7
votes
Accepted
Indent Guideline in Text Editor
An addon is doing that.
You can find it here. It seems to work well in 4.0.
4
votes
Accepted
`ValueError: 1-2 args execution context is supported` on call to `bpy.ops.outliner.show_hierarchy` in Blender 4.0.1
Blender dev team added a new API for overriding context some time ago:
https://docs.blender.org/api/current/bpy.ops.html#overriding-context
Overriding context should be implemented this way, context ...
3
votes
Accepted
Connect multiple vertex pairs
An operator that can handle this kind of cases:
The code checks:
if we have an even number of vertices selected
if they share one face
If one of these conditions is not respected, it will do ...
2
votes
Accepted
How to get what a node group's name is inside a material?
Gorgious has just posted an answer that will simplify your life, here.
As you can:
dict_of_group_to_users = bpy.data.user_map(subset=bpy.data.node_groups)
But for ...
2
votes
Accepted
What Blender type should be used for custom list of objects?
You would use a bpy.props.CollectionProperty(type=MyNewObject, name="Insert Name Here"). The type parameter should match your class name. You can check ...
1
vote
How to Set Selected Edge Bevel Weight in Blender 4.0
Add a bevel and look in the attributes tab for the mesh
You can access it by:
bpy.context.active_object.data.attributes['bevel_weight_edge'].data[1].value
or write ...
1
vote
where is stored the data of the projects?
The "data" of an object can be accessed from Python in several ways, but the most direct way to access the vertices coordinates of the active object is with:
...
1
vote
Where is my script?
If you don't save it in a separate file, try searching in the datablock selector:
1
vote
How to display progress notifications from an Operator?
Here's a minimal working example that displays a progress bar filling in the UI. I used a modal operator and a timer but it can be driven by any property. You'll need Version 4.0 and bpy.types....
1
vote
Accepted
Low level fast way to create cube
This is one way to do it without having to depend on bpy.ops.
...
1
vote
How can I render text above mesh in Blender 3.6 with Python Script?
I made this using geometry nodes, so this isn't a python solution. But it works. It uses a vertex group as input and displays the length of the selection.
Note that you'll have to use a curve to mesh ...
1
vote
Accepted
Drawing a circle that faces towards the view with GPU/BGL?
Use gpu.matrix.multiply_matrix to multiply the matrix before drawing
Press F7 in the viewport to run the modal
...
1
vote
Only top scored, non community-wiki answers of a minimum length are eligible
Related Tags
scripting × 6263python × 4669
add-on × 652
mesh × 326
animation × 322
interface × 322
rendering × 243
objects × 243
game-engine × 200
materials × 192
node-editor × 186
operator × 186
properties × 175
modeling × 161
modifiers × 161
transforms × 144
export × 140
import × 130
bmesh × 127
drivers × 120
3d-view × 115
uv × 106
armature × 102
camera × 101
command-line × 101