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.
This commit is contained in:
parent
5b3530e480
commit
b6cf4a715b
|
@ -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);
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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,
|
||||
|
|
Loading…
Reference in New Issue