Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender-addons.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'power_sequencer/operators/mouse_trim_modal.py')
-rw-r--r--power_sequencer/operators/mouse_trim_modal.py24
1 files changed, 9 insertions, 15 deletions
diff --git a/power_sequencer/operators/mouse_trim_modal.py b/power_sequencer/operators/mouse_trim_modal.py
index 4e4bb407..b75985b7 100644
--- a/power_sequencer/operators/mouse_trim_modal.py
+++ b/power_sequencer/operators/mouse_trim_modal.py
@@ -17,7 +17,6 @@
import bpy
import bgl
import gpu
-from gpu_extras.batch import batch_for_shader
import math
from mathutils import Vector
@@ -26,7 +25,6 @@ from .utils.functions import (
trim_strips,
find_snap_candidate,
find_closest_surrounding_cuts,
- sequencer_workaround_2_80_audio_bug,
)
from .utils.draw import (
@@ -48,7 +46,7 @@ class POWER_SEQUENCER_OT_mouse_trim(bpy.types.Operator):
*brief* Cut or Trim strips quickly with the mouse cursor
- Click somewehre in the Sequencer to insert a cut, click and drag to trim
+ Click somehwere in the Sequencer to insert a cut, click and drag to trim
With this function you can quickly cut and remove a section of strips while keeping or
collapsing the remaining gap.
Press <kbd>Ctrl</kbd> to snap to cuts.
@@ -186,10 +184,6 @@ class POWER_SEQUENCER_OT_mouse_trim(bpy.types.Operator):
self.trim_apply(context, event)
self.draw_stop()
context.scene.use_audio_scrub = self.use_audio_scrub
-
- # FIXME: Workaround Blender 2.80's audio bug, remove when fixed in Blender
- sequencer_workaround_2_80_audio_bug(context)
-
return {"FINISHED"}
# Update trim
@@ -217,8 +211,8 @@ class POWER_SEQUENCER_OT_mouse_trim(bpy.types.Operator):
def draw_start(self, context, event):
"""Initializes the drawing handler, see draw()"""
- to_select, to_delete = self.find_strips_to_trim(context)
- target_strips = to_select + to_delete
+ to_trim, to_delete = self.find_strips_to_trim(context)
+ target_strips = to_trim + to_delete
draw_args = (self, context, self.trim_start, self.trim_end, target_strips, self.gap_remove)
self.draw_handler = bpy.types.SpaceSequenceEditor.draw_handler_add(
@@ -263,12 +257,12 @@ class POWER_SEQUENCER_OT_mouse_trim(bpy.types.Operator):
self.is_trimming = False
def cut(self, context):
- to_select = self.find_strips_to_cut(context)
+ to_cut = self.find_strips_to_cut(context)
bpy.ops.sequencer.select_all(action="DESELECT")
- for s in to_select:
+ for s in to_cut:
s.select = True
- if len(to_select) == 0:
+ if len(to_cut) == 0:
bpy.ops.power_sequencer.gap_remove()
else:
frame_current = context.scene.frame_current
@@ -298,10 +292,10 @@ class POWER_SEQUENCER_OT_mouse_trim(bpy.types.Operator):
return to_cut
def trim(self, context):
- to_select, to_delete = self.find_strips_to_trim(context)
- trim_strips(context, self.trim_start, self.trim_end, self.select_mode, to_select, to_delete)
+ to_trim, to_delete = self.find_strips_to_trim(context)
+ trim_strips(context, self.trim_start, self.trim_end, to_trim, to_delete)
if (self.gap_remove and self.select_mode == "CURSOR") or (
- self.select_mode == "CONTEXT" and to_select == [] and to_delete == []
+ self.select_mode == "CONTEXT" and to_trim == [] and to_delete == []
):
context.scene.frame_current = min(self.trim_start, self.trim_end)
bpy.ops.power_sequencer.gap_remove()