diff options
author | Alexander Gavrilov <angavrilov@gmail.com> | 2018-11-12 16:17:57 +0300 |
---|---|---|
committer | Alexander Gavrilov <angavrilov@gmail.com> | 2018-11-12 16:18:33 +0300 |
commit | aee0446b6bdc6ff384e9d66a917f6cb06f620c0a (patch) | |
tree | f2cfd422a9415248c33118743d0d2c7427bf44d4 /source/blender/editors/animation/anim_deps.c | |
parent | 36a3a40033298227cfc55f59580e03863c09699d (diff) |
Add a lot of update tagging to operations with NLA tracks and strips.
Diffstat (limited to 'source/blender/editors/animation/anim_deps.c')
-rw-r--r-- | source/blender/editors/animation/anim_deps.c | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c index bfc3caecfee..2ed5d35b613 100644 --- a/source/blender/editors/animation/anim_deps.c +++ b/source/blender/editors/animation/anim_deps.c @@ -84,6 +84,12 @@ void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale) } } + /* Tag copy on the main object if updating anything directly inside AnimData */ + if (ELEM(ale->type, ANIMTYPE_ANIMDATA, ANIMTYPE_NLAACTION, ANIMTYPE_NLATRACK, ANIMTYPE_NLACURVE)) { + DEG_id_tag_update(id, DEG_TAG_TIME | DEG_TAG_COPY_ON_WRITE); + return; + } + /* update data */ fcu = (ale->datatype == ALE_FCURVE) ? ale->key_data : NULL; @@ -108,7 +114,7 @@ void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale) /* tags the given ID block for refreshes (if applicable) due to * Animation Editor editing */ -void ANIM_id_update(Scene *UNUSED(scene), ID *id) +void ANIM_id_update(Main *bmain, ID *id) { if (id) { AnimData *adt = BKE_animdata_from_id(id); @@ -118,7 +124,7 @@ void ANIM_id_update(Scene *UNUSED(scene), ID *id) adt->recalc |= ADT_RECALC_ANIM; /* set recalc flags */ - DEG_id_tag_update(id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); // XXX or do we want something more restrictive? + DEG_id_tag_update_ex(bmain, id, OB_RECALC_OB | OB_RECALC_DATA | OB_RECALC_TIME); // XXX or do we want something more restrictive? } } @@ -433,7 +439,7 @@ void ANIM_animdata_update(bAnimContext *ac, ListBase *anim_data) ANIM_list_elem_update(ac->bmain, ac->scene, ale); } } - else if (ale->datatype == ALE_NLASTRIP) { + else if (ELEM(ale->type, ANIMTYPE_ANIMDATA, ANIMTYPE_NLAACTION, ANIMTYPE_NLATRACK, ANIMTYPE_NLACURVE)) { if (ale->update & ANIM_UPDATE_DEPS) { ale->update &= ~ANIM_UPDATE_DEPS; ANIM_list_elem_update(ac->bmain, ac->scene, ale); |