API

Changing the volume of selected audio strips in Blender VSE

To set the desired volume for multiple audio strips at once in Blender VSE, select them, then in the Properties panel, in the Strip tab, in the Sound section, type the desired number in the Volume field, hold down the Alt key, and press Enter. Holding the Alt key changes the volume for all selected strips; if we don’t hold it down, the volume will only change for the currently active strip. We can also change the volume for all selected audio strips at once using the Blender Python API.

Automatically muting strips added to Blender VSE

When creating videos in Blender VSE, it’s often necessary to separately create a silent video sequence and only then overlay separately prepared audio tracks onto the edited video stream. However, when adding a video strip to VSE, it is added along with its audio track, with the audio also connected to the video. Separating the audio and video tracks is not difficult, but it takes time. Let’s write a small script that will automatically detach the audio from the video in a strip added to VSE and completely delete the original audio track.

Quickly adding a mirror modifier to a mesh in Blender

Using the Mirror modifier greatly simplifies the modeling process on symmetrical objects. To properly optimize a mesh for use with this modifier, we should always delete the part of the mesh that will be mirrored; otherwise, we’ll immediately end up with duplicate geometry, which will lead to problems with further editing and shading. This geometry cleanup process can be optimized with a simple script that automatically removes unnecessary points and adds the modifier to the mesh.

Blender add-on development – manifest file

Starting with Blender 4.5, the developers fundamentally changed the approach to developing Blender add-ons. Now – Extensions, rather than Add-ons. The old add-on format still works correctly, and if you don’t intend to publish your add-ons in the official Blender Extensions library, you don’t need to change anything. However, if you want your add-ons to be supported by Blender in the future, it’s a good idea to make some changes now. One such improvement is the creation of a manifest file.

Changes in node tree creation for compositor in Blender 5.0

In Blender 4.5 and earlier, the compositor only supported one node tree per scene. To initialize it in the compositor, we had to on the “Use Nodes” checkbox in the area header. The node tree was created automatically and immediately connected to the scene. Starting with Blender 5.0, the developers introduced the ability to create multiple node tree variants for the compositor. The method for creating node trees in the compositor has also changed.

Getting an on-screen bounding box for an object in Blender

For calculating simplified interactions between objects, bounding boxes are typically used—parallelepipeds whose volume completely encloses the entire mesh geometry. Because such a box has and uses only six points for calculations, unlike the mesh itself, which can have millions of points, all calculations are very fast. Every object has a built-in bounding box, and its display can be enabled in the mesh’s parameters. This bounding box operates in 3D scene space, but there could be some cases when we need to control object interactions in 2D screen space. There are no pre-calculated bounding boxes for the viewport, but we can get one ourselves using the Blender Python API.