Bone Selection Sets: USE_INSERTION on CollectionProperties

Use the new 'USE_INSERTION' override flag (rBdb314ee7a472) to allow creating new entries of Selection Sets on overridden rigs. I tested including saving and reloading, assigning and removing bones from a set:

- Can create and name new, local sets
- Can add and remove bones to and from those local sets
- Can add bones to original, non-local sets and remove those same bones
- Can NOT remove original sets
- Can NOT remove originally assigned bones bones from originally existing sets

To me this all seems to be working as intended, so might as well use it!

Reviewed By: mont29

Differential Revision: https://developer.blender.org/D8971
This commit is contained in:
Demeter Dzadik
2020-09-21 17:59:13 +02:00
committed by Demeter Dzadik
parent b1af248874
commit 1be0b3210d

View File

@ -55,7 +55,10 @@ class SelectionEntry(PropertyGroup):
class SelectionSet(PropertyGroup):
name: StringProperty(name="Set Name", override={'LIBRARY_OVERRIDABLE'})
bone_ids: CollectionProperty(type=SelectionEntry, override={'LIBRARY_OVERRIDABLE'})
bone_ids: CollectionProperty(
type=SelectionEntry,
override={'LIBRARY_OVERRIDABLE', 'USE_INSERTION'}
)
is_selected: BoolProperty(name="Is Selected", override={'LIBRARY_OVERRIDABLE'})
@ -546,7 +549,7 @@ def register():
type=SelectionSet,
name="Selection Sets",
description="List of groups of bones for easy selection",
override={'LIBRARY_OVERRIDABLE'}
override={'LIBRARY_OVERRIDABLE', 'USE_INSERTION'}
)
bpy.types.Object.active_selection_set = IntProperty(
name="Active Selection Set",