diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-12-13 16:39:56 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2017-12-13 16:43:32 +0300 |
commit | 81f135677be419a505a38f5a23354690a75b678b (patch) | |
tree | b5e3dede5a4b7693affa9ad4c27c51dbe3a2ff78 /source/blender/blenkernel/intern/depsgraph.c | |
parent | 4838512e7d495cb74ac599a8cd4c788d006c843c (diff) |
Depsgraph: Cleanup, use less explicit checks of LIB_TAG_ID_RECALC_DATA
This is a part of ongoing work in Blender 2.8, where we need to replace
`object->id.tag & LIB_TAG_ID_RECALC_DATA`
with
`object->data->id.tag & LIB_TAG_ID_RECALC`
Should be no user measurable difference.
Diffstat (limited to 'source/blender/blenkernel/intern/depsgraph.c')
-rw-r--r-- | source/blender/blenkernel/intern/depsgraph.c | 12 |
1 files changed, 5 insertions, 7 deletions
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c index 30b7f15da7c..e9b83b27ef2 100644 --- a/source/blender/blenkernel/intern/depsgraph.c +++ b/source/blender/blenkernel/intern/depsgraph.c @@ -1532,7 +1532,7 @@ static bool check_object_tagged_for_update(Object *object) if (ELEM(object->type, OB_MESH, OB_CURVE, OB_SURF, OB_FONT, OB_MBALL, OB_LATTICE)) { ID *data_id = object->data; - return (data_id->tag & (LIB_TAG_ID_RECALC_DATA | LIB_TAG_ID_RECALC)) != 0; + return (data_id->tag & LIB_TAG_ID_RECALC_ALL) != 0; } return false; @@ -2825,8 +2825,7 @@ void DAG_ids_flush_tagged(Main *bmain) if (id && bmain->id_tag_update[BKE_idcode_to_index(GS(id->name))]) { for (; id; id = id->next) { - if (id->tag & (LIB_TAG_ID_RECALC | LIB_TAG_ID_RECALC_DATA)) { - + if (id->tag & LIB_TAG_ID_RECALC_ALL) { for (dsl = listbase.first; dsl; dsl = dsl->next) dag_id_flush_update(bmain, dsl->scene, id); @@ -2946,13 +2945,12 @@ void DAG_ids_clear_recalc(Main *bmain) if (id && bmain->id_tag_update[BKE_idcode_to_index(GS(id->name))]) { for (; id; id = id->next) { - if (id->tag & (LIB_TAG_ID_RECALC | LIB_TAG_ID_RECALC_DATA)) - id->tag &= ~(LIB_TAG_ID_RECALC | LIB_TAG_ID_RECALC_DATA); + id->tag &= ~LIB_TAG_ID_RECALC_ALL; /* some ID's contain semi-datablock nodetree */ ntree = ntreeFromID(id); - if (ntree && (ntree->id.tag & (LIB_TAG_ID_RECALC | LIB_TAG_ID_RECALC_DATA))) - ntree->id.tag &= ~(LIB_TAG_ID_RECALC | LIB_TAG_ID_RECALC_DATA); + if (ntree) + ntree->id.tag &= ~LIB_TAG_ID_RECALC_ALL; } } } |