From 79312c1912b4fdb830e38a856cf88bfca8e4703d Mon Sep 17 00:00:00 2001 From: Sergey Sharybin Date: Thu, 6 Dec 2018 17:52:37 +0100 Subject: Depsgraph: Remove duplicated sets of recalc/update flags There were at least three copies of those: - OB_RECALC* family of flags, which are rudiment of an old dependency graph system. - PSYS_RECALC* which were used by old dependency graph system as a separate set since the graph itself did not handle particle systems. - DEG_TAG_* which was used to tag IDs. Now there is a single set, which defines what can be tagged and queried for an update. It also has some aggregate flags to make queries simpler. Lets once and for all solve the madness of those flags, stick to a single set, which will not overlap with anything or require any extra conversion. Technically, shouldn't be measurable user difference, but some of the agregate flags for few dependency graph components did change. Fixes T58632: Particle don't update rotation settings --- source/blender/editors/animation/anim_deps.c | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'source/blender/editors/animation/anim_deps.c') diff --git a/source/blender/editors/animation/anim_deps.c b/source/blender/editors/animation/anim_deps.c index c9b393601b2..b69d93aaacf 100644 --- a/source/blender/editors/animation/anim_deps.c +++ b/source/blender/editors/animation/anim_deps.c @@ -78,15 +78,15 @@ void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale) adt = BKE_animdata_from_id(id); if (adt) { adt->recalc |= ADT_RECALC_ANIM; - DEG_id_tag_update(id, OB_RECALC_TIME); + DEG_id_tag_update(id, ID_RECALC_ANIMATION); if (adt->action != NULL) { - DEG_id_tag_update(&adt->action->id, DEG_TAG_COPY_ON_WRITE); + DEG_id_tag_update(&adt->action->id, ID_RECALC_COPY_ON_WRITE); } } /* 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); + DEG_id_tag_update(id, ID_RECALC_ANIMATION | ID_RECALC_COPY_ON_WRITE); return; } @@ -108,7 +108,7 @@ void ANIM_list_elem_update(Main *bmain, Scene *scene, bAnimListElem *ale) else { /* in other case we do standard depsgraph update, ideally * we'd be calling property update functions here too ... */ - 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(id, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION); // XXX or do we want something more restrictive? } } @@ -124,7 +124,7 @@ void ANIM_id_update(Main *bmain, ID *id) adt->recalc |= ADT_RECALC_ANIM; /* set recalc flags */ - DEG_id_tag_update_ex(bmain, 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, ID_RECALC_TRANSFORM | ID_RECALC_GEOMETRY | ID_RECALC_ANIMATION); // XXX or do we want something more restrictive? } } -- cgit v1.2.3