Blender 3D
Appending objects into the scene by name from an external blend file
In order to append the necessary meshes into the scene by name from an external blend file, we can use the wm.append operator or use the BlendDataLibraries mechanism.
Appending objects into the scene by name from an external blend fileRead More »
Inverting 1 to 0 and back with nodes
In order to make an inversion of the boolean value: invert 1 to 0 and 0 back to 1, we only need to use two Math nodes in the Blender node editor.
Transferring the local coordinate system from one object to another
We can quickly transfer the local coordinate system from one object to another by joining and next separating them, or by performing the “Align to Transform Orientation” operation with the “Affect only Origins” option turned on.
Transferring the local coordinate system from one object to anotherRead More »
Selecting objects in a collection
To select all objects in a collection with the Blender Python API, we need to walk through the list of these objects and call the “select_set” method for each of them, specifying the “True” value in the parameter.
Turning off the Load UI option by default
Blender is developing intensively and new versions of the program are released quite quickly. In this case, compatibility often suffers – when we open a project created in earlier versions of Blender, it can be opened not correctly. Sometimes this happens because Blender stores all user interface (UI) settings and options in every .blend file. Opening a project with the Load UI option unchecked can help.
In this case, Blender only loads the project itself, without any UI settings that may have changed in the current version.
Tracking when the user switching between object and edit mode
It is impossible to track the switching between object and edit mode by the user with common handlers in Blender, there are no handlers for such event type in the bpy.app.handlers. However, this can be tracked through the Message Bus.
Tracking when the user switching between object and edit modeRead More »
Proper use of foreach_set
foreach_set is a convenient wrapper in the Blender Python API for quickly setting the desired value for each element of the bpy_prop_collection type. However, when using this function, script developers sometimes run into an error.
Making spring by Blender Geometry Nodes
To make a spring with Geometry Nodes in Blender, all we need to do is use some vector math. Taking a straight line as a basis, we can move its points in accordance with the circle equation so that in the end they form a spring.