mirror of
https://github.com/blender/blender
synced 2026-09-29 04:37:17 +03:00
Fix #151951: VSE: Crossfade sounds zeroes out the audio
Calling `.keyframe_insert` creates a frame at `bpy.context.scene.frame_current` by default. Explicitly pass the frame so that we keyframe on the strip's sequencer scene instead.
This commit is contained in:
parent
1faa192978
commit
d3077785b4
1 changed files with 4 additions and 9 deletions
|
|
@ -59,17 +59,12 @@ class SequencerCrossfadeSounds(Operator):
|
|||
if strip1.frame_final_start > strip2.frame_final_start:
|
||||
strip1, strip2 = strip2, strip1
|
||||
if strip1.frame_final_end > strip2.frame_final_start:
|
||||
tempcfra = scene.frame_current
|
||||
scene.frame_current = strip2.frame_final_start
|
||||
strip1.keyframe_insert("volume")
|
||||
scene.frame_current = strip1.frame_final_end
|
||||
strip1.keyframe_insert("volume", frame=strip2.frame_final_start)
|
||||
strip1.volume = 0
|
||||
strip1.keyframe_insert("volume")
|
||||
strip2.keyframe_insert("volume")
|
||||
scene.frame_current = strip2.frame_final_start
|
||||
strip1.keyframe_insert("volume", frame=strip1.frame_final_end)
|
||||
strip2.keyframe_insert("volume", frame=strip1.frame_final_end)
|
||||
strip2.volume = 0
|
||||
strip2.keyframe_insert("volume")
|
||||
scene.frame_current = tempcfra
|
||||
strip2.keyframe_insert("volume", frame=strip2.frame_final_start)
|
||||
return {'FINISHED'}
|
||||
|
||||
self.report({'ERROR'}, "The selected strips don't overlap")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue