[Bf-blender-cvs] [d7d0b64] depsgraph_refactor: Depsgraph: Make ID nodes fully fisible by default

Sergey Sharybin noreply at git.blender.org
Thu Jan 15 15:23:36 CET 2015


Commit: d7d0b64a4c1324c4555ab7be0956ffb876e3d818
Author: Sergey Sharybin
Date:   Thu Jan 15 19:23:15 2015 +0500
Branches: depsgraph_refactor
https://developer.blender.org/rBd7d0b64a4c1324c4555ab7be0956ffb876e3d818

Depsgraph: Make ID nodes fully fisible by default

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

M	source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
M	source/blender/depsgraph/intern/depsnode.cpp

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

diff --git a/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp b/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
index 6f0a6cd..3b66e3f 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
@@ -214,7 +214,7 @@ SubgraphDepsNode *DepsgraphNodeBuilder::build_subgraph(Group *group)
 void DepsgraphNodeBuilder::build_object(Scene *scene, Base *base, Object *ob)
 {
 	IDDepsNode *id_node = add_id_node(&ob->id);
-	id_node->layers |= base->lay;
+	id_node->layers = base->lay;
 
 	/* standard components */
 	build_object_transform(scene, ob);
@@ -835,8 +835,7 @@ void DepsgraphNodeBuilder::build_material(DepsNode *owner_node, Material *ma)
 	id_tag_set(ma_id);
 
 	/* material itself */
-	IDDepsNode *id_node = add_id_node(ma_id);
-	id_node->layers = (1 << 20) - 1;
+	add_id_node(ma_id);
 
 	add_operation_node(ma_id, DEPSNODE_TYPE_SHADING,
 	                   DEPSOP_TYPE_EXEC, NULL,
diff --git a/source/blender/depsgraph/intern/depsnode.cpp b/source/blender/depsgraph/intern/depsnode.cpp
index 35a32b4..86b972f 100644
--- a/source/blender/depsgraph/intern/depsnode.cpp
+++ b/source/blender/depsgraph/intern/depsnode.cpp
@@ -141,6 +141,7 @@ void IDDepsNode::init(const ID *id, const string &UNUSED(subdata))
 	/* Store ID-pointer. */
 	BLI_assert(id != NULL);
 	this->id = (ID *)id;
+	this->layers = (1 << 20) - 1;
 
 	/* NOTE: components themselves are created if/when needed.
 	 * This prevents problems with components getting added




More information about the Bf-blender-cvs mailing list