Categorising selections of objects within scenes is crucial for various digital content workflows. Blender gives us access to the Collection type through its Python API but lacks in tools (code and non-code) for grouping objects by common properties and metadata. This extension draws inspiration from Pattern-Based Collections for OpenUSD and is built on top of existing standards like RegEx and the JSON format to enable configuration and layering of precise sorting rules for collections in Blender.
Configure, test and reiterate on your collection patterns from the Blender interface
Export and reuse your collection patterns for future projects
# Assumes you have an active collection
# Reads the json file
bpy.ops.scene.pattern_collection_import(filepath="")
bpy.ops.scene.pattern_collection_sort() # Sorts the collection
The extension has the potential of sorting 1K objects in less than one second. I'm continuously searching for more optimisations; however most of the time sorting is spent on unlinking/linking of objects and cannot be parallelised.
Define your working structure once and let objects be categorised as you create
This extension requests the following permission:
Import/export FBX from/to disk to provide JSON File I/O
This was definitely planned at some point but must have gotten lost in my thoughts! I will update the add-on this or the following week to add modifier sorting categories as I see this potentially being very beneficial to some workflows! 👍
A very useful addon that greatly simplifies the work. Do you plan to add "Included Modifiers" in the future? Thank you.