diff options
author | mano-wii <germano.costa@ig.com.br> | 2019-07-17 20:17:16 +0300 |
---|---|---|
committer | mano-wii <germano.costa@ig.com.br> | 2019-07-17 20:17:34 +0300 |
commit | 709f126e8143da4fa28a08a94e13581c68ab6b29 (patch) | |
tree | 3c1d1bf71376904c4816af0d16a5c11cde639ddf /source/blender/makesrna | |
parent | 4ddc7e8d1b2c22463d4d181d8bb3bb9bb17b1b35 (diff) |
Fix T59713: Armature layer dots not updated on changes
`layer_used` runtime data, which controls the drawing of dots in the UI was not getting refreshed properly.
This used to happen in the drawing code, but was no longer working for reasons explained in:
{rB2b09062defa093a243b5fe64b099accb07b440a3}
The solution was to update each layer manually in the operators:
* ARMATURE_OT_bone_primitive_add
* ARMATURE_OT_delete
* ARMATURE_OT_dissolve
* ARMATURE_OT_fill
* ARMATURE_OT_merge
* ARMATURE_OT_separate
* ARMATURE_OT_bone_layers
* POSE_OT_bone_layers
Differential Revision: https://developer.blender.org/D5281
Diffstat (limited to 'source/blender/makesrna')
-rw-r--r-- | source/blender/makesrna/intern/rna_armature.c | 15 |
1 files changed, 1 insertions, 14 deletions
diff --git a/source/blender/makesrna/intern/rna_armature.c b/source/blender/makesrna/intern/rna_armature.c index aef35684ff7..6737363bae4 100644 --- a/source/blender/makesrna/intern/rna_armature.c +++ b/source/blender/makesrna/intern/rna_armature.c @@ -268,18 +268,6 @@ static IDProperty *rna_EditBone_idprops(PointerRNA *ptr, bool create) return ebone->prop; } -/* Update the layers_used variable after bones are moved between layer - * NOTE: Used to be done in drawing code in 2.7, but that won't work with - * Copy-on-Write, as drawing uses evaluated copies. - */ -static void rna_Armature_layer_used_refresh(bArmature *arm, ListBase *bones) -{ - for (Bone *bone = bones->first; bone; bone = bone->next) { - arm->layer_used |= bone->layer; - rna_Armature_layer_used_refresh(arm, &bone->childbase); - } -} - static void rna_bone_layer_set(int *layer, const bool *values) { int i, tot = 0; @@ -312,8 +300,7 @@ static void rna_Bone_layer_set(PointerRNA *ptr, const bool *values) rna_bone_layer_set(&bone->layer, values); - arm->layer_used = 0; - rna_Armature_layer_used_refresh(arm, &arm->bonebase); + BKE_armature_refresh_layer_used(arm); } static void rna_Armature_layer_set(PointerRNA *ptr, const bool *values) |