Blender
How to import a Python module by the absolute path
Modules used in Blender scripts and add-ons are located in the same directory as the script or add-on, or in the Blender installation directory by the “blender_version\python\lib\” path. However, it is possible to load a module located elsewhere on the hard drive.
To do this, we need to load the module by its absolute path.
How to import a Python module by the absolute pathRead More »
Blender 2.83.15 LTS release
The Blender 2.83.15 LTS release is enabled for downloading on the official Blender site.
How to link a mesh to an armature bone with maintaining its current position
To link a mesh to an armature bone that the mesh retains its current position through the Blender Python API, we need to execute the following code:
How to link a mesh to an armature bone with maintaining its current positionRead More »
Blender add-on “Accurate Region Border” v. 1.1.1.
Blender add-on “Accurate Region Border” updated to v. 1.1.1.
- Changed sliders names for more convenience
- Added confirmation for pressing “To All Scenes” button
How to align an armature bone to a bone from another armature
To accurately align the bone of one armature with the bone of another armature, we need to correlate the global armature matrices and the local pose-bone matrices.
To do this, we need to execute the following:
1 2 3 4 5 6 7 |
import bpy armature_to = bpy.data.objects['Armature'] armature_from = bpy.data.objects['Armature.001'] armature_from.matrix_world = armature_to.matrix_world armature_from.pose.bones[0].matrix = armature_to.pose.bones[0].matrix |
After executing this code, the first bone of the “Armature.001” will be moved to the position of the first bone of the “Armature”.
Blender 2.83.14 LTS release
The Blender 2.83.14 LTS release is enabled for downloading on the official Blender site.
How to calculate the Bounding Sphere for selected objects
Most often, for quick simplified calculations with the object’s geometry, their Bounding Boxes are used – the minimum parallelepiped into which this object is inscribed. But sometimes the Bounding Sphere – the minimum sphere into which an object can be inscribed – can provide greater accuracy and simplify the calculations. While the location and size of the object’s Bounding Box is available in Blender at once, the Bounding Sphere we need to calculate manually
Let’s write a function that, based on the object list, returns the coordinates of the center of their Bounding Sphere and its radius.
How to calculate the Bounding Sphere for selected objectsRead More »