Skip to main content

All Questions

7 votes
1 answer
1k views

Is there a way to save strokes while painting/sculpting?

While painting or sculpting, user draws strokes. Is there a way with python to save those (with brush parameters and pressure data) and then play them back slowly also with python? Point is to ...
matali's user avatar
  • 2,811
4 votes
1 answer
256 views

Save Edited (Texture Paint) Image Sequence

I load an image texture (of 3 frames) as a material node. I draw on all (3) frames in texture paint mode. I want to save all modified images at once, preferably with python. How can I save all images ...
Leander's user avatar
  • 27.3k
4 votes
1 answer
559 views

Blender 3 scripting: texture drawing

How do I instantiate objects in Blender 3? I am trying to programmatically draw on a mesh's texture. According to the docs, the function to call is ...
user2971878's user avatar
3 votes
1 answer
907 views

Extract Palette from image - how to define the number of colors?

Image editor allows you to extract a palette via Image-->extract Palette. Is there a way to set the number of color the image gets reduced to? Python gives you a threshold value at least. ...
Tortenrandband's user avatar
3 votes
1 answer
408 views

How to draw text and shapes to a Texture?

Using Python I'm trying to generate a texture with a few lines and text. I've got a proof of concept using Pillow and a function to convert from PIL Image to Blender Image, but I would like to avoid ...
George Profenza's user avatar
3 votes
0 answers
603 views

Texture Painting in Blender with Python script

I can Sculpt using Python but am having trouble getting Texture Painting to work. Here is a working example of Sculpting: ...
Jake's user avatar
  • 31
3 votes
0 answers
161 views

Exporting current frame from the Movie Clip Editor

I'm making some Camera Projection mapping in Blender. The issue I have is that when I Paint my projections using the clone method (with multiple UV maps from view). It's working great except that I ...
melMass's user avatar
  • 444
2 votes
0 answers
231 views

Stencil Texture : How to align it exaclty to the camera region by code?

I'm doing texture mapping with tracked stencil video texture. The probleme is that I cannot place the stencil exatly at the size of the camera vieport/region when looking from the camera. I have tried ...
ISCREAM kevin deguisne 's user avatar
2 votes
2 answers
495 views

Unable to paint texture

I referenced this tutorial to paint textures using bpy. I just replaced the Cube object with my mesh object loaded from an obj file. Rather than using all the textures I just used one of them (in code ...
user3159395's user avatar
1 vote
1 answer
276 views

Fill image problem with generated_color in python, into paint workflow

After creating a new image,i know that D.images['my_image'].generated_color = (1,1,1,1) It makes the image all white, in short, it fills it ...
Noob Cat's user avatar
  • 1,269
1 vote
1 answer
1k views

How to get name of image corresponding to active paint slot?

I understand that I can get the paint_active_slot for the active object, and that returns a number that corresponds to the position of the texture in the slot panel and in the texture panel. ...
Craig D Jones's user avatar
1 vote
1 answer
615 views

Incorrect Context bpy.ops.paint.image_paint(mode='NORMAL', stroke=None)

can somebody help me figuring out what the correct context of the image_paint operator is? I thought it needed to be the VIEW_3D Area with ...
John's user avatar
  • 11
1 vote
0 answers
74 views

How can I Use 2D Texture Paint in 3D View (Python)?

The 3D Fill tool fills the entire texture, while the 2D one respects different values within the image (only fills clicked sections). As a workaround I need to split the window and open Image Editor (...
nytemairqt's user avatar
1 vote
1 answer
99 views

Texture Paint a straight Line using Python

Refactoring this post to simplify the request: I need to draw a straight line/continuous Stroke in Python with Texture Paint. Unfortunately it is currently only placing a single dot at either end of ...
nytemairqt's user avatar
1 vote
0 answers
210 views

Modal not running when painting

I'm working on a feature which needs to be a modal that runs when you're painting a stroke. It then needs to repeat that stroke again. For this I'm trying to store the coordinates of the mouse when ...
Joshua Knauber's user avatar

15 30 50 per page