Skip to content

somjitking/quick-selection-sets

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Quick Selection Sets

A Blender add-on that lets animators save and recall controller / pose-bone selection sets that persist inside the .blend file — survive closing, reopening, and sharing the scene.

  • Author / Owner: Somjit Purkait
  • Blender: 4.4.0 and newer (tested through 4.5)
  • Category: Animation
  • License: MIT

Why this add-on

Blender's built-in Bone Collections and the old Selection Sets add-on only cover bones inside a single armature. Riggers, animators, and layout artists often need lightweight, named groups that:

  • Mix objects (props, controllers in multiple armatures, cameras) or pose bones
  • Survive file reloads without any extra action
  • Can be shared across files via a simple JSON export/import

Quick Selection Sets does exactly that.


Features

  • Save the current selection (objects or pose bones) as a named set
  • One-click load with modifier support:
    • Click → replace the current selection
    • Shift-click → extend the current selection
    • Ctrl-click → deselect the set from the current selection
  • Update a set in place from the current selection
  • Add to / Remove from a set with the current selection
  • Toggle visibility of every item in a set (hide_set for objects, bone.hide for bones)
  • Rename, reorder, delete (with confirm), undoable via Ctrl-Z
  • Import / Export all sets to JSON for sharing across files or rigs
  • Pose sets are namespaced per-armature and can be filtered to the active armature
  • Auto-switches to Pose Mode on the correct armature when loading a pose set
  • Item counts shown in every row

Install

  1. Download quick_selection_sets.py from this repo (or clone it).
  2. In Blender: Edit → Preferences → Add-ons → Install from Disk… (the legacy Install button also works).
  3. Pick quick_selection_sets.py.
  4. Enable Quick Selection Sets in the add-ons list.
  5. The panel appears in the 3D Viewport N-panel → QuickSelect tab.

Blender 4.2+ treats legacy add-ons and extensions differently. This add-on still ships as a classic single-file .py with bl_info, which Blender 4.4 continues to support via Install from Disk.


Usage

Creating a set

  1. Select the objects you want (Object Mode) or the pose bones you want (Pose Mode on an armature).
  2. In the QuickSelect panel, type a name and click Save.
  3. The set is stored on the current scene and written to the .blend on the next save.

Loading a set

  • Click the set name to select its members (replaces current selection).
  • Shift-click to extend; Ctrl-click to deselect those members.
  • If it's a pose set and you're not in Pose Mode on that armature, the add-on switches automatically.

Editing a set

Icon Action
🔄 (file refresh) Overwrite with current selection
Add current selection to set
Remove current selection from set
👁 Toggle visibility of all members
✏️ Rename set
Delete set (confirm)
▲ / ▼ Reorder

Import / Export

Use the Export / Import buttons at the bottom of the panel to share sets as JSON. On import, name-matched sets are replaced (toggleable).


Persistence architecture

This is the core fix relative to the v1 prototype, which stored data in module-level Python dictionaries and therefore lost every set on file reload.

Where the data lives

All sets live on Scene.quicksel_props, a PointerProperty to a PropertyGroup hierarchy:

Scene
└── quicksel_props : QUICKSEL_SceneProps
    ├── sets : CollectionProperty[QUICKSEL_Set]
    │   └── QUICKSEL_Set
    │       ├── name            : StringProperty
    │       ├── set_type        : StringProperty   # 'OBJECT' | 'POSE'
    │       ├── armature_name   : StringProperty   # owner armature for POSE sets
    │       ├── visible         : BoolProperty
    │       ├── note            : StringProperty
    │       └── items           : CollectionProperty[QUICKSEL_ItemName]
    │                               └── name : StringProperty
    ├── active_index            : IntProperty
    ├── new_set_name            : StringProperty
    └── filter_by_armature      : BoolProperty

Why this persists

Blender serializes every PropertyGroup attached to an ID-block (Scene, Object, Collection, …) directly into the .blend file as part of its DNA / RNA data. No file I/O, no handlers, no external storage required. The add-on only needs to register the PropertyGroup classes at startup for Blender to re-hydrate them on load.

That means:

  • File save / reopen → preserved (DNA write/read)
  • Blender restart → preserved (same)
  • Append / Link the scene into another file → sets travel with the scene
  • Disable / re-enable the add-on → as long as the classes are registered, data is intact

Why items are stored by name (not PointerProperty)

Pose bones aren't ID-blocks, so they can't be stored as a pointer. For consistency, object members are also stored by name. The trade-off is that renaming a member breaks its membership — acceptable, and easier to share across files. Resolution happens at select-time via bpy.data.objects.get(name) and armature.pose.bones.get(name), which also handles missing references gracefully (a deleted object just skips, the remaining members still load).

Namespacing for pose sets

Two different armatures can have a set named FK_Arms without collision, because pose sets are matched by (name, set_type='POSE', armature_name). The panel optionally filters pose sets to the active armature for a cleaner UI during animation.

Registration flow

def register():
    for cls in classes:
        bpy.utils.register_class(cls)
    bpy.types.Scene.quicksel_props = PointerProperty(type=QUICKSEL_SceneProps)

def unregister():
    if hasattr(bpy.types.Scene, "quicksel_props"):
        del bpy.types.Scene.quicksel_props
    for cls in reversed(classes):
        try:
            bpy.utils.unregister_class(cls)
        except RuntimeError:
            pass
  • PointerProperty must be assigned after the PropertyGroup class is registered.
  • Unregister guards against double-unregister errors when Blender reloads scripts.

Compatibility notes

  • Uses only stable APIs (PointerProperty, CollectionProperty, selected_pose_bones, pose.bones, data.bones, hide_set, mode_set) — none of the 4.4 breaking changes around Action Slots or bpy.types.Strip apply.
  • bl_options = {'REGISTER', 'UNDO'} is set on every operator, so each action is in the Undo stack.

Changelog

2.0.0

  • Full rewrite. Moved storage from module dicts to Scene PropertyGroup → data now persists in the .blend.
  • Added Update / Add-to / Remove-from / Rename / Reorder operators.
  • Added Shift/Ctrl modifier behaviour on load.
  • Added JSON Import / Export.
  • Auto-switch to Pose Mode on the correct armature when loading pose sets.
  • Per-armature namespacing for pose sets plus active-armature filter.
  • Bumped minimum Blender to 4.4.

1.0.0

  • Initial prototype. Sets were stored in memory only and lost on file reload.

License

MIT — see LICENSE.

About

Blender add-on for persistent controller / pose-bone selection sets (Blender 4.4+)

Topics

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Contributors

Languages