Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-12-15 11:43:18 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-12-15 11:43:18 +0300
commitc4046e9082f61bfef87173d20c566a065f2602d7 (patch)
treed04eb7411cb107ed05c3e6e9a83a54065b4a46a4 /source/blender/blenkernel/intern/depsgraph.c
parent400d59be9b058d4bfa31a84547591275f7c700b9 (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/blenkernel/intern/depsgraph.c')
-rw-r--r--source/blender/blenkernel/intern/depsgraph.c12
1 files changed, 6 insertions, 6 deletions
diff --git a/source/blender/blenkernel/intern/depsgraph.c b/source/blender/blenkernel/intern/depsgraph.c
index e9b83b27ef2..81e88bd3019 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_ALL) != 0;
+ return (data_id->recalc & ID_RECALC_ALL) != 0;
}
return false;
@@ -1780,13 +1780,13 @@ void DAG_scene_free(Scene *sce)
static void lib_id_recalc_tag(Main *bmain, ID *id)
{
- id->tag |= LIB_TAG_ID_RECALC;
+ id->recalc |= ID_RECALC;
DAG_id_type_tag(bmain, GS(id->name));
}
static void lib_id_recalc_data_tag(Main *bmain, ID *id)
{
- id->tag |= LIB_TAG_ID_RECALC_DATA;
+ id->recalc |= ID_RECALC_DATA;
DAG_id_type_tag(bmain, GS(id->name));
}
@@ -2825,7 +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_ALL) {
+ if (id->recalc & ID_RECALC_ALL) {
for (dsl = listbase.first; dsl; dsl = dsl->next)
dag_id_flush_update(bmain, dsl->scene, id);
@@ -2945,12 +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) {
- id->tag &= ~LIB_TAG_ID_RECALC_ALL;
+ id->recalc &= ~ID_RECALC_ALL;
/* some ID's contain semi-datablock nodetree */
ntree = ntreeFromID(id);
if (ntree)
- ntree->id.tag &= ~LIB_TAG_ID_RECALC_ALL;
+ ntree->id.recalc &= ~ID_RECALC_ALL;
}
}
}