[Bf-blender-cvs] [5eab3b0] master: Depsgraph: Fix infinite viewport object update in CYcles render mode

Sergey Sharybin noreply at git.blender.org
Mon Nov 21 12:01:53 CET 2016


Commit: 5eab3b079f939c4c0cc0c84f9bf8c5dcb0c0b77f
Author: Sergey Sharybin
Date:   Mon Nov 21 12:00:09 2016 +0100
Branches: master
https://developer.blender.org/rB5eab3b079f939c4c0cc0c84f9bf8c5dcb0c0b77f

Depsgraph: Fix infinite viewport object update in CYcles render mode

The issue was caused by wrong object re-tag needed to have proper dependnecies
update for OpenSubdiv.

===================================================================

M	source/blender/depsgraph/intern/builder/deg_builder.cc
M	source/blender/depsgraph/intern/depsgraph.cc

===================================================================

diff --git a/source/blender/depsgraph/intern/builder/deg_builder.cc b/source/blender/depsgraph/intern/builder/deg_builder.cc
index 51d1e08..aedd006 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder.cc
@@ -48,6 +48,8 @@
 
 #include "util/deg_util_foreach.h"
 
+#include <cstdio>
+
 namespace DEG {
 
 string deg_fcurve_id_name(const FCurve *fcu)
diff --git a/source/blender/depsgraph/intern/depsgraph.cc b/source/blender/depsgraph/intern/depsgraph.cc
index 3502267..9a4a35a 100644
--- a/source/blender/depsgraph/intern/depsgraph.cc
+++ b/source/blender/depsgraph/intern/depsgraph.cc
@@ -371,8 +371,7 @@ DepsRelation *Depsgraph::add_new_relation(OperationDepsNode *from,
 	if (comp_node->type == DEPSNODE_TYPE_GEOMETRY) {
 		IDDepsNode *id_to = to->owner->owner;
 		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_to != id_from && (id_to->id->tag & LIB_TAG_ID_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;




More information about the Bf-blender-cvs mailing list