Skip to main content
Share Your Experience: Take the 2024 Developer Survey
6 votes
Accepted

How can I get the `session_uid` used by the Bake geometry node using Python?

You can get this id from the object: bpy.context.active_object.id_data.session_uid
Harry McKenzie's user avatar
5 votes
Accepted

How can I select all edges that form part of a square without a face via python?

I found a solution. First I select all the edges that have only 1 face linked to them and then check that all of the vertices have exactly 4 edges linked to them: ...
Megan Love's user avatar
4 votes
Accepted

How can I remove a point of junction and reconnect 2 meshes via python?

Angle based method There is a n-panel button you can test it. ...
X Y's user avatar
  • 5,813
4 votes
Accepted

How can I expose Geometry Nodes properties in my addon panel?

...
X Y's user avatar
  • 5,813
3 votes
Accepted

How can I pass an object (like a bmesh) to an operator or should I not do that?

Blender operator designed for shortcuts, and not all variable types can be passed. Avoid running bpy.ops inside bpy.ops. Here's ...
X Y's user avatar
  • 5,813
3 votes
Accepted

How to hide/unhide objects in a particular ViewLayer?

You have to specify in which view layer you want to hide the object using obj.hide_set(not obj.hide_get(view_layer=view_layer), view_layer=view_layer). Change the <...
Harry McKenzie's user avatar
2 votes
Accepted

Some operators don't appear in operator search F3 despite being Registered and Developer Extras enabled

Upon investigation, I identified the root cause of the issue with the test operator. It appears that I neglected to adjust the return value to True within the poll function. This oversight resulted in ...
Megan Love's user avatar
2 votes

How to read and change value of edge crease in blender 4 via python script (MeshEdge.crease property has been removed)

You can edit the attribute in edit mode but you have to use bmesh : ...
Gorgious's user avatar
  • 31.2k
2 votes

How to read and change value of edge crease in blender 4 via python script (MeshEdge.crease property has been removed)

It seems to have moved to an attribute called "crease_edge", but the data only seems to be valid in Object Mode. ...
Ron Jensen's user avatar
  • 3,481
2 votes

Scene optimization on a material level?

Take everything I say with a grain of salt as there is no clear documentation on how Blender handles this all, but if I am not wrong: Blender does MIP Mapping, it should generate and use lower ...
Lauloque's user avatar
  • 16.4k
2 votes
Accepted

AttributeError: 'NoneType' object has no attribute 'modifiers'

Because context.active_object might be a camera or light, which doesn't have modifiers. you need to check if context.object is ...
Karan's user avatar
  • 2,256
2 votes

How can I select all edges that form part of a square without a face via python?

How to find a hold with only 4 edges ...
X Y's user avatar
  • 5,813
2 votes
Accepted

How to Align Icon to the Right in Blender Panel Header using python?

use draw_header_preset() https://docs.blender.org/api/current/bpy.types.Panel.html#bpy.types.Panel.draw_header_preset ...
Karan's user avatar
  • 2,256
1 vote
Accepted

Python way to setup the Menu Switch default value when exposed to the modifiers input

I figure it out. The options are indexed, so giving the index value to change the value instead of the string. ...
baby boss's user avatar
  • 125
1 vote
Accepted

Is there a way to create a colored text box for StringProperty in addon UI, like the overwrite warning in Blender save-as window?

use layout.alert = True learn more https://docs.blender.org/api/current/bpy.types.UILayout.html#bpy.types.UILayout.alert
Karan's user avatar
  • 2,256
1 vote
Accepted

ENUM_FLAG EnumProperty OverflowError when trying to use 1 << 31 as a flag value

Python ints are unbound but C ints (or in this case C long) are bound to 2^31 - 1 = 2 147 483 647. That means you can only have 30 different flag enum values in a ...
Gorgious's user avatar
  • 31.2k
1 vote
Accepted

Can Particle System caches be accessed directly by Geometry Nodes?

Animation nodes has particles nodes, with which you can read the particle data like locations. With the object instancer you duplicate objects and with the object transform output node you can set ...
Chris's user avatar
  • 61.7k
1 vote
Accepted

Python: canvas-flip action is merged with the next user action in undo history

That is because you did not register your operator to be included into the UNDO history. You can do that by adding bl_options = {'REGISTER', 'UNDO'} ...
Harry McKenzie's user avatar
1 vote
Accepted

Is it possible to toggle Blender's built-in Boolean command state temporarily by pushing keyboard shortcut?

You may consider assign both keymap to a operator Since you cannot execute another operator when the built-in operator modal is running, it will fail in some cases, Success disable and enable: Hold <...
X Y's user avatar
  • 5,813
1 vote

How can I remove a point of junction and reconnect 2 meshes via python?

Assuming that you're doing 2D, verts with no intersections other than that junction, this might cut it. ...
jupiterbjy's user avatar
1 vote

Adding Smooth by Angle to an object with python

I managed to find a way to accomplish what I wanted with bpy.ops.object.modifier_add_node_group. ...
Radiant2024's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible