diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-09-24 19:22:30 +0300 |
---|---|---|
committer | Sybren A. Stüvel <sybren@blender.org> | 2020-09-25 15:20:59 +0300 |
commit | 2ef68edad8b9832d55c185d4db948417e74ae8c2 (patch) | |
tree | a4928697b380c077db1f9bf3cef1f04f831dd1e8 /source/blender/makesrna/intern/rna_animation.c | |
parent | 2e1339bc0b55bcde8d2f3936011c645aab8b263c (diff) |
Cleanup: animation, deduplicate "can edit action" logic
Move "action editable" check from RNA code to Blender kernel
`BKE_animdata_action_editable()`.
No functional changes.
Diffstat (limited to 'source/blender/makesrna/intern/rna_animation.c')
-rw-r--r-- | source/blender/makesrna/intern/rna_animation.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/source/blender/makesrna/intern/rna_animation.c b/source/blender/makesrna/intern/rna_animation.c index 823446a9d3b..a50d27a726b 100644 --- a/source/blender/makesrna/intern/rna_animation.c +++ b/source/blender/makesrna/intern/rna_animation.c @@ -144,14 +144,7 @@ static void rna_AnimData_dependency_update(Main *bmain, Scene *scene, PointerRNA static int rna_AnimData_action_editable(PointerRNA *ptr, const char **UNUSED(r_info)) { AnimData *adt = (AnimData *)ptr->data; - - /* active action is only editable when it is not a tweaking strip */ - if ((adt->flag & ADT_NLA_EDIT_ON) || (adt->actstrip) || (adt->tmpact)) { - return 0; - } - else { - return PROP_EDITABLE; - } + return BKE_animdata_action_editable(adt) ? PROP_EDITABLE : 0; } static void rna_AnimData_action_set(PointerRNA *ptr, |