Despgraph: don't tag for transform/geometry update on relations rebuild.

This should already be happening elsewhere and was causing depsgraph
rebuild to be slower than it should.
This commit is contained in:
Brecht Van Lommel 2018-06-20 17:42:57 +02:00
parent e1dff01e29
commit 40e1e8ebed
1 changed files with 4 additions and 2 deletions

View File

@ -58,7 +58,7 @@ void deg_graph_build_finalize(Main *bmain, Depsgraph *graph)
foreach (IDDepsNode *id_node, graph->id_nodes) {
ID *id = id_node->id_orig;
id_node->finalize_build(graph);
int flag = DEG_TAG_TRANSFORM | DEG_TAG_GEOMETRY;
int flag = 0;
if ((id->recalc & ID_RECALC_ALL)) {
AnimData *adt = BKE_animdata_from_id(id);
if (adt != NULL && (adt->recalc & ADT_RECALC_ANIM) != 0) {
@ -68,7 +68,9 @@ void deg_graph_build_finalize(Main *bmain, Depsgraph *graph)
if (!deg_copy_on_write_is_expanded(id_node->id_cow)) {
flag |= DEG_TAG_COPY_ON_WRITE;
}
DEG_id_tag_update_ex(bmain, id_node->id_orig, flag);
if (flag != 0) {
DEG_id_tag_update_ex(bmain, id_node->id_orig, flag);
}
}
}