All Questions
Tagged with python texture-painting
30
questions
0
votes
0
answers
20
views
Ray_casting from curve origins doesn't hit any part of the mesh
The terminal prints none, which I guess means the raycast is not hitting anything. To replicate this output. Run the script and navigate to its sidebar in the viewport, select the two nerve curves and ...
0
votes
1
answer
42
views
Is there a way to change the active texture in texture paint mode using Python?
Is there a way to access the variable that is responsible for the active texture of a certain material for texture painting and change it?
It is better to use the image variable itself and not an ...
0
votes
1
answer
32
views
How can I add custom section panel to the Texture Paint Properties?
I’m trying to add custom panel to the Texture Paint tools on the Properties tab, it’s suppoesd to be a simple task, but from some reason it’s doesn’t really work.
I think the problem is on the ...
1
vote
0
answers
73
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 (...
1
vote
1
answer
98
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 ...
0
votes
1
answer
136
views
Issues with using painting tools via python script
I am trying to apply colour to an object with a python script. I have found several other posts that were also struggling with this. However, their solutions didn’t fix my problem. Drawing on the ...
0
votes
1
answer
102
views
Scripting which image is active in Single Image Paint mode?
i'm doing some scripting with the texture paint mode, basically calling bpy.ops.paint.project_image on multiple layers. It's working fine, except I can't figure out ...
4
votes
1
answer
555
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 ...
3
votes
1
answer
902
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.
...
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 ...
2
votes
0
answers
229
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 ...
3
votes
0
answers
601
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:
...
0
votes
1
answer
440
views
Fill a UDIM tile with python API
I'm working on an addon that requires me to generate and fill UDIM tiles in a texture with the python API, however I am stuck at the point of filling the tile.
The following code creates a new tiled ...
1
vote
1
answer
274
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 ...
0
votes
1
answer
54
views
How can a cube/ a group of cubes be painted?
Setup : Blender 2.82
I want to achieve something similar to what was represented below but through a python script.
If each cube here represents a pixel, what is the fastest way to change its color ...