BPY plus

BPY plus – a set of modules to extend the Blender Python API.

BPY plus is an Open Source project based on Blender API and extending it with several new features and making it easier to use some of “bpy” functions.

Your Patreon support helps the project developing and extending with new modules and classes.

You can use BPY plus in your add-ons and scripts in any way for free.

BPY plus modules
  • about – a module with information about BPY plus itself
  • bounding – a module for working with bounding objects
  • transform – a module for working with 3D objects transformations
  • objects – a module to simplify work with 3D objects.
Usage example

The “bpy_plus” package must be placed in the same directory as the project in which it will be used. Copy “bpy_plus” to your project directory. Now you can import “bpy_plus” modules as usual:

and then use the required functionality.

For example, let’s find the bounding sphere around selected objects.

Import the “Bounding” class from the “bounding” module:

Now we can calculate the bounding sphere around the selected objects using the “sphere” method:

This method returns the location and radius of the bounding sphere. Let’s add an empty with the type of sphere to the scene and set the resulting location and radius to it, to display the bounding sphere we found:

The result:

Final code:

Current version

1.0.0.

For Blender

2.91

Version history

1.0.0.

  • This release.
Nikita

Author: Nikita

Blender add-ons developer and articles writer.