diff options
author | Sybren A. Stüvel <sybren@blender.org> | 2020-03-03 07:48:00 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2020-03-03 07:50:11 +0300 |
commit | 8447f45f09761c5f75b1ac76b7ad99c901680052 (patch) | |
tree | e86829cf6d6e5b94b2e06346bed0dcdffa2a7fe2 /source/blender | |
parent | 7a875922e7cce20de1c2475534666fdcd664b6a0 (diff) |
Fix T74292: Dope sheet (Mask mode) keyframe editing misses update
Diffstat (limited to 'source/blender')
-rw-r--r-- | source/blender/editors/animation/anim_deps.c | 34 | ||||
-rw-r--r-- | source/blender/editors/transform/transform_convert.c | 2 |
2 files changed, 25 insertions, 11 deletions
diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c index 5c9f0707aa9..0a93351fefd 100644 --- a/source/blender/editors/animation/anim_deps.c +++ b/source/blender/editors/animation/anim_deps.c @@ -30,6 +30,7 @@ #include "DNA_gpencil_types.h" #include "DNA_object_types.h" #include "DNA_node_types.h" +#include "DNA_mask_types.h" #include "DNA_scene_types.h" #include "DNA_sequence_types.h" @@ -360,16 +361,6 @@ void ANIM_animdata_update(bAnimContext *ac, ListBase *anim_data) { bAnimListElem *ale; - if (ELEM(ac->datatype, ANIMCONT_MASK)) { -#ifdef DEBUG - /* quiet assert */ - for (ale = anim_data->first; ale; ale = ale->next) { - ale->update = 0; - } -#endif - return; - } - for (ale = anim_data->first; ale; ale = ale->next) { if (ale->type == ANIMTYPE_GPLAYER) { bGPDlayer *gpl = ale->data; @@ -377,6 +368,8 @@ void ANIM_animdata_update(bAnimContext *ac, ListBase *anim_data) if (ale->update & ANIM_UPDATE_ORDER) { ale->update &= ~ANIM_UPDATE_ORDER; if (gpl) { + /* While correct & we could enable it: 'posttrans_gpd_clean' + * currently handles as well as removing doubles. */ // gpencil_sort_frames(gpl); } } @@ -390,6 +383,27 @@ void ANIM_animdata_update(bAnimContext *ac, ListBase *anim_data) ale->update &= ~ANIM_UPDATE_HANDLES; } } + else if (ale->datatype == ALE_MASKLAY) { + MaskLayer *masklay = ale->data; + + if (ale->update & ANIM_UPDATE_ORDER) { + ale->update &= ~ANIM_UPDATE_ORDER; + if (masklay) { + /* While correct & we could enable it: 'posttrans_mask_clean' + * currently handles as well as removing doubles. */ + // BKE_mask_layer_shape_sort(masklay); + } + } + + if (ale->update & ANIM_UPDATE_DEPS) { + ale->update &= ~ANIM_UPDATE_DEPS; + ANIM_list_elem_update(ac->bmain, ac->scene, ale); + } + /* Disable handles to avoid assert. */ + if (ale->update & ANIM_UPDATE_HANDLES) { + ale->update &= ~ANIM_UPDATE_HANDLES; + } + } else if (ale->datatype == ALE_FCURVE) { FCurve *fcu = ale->key_data; diff --git a/source/blender/editors/transform/transform_convert.c b/source/blender/editors/transform/transform_convert.c index c2e3c8ef508..3e3e780dede 100644 --- a/source/blender/editors/transform/transform_convert.c +++ b/source/blender/editors/transform/transform_convert.c @@ -2094,7 +2094,7 @@ void special_aftertrans_update(bContext *C, TransInfo *t) } /* make sure all F-Curves are set correctly */ - if (!ELEM(ac.datatype, ANIMCONT_GPENCIL, ANIMCONT_MASK)) { + if (!ELEM(ac.datatype, ANIMCONT_GPENCIL)) { ANIM_editkeyframes_refresh(&ac); } |