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>2019-06-26 13:58:54 +0300
committerSergey Sharybin <sergey.vfx@gmail.com>2019-06-26 14:00:18 +0300
commitb6cf4a715bf0031d429c81c1c9a7210dc1c9388a (patch)
treed91428a5bd40276f85f593b1552882b87e8c4c39
parent5b3530e4805f35202eeab57253c02b144f838134 (diff)
Fix missing volume update via scene strip's settings
This is a part of T66117. The entire sequencer+3d sound was never reliable, so this is as much as i can fix currently.
-rw-r--r--source/blender/blenkernel/intern/scene.c9
-rw-r--r--source/blender/depsgraph/intern/builder/deg_builder_relations.cc4
-rw-r--r--source/blender/makesrna/intern/rna_scene.c5
3 files changed, 14 insertions, 4 deletions
diff --git a/source/blender/blenkernel/intern/scene.c b/source/blender/blenkernel/intern/scene.c
index 09e05a9d93a..d2d56569bff 100644
--- a/source/blender/blenkernel/intern/scene.c
+++ b/source/blender/blenkernel/intern/scene.c
@@ -2467,7 +2467,14 @@ void BKE_scene_eval_sequencer_sequences(Depsgraph *depsgraph, Scene *scene)
}
}
}
- if (seq->scene_sound) {
+ if (seq->scene_sound != NULL) {
+ /* Make sure changing volume via sequence's properties panel works correct.
+ *
+ * Ideally, the entire BKE_scene_update_sound() will happen from a dependency graph, so
+ * then it is no longer needed to do such manual forced updates. */
+ if (seq->type == SEQ_TYPE_SCENE && seq->scene != NULL) {
+ BKE_sound_set_scene_volume(seq->scene, seq->scene->audio.volume);
+ }
if (seq->sound != NULL) {
if (scene->id.recalc & ID_RECALC_AUDIO || seq->sound->id.recalc & ID_RECALC_AUDIO) {
BKE_sound_update_scene_sound(seq->scene_sound, seq->sound);
diff --git a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
index c8ef50fa18e..60233ecd304 100644
--- a/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
+++ b/source/blender/depsgraph/intern/builder/deg_builder_relations.cc
@@ -2370,7 +2370,9 @@ void DepsgraphRelationBuilder::build_scene_sequencer(Scene *scene)
if (seq->flag & SEQ_SCENE_STRIPS) {
build_scene_sequencer(seq->scene);
ComponentKey sequence_scene_audio_key(&seq->scene->id, NodeType::AUDIO);
- add_relation(sequence_scene_audio_key, scene_audio_key, "Sequence Audio -> Scene Audio");
+ add_relation(sequence_scene_audio_key, sequencer_key, "Sequence Scene Audio -> Sequencer");
+ ComponentKey sequence_scene_key(&seq->scene->id, NodeType::SEQUENCER);
+ add_relation(sequence_scene_key, sequencer_key, "Sequence Scene -> Sequencer");
}
ViewLayer *sequence_view_layer = BKE_view_layer_default_render(seq->scene);
build_scene_speakers(seq->scene, sequence_view_layer);
diff --git a/source/blender/makesrna/intern/rna_scene.c b/source/blender/makesrna/intern/rna_scene.c
index 3fe8e9ba382..b47454ecd84 100644
--- a/source/blender/makesrna/intern/rna_scene.c
+++ b/source/blender/makesrna/intern/rna_scene.c
@@ -831,9 +831,10 @@ static void rna_Scene_listener_update(Main *UNUSED(bmain), Scene *scene, Pointer
DEG_id_tag_update(&scene->id, ID_RECALC_AUDIO_LISTENER);
}
-static void rna_Scene_volume_update(Main *UNUSED(bmain), Scene *scene, PointerRNA *UNUSED(ptr))
+static void rna_Scene_volume_update(Main *UNUSED(bmain), Scene *UNUSED(scene), PointerRNA *ptr)
{
- DEG_id_tag_update(&scene->id, ID_RECALC_AUDIO_VOLUME);
+ Scene *scene = (Scene *)ptr->id.data;
+ DEG_id_tag_update(&scene->id, ID_RECALC_AUDIO_VOLUME | ID_RECALC_SEQUENCER_STRIPS);
}
static const char *rna_Scene_statistics_string_get(Scene *scene,