Scaling images and environment maps in Blender
With the Blender Python API we can very easily resize images, both common and .hdr or .exr environment maps. Any image loaded to Blender can be resized with the scale function.
With the Blender Python API we can very easily resize images, both common and .hdr or .exr environment maps. Any image loaded to Blender can be resized with the scale function.
We can programmatically add various types of strips – video, audio, images, and image sequences to the Video Sequence Editor with the Blender Python API.
Adding strips to the Blender Video Sequencer EditorRead More »
When we specifying the full path to save the rendered animation, we must correctly set the file extension, which will change depending on the codec chosen for packing animation.
The output file extension for animation with the Blender Python APIRead More »
Pressing the “Purge” button cleans the current open scene – removes all unused objects from it (mesh, nodes, materials, textures, etc.). However, this button is located very inconveniently, in the Outliner header and is visible only in the “Orphan Data” Outliner mode. For quick access to this button we can move it to the header of the 3D Viewport.
Adding the “Purge” button to the 3D Viewport header in BlenderRead More »
When we need to add several different objects to the scene, and at the same time, each object should appear in the scene with a greater or lesser probability, we can use the “random.choice” method for generating random sets from the Python “numpy” module.
Creating an operator in the Blender Python API, its description is usually specified in its “bl_description” parameter. However, quite often the same operator performs different actions in different cases, and a constant description does not describe all its capabilities. In this case, a dynamic description can be given to an operator.
One of the common tasks when making a scene in Blender is to control the overlapping of meshes. We can check whether two meshes intersect with each other using the technology of Bounding Volumes.
There is no single selection list for collections. We can open the Outliner in two different Blender areas, and select a different set of collections in each of them. Since the list of selected collections is different for each Outliner area, it can only be obtained through the context of this area.
Blender macros differs from Blender operators – they don’t require a predefined “execute” function with constant actions. In macros actions are added after its registration using the “define” method.
BPY plus project updated to v. 1.6.0.