What is PyClone
PyClone is an Add-on for Blender that helps developers create parametric assets, and allows users to register asset libraries.
Since Blender doesn’t currently support drag and drop PyClone is also a custom build of Blender. The custom build can be download here.
How to Install
Below is a link with the a Build of Blender 2.83 for Windows and all of the add-ons included.
If you need to build Blender for a different operating system you can use the Source Code link below.
This build is compiled with the official Blender 2.83 LTS code
This download includes Blender, the PyClone Add-on, and the asset libraries listed below.
PyClone is still in development but there are a few example libraries that are available.
The Toybox Asset Library
This library allows users to maintain their own Blender Assets. Currently this library supports Object, Collections, Materials, and Worlds. This is currently in development, but is a good starting point for anyone who wants to maintain their own Blender Assets.
The Home Builder Library
This library helps users with architecture an interior design. This is currently in development. You can find the repository here.
Developing New PyClone Libraries
Developing PyClone Asset Libraries is very similar to developing an add-on for Blender. There are only a few lines of code that you need to register a library.
from .pc_lib import pc_utils pc_utils.register_library(name="Library Name", activate_id='library.activate', drop_id='library.drop', icon='ICON_NAME')
name – The name of the library.
activate_id – Blender Operator. This is called when the library is activated.
drop_id – Blender Operator. This is called when an item is dropped onto the 3D Viewport.
icon – Name of icon to display in the library. This currently needs to be one of Blenders default icons. There is an Add-on that ships with Blender called “Icon Viewer” that will allow you to see all of the available icons.
If you are creating a new library it is recommended that you review the Toy Box and Home Builder Library first.
Once you have an understanding of how those work then you can use the starter library as a staring point for your library.
There are several improvements that I would like to make to PyClone. Some of them I am not sure where to start. Hopefully Blenders Development team can assist, or at least point me in the right direction.
- New editor space – Create a new sub type of the file browser to store assets.
- Better way of loading asset previews – We need a way to load assets into the asset manager region. Currently I just display a directory from your hard drive. This can work in a similar way to bpy.utils.preview, but it would be nice if it could load previews faster. https://docs.blender.org/api/2.83/bpy.utils.previews.html
- Better way of navigating assets – This will mainly be developed in each asset library. Once we have a way of loading custom previews then we can determine what should be displayed by using search fields, tag system, and filters.
- Automate thumbnail previews – Blender creates a preview of the blend file, but no previews are generated for ID types (objects, collections, materials, worlds). It would be nice if Blender can automatically do this in the background.
- Better way of saving multiple assets – This will mainly be developed in each asset library. I have several ideas of how this can be done for the ToyBox Library. I just need more time to develop the functionality.
- Move some python code to blenders source code – I created a repository of some of the code that I would like to move to Blenders source. https://github.com/CreativeDesigner3D/Blender_Asset_Manager_Prototype
Hopefully PyClone, or something similar, will be added to blender in an upcoming release.
I will maintain this build until Blenders official asset manager is available.
If you have comments feel free to leave them below.
I also created a forum post on Blenders DevTalk site to discuss ideas on how to move forward.