Questions tagged [scripting]
Questions concerning scripting in Blender using the Python programming language. Also use this tag for questions about scripting in OSL (Open Shading Language).
6,449
questions
0
votes
1
answer
46
views
code that works in blender 3.5 but not as expected in blender 4.1
premise
The code below is intended to duplicate an object and change the vertex color of the duplicated object.
Select the object called "ic" and run it.
Ultimately, I want to change the ...
1
vote
1
answer
32
views
AttributeError: 'NoneType' object has no attribute 'modifiers'
So I've been trying to add Geo Nodes modifier to a created cube through custom UI panel, even though it works as intended, Blender shows me AttributeError. How can I fix this? (I'm new to coding so ...
3
votes
1
answer
48
views
How to hide/unhide objects in a particular ViewLayer?
I am trying to hide/unhide objects in a particular ViewLayer but it's hiding in the current view layer only.
...
0
votes
0
answers
32
views
How can I prevent operator from blocking Blender Interactions during execution?
I'm new to Blender Python programming, and for a personal project, I'm experimenting with creating a Blender Python addon. I aim to execute an asynchronous GET request when I select a button in a ...
1
vote
1
answer
46
views
Scene optimization on a material level?
How can I properly optimize a scene at a material level? For example. I have 2 different versions of the same rock texture in different resolutions, 1k for the background and 8k for the foreground. ...
0
votes
0
answers
27
views
How can I add a FloatVectorProperty to my addon layout? [duplicate]
How to properly register a FloatVectorProperty? When I do:
box.prop(self, "amb_day_color")
where ...
1
vote
1
answer
70
views
How to select only deformation bones?
Is there a way to select all bones from the vertex group of the mesh?
I have too many overlapping bones that are very tedious to work and some are non-deformer which I wanted to hide and only work ...
1
vote
1
answer
50
views
Can Particle System caches be accessed directly by Geometry Nodes?
My goal is to instantiate objects on the points of a particle system.
Right now, my workflow is:
tweak the parameters of the particle system
export it as an Alembic cache (point cloud?)
import it ...
2
votes
2
answers
23
views
How to read and change value of edge crease in blender 4 via python script (MeshEdge.crease property has been removed)
as MeshEdge.crease property has been removed in blender 4, how can I check and change the value of an edge crease ?
I used to do this to check edge crease value and set it to 1 if the value was over 0....
2
votes
1
answer
28
views
Python: canvas-flip action is merged with the next user action in undo history
I wrote a simple add-on to enable canvas flipping in Blender (for Grease Pencil) with a hotkey, as well as a menu button. All it does is multiply the camera's local X scale by -1:
...
0
votes
0
answers
22
views
Is it possible to make a script or GeoNod so that all the empties become children of the vertex where vertex and the same coordinates with empties?
Is it possible to make a script so that all the empties become children of the vertex where vertex and the same coordinates with empties? Its not Hook - need vertex are parenting for Empty.
Whether ...
0
votes
0
answers
6
views
Alternative to create non-object elements like gizoms
I want to create a dimension like in autocad. So there is the dimension object which is visible and two small points which only appear when I want to edit my dimension. How to create your little ...
0
votes
0
answers
25
views
How to customize a cube-shaped gizmo
I'm interested in gizmos. I saw that it was possible to create a custom gizmo, as shown in the gizmo_custom_geometry.py template. I want to try making a cube shaped gizmo. However, this does not ...
1
vote
1
answer
27
views
Is it possible to toggle Blender's built-in Boolean command state temporarily by pushing keyboard shortcut?
Is there any way to toggle blender's Boolean command state while pushing keyboard shortcut? I always enable weight paint tool's Restrict mode but sometimes I need to disable it. I would like to ...
4
votes
1
answer
121
views
How can I expose Geometry Nodes properties in my addon panel?
I came across this question and learned that I can actually expose properties from the Blender UI in my addon panel. So I was experimenting on exposing properties of modifiers like for example the ...