Add-ons loading order
When Blender starts, all active add-ons are loaded sequentially, one after the other. Which add-on will be loaded first is determined by its order in the “bpy.context.preferences.addons” list.
When Blender starts, all active add-ons are loaded sequentially, one after the other. Which add-on will be loaded first is determined by its order in the “bpy.context.preferences.addons” list.
The Lattice modifier is used to simplify the process of deforming high-poly meshes using simple wireframe objects with a few points – lattice. The lattice is superimposed on the mesh and associated with it, after which, by manipulating its point, we can deform the mesh itself. We can access the coordinates of the lattice points with the Blender Python API through its “points” property.
In Blender, we can add custom items to any context menu, called by pressing the right mouse button, to quickly execute the necessary operators.
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 »
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.
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 »
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.
When writing add-ons for Blender, it is important to place UI elements – buttons, fields, switches, etc., so that the user can easily find them and have convenient access to them. Blender provides to add-on developers the following areas to place their custom UI:
In the Blender Python API, a collection does not have a direct pointer to its parent collection. However, we can get the parent collection by searching through the list of children of each collection in the scene until we find the current one.
When creating custom properties, the values of which the user can choose from a list, it is often necessary to filter the list of values offered for selection. We can use the poll function to shorten the proposed list of values by removing unwanted elements.
Filtering values available for selection through the UILayout.prop()Read More »