Cleanup: Anim, add some more comments to the bone collection system
Add some TODOs and clarification in comments. No functional changes.
This commit is contained in:
parent
de13d7861c
commit
9580c377fe
|
@ -371,6 +371,8 @@ bool ANIM_armature_bonecoll_unassign(BoneCollection *bcoll, Bone *bone)
|
|||
void ANIM_armature_bonecoll_unassign_all(Bone *bone)
|
||||
{
|
||||
LISTBASE_FOREACH_MUTABLE (BoneCollectionReference *, ref, &bone->runtime.collections) {
|
||||
/* TODO: include Armature as parameter, and check that the bone collection to unassign from is
|
||||
* actually editable. */
|
||||
ANIM_armature_bonecoll_unassign(ref->bcoll, bone);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -100,6 +100,8 @@ static void undoarm_to_editarm(UndoArmature *uarm, bArmature *arm)
|
|||
auto bcoll_map = ANIM_bonecoll_listbase_copy_no_membership(
|
||||
&arm->collections, &uarm->bone_collections, true);
|
||||
|
||||
/* Always do a lookup-by-name and assignment. Even when the name of the active collection is
|
||||
* still the same, the order may have changed and thus the index needs to be updated. */
|
||||
BoneCollection *active_bcoll = ANIM_armature_bonecoll_get_by_name(arm,
|
||||
uarm->active_collection_name);
|
||||
ANIM_armature_bonecoll_active_set(arm, active_bcoll);
|
||||
|
|
|
@ -1834,6 +1834,8 @@ static void rna_def_armature_collections(BlenderRNA *brna, PropertyRNA *cprop)
|
|||
|
||||
prop = RNA_def_property(srna, "active_name", PROP_STRING, PROP_NONE);
|
||||
RNA_def_property_string_sdna(prop, nullptr, "active_collection_name");
|
||||
/* TODO: For some reason the overrides system doesn't register a new operation when this property
|
||||
* changes. Needs further investigation to figure out why & fix it. */
|
||||
RNA_def_property_override_flag(prop, PROPOVERRIDE_OVERRIDABLE_LIBRARY);
|
||||
RNA_def_property_ui_text(prop,
|
||||
"Active Collection Name",
|
||||
|
|
Loading…
Reference in New Issue