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:
Diffstat (limited to 'source/blender/depsgraph/intern/builder/deg_builder_nodes.cc')
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_nodes.cc13
1 files changed, 12 insertions, 1 deletions
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
index 44ddd9522e0..f76af5bdda5 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -83,6 +83,7 @@
#include "BKE_key.h"
#include "BKE_lattice.h"
#include "BKE_layer.h"
+#include "BKE_light.h"
#include "BKE_mask.h"
#include "BKE_material.h"
#include "BKE_mball.h"
@@ -1402,7 +1403,11 @@ void DepsgraphNodeBuilder::build_armature(bArmature *armature)
build_animdata(&armature->id);
build_parameters(&armature->id);
/* Make sure pose is up-to-date with armature updates. */
- add_operation_node(&armature->id, NodeType::ARMATURE, OperationCode::ARMATURE_EVAL);
+ bArmature *armature_cow = (bArmature *)get_cow_id(&armature->id);
+ add_operation_node(&armature->id,
+ NodeType::ARMATURE,
+ OperationCode::ARMATURE_EVAL,
+ function_bind(BKE_armature_refresh_layer_used, _1, armature_cow));
build_armature_bones(&armature->bonebase);
}
@@ -1437,6 +1442,12 @@ void DepsgraphNodeBuilder::build_light(Light *lamp)
build_parameters(&lamp->id);
/* light's nodetree */
build_nodetree(lamp->nodetree);
+
+ Light *lamp_cow = get_cow_datablock(lamp);
+ add_operation_node(&lamp->id,
+ NodeType::SHADING,
+ OperationCode::LIGHT_UPDATE,
+ function_bind(BKE_light_eval, _1, lamp_cow));
}
void DepsgraphNodeBuilder::build_nodetree(bNodeTree *ntree)