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_instantly.py')
-rw-r--r--power_sequencer/operators/mouse_trim_instantly.py11
1 files changed, 7 insertions, 4 deletions
diff --git a/power_sequencer/operators/mouse_trim_instantly.py b/power_sequencer/operators/mouse_trim_instantly.py
index aeba2325..849b23e5 100644
--- a/power_sequencer/operators/mouse_trim_instantly.py
+++ b/power_sequencer/operators/mouse_trim_instantly.py
@@ -1,5 +1,5 @@
#
-# Copyright (C) 2016-2019 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
#
# This file is part of Power Sequencer.
#
@@ -96,15 +96,18 @@ class POWER_SEQUENCER_OT_mouse_trim_instantly(bpy.types.Operator):
for s in context.sequences
if s.frame_final_start <= frame <= s.frame_final_end and not s.lock
]
+ if not to_trim:
+ return {"FINISHED"}
- frame_cut_closest = min(get_frame_range(context, to_trim), key=lambda f: abs(frame - f))
+ frame_cut_closest = min(get_frame_range(to_trim), key=lambda f: abs(frame - f))
frame_start = min(frame, frame_cut_closest)
frame_end = max(frame, frame_cut_closest)
trim_strips(context, frame_start, frame_end, to_trim=to_trim)
- context.scene.frame_current = frame_start
+ context.scene.frame_current = frame
+
if self.gap_remove and self.select_mode == "CURSOR":
- bpy.ops.power_sequencer.gap_remove()
+ bpy.ops.power_sequencer.gap_remove(frame=frame_start, move_time_cursor=True)
return {"FINISHED"}