Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergey Sharybin <sergey.vfx@gmail.com>2017-08-29 13:51:56 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2017-08-29 13:58:55 +0300
commitf84684694113f60e9d8de5e30c7af8f340e52106 (patch)
treeaa11c7b4a602f4ae9e061d8c9fe30c0403afd982 /source/blender/depsgraph/intern/nodes/deg_node_component.cc
parentc1582667cabe025bd3a1ee4a3db27e2b3fd9e42a (diff)
Depsgraph: Fix missing updates when tweaking node tree parameters
The is following: split copy on write update for node trees, and if we are only tagging for uniform buffer update we skip whole datablock copy and only invoke copy default_values form original nodetree to a copied one. Thing which i'm not sure is: whether we need to use different branches in graph itself to control such a conditional behavior, or whether we need to store tag somewhere in the dependency graph. There are obviously cons and pros in both approaches, and need to think about this. Maybe with more examples it becomes more obvious which way is better. This only fixes manual tweaks for now, animation support is coming.
Diffstat (limited to 'source/blender/depsgraph/intern/nodes/deg_node_component.cc')
-rw-r--r--source/blender/depsgraph/intern/nodes/deg_node_component.cc7
1 files changed, 7 insertions, 0 deletions
diff --git a/source/blender/depsgraph/intern/nodes/deg_node_component.cc b/source/blender/depsgraph/intern/nodes/deg_node_component.cc
index bd9583a7b67..a250dce1239 100644
--- a/source/blender/depsgraph/intern/nodes/deg_node_component.cc
+++ b/source/blender/depsgraph/intern/nodes/deg_node_component.cc
@@ -396,6 +396,11 @@ static DepsNodeFactoryImpl<ParticlesComponentDepsNode> DNTI_EVAL_PARTICLES;
DEG_DEPSNODE_DEFINE(ShadingComponentDepsNode, DEG_NODE_TYPE_SHADING, "Shading Component");
static DepsNodeFactoryImpl<ShadingComponentDepsNode> DNTI_SHADING;
+/* Shading Parameters Component Defines ============================ */
+
+DEG_DEPSNODE_DEFINE(ShadingParametersComponentDepsNode, DEG_NODE_TYPE_SHADING_PARAMETERS, "Shading Parameters Component");
+static DepsNodeFactoryImpl<ShadingParametersComponentDepsNode> DNTI_SHADING_PARAMETERS;
+
/* Cache Component Defines ============================ */
DEG_DEPSNODE_DEFINE(CacheComponentDepsNode, DEG_NODE_TYPE_CACHE, "Cache Component");
@@ -426,7 +431,9 @@ void deg_register_component_depsnodes()
deg_register_node_typeinfo(&DNTI_BONE);
deg_register_node_typeinfo(&DNTI_EVAL_PARTICLES);
+
deg_register_node_typeinfo(&DNTI_SHADING);
+ deg_register_node_typeinfo(&DNTI_SHADING_PARAMETERS);
deg_register_node_typeinfo(&DNTI_CACHE);