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.cc37
1 files changed, 35 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 93e5dd14ae0..9bdc815518d 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_nodes.cc
@@ -58,6 +58,7 @@ extern "C" {
#include "DNA_lightprobe_types.h"
#include "DNA_rigidbody_types.h"
#include "DNA_scene_types.h"
+#include "DNA_sequence_types.h"
#include "DNA_sound_types.h"
#include "DNA_speaker_types.h"
#include "DNA_texture_types.h"
@@ -89,6 +90,8 @@ extern "C" {
#include "BKE_particle.h"
#include "BKE_pointcache.h"
#include "BKE_rigidbody.h"
+#include "BKE_scene.h"
+#include "BKE_sequencer.h"
#include "BKE_shader_fx.h"
#include "BKE_sound.h"
#include "BKE_tracking.h"
@@ -1564,12 +1567,42 @@ void DepsgraphNodeBuilder::build_sound(bSound *sound)
if (built_map_.checkIsBuiltAndTag(sound)) {
return;
}
- /* Placeholder so we can add relations and tag ID node for update. */
- add_operation_node(&sound->id, NodeType::AUDIO, OperationCode::SOUND_EVAL);
+ add_id_node(&sound->id);
+ bSound *sound_cow = get_cow_datablock(sound);
+ add_operation_node(&sound->id,
+ NodeType::AUDIO,
+ OperationCode::SOUND_EVAL,
+ function_bind(BKE_sound_evaluate, _1, bmain_, sound_cow));
build_animdata(&sound->id);
build_parameters(&sound->id);
}
+void DepsgraphNodeBuilder::build_scene_sequencer(Scene *scene)
+{
+ if (scene->ed == NULL) {
+ return;
+ }
+ Scene *scene_cow = get_cow_datablock(scene_);
+ add_operation_node(&scene->id,
+ NodeType::SEQUENCER,
+ OperationCode::SEQUENCES_EVAL,
+ function_bind(BKE_scene_eval_sequencer_sequences, _1, scene_cow));
+ /* Make sure data for sequences is in the graph. */
+ Sequence *seq;
+ SEQ_BEGIN (scene->ed, seq) {
+ if (seq->sound != NULL) {
+ build_sound(seq->sound);
+ }
+ /* TODO(sergey): Movie clip, scene, camera, mask. */
+ }
+ SEQ_END;
+}
+
+void DepsgraphNodeBuilder::build_scene_audio(Scene *scene)
+{
+ add_operation_node(&scene->id, NodeType::AUDIO, OperationCode::SOUND_EVAL);
+}
+
/* **** ID traversal callbacks functions **** */
void DepsgraphNodeBuilder::modifier_walk(void *user_data,