2.92

How to apply transformations to a mesh with the Blender Python API

To apply all transformations to an object, all its vertices must be multiplied by its global matrix, the matrix itself must be made identity.

To apply all transformations to the active mesh, we need to execute the following:

How to find which collection contains the desired object

If the object you need is located in a hidden collection, it can be difficult to find it in large scenes.

To find out in which collection the desired object is located by its type, we need to execute the following. For example for cameras:

This code will return a list of cameras and collections in which they are located.

Context override

Some Blender operators can only be called from the workspace for which they are intended.

If you call from the Python console, for example, an operator intended only for working in the 3D Viewport area, the operator will not be executed:

or it will fail with an error message about the incorrect context:

However, we can still execute operators from a non-native working area. To do this, we can pass the first implicit parameter to any operator – a pointer to the context of the area in which this operator should be executed. This parameter commonly named the “overridden context”.

How to change current tool through the Blender Python API

To switch the active tool from the T-panel in the 3D viewport window, we need to call the appropriate operator and pass the “idname” of the required tool in its “name” parameter.

For example, to enable the “Select Circle” selection toll, we need to call:

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:

After executing this code, the first bone of the “Armature.001” will be moved to the position of the first bone of the “Armature”.

BMusic Player

BMusic Player

Are you crazy about music? Music can change the mood and talk to you. Listening to music is a favorite hobby and entertainment for most people.

Here is an addon that does the job for you. ‘BMusic Player’ is an addon that takes all the music to one place inside Blender. Plays almost any format like mp3, wav, FLAC, M4A, aac etc. In addition to it, there will be detailed documentation about the addon and you can check it here.

BMusic Player v1.0.1 (Initial Release)

Key Features:

  • Custom icon set.
  • Popup music player.
  • Custom shortcut key.
  • Supports almost any formats like mp3, mp4, wav, M4A, aac, FLAC etc.

BMusic Player v1.0.2

Planned Features:

  • Sleep timer.
  • Personal playlist option.
  • Change the playback speed.
  • Multiple key mapping.
  • Default music folder.

pre-order before 25th evening to get 25% discount use coupon code birthday

Finally feel the music…!