[Bf-blender-cvs] [def41b0] depsgraph_refactor: Depsgraph: Fix missing editors ID update callback invoke
Sergey Sharybin
noreply at git.blender.org
Thu Jan 15 15:23:34 CET 2015
Commit: def41b0ed33c9fea5224b44bdb256090e2be6f4d
Author: Sergey Sharybin
Date: Thu Jan 15 19:19:39 2015 +0500
Branches: depsgraph_refactor
https://developer.blender.org/rBdef41b0ed33c9fea5224b44bdb256090e2be6f4d
Depsgraph: Fix missing editors ID update callback invoke
This way tweaking node trees reflects on shading update in GLSL viewport.
===================================================================
M source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
M source/blender/depsgraph/intern/depsgraph_tag.cpp
===================================================================
diff --git a/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp b/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
index 47b2f20..6f0a6cd 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_build_nodes.cpp
@@ -835,7 +835,8 @@ void DepsgraphNodeBuilder::build_material(DepsNode *owner_node, Material *ma)
id_tag_set(ma_id);
/* material itself */
- add_id_node(ma_id);
+ IDDepsNode *id_node = add_id_node(ma_id);
+ id_node->layers = (1 << 20) - 1;
add_operation_node(ma_id, DEPSNODE_TYPE_SHADING,
DEPSOP_TYPE_EXEC, NULL,
diff --git a/source/blender/depsgraph/intern/depsgraph_tag.cpp b/source/blender/depsgraph/intern/depsgraph_tag.cpp
index b0e48e6..131bd5b 100644
--- a/source/blender/depsgraph/intern/depsgraph_tag.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_tag.cpp
@@ -212,6 +212,7 @@ void DEG_graph_flush_updates(Main *bmain,
IDDepsNode *id_node = node->owner->owner;
if (id_node->layers & layers) {
queue.push(node);
+ deg_editors_id_update(bmain, id_node->id);
}
else {
node->flag &= ~DEPSOP_FLAG_NEEDS_UPDATE;
@@ -242,6 +243,7 @@ void DEG_graph_flush_updates(Main *bmain,
{
to_node->flag |= DEPSOP_FLAG_NEEDS_UPDATE;
queue.push(to_node);
+ deg_editors_id_update(bmain, id_node->id);
}
}
}
More information about the Bf-blender-cvs
mailing list