diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-12-15 11:43:18 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-12-15 11:43:18 +0300 |
commit | c4046e9082f61bfef87173d20c566a065f2602d7 (patch) | |
tree | d04eb7411cb107ed05c3e6e9a83a54065b4a46a4 /source/blender/depsgraph/intern/depsgraph_tag.cc | |
parent | 400d59be9b058d4bfa31a84547591275f7c700b9 (diff) |
Move ID recalc flags into dedicated field in ID
Currently this is a no-visible-changes change, but the idea is to use this
dedicated flag to tell which exact components of ID changed, make it more
granular than just OBJECT and OBJECT_DATA. Allow setting this field based
on what components new dependency graph flushed on evaluation.
Diffstat (limited to 'source/blender/depsgraph/intern/depsgraph_tag.cc')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph_tag.cc | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc index 8f91a826760..79c30e7904d 100644 --- a/source/blender/depsgraph/intern/depsgraph_tag.cc +++ b/source/blender/depsgraph/intern/depsgraph_tag.cc @@ -83,13 +83,13 @@ namespace { void lib_id_recalc_tag(Main *bmain, ID *id) { - id->tag |= LIB_TAG_ID_RECALC; + id->recalc |= ID_RECALC; DEG_id_type_tag(bmain, GS(id->name)); } void lib_id_recalc_data_tag(Main *bmain, ID *id) { - id->tag |= LIB_TAG_ID_RECALC_DATA; + id->recalc |= ID_RECALC_DATA; DEG_id_type_tag(bmain, GS(id->name)); } @@ -295,7 +295,7 @@ void DEG_graph_on_visible_update(Main *bmain, Scene *scene) GHASH_FOREACH_BEGIN(DEG::IDDepsNode *, id_node, graph->id_hash) { ID *id = id_node->id; - if ((id->tag & LIB_TAG_ID_RECALC_ALL) != 0 || + if ((id->recalc & ID_RECALC_ALL) != 0 || (id_node->layers & scene->lay_updated) == 0) { id_node->tag_update(graph); @@ -307,7 +307,7 @@ void DEG_graph_on_visible_update(Main *bmain, Scene *scene) */ if (GS(id->name) == ID_OB) { Object *object = (Object *)id; - if ((id->tag & LIB_TAG_ID_RECALC_ALL) == 0 && + if ((id->recalc & ID_RECALC_ALL) == 0 && (object->recalc & OB_RECALC_ALL) != 0) { id_node->tag_update(graph); @@ -409,12 +409,12 @@ void DEG_ids_clear_recalc(Main *bmain) if (id && bmain->id_tag_update[BKE_idcode_to_index(GS(id->name))]) { for (; id; id = (ID *)id->next) { - id->tag &= ~LIB_TAG_ID_RECALC_ALL; + id->recalc &= ~ID_RECALC_ALL; /* Some ID's contain semi-datablock nodetree */ ntree = ntreeFromID(id); if (ntree != NULL) { - ntree->id.tag &= ~LIB_TAG_ID_RECALC_ALL; + ntree->id.recalc &= ~ID_RECALC_ALL; } } } |