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.cc19
1 files changed, 17 insertions, 2 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..9230fa19c32 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)
@@ -1570,6 +1581,7 @@ void DepsgraphNodeBuilder::build_texture(Tex *texture)
return;
}
/* Texture itself. */
+ add_id_node(&texture->id);
build_idproperties(texture->id.properties);
build_animdata(&texture->id);
build_parameters(&texture->id);
@@ -1755,10 +1767,13 @@ void DepsgraphNodeBuilder::build_simulation(Simulation *simulation)
build_animdata(&simulation->id);
build_parameters(&simulation->id);
+ Simulation *simulation_cow = get_cow_datablock(simulation);
+ Scene *scene_cow = get_cow_datablock(scene_);
+
add_operation_node(&simulation->id,
NodeType::SIMULATION,
OperationCode::SIMULATION_EVAL,
- function_bind(BKE_simulation_data_update, _1, get_cow_datablock(scene_)));
+ function_bind(BKE_simulation_data_update, _1, scene_cow, simulation_cow));
}
void DepsgraphNodeBuilder::build_scene_sequencer(Scene *scene)