diff options
Diffstat (limited to 'source/blender/editors/animation/anim_deps.c')
-rw-r--r-- | source/blender/editors/animation/anim_deps.c | 34 |
1 files changed, 24 insertions, 10 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; |