Depsgraph: Relations builder should not tag ID in all depsgraphs

This commit is contained in:
Sergey Sharybin
2018-07-06 14:45:14 +02:00
parent 571e773fbe
commit 15f4aa182f
2 changed files with 11 additions and 7 deletions

View File

@@ -69,7 +69,10 @@ void deg_graph_build_finalize(Main *bmain, Depsgraph *graph)
flag |= DEG_TAG_COPY_ON_WRITE;
}
if (flag != 0) {
DEG_id_tag_update_ex(bmain, id_node->id_orig, flag);
DEG_graph_id_tag_update(bmain,
(::Depsgraph*)graph,
id_node->id_orig,
flag);
}
}
}

View File

@@ -299,6 +299,7 @@ void depsgraph_tag_component(Depsgraph *graph,
* explicitly, but not all areas are aware of this yet.
*/
void deg_graph_id_tag_legacy_compat(Main *bmain,
Depsgraph *depsgraph,
ID *id,
eDepsgraph_Tag tag)
{
@@ -309,7 +310,7 @@ void deg_graph_id_tag_legacy_compat(Main *bmain,
Object *object = (Object *)id;
ID *data_id = (ID *)object->data;
if (data_id != NULL) {
DEG_id_tag_update_ex(bmain, data_id, 0);
deg_graph_id_tag_update(bmain, depsgraph, data_id, 0);
}
break;
}
@@ -322,7 +323,7 @@ void deg_graph_id_tag_legacy_compat(Main *bmain,
Mesh *mesh = (Mesh *)id;
ID *key_id = &mesh->key->id;
if (key_id != NULL) {
DEG_id_tag_update_ex(bmain, key_id, 0);
deg_graph_id_tag_update(bmain, depsgraph, key_id, 0);
}
break;
}
@@ -331,7 +332,7 @@ void deg_graph_id_tag_legacy_compat(Main *bmain,
Lattice *lattice = (Lattice *)id;
ID *key_id = &lattice->key->id;
if (key_id != NULL) {
DEG_id_tag_update_ex(bmain, key_id, 0);
deg_graph_id_tag_update(bmain, depsgraph, key_id, 0);
}
break;
}
@@ -340,7 +341,7 @@ void deg_graph_id_tag_legacy_compat(Main *bmain,
Curve *curve = (Curve *)id;
ID *key_id = &curve->key->id;
if (key_id != NULL) {
DEG_id_tag_update_ex(bmain, key_id, 0);
deg_graph_id_tag_update(bmain, depsgraph, key_id, 0);
}
break;
}
@@ -396,7 +397,7 @@ static void deg_graph_id_tag_update_single_flag(Main *bmain,
/* TODO(sergey): Get rid of this once all areas are using proper data ID
* for tagging.
*/
deg_graph_id_tag_legacy_compat(bmain, id, tag);
deg_graph_id_tag_legacy_compat(bmain, graph, id, tag);
}
@@ -454,7 +455,7 @@ void deg_graph_node_tag_zero(Main *bmain, Depsgraph *graph, IDDepsNode *id_node)
comp_node->tag_update(graph);
}
GHASH_FOREACH_END();
deg_graph_id_tag_legacy_compat(bmain, id, (eDepsgraph_Tag)0);
deg_graph_id_tag_legacy_compat(bmain, graph, id, (eDepsgraph_Tag)0);
}
void deg_graph_id_tag_update(Main *bmain, Depsgraph *graph, ID *id, int flag)