[Bf-blender-cvs] [b4deb49] depsgraph_refactor: Depsgraph: Add relation between parameters and animation lamp components
Sergey Sharybin
noreply at git.blender.org
Fri Feb 27 14:07:39 CET 2015
Commit: b4deb499548c4a7a7e1a20f5a0002c21d6fb3646
Author: Sergey Sharybin
Date: Fri Feb 27 18:06:25 2015 +0500
Branches: depsgraph_refactor
https://developer.blender.org/rBb4deb499548c4a7a7e1a20f5a0002c21d6fb3646
Depsgraph: Add relation between parameters and animation lamp components
This way animating lamp parameter will properly cause all related drivers to be
updated as well.
This seems to be actually needed for all non-geometry nodes, but that's for later.
===================================================================
M source/blender/depsgraph/intern/depsgraph_build_relations.cpp
===================================================================
diff --git a/source/blender/depsgraph/intern/depsgraph_build_relations.cpp b/source/blender/depsgraph/intern/depsgraph_build_relations.cpp
index 443da8b..42d4f6e 100644
--- a/source/blender/depsgraph/intern/depsgraph_build_relations.cpp
+++ b/source/blender/depsgraph/intern/depsgraph_build_relations.cpp
@@ -1576,6 +1576,13 @@ void DepsgraphRelationBuilder::build_lamp(Object *ob)
}
lamp_id->flag |= LIB_DOIT;
+ if (BKE_animdata_from_id(lamp_id) != NULL) {
+ ComponentKey animation_key(lamp_id, DEPSNODE_TYPE_ANIMATION);
+ ComponentKey parameters_key(lamp_id, DEPSNODE_TYPE_PARAMETERS);
+ add_relation(animation_key, parameters_key,
+ DEPSREL_TYPE_COMPONENT_ORDER, "Lamp Parameters");
+ }
+
/* lamp's nodetree */
if (la->nodetree) {
build_nodetree(lamp_id, la->nodetree);
More information about the Bf-blender-cvs
mailing list