[Bf-blender-cvs] [24676b535af] master: Fix T49981: When camera is on inactive layer, it does not evaluate constraints

Sergey Sharybin noreply at git.blender.org
Wed May 17 10:23:57 CEST 2017


Commit: 24676b535af5fe3feede0cb42838f8eb7b00e92c
Author: Sergey Sharybin
Date:   Wed May 17 10:20:34 2017 +0200
Branches: master
https://developer.blender.org/rB24676b535af5fe3feede0cb42838f8eb7b00e92c

Fix T49981: When camera is on inactive layer, it does not evaluate constraints

Second round of fix, was broken by 843be91.

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

M	source/blender/depsgraph/intern/depsgraph_tag.cc

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

diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cc b/source/blender/depsgraph/intern/depsgraph_tag.cc
index cfc9005a1e3..e74972a688b 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cc
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cc
@@ -356,6 +356,10 @@ void DEG_graph_on_visible_update(Main *bmain, Scene *scene)
 		Object *object = base->object;
 		DEG::IDDepsNode *id_node = graph->find_id_node(&object->id);
 		id_node->layers |= base->lay;
+		if (object == scene->camera) {
+			/* Camera should always be updated, it used directly by viewport. */
+			id_node->layers |= (unsigned int)(-1);
+		}
 	}
 	DEG::deg_graph_build_flush_layers(graph);
 	LINKLIST_FOREACH (Base *, base, &scene->base) {




More information about the Bf-blender-cvs mailing list