diff options
Diffstat (limited to 'source/blender/editors/armature/armature_utils.c')
-rw-r--r-- | source/blender/editors/armature/armature_utils.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/source/blender/editors/armature/armature_utils.c b/source/blender/editors/armature/armature_utils.c index 5d424594229..d8777b7e0b7 100644 --- a/source/blender/editors/armature/armature_utils.c +++ b/source/blender/editors/armature/armature_utils.c @@ -85,6 +85,18 @@ void ED_armature_edit_validate_active(struct bArmature *arm) } } +/* 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. + */ +void ED_armature_edit_refresh_layer_used(bArmature *arm) +{ + arm->layer_used = 0; + for (EditBone *ebo = arm->edbo->first; ebo; ebo = ebo->next) { + arm->layer_used |= ebo->layer; + } +} + /* *************************************************************** */ /* Bone Operations */ |