Fix #123226: Sound: Ensure camera switch when baking

In `sound_bake_animation_exec`, the camera needs to be ensured each
frame so that marker camera switch can still give correct stereo/surround
effect during render.

Pull Request: https://projects.blender.org/blender/blender/pulls/123294
This commit is contained in:
YimingWu
2024-06-17 02:52:52 +02:00
parent fca4318e3c
commit 30b3bc8f2b

View File

@@ -301,6 +301,8 @@ static int sound_bake_animation_exec(bContext *C, wmOperator * /*op*/)
for (cfra = (scene->r.sfra > 0) ? (scene->r.sfra - 1) : 0; cfra <= scene->r.efra + 1; cfra++) {
scene->r.cfra = cfra;
/* Make sure the camera is updated, since it will affect stereo/surround output. */
BKE_scene_camera_switch_update(scene);
BKE_scene_graph_update_for_newframe(depsgraph);
}