From 8447f45f09761c5f75b1ac76b7ad99c901680052 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= Date: Tue, 3 Mar 2020 15:48:00 +1100 Subject: Fix T74292: Dope sheet (Mask mode) keyframe editing misses update --- source/blender/editors/animation/anim_deps.c | 34 ++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 10 deletions(-) (limited to 'source/blender/editors/animation') 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; -- cgit v1.2.3