diff options
author | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-08-28 15:54:27 +0300 |
---|---|---|
committer | Sergey Sharybin <sergey.vfx@gmail.com> | 2015-08-28 15:55:21 +0300 |
commit | b024ccd61992e33c62485a80c903a0f284d42dc5 (patch) | |
tree | 8f27687cdced8b217ca97ddc99b50c18a1ceecfb /source/blender/depsgraph | |
parent | c53b1e2a93e17eb353d0dfa1472d501fd023d05f (diff) |
Fix T45929: OpenSubdiv was doing extra object recalc tags
Diffstat (limited to 'source/blender/depsgraph')
-rw-r--r-- | source/blender/depsgraph/intern/depsgraph.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc index a2c17b0fc8c..d9d94d6d47e 100644 --- a/source/blender/depsgraph/intern/depsgraph.cc +++ b/source/blender/depsgraph/intern/depsgraph.cc @@ -356,13 +356,15 @@ DepsRelation *Depsgraph::add_new_relation(OperationDepsNode *from, DepsRelation *rel = OBJECT_GUARDED_NEW(DepsRelation, from, to, type, description); /* TODO(sergey): Find a better place for this. */ #ifdef WITH_OPENSUBDIV - if (type == DEPSREL_TYPE_GEOMETRY_EVAL) { + ComponentDepsNode *comp_node = from->owner; + if (comp_node->type == DEPSNODE_TYPE_GEOMETRY) { IDDepsNode *id_to = to->owner->owner; - IDDepsNode *id_from = to->owner->owner; - if (id_to != id_from) { - if ((id_to->eval_flags & DAG_EVAL_NEED_CPU) == 0) { - id_to->tag_update(this); - id_to->eval_flags |= DAG_EVAL_NEED_CPU; + IDDepsNode *id_from = from->owner->owner; + Object *object_to = (Object *)id_to->id; + if (id_to != id_from && (object_to->recalc & OB_RECALC_ALL)) { + if ((id_from->eval_flags & DAG_EVAL_NEED_CPU) == 0) { + id_from->tag_update(this); + id_from->eval_flags |= DAG_EVAL_NEED_CPU; } } } |