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')
-rwxr-xr-xpower_sequencer/__init__.py9
-rw-r--r--power_sequencer/addon_preferences.py5
-rw-r--r--power_sequencer/addon_properties.py9
-rw-r--r--power_sequencer/handlers.py40
-rwxr-xr-xpower_sequencer/operators/__init__.py7
-rw-r--r--power_sequencer/operators/channel_offset.py14
-rw-r--r--power_sequencer/operators/concatenate_strips.py5
-rw-r--r--power_sequencer/operators/copy_selected_sequences.py5
-rw-r--r--power_sequencer/operators/crossfade_add.py7
-rw-r--r--power_sequencer/operators/crossfade_edit.py5
-rw-r--r--power_sequencer/operators/cut_strips_under_cursor.py5
-rw-r--r--power_sequencer/operators/delete_direct.py5
-rw-r--r--power_sequencer/operators/deselect_all_left_or_right.py5
-rw-r--r--power_sequencer/operators/deselect_handles_and_grab.py5
-rw-r--r--power_sequencer/operators/duplicate_move.py5
-rw-r--r--power_sequencer/operators/expand_to_surrounding_cuts.py11
-rw-r--r--power_sequencer/operators/fade_add.py10
-rw-r--r--power_sequencer/operators/fade_clear.py11
-rw-r--r--power_sequencer/operators/gap_remove.py5
-rw-r--r--power_sequencer/operators/grab.py5
-rw-r--r--power_sequencer/operators/grab_closest_handle_or_cut.py5
-rw-r--r--power_sequencer/operators/grab_sequence_handles.py9
-rw-r--r--power_sequencer/operators/import_local_footage.py5
-rw-r--r--power_sequencer/operators/jump_time_offset.py5
-rw-r--r--power_sequencer/operators/jump_to_cut.py62
-rw-r--r--power_sequencer/operators/make_hold_frame.py5
-rw-r--r--power_sequencer/operators/marker_delete_closest.py5
-rw-r--r--power_sequencer/operators/marker_delete_direct.py5
-rw-r--r--power_sequencer/operators/marker_snap_to_cursor.py5
-rw-r--r--power_sequencer/operators/markers_as_timecodes.py5
-rw-r--r--power_sequencer/operators/markers_create_from_selected.py5
-rw-r--r--power_sequencer/operators/markers_set_preview_in_between.py5
-rw-r--r--power_sequencer/operators/markers_snap_matching_strips.py5
-rw-r--r--power_sequencer/operators/meta_resize_to_content.py5
-rw-r--r--power_sequencer/operators/meta_trim_content_to_bounds.py5
-rw-r--r--power_sequencer/operators/meta_ungroup_and_trim.py5
-rw-r--r--power_sequencer/operators/mouse_toggle_mute.py5
-rw-r--r--power_sequencer/operators/mouse_trim_instantly.py5
-rw-r--r--power_sequencer/operators/mouse_trim_modal.py14
-rw-r--r--power_sequencer/operators/open_project_directory.py5
-rw-r--r--power_sequencer/operators/playback_speed_decrease.py52
-rw-r--r--power_sequencer/operators/playback_speed_increase.py52
-rw-r--r--power_sequencer/operators/playback_speed_set.py17
-rw-r--r--power_sequencer/operators/preview_closest_cut.py5
-rw-r--r--power_sequencer/operators/preview_to_selection.py5
-rw-r--r--power_sequencer/operators/render_apply_preset.py5
-rw-r--r--power_sequencer/operators/render_presets/twitter_720p.py5
-rw-r--r--power_sequencer/operators/render_presets/youtube_1080.py5
-rw-r--r--power_sequencer/operators/ripple_delete.py5
-rw-r--r--power_sequencer/operators/save_direct.py5
-rw-r--r--power_sequencer/operators/scene_create_from_selection.py5
-rw-r--r--power_sequencer/operators/scene_cycle.py5
-rw-r--r--power_sequencer/operators/scene_merge_from.py5
-rw-r--r--power_sequencer/operators/scene_open_from_strip.py5
-rw-r--r--power_sequencer/operators/scene_rename_with_strip.py5
-rw-r--r--power_sequencer/operators/select_all_left_or_right.py13
-rw-r--r--power_sequencer/operators/select_closest_to_mouse.py5
-rw-r--r--power_sequencer/operators/select_linked_effect.py5
-rw-r--r--power_sequencer/operators/select_linked_strips.py5
-rw-r--r--power_sequencer/operators/select_related_strips.py5
-rw-r--r--power_sequencer/operators/select_strips_under_cursor.py5
-rw-r--r--power_sequencer/operators/set_timeline_range.py5
-rw-r--r--power_sequencer/operators/snap.py11
-rw-r--r--power_sequencer/operators/snap_selection.py11
-rw-r--r--power_sequencer/operators/space_sequences.py5
-rw-r--r--power_sequencer/operators/speed_remove_effect.py5
-rw-r--r--power_sequencer/operators/speed_up_movie_strip.py23
-rw-r--r--power_sequencer/operators/swap_strips.py5
-rw-r--r--power_sequencer/operators/toggle_selected_mute.py5
-rw-r--r--power_sequencer/operators/toggle_waveforms.py5
-rw-r--r--power_sequencer/operators/transitions_remove.py5
-rw-r--r--power_sequencer/operators/trim_left_or_right_handles.py5
-rw-r--r--power_sequencer/operators/trim_three_point_edit.py5
-rw-r--r--power_sequencer/operators/trim_to_surrounding_cuts.py5
-rw-r--r--power_sequencer/operators/utils/__init__.py4
-rw-r--r--power_sequencer/operators/utils/doc.py5
-rw-r--r--power_sequencer/operators/utils/draw.py5
-rw-r--r--power_sequencer/operators/utils/functions.py31
-rw-r--r--power_sequencer/operators/utils/global_settings.py5
-rw-r--r--power_sequencer/operators/utils/info_progress_bar.py5
-rw-r--r--power_sequencer/operators/value_offset.py10
-rw-r--r--power_sequencer/tools/__init__.py7
-rw-r--r--power_sequencer/tools/trim.py5
-rw-r--r--power_sequencer/ui/__init__.py5
-rw-r--r--power_sequencer/ui/menu_contextual.py5
-rwxr-xr-xpower_sequencer/ui/menu_toolbar.py5
-rw-r--r--power_sequencer/utils/addon_auto_imports.py5
-rw-r--r--power_sequencer/utils/register_shortcuts.py5
88 files changed, 211 insertions, 548 deletions
diff --git a/power_sequencer/__init__.py b/power_sequencer/__init__.py
index c646da7c..877de302 100755
--- a/power_sequencer/__init__.py
+++ b/power_sequencer/__init__.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
from typing import List, Tuple, Type
import bpy
@@ -27,8 +24,8 @@ bl_info = {
"name": "Power Sequencer",
"description": "Video editing tools for content creators",
"author": "Nathan Lovato",
- "version": (1, 5, 0),
- "blender": (2, 81, 0),
+ "version": (2, 0, 2),
+ "blender": (2, 93, 3),
"location": "Sequencer",
"tracker_url": "https://github.com/GDquest/Blender-power-sequencer/issues",
"wiki_url": "https://www.gdquest.com/docs/documentation/power-sequencer/",
diff --git a/power_sequencer/addon_preferences.py b/power_sequencer/addon_preferences.py
index 4220e89c..cfa21334 100644
--- a/power_sequencer/addon_preferences.py
+++ b/power_sequencer/addon_preferences.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
"""
Add-on preferences and interface in the Blender preferences window.
"""
diff --git a/power_sequencer/addon_properties.py b/power_sequencer/addon_properties.py
index 575a3954..3e7a4df3 100644
--- a/power_sequencer/addon_properties.py
+++ b/power_sequencer/addon_properties.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
@@ -10,8 +7,6 @@ class PowerSequencerProperties(bpy.types.PropertyGroup):
playback_speed: bpy.props.EnumProperty(
items=[
("NORMAL", "Normal (1x)", ""),
- ("FAST", "Fast (1.33x)", ""),
- ("FASTER", "Faster (1.66x)", ""),
("DOUBLE", "Double (2x)", ""),
("TRIPLE", "Triple (3x)", ""),
],
@@ -19,8 +14,6 @@ class PowerSequencerProperties(bpy.types.PropertyGroup):
default="NORMAL",
)
- frame_pre: bpy.props.IntProperty(name="Frame before frame_change", default=0, min=0)
-
active_tab: bpy.props.StringProperty(
name="Active Tab", description="The name of the active tab in the UI", default="Sequencer"
)
diff --git a/power_sequencer/handlers.py b/power_sequencer/handlers.py
index d9c107da..c743d18b 100644
--- a/power_sequencer/handlers.py
+++ b/power_sequencer/handlers.py
@@ -1,22 +1,10 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from bpy.app.handlers import persistent
@persistent
-def power_sequencer_load_file_post(arg):
- """
- Called after loading the blend file
- """
- for scene in bpy.data.scenes:
- scene.power_sequencer.frame_pre = bpy.context.scene.frame_current
-
-
-@persistent
def power_sequencer_playback_speed_post(scene):
"""
Handler function for faster playback
@@ -24,27 +12,23 @@ def power_sequencer_playback_speed_post(scene):
It steps over frame rather than increase the playback speed smoothly,
but it's still useful for faster editing
"""
+
+ # Calling this function triggers a callback to this function via the frame
+ # changed handler, causing a stack overflow. We use a property to prevent
+ # errors.
if bpy.context.screen and not bpy.context.screen.is_animation_playing:
return
playback_speed = scene.power_sequencer.playback_speed
- frame_start = scene.frame_current
- frame_post = scene.frame_current
-
- if playback_speed == "FAST" and frame_start % 3 == 0:
- frame_post += 1
- elif playback_speed == "FASTER" and frame_start % 2 == 0:
- frame_post += 1
- elif playback_speed == "DOUBLE":
- # 2.5x -> skip 5 frames for 2. 2 then 3 then 2 etc.
- frame_post += 1
+ target_frame = scene.frame_current
+ if playback_speed == "DOUBLE":
+ target_frame += 1
elif playback_speed == "TRIPLE":
- frame_post += 2
+ target_frame += 2
- if frame_start != frame_post:
- bpy.ops.screen.frame_offset(delta=frame_post - frame_start)
- scene.power_sequencer.frame_pre = scene.frame_current
+ if target_frame != scene.frame_current:
+ bpy.ops.screen.frame_offset(delta=target_frame - scene.frame_current)
def draw_playback_speed(self, context):
@@ -64,7 +48,6 @@ def register_handlers():
bpy.types.SEQUENCER_HT_header.append(draw_playback_speed)
# Handlers
- bpy.app.handlers.load_post.append(power_sequencer_load_file_post)
bpy.app.handlers.frame_change_post.append(power_sequencer_playback_speed_post)
@@ -74,5 +57,4 @@ def unregister_handlers():
bpy.types.SEQUENCER_HT_header.remove(draw_playback_speed)
# Handlers
- bpy.app.handlers.load_post.remove(power_sequencer_load_file_post)
bpy.app.handlers.frame_change_post.remove(power_sequencer_playback_speed_post)
diff --git a/power_sequencer/operators/__init__.py b/power_sequencer/operators/__init__.py
index b1222a18..57dbe2bb 100755
--- a/power_sequencer/operators/__init__.py
+++ b/power_sequencer/operators/__init__.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import importlib
import os
@@ -16,7 +13,7 @@ def get_operator_classes():
module_paths = ["." + os.path.splitext(f)[0] for f in module_files]
classes = []
for path in module_paths:
- module = importlib.import_module(path, package="power_sequencer.operators")
+ module = importlib.import_module(path, package=__package__)
operator_names = [entry for entry in dir(module) if entry.startswith("POWER_SEQUENCER_OT")]
classes.extend([getattr(module, name) for name in operator_names])
return classes
diff --git a/power_sequencer/operators/channel_offset.py b/power_sequencer/operators/channel_offset.py
index b7569afa..1e9c97f7 100644
--- a/power_sequencer/operators/channel_offset.py
+++ b/power_sequencer/operators/channel_offset.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
from operator import attrgetter
import bpy
@@ -117,12 +114,11 @@ class POWER_SEQUENCER_OT_channel_offset(bpy.types.Operator):
context, s.frame_final_start, s.frame_final_end, to_trim, to_delete
)
- if not self.keep_selection_offset:
- s.channel = comparison_function(limit_channel, s.channel + channel_offset)
- if s.channel == limit_channel:
- move_selection(context, [s], 0, 0)
+ s.channel = comparison_function(limit_channel, s.channel + channel_offset)
+ if s.channel == limit_channel:
+ move_selection(context, [s], 0, 0)
- if self.keep_selection_offset:
+ if self.keep_selection_offset and not self.trim_target_channel:
start_frame = head.frame_final_start
x_difference = 0
while not head.channel == limit_channel:
diff --git a/power_sequencer/operators/concatenate_strips.py b/power_sequencer/operators/concatenate_strips.py
index 32f5f59b..17ff4ee4 100644
--- a/power_sequencer/operators/concatenate_strips.py
+++ b/power_sequencer/operators/concatenate_strips.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from operator import attrgetter
diff --git a/power_sequencer/operators/copy_selected_sequences.py b/power_sequencer/operators/copy_selected_sequences.py
index 643ecb33..338f1cff 100644
--- a/power_sequencer/operators/copy_selected_sequences.py
+++ b/power_sequencer/operators/copy_selected_sequences.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from operator import attrgetter
diff --git a/power_sequencer/operators/crossfade_add.py b/power_sequencer/operators/crossfade_add.py
index 73644c80..25ce7ae7 100644
--- a/power_sequencer/operators/crossfade_add.py
+++ b/power_sequencer/operators/crossfade_add.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.functions import find_sequences_after
@@ -94,7 +91,7 @@ class POWER_SEQUENCER_OT_crossfade_add(bpy.types.Operator):
Moves the handles of the two sequences before adding the crossfade
"""
fade_duration = convert_duration_to_frames(context, self.crossfade_duration)
- fade_offset = fade_duration / 2
+ fade_offset = int(fade_duration / 2)
if hasattr(sequence_1, "input_1"):
sequence_1.input_1.frame_final_end -= fade_offset
diff --git a/power_sequencer/operators/crossfade_edit.py b/power_sequencer/operators/crossfade_edit.py
index 0e330e10..6d3be976 100644
--- a/power_sequencer/operators/crossfade_edit.py
+++ b/power_sequencer/operators/crossfade_edit.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.global_settings import SequenceTypes
diff --git a/power_sequencer/operators/cut_strips_under_cursor.py b/power_sequencer/operators/cut_strips_under_cursor.py
index 4a66a782..51bf0789 100644
--- a/power_sequencer/operators/cut_strips_under_cursor.py
+++ b/power_sequencer/operators/cut_strips_under_cursor.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
diff --git a/power_sequencer/operators/delete_direct.py b/power_sequencer/operators/delete_direct.py
index bda5face..1fc8bf60 100644
--- a/power_sequencer/operators/delete_direct.py
+++ b/power_sequencer/operators/delete_direct.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.functions import get_mouse_frame_and_channel
diff --git a/power_sequencer/operators/deselect_all_left_or_right.py b/power_sequencer/operators/deselect_all_left_or_right.py
index 6769d173..3ba79483 100644
--- a/power_sequencer/operators/deselect_all_left_or_right.py
+++ b/power_sequencer/operators/deselect_all_left_or_right.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
diff --git a/power_sequencer/operators/deselect_handles_and_grab.py b/power_sequencer/operators/deselect_handles_and_grab.py
index 468baf8b..36f547df 100644
--- a/power_sequencer/operators/deselect_handles_and_grab.py
+++ b/power_sequencer/operators/deselect_handles_and_grab.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
diff --git a/power_sequencer/operators/duplicate_move.py b/power_sequencer/operators/duplicate_move.py
index 32c62a56..cce7a6ed 100644
--- a/power_sequencer/operators/duplicate_move.py
+++ b/power_sequencer/operators/duplicate_move.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.functions import get_mouse_frame_and_channel
diff --git a/power_sequencer/operators/expand_to_surrounding_cuts.py b/power_sequencer/operators/expand_to_surrounding_cuts.py
index 7129e42d..4b8a6f93 100644
--- a/power_sequencer/operators/expand_to_surrounding_cuts.py
+++ b/power_sequencer/operators/expand_to_surrounding_cuts.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.functions import slice_selection
@@ -22,7 +19,11 @@ class POWER_SEQUENCER_OT_expand_to_surrounding_cuts(bpy.types.Operator):
"demo": "",
"description": doc_description(__doc__),
"shortcuts": [
- ({"type": "E", "value": "PRESS", "ctrl": True}, {}, "Expand to Surrounding Cuts",)
+ (
+ {"type": "E", "value": "PRESS", "ctrl": True},
+ {},
+ "Expand to Surrounding Cuts",
+ )
],
"keymap": "Sequencer",
}
diff --git a/power_sequencer/operators/fade_add.py b/power_sequencer/operators/fade_add.py
index 39fe18a9..9a3d1973 100644
--- a/power_sequencer/operators/fade_add.py
+++ b/power_sequencer/operators/fade_add.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from mathutils import Vector
from math import floor
@@ -40,7 +37,10 @@ class POWER_SEQUENCER_OT_fade_add(bpy.types.Operator):
bl_options = {"REGISTER", "UNDO"}
duration_seconds: bpy.props.FloatProperty(
- name="Fade Duration", description="Duration of the fade in seconds", default=1.0, min=0.01,
+ name="Fade Duration",
+ description="Duration of the fade in seconds",
+ default=1.0,
+ min=0.01,
)
type: bpy.props.EnumProperty(
items=[
diff --git a/power_sequencer/operators/fade_clear.py b/power_sequencer/operators/fade_clear.py
index c74b27cf..d73c7347 100644
--- a/power_sequencer/operators/fade_clear.py
+++ b/power_sequencer/operators/fade_clear.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
@@ -21,7 +18,11 @@ class POWER_SEQUENCER_OT_fade_clear(bpy.types.Operator):
"demo": "",
"description": doc_description(__doc__),
"shortcuts": [
- ({"type": "F", "value": "PRESS", "alt": True, "ctrl": True}, {}, "Clear Fades",)
+ (
+ {"type": "F", "value": "PRESS", "alt": True, "ctrl": True},
+ {},
+ "Clear Fades",
+ )
],
"keymap": "Sequencer",
}
diff --git a/power_sequencer/operators/gap_remove.py b/power_sequencer/operators/gap_remove.py
index 7f2ec5ae..64070667 100644
--- a/power_sequencer/operators/gap_remove.py
+++ b/power_sequencer/operators/gap_remove.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from operator import attrgetter
diff --git a/power_sequencer/operators/grab.py b/power_sequencer/operators/grab.py
index de53d2a4..57299d72 100644
--- a/power_sequencer/operators/grab.py
+++ b/power_sequencer/operators/grab.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.functions import get_mouse_frame_and_channel
diff --git a/power_sequencer/operators/grab_closest_handle_or_cut.py b/power_sequencer/operators/grab_closest_handle_or_cut.py
index 55440b95..7a7a056d 100644
--- a/power_sequencer/operators/grab_closest_handle_or_cut.py
+++ b/power_sequencer/operators/grab_closest_handle_or_cut.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
"""
Selects and grabs the strip handle or cut closest to the mouse cursor.
Hover near a cut and use this operator to slide it.
diff --git a/power_sequencer/operators/grab_sequence_handles.py b/power_sequencer/operators/grab_sequence_handles.py
index ecbe8c4b..d8137b0f 100644
--- a/power_sequencer/operators/grab_sequence_handles.py
+++ b/power_sequencer/operators/grab_sequence_handles.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.global_settings import SequenceTypes
@@ -34,8 +31,8 @@ class POWER_SEQUENCER_OT_grab_sequence_handles(bpy.types.Operator):
bl_options = {"REGISTER", "UNDO"}
always_find_closest: bpy.props.BoolProperty(name="Always find closest", default=False)
- frame: bpy.props.IntProperty(name="Frame", default=-1, options={"HIDDEN"})
- channel: bpy.props.IntProperty(name="Channel", default=-1, options={"HIDDEN"})
+ frame: bpy.props.FloatProperty(name="Frame", default=-1.0, options={"HIDDEN"})
+ channel: bpy.props.FloatProperty(name="Channel", default=-1.0, options={"HIDDEN"})
@classmethod
def poll(cls, context):
diff --git a/power_sequencer/operators/import_local_footage.py b/power_sequencer/operators/import_local_footage.py
index 8612210a..7eb7120b 100644
--- a/power_sequencer/operators/import_local_footage.py
+++ b/power_sequencer/operators/import_local_footage.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import json
import os
import re
diff --git a/power_sequencer/operators/jump_time_offset.py b/power_sequencer/operators/jump_time_offset.py
index ee9b1f9b..79941827 100644
--- a/power_sequencer/operators/jump_time_offset.py
+++ b/power_sequencer/operators/jump_time_offset.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.functions import convert_duration_to_frames
diff --git a/power_sequencer/operators/jump_to_cut.py b/power_sequencer/operators/jump_to_cut.py
index add0dab9..02a0b9f9 100644
--- a/power_sequencer/operators/jump_to_cut.py
+++ b/power_sequencer/operators/jump_to_cut.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from operator import attrgetter
@@ -45,8 +42,8 @@ class POWER_SEQUENCER_OT_jump_to_cut(bpy.types.Operator):
name="Direction",
description="Jump direction, either forward or backward",
items=[
- ("RIGHT", "Forward", "Jump forward in time"),
- ("LEFT", "Backward", "Jump backward in time"),
+ ("RIGHT", "Right", "Jump forward in time"),
+ ("LEFT", "Left", "Jump backward in time"),
],
)
@@ -56,9 +53,6 @@ class POWER_SEQUENCER_OT_jump_to_cut(bpy.types.Operator):
def execute(self, context):
frame_current = context.scene.frame_current
- sorted_sequences = sorted(
- context.sequences, key=attrgetter("frame_final_start", "frame_final_end")
- )
fcurves = []
animation_data = context.scene.animation_data
@@ -66,43 +60,53 @@ class POWER_SEQUENCER_OT_jump_to_cut(bpy.types.Operator):
fcurves = animation_data.action.fcurves
frame_target = -1
+
+ # First find the closest cut, then if that sequence has an associated
+ # fcurve, loop through the curve's keyframes.
if self.direction == "RIGHT":
- sequences = [s for s in sorted_sequences if s.frame_final_end > frame_current]
- for s in sequences:
+ frame_target = 100_000_000
+ for s in context.sequences:
+ if s.frame_final_end <= frame_current:
+ continue
+
+ candidates = [frame_target, s.frame_final_end]
+ if s.frame_final_start > frame_current:
+ candidates.append(s.frame_final_start)
- frame_target = (
- s.frame_final_end
- if s.frame_final_start <= frame_current
- else s.frame_final_start
- )
+ frame_target = min(candidates)
for f in fcurves:
+ if s.name not in f.data_path:
+ continue
+
for k in f.keyframe_points:
frame = k.co[0]
- if frame <= context.scene.frame_current:
+ if frame <= frame_current:
continue
frame_target = min(frame_target, frame)
- break
elif self.direction == "LEFT":
- sequences = [
- s for s in reversed(sorted_sequences) if s.frame_final_start < frame_current
- ]
- for s in sequences:
+ for s in context.sequences:
+ if s.frame_final_start >= frame_current:
+ continue
+
+ candidates = [frame_target, s.frame_final_start]
+ if s.frame_final_end < frame_current:
+ candidates.append(s.frame_final_end)
- frame_target = (
- s.frame_final_start if s.frame_final_end >= frame_current else s.frame_final_end
- )
+ frame_target = max(candidates)
for f in fcurves:
+ if s.name not in f.data_path:
+ continue
+
for k in f.keyframe_points:
frame = k.co[0]
- if frame >= context.scene.frame_current:
+ if frame >= frame_current:
continue
frame_target = max(frame_target, frame)
- break
- if frame_target != -1:
- context.scene.frame_current = max(1, frame_target)
+ if frame_target > 0 and frame_target != 100_000_000:
+ context.scene.frame_current = int(frame_target)
return {"FINISHED"}
diff --git a/power_sequencer/operators/make_hold_frame.py b/power_sequencer/operators/make_hold_frame.py
index 4c1f110d..3650a4cb 100644
--- a/power_sequencer/operators/make_hold_frame.py
+++ b/power_sequencer/operators/make_hold_frame.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
import operator
diff --git a/power_sequencer/operators/marker_delete_closest.py b/power_sequencer/operators/marker_delete_closest.py
index a4756958..68659b51 100644
--- a/power_sequencer/operators/marker_delete_closest.py
+++ b/power_sequencer/operators/marker_delete_closest.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
diff --git a/power_sequencer/operators/marker_delete_direct.py b/power_sequencer/operators/marker_delete_direct.py
index efc8ba66..3b6f9297 100644
--- a/power_sequencer/operators/marker_delete_direct.py
+++ b/power_sequencer/operators/marker_delete_direct.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
diff --git a/power_sequencer/operators/marker_snap_to_cursor.py b/power_sequencer/operators/marker_snap_to_cursor.py
index dbb3a6c7..8fe80653 100644
--- a/power_sequencer/operators/marker_snap_to_cursor.py
+++ b/power_sequencer/operators/marker_snap_to_cursor.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
diff --git a/power_sequencer/operators/markers_as_timecodes.py b/power_sequencer/operators/markers_as_timecodes.py
index 52658838..74b42794 100644
--- a/power_sequencer/operators/markers_as_timecodes.py
+++ b/power_sequencer/operators/markers_as_timecodes.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
import datetime as dt
diff --git a/power_sequencer/operators/markers_create_from_selected.py b/power_sequencer/operators/markers_create_from_selected.py
index bd346d84..620995de 100644
--- a/power_sequencer/operators/markers_create_from_selected.py
+++ b/power_sequencer/operators/markers_create_from_selected.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
diff --git a/power_sequencer/operators/markers_set_preview_in_between.py b/power_sequencer/operators/markers_set_preview_in_between.py
index 60724312..8ac0e9f6 100644
--- a/power_sequencer/operators/markers_set_preview_in_between.py
+++ b/power_sequencer/operators/markers_set_preview_in_between.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.functions import find_neighboring_markers
diff --git a/power_sequencer/operators/markers_snap_matching_strips.py b/power_sequencer/operators/markers_snap_matching_strips.py
index da475eeb..b9eab7b4 100644
--- a/power_sequencer/operators/markers_snap_matching_strips.py
+++ b/power_sequencer/operators/markers_snap_matching_strips.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
diff --git a/power_sequencer/operators/meta_resize_to_content.py b/power_sequencer/operators/meta_resize_to_content.py
index ed54ebca..b5d0b29f 100644
--- a/power_sequencer/operators/meta_resize_to_content.py
+++ b/power_sequencer/operators/meta_resize_to_content.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.functions import get_frame_range
diff --git a/power_sequencer/operators/meta_trim_content_to_bounds.py b/power_sequencer/operators/meta_trim_content_to_bounds.py
index 11b48369..e309f8e1 100644
--- a/power_sequencer/operators/meta_trim_content_to_bounds.py
+++ b/power_sequencer/operators/meta_trim_content_to_bounds.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.global_settings import SequenceTypes
diff --git a/power_sequencer/operators/meta_ungroup_and_trim.py b/power_sequencer/operators/meta_ungroup_and_trim.py
index 00c79cf4..e467492d 100644
--- a/power_sequencer/operators/meta_ungroup_and_trim.py
+++ b/power_sequencer/operators/meta_ungroup_and_trim.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
diff --git a/power_sequencer/operators/mouse_toggle_mute.py b/power_sequencer/operators/mouse_toggle_mute.py
index 362b2e9d..cd135829 100644
--- a/power_sequencer/operators/mouse_toggle_mute.py
+++ b/power_sequencer/operators/mouse_toggle_mute.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
"""Toggle mute a sequence as you click on it"""
import bpy
from math import floor
diff --git a/power_sequencer/operators/mouse_trim_instantly.py b/power_sequencer/operators/mouse_trim_instantly.py
index 332053fc..3a79a5a7 100644
--- a/power_sequencer/operators/mouse_trim_instantly.py
+++ b/power_sequencer/operators/mouse_trim_instantly.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from math import floor
diff --git a/power_sequencer/operators/mouse_trim_modal.py b/power_sequencer/operators/mouse_trim_modal.py
index a138933b..8136adae 100644
--- a/power_sequencer/operators/mouse_trim_modal.py
+++ b/power_sequencer/operators/mouse_trim_modal.py
@@ -1,10 +1,6 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
-import bgl
import gpu
import math
from mathutils import Vector
@@ -361,8 +357,8 @@ def draw(self, context, frame_start=-1, frame_end=-1, target_strips=[], draw_arr
rect_origin = Vector((start_x, start_y))
rect_size = Vector((end_x - start_x, abs(start_y - end_y)))
- bgl.glEnable(bgl.GL_BLEND)
- bgl.glLineWidth(3)
+ gpu.state.blend_set('ALPHA')
+ gpu.state.line_width_set(3.0)
draw_rectangle(SHADER, rect_origin, rect_size, color_fill)
# Vertical lines
draw_line(SHADER, Vector((start_x, start_y)), Vector((start_x, end_y)), color_line)
@@ -377,8 +373,8 @@ def draw(self, context, frame_start=-1, frame_end=-1, target_strips=[], draw_arr
draw_triangle_equilateral(SHADER, center_1, radius, color=color_line)
draw_triangle_equilateral(SHADER, center_2, radius, math.pi, color=color_line)
- bgl.glLineWidth(1)
- bgl.glDisable(bgl.GL_BLEND)
+ gpu.state.line_width_set(1)
+ gpu.state.blend_set('NONE')
def get_frame_and_channel(event):
diff --git a/power_sequencer/operators/open_project_directory.py b/power_sequencer/operators/open_project_directory.py
index f32f2ac2..02c72de1 100644
--- a/power_sequencer/operators/open_project_directory.py
+++ b/power_sequencer/operators/open_project_directory.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
import os
from platform import system
diff --git a/power_sequencer/operators/playback_speed_decrease.py b/power_sequencer/operators/playback_speed_decrease.py
deleted file mode 100644
index a856ac4b..00000000
--- a/power_sequencer/operators/playback_speed_decrease.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
-import bpy
-
-from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
-
-
-class POWER_SEQUENCER_OT_playback_speed_decrease(bpy.types.Operator):
- """
- *brief* Decrease playback speed incrementally down to normal
-
-
- Playback speed may be set to any of the following speeds:
-
- * Normal (1x)
- * Fast (1.33x)
- * Faster (1.66x)
- * Double (2x)
- * Triple (3x)
-
- Activating this operator will decrease playback speed through each
- of these steps until minimum speed is reached.
- """
-
- doc = {
- "name": doc_name(__qualname__),
- "demo": "",
- "description": doc_description(__doc__),
- "shortcuts": [({"type": "COMMA", "value": "PRESS"}, {}, "Decrease Playback Speed")],
- "keymap": "Sequencer",
- }
- bl_idname = doc_idname(__qualname__)
- bl_label = doc["name"]
- bl_description = doc_brief(doc["description"])
-
- @classmethod
- def poll(cls, context):
- return context.sequences
-
- def execute(self, context):
- scene = context.scene
-
- speeds = ["NORMAL", "FAST", "FASTER", "DOUBLE", "TRIPLE"]
- playback_speed = scene.power_sequencer.playback_speed
-
- index = max(0, speeds.index(playback_speed) - 1)
- scene.power_sequencer.playback_speed = speeds[index]
-
- return {"FINISHED"}
diff --git a/power_sequencer/operators/playback_speed_increase.py b/power_sequencer/operators/playback_speed_increase.py
deleted file mode 100644
index 7c2f2ad2..00000000
--- a/power_sequencer/operators/playback_speed_increase.py
+++ /dev/null
@@ -1,52 +0,0 @@
-# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
-import bpy
-
-from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
-
-
-class POWER_SEQUENCER_OT_playback_speed_increase(bpy.types.Operator):
- """
- *brief* Increase playback speed up to triple
-
-
- Playback speed may be set to any of the following speeds:
-
- * Normal (1x)
- * Fast (1.33x)
- * Faster (1.66x)
- * Double (2x)
- * Triple (3x)
-
- Activating this operator will increase playback speed through each
- of these steps until maximum speed is reached.
- """
-
- doc = {
- "name": doc_name(__qualname__),
- "demo": "",
- "description": doc_description(__doc__),
- "shortcuts": [({"type": "PERIOD", "value": "PRESS"}, {}, "Increase playback speed")],
- "keymap": "Sequencer",
- }
- bl_idname = doc_idname(__qualname__)
- bl_label = doc["name"]
- bl_description = doc_brief(doc["description"])
-
- @classmethod
- def poll(cls, context):
- return context.sequences
-
- def execute(self, context):
- scene = context.scene
-
- speeds = ["NORMAL", "FAST", "FASTER", "DOUBLE", "TRIPLE"]
- playback_speed = scene.power_sequencer.playback_speed
-
- index = min(speeds.index(playback_speed) + 1, len(speeds) - 1)
- scene.power_sequencer.playback_speed = speeds[index]
-
- return {"FINISHED"}
diff --git a/power_sequencer/operators/playback_speed_set.py b/power_sequencer/operators/playback_speed_set.py
index 9f576247..82c45b7a 100644
--- a/power_sequencer/operators/playback_speed_set.py
+++ b/power_sequencer/operators/playback_speed_set.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
@@ -19,14 +16,8 @@ class POWER_SEQUENCER_OT_playback_speed_set(bpy.types.Operator):
"description": doc_description(__doc__),
"shortcuts": [
({"type": "ONE", "ctrl": True, "value": "PRESS"}, {"speed": "NORMAL"}, "Speed to 1x"),
- ({"type": "TWO", "ctrl": True, "value": "PRESS"}, {"speed": "FAST"}, "Speed to 1.33x"),
- (
- {"type": "THREE", "ctrl": True, "value": "PRESS"},
- {"speed": "FASTER"},
- "Speed to 1.66x",
- ),
- ({"type": "FOUR", "ctrl": True, "value": "PRESS"}, {"speed": "DOUBLE"}, "Speed to 2x"),
- ({"type": "FIVE", "ctrl": True, "value": "PRESS"}, {"speed": "TRIPLE"}, "Speed to 3x"),
+ ({"type": "TWO", "ctrl": True, "value": "PRESS"}, {"speed": "DOUBLE"}, "Speed to 2x"),
+ ({"type": "THREE", "ctrl": True, "value": "PRESS"}, {"speed": "TRIPLE"}, "Speed to 3x"),
],
"keymap": "Sequencer",
}
@@ -38,8 +29,6 @@ class POWER_SEQUENCER_OT_playback_speed_set(bpy.types.Operator):
speed: bpy.props.EnumProperty(
items=[
("NORMAL", "Normal (1x)", ""),
- ("FAST", "Fast (1.33x)", ""),
- ("FASTER", "Faster (1.66x)", ""),
("DOUBLE", "Double (2x)", ""),
("TRIPLE", "Triple (3x)", ""),
],
diff --git a/power_sequencer/operators/preview_closest_cut.py b/power_sequencer/operators/preview_closest_cut.py
index 312be788..2375c21a 100644
--- a/power_sequencer/operators/preview_closest_cut.py
+++ b/power_sequencer/operators/preview_closest_cut.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.functions import get_frame_range
diff --git a/power_sequencer/operators/preview_to_selection.py b/power_sequencer/operators/preview_to_selection.py
index ea6c0ed7..7ad8e2c7 100644
--- a/power_sequencer/operators/preview_to_selection.py
+++ b/power_sequencer/operators/preview_to_selection.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.functions import get_frame_range
diff --git a/power_sequencer/operators/render_apply_preset.py b/power_sequencer/operators/render_apply_preset.py
index dc3b0ed1..d7ad5b38 100644
--- a/power_sequencer/operators/render_apply_preset.py
+++ b/power_sequencer/operators/render_apply_preset.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
import os
diff --git a/power_sequencer/operators/render_presets/twitter_720p.py b/power_sequencer/operators/render_presets/twitter_720p.py
index 109090cc..eadb4266 100644
--- a/power_sequencer/operators/render_presets/twitter_720p.py
+++ b/power_sequencer/operators/render_presets/twitter_720p.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
if __name__ == "__main__":
import bpy
diff --git a/power_sequencer/operators/render_presets/youtube_1080.py b/power_sequencer/operators/render_presets/youtube_1080.py
index 5bf6e826..61bab65d 100644
--- a/power_sequencer/operators/render_presets/youtube_1080.py
+++ b/power_sequencer/operators/render_presets/youtube_1080.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
if __name__ == "__main__":
import bpy
diff --git a/power_sequencer/operators/ripple_delete.py b/power_sequencer/operators/ripple_delete.py
index 939da4e0..515f318f 100644
--- a/power_sequencer/operators/ripple_delete.py
+++ b/power_sequencer/operators/ripple_delete.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.doc import doc_brief, doc_description, doc_idname, doc_name
diff --git a/power_sequencer/operators/save_direct.py b/power_sequencer/operators/save_direct.py
index f41c3d4f..09b130a3 100644
--- a/power_sequencer/operators/save_direct.py
+++ b/power_sequencer/operators/save_direct.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
diff --git a/power_sequencer/operators/scene_create_from_selection.py b/power_sequencer/operators/scene_create_from_selection.py
index 206e385a..15ed0237 100644
--- a/power_sequencer/operators/scene_create_from_selection.py
+++ b/power_sequencer/operators/scene_create_from_selection.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from operator import attrgetter
diff --git a/power_sequencer/operators/scene_cycle.py b/power_sequencer/operators/scene_cycle.py
index 1be39ab9..05b861e7 100644
--- a/power_sequencer/operators/scene_cycle.py
+++ b/power_sequencer/operators/scene_cycle.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
diff --git a/power_sequencer/operators/scene_merge_from.py b/power_sequencer/operators/scene_merge_from.py
index b411e039..9d790baf 100644
--- a/power_sequencer/operators/scene_merge_from.py
+++ b/power_sequencer/operators/scene_merge_from.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
diff --git a/power_sequencer/operators/scene_open_from_strip.py b/power_sequencer/operators/scene_open_from_strip.py
index 0b992356..8c868bc3 100644
--- a/power_sequencer/operators/scene_open_from_strip.py
+++ b/power_sequencer/operators/scene_open_from_strip.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
diff --git a/power_sequencer/operators/scene_rename_with_strip.py b/power_sequencer/operators/scene_rename_with_strip.py
index 8bc6432f..b5327439 100644
--- a/power_sequencer/operators/scene_rename_with_strip.py
+++ b/power_sequencer/operators/scene_rename_with_strip.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
diff --git a/power_sequencer/operators/select_all_left_or_right.py b/power_sequencer/operators/select_all_left_or_right.py
index 7d9087ee..794a9378 100644
--- a/power_sequencer/operators/select_all_left_or_right.py
+++ b/power_sequencer/operators/select_all_left_or_right.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
@@ -51,4 +48,10 @@ class POWER_SEQUENCER_OT_select_all_left_or_right(bpy.types.Operator):
return context.sequences
def execute(self, context):
- return bpy.ops.sequencer.select("INVOKE_DEFAULT", left_right=self.side)
+ if self.side == "LEFT":
+ for s in context.sequences:
+ s.select = s.frame_final_end < context.scene.frame_current
+ else:
+ for s in context.sequences:
+ s.select = s.frame_final_start > context.scene.frame_current
+ return {"FINISHED"}
diff --git a/power_sequencer/operators/select_closest_to_mouse.py b/power_sequencer/operators/select_closest_to_mouse.py
index f14bc309..dee7e967 100644
--- a/power_sequencer/operators/select_closest_to_mouse.py
+++ b/power_sequencer/operators/select_closest_to_mouse.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.functions import find_strips_mouse
diff --git a/power_sequencer/operators/select_linked_effect.py b/power_sequencer/operators/select_linked_effect.py
index a63096f1..d00a7a4a 100644
--- a/power_sequencer/operators/select_linked_effect.py
+++ b/power_sequencer/operators/select_linked_effect.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.functions import find_linked
diff --git a/power_sequencer/operators/select_linked_strips.py b/power_sequencer/operators/select_linked_strips.py
index 5716d13d..29022257 100644
--- a/power_sequencer/operators/select_linked_strips.py
+++ b/power_sequencer/operators/select_linked_strips.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
diff --git a/power_sequencer/operators/select_related_strips.py b/power_sequencer/operators/select_related_strips.py
index 0e442ebd..e7101fee 100644
--- a/power_sequencer/operators/select_related_strips.py
+++ b/power_sequencer/operators/select_related_strips.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.global_settings import SequenceTypes
diff --git a/power_sequencer/operators/select_strips_under_cursor.py b/power_sequencer/operators/select_strips_under_cursor.py
index a47d6e80..0c4712b5 100644
--- a/power_sequencer/operators/select_strips_under_cursor.py
+++ b/power_sequencer/operators/select_strips_under_cursor.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.functions import get_sequences_under_cursor
diff --git a/power_sequencer/operators/set_timeline_range.py b/power_sequencer/operators/set_timeline_range.py
index 65a90f4d..a9bbd163 100644
--- a/power_sequencer/operators/set_timeline_range.py
+++ b/power_sequencer/operators/set_timeline_range.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
diff --git a/power_sequencer/operators/snap.py b/power_sequencer/operators/snap.py
index 793f5bd9..24a4f52a 100644
--- a/power_sequencer/operators/snap.py
+++ b/power_sequencer/operators/snap.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.functions import get_sequences_under_cursor
@@ -21,7 +18,11 @@ class POWER_SEQUENCER_OT_snap(bpy.types.Operator):
"demo": "",
"description": doc_description(__doc__),
"shortcuts": [
- ({"type": "S", "value": "PRESS", "shift": True}, {}, "Snap sequences to cursor",)
+ (
+ {"type": "S", "value": "PRESS", "shift": True},
+ {},
+ "Snap sequences to cursor",
+ )
],
"keymap": "Sequencer",
}
diff --git a/power_sequencer/operators/snap_selection.py b/power_sequencer/operators/snap_selection.py
index 38da4c17..b73c5561 100644
--- a/power_sequencer/operators/snap_selection.py
+++ b/power_sequencer/operators/snap_selection.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.functions import get_sequences_under_cursor, move_selection
from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
@@ -21,7 +18,11 @@ class POWER_SEQUENCER_OT_snap_selection(bpy.types.Operator):
"demo": "",
"description": doc_description(__doc__),
"shortcuts": [
- ({"type": "S", "value": "PRESS", "alt": True}, {}, "Snap selection to cursor",)
+ (
+ {"type": "S", "value": "PRESS", "alt": True},
+ {},
+ "Snap selection to cursor",
+ )
],
"keymap": "Sequencer",
}
diff --git a/power_sequencer/operators/space_sequences.py b/power_sequencer/operators/space_sequences.py
index ddb28dfe..da3a0ac5 100644
--- a/power_sequencer/operators/space_sequences.py
+++ b/power_sequencer/operators/space_sequences.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.functions import convert_duration_to_frames
diff --git a/power_sequencer/operators/speed_remove_effect.py b/power_sequencer/operators/speed_remove_effect.py
index ae2a4d35..69348461 100644
--- a/power_sequencer/operators/speed_remove_effect.py
+++ b/power_sequencer/operators/speed_remove_effect.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
diff --git a/power_sequencer/operators/speed_up_movie_strip.py b/power_sequencer/operators/speed_up_movie_strip.py
index c004e2fc..9e863f36 100644
--- a/power_sequencer/operators/speed_up_movie_strip.py
+++ b/power_sequencer/operators/speed_up_movie_strip.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from math import ceil
@@ -24,9 +21,21 @@ class POWER_SEQUENCER_OT_speed_up_movie_strip(bpy.types.Operator):
"demo": "https://i.imgur.com/ZyEd0jD.gif",
"description": doc_description(__doc__),
"shortcuts": [
- ({"type": "TWO", "value": "PRESS", "alt": True}, {"speed_factor": 2.0}, "Speed x2",),
- ({"type": "THREE", "value": "PRESS", "alt": True}, {"speed_factor": 3.0}, "Speed x3",),
- ({"type": "FOUR", "value": "PRESS", "alt": True}, {"speed_factor": 4.0}, "Speed x4",),
+ (
+ {"type": "TWO", "value": "PRESS", "alt": True},
+ {"speed_factor": 2.0},
+ "Speed x2",
+ ),
+ (
+ {"type": "THREE", "value": "PRESS", "alt": True},
+ {"speed_factor": 3.0},
+ "Speed x3",
+ ),
+ (
+ {"type": "FOUR", "value": "PRESS", "alt": True},
+ {"speed_factor": 4.0},
+ "Speed x4",
+ ),
],
"keymap": "Sequencer",
}
diff --git a/power_sequencer/operators/swap_strips.py b/power_sequencer/operators/swap_strips.py
index 44537c43..6b0460fa 100644
--- a/power_sequencer/operators/swap_strips.py
+++ b/power_sequencer/operators/swap_strips.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from operator import attrgetter
diff --git a/power_sequencer/operators/toggle_selected_mute.py b/power_sequencer/operators/toggle_selected_mute.py
index 3ee1a022..1a79237f 100644
--- a/power_sequencer/operators/toggle_selected_mute.py
+++ b/power_sequencer/operators/toggle_selected_mute.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.doc import doc_name, doc_idname, doc_brief, doc_description
diff --git a/power_sequencer/operators/toggle_waveforms.py b/power_sequencer/operators/toggle_waveforms.py
index 3e064182..12104493 100644
--- a/power_sequencer/operators/toggle_waveforms.py
+++ b/power_sequencer/operators/toggle_waveforms.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.global_settings import SequenceTypes
diff --git a/power_sequencer/operators/transitions_remove.py b/power_sequencer/operators/transitions_remove.py
index d1db0d74..1fb1b0d0 100644
--- a/power_sequencer/operators/transitions_remove.py
+++ b/power_sequencer/operators/transitions_remove.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from operator import attrgetter
diff --git a/power_sequencer/operators/trim_left_or_right_handles.py b/power_sequencer/operators/trim_left_or_right_handles.py
index aea81610..c02b8650 100644
--- a/power_sequencer/operators/trim_left_or_right_handles.py
+++ b/power_sequencer/operators/trim_left_or_right_handles.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
from operator import attrgetter
import bpy
diff --git a/power_sequencer/operators/trim_three_point_edit.py b/power_sequencer/operators/trim_three_point_edit.py
index f174589e..6d173258 100644
--- a/power_sequencer/operators/trim_three_point_edit.py
+++ b/power_sequencer/operators/trim_three_point_edit.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.functions import get_mouse_frame_and_channel
diff --git a/power_sequencer/operators/trim_to_surrounding_cuts.py b/power_sequencer/operators/trim_to_surrounding_cuts.py
index ab5df939..3057dfe5 100644
--- a/power_sequencer/operators/trim_to_surrounding_cuts.py
+++ b/power_sequencer/operators/trim_to_surrounding_cuts.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
"""
Find the two closest cuts, trims and deletes all strips above in the range but leaves some
margin. Removes the newly formed gap.
diff --git a/power_sequencer/operators/utils/__init__.py b/power_sequencer/operators/utils/__init__.py
index 71fca8c4..be8d8b53 100644
--- a/power_sequencer/operators/utils/__init__.py
+++ b/power_sequencer/operators/utils/__init__.py
@@ -1,4 +1,2 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
diff --git a/power_sequencer/operators/utils/doc.py b/power_sequencer/operators/utils/doc.py
index 8bdae410..be52c7c2 100644
--- a/power_sequencer/operators/utils/doc.py
+++ b/power_sequencer/operators/utils/doc.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
"""
Utilities to convert operator names and docstrings to human-readable text.
Used to generate names for Blender's operator search, and to generate Power Sequencer's documentation.
diff --git a/power_sequencer/operators/utils/draw.py b/power_sequencer/operators/utils/draw.py
index 5a156bea..3cede778 100644
--- a/power_sequencer/operators/utils/draw.py
+++ b/power_sequencer/operators/utils/draw.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
"""Drawing utilities. A list of functions to draw common elements"""
# import bgl
import blf
diff --git a/power_sequencer/operators/utils/functions.py b/power_sequencer/operators/utils/functions.py
index 0d5c9fcf..c4552c2d 100644
--- a/power_sequencer/operators/utils/functions.py
+++ b/power_sequencer/operators/utils/functions.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
from math import floor, sqrt
from operator import attrgetter
@@ -279,9 +276,7 @@ def trim_strips(context, frame_start, frame_end, to_trim, to_delete=[]):
elif s.frame_final_end > trim_start and s.frame_final_start < trim_start:
s.frame_final_end = trim_start
- for s in to_delete:
- bpy.context.sequences.remove(s)
-
+ delete_strips(to_delete)
for s in initial_selection:
s.select = True
return {"FINISHED"}
@@ -331,7 +326,8 @@ def get_sequences_under_cursor(context):
def ripple_move(context, sequences, duration_frames, delete=False):
- """Moves sequences in the list and ripples the change to all sequences after them, in the corresponding channels
+ """
+ Moves sequences in the list and ripples the change to all sequences after them, in the corresponding channels
The `duration_frames` can be positive or negative.
If `delete` is True, deletes every sequence in `sequences`.
"""
@@ -344,10 +340,7 @@ def ripple_move(context, sequences, duration_frames, delete=False):
]
if delete:
- bpy.ops.sequencer.select_all(action="DESELECT")
- for s in sequences:
- s.select = True
- bpy.ops.sequencer.delete()
+ delete_strips(sequences)
else:
to_ripple = set(to_ripple + sequences)
@@ -390,8 +383,20 @@ def find_strips_in_range(frame_start, frame_end, sequences, find_overlapping=Tru
return strips_inside_range, strips_overlapping_range
+def delete_strips(to_delete):
+ """
+ Deletes the list of sequences `to_delete`
+ """
+ # Effect strips get deleted with their source so we skip them to avoid errors.
+ to_delete = [s for s in to_delete if s.type in SequenceTypes.CUTABLE]
+ sequences = bpy.context.scene.sequence_editor.sequences
+ for s in to_delete:
+ sequences.remove(s)
+
+
def move_selection(context, sequences, frame_offset, channel_offset=0):
- """Offsets the selected `sequences` horizontally and vertically and preserves
+ """
+ Offsets the selected `sequences` horizontally and vertically and preserves
the current selected sequences.
"""
if not sequences:
diff --git a/power_sequencer/operators/utils/global_settings.py b/power_sequencer/operators/utils/global_settings.py
index a5c9756b..6c5ed55a 100644
--- a/power_sequencer/operators/utils/global_settings.py
+++ b/power_sequencer/operators/utils/global_settings.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
class ProjectSettings:
RESOLUTION_X = 1920
RESOLUTION_Y = 1080
diff --git a/power_sequencer/operators/utils/info_progress_bar.py b/power_sequencer/operators/utils/info_progress_bar.py
index e645c762..e479aecf 100644
--- a/power_sequencer/operators/utils/info_progress_bar.py
+++ b/power_sequencer/operators/utils/info_progress_bar.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
diff --git a/power_sequencer/operators/value_offset.py b/power_sequencer/operators/value_offset.py
index 919e8a43..f7ea129f 100644
--- a/power_sequencer/operators/value_offset.py
+++ b/power_sequencer/operators/value_offset.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .utils.doc import doc_brief, doc_description, doc_idname, doc_name
@@ -10,8 +7,9 @@ from .utils.functions import convert_duration_to_frames
class POWER_SEQUENCER_OT_value_offset(bpy.types.Operator):
- """Instantly offset selected strips, either using frames or seconds. """ \
- """Allows to nudge the selection quickly, using keyboard shortcuts"""
+ """Instantly offset selected strips, either using frames or seconds. Allows to
+ nudge the selection quickly, using keyboard shortcuts.
+ """
doc = {
"name": doc_name(__qualname__),
diff --git a/power_sequencer/tools/__init__.py b/power_sequencer/tools/__init__.py
index e7ac0ddc..6c24a950 100644
--- a/power_sequencer/tools/__init__.py
+++ b/power_sequencer/tools/__init__.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import importlib
import os
@@ -16,7 +13,7 @@ def get_tool_classes():
module_paths = ["." + os.path.splitext(f)[0] for f in module_files]
classes = []
for path in module_paths:
- module = importlib.import_module(path, package="power_sequencer.tools")
+ module = importlib.import_module(path, package=__package__)
tool_names = [entry for entry in dir(module) if entry.startswith("POWER_SEQUENCER_TOOL")]
classes.extend([getattr(module, name) for name in tool_names])
return classes
diff --git a/power_sequencer/tools/trim.py b/power_sequencer/tools/trim.py
index 9c60b2d0..7b740828 100644
--- a/power_sequencer/tools/trim.py
+++ b/power_sequencer/tools/trim.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from bpy.types import WorkSpaceTool
diff --git a/power_sequencer/ui/__init__.py b/power_sequencer/ui/__init__.py
index 9b5b5c6b..b81bdea2 100644
--- a/power_sequencer/ui/__init__.py
+++ b/power_sequencer/ui/__init__.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from .menu_contextual import POWER_SEQUENCER_MT_contextual
from .menu_toolbar import (
diff --git a/power_sequencer/ui/menu_contextual.py b/power_sequencer/ui/menu_contextual.py
index 41628448..56b1b33a 100644
--- a/power_sequencer/ui/menu_contextual.py
+++ b/power_sequencer/ui/menu_contextual.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
from ..operators.utils.global_settings import SequenceTypes
diff --git a/power_sequencer/ui/menu_toolbar.py b/power_sequencer/ui/menu_toolbar.py
index 4feb1ea7..6372f139 100755
--- a/power_sequencer/ui/menu_toolbar.py
+++ b/power_sequencer/ui/menu_toolbar.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
diff --git a/power_sequencer/utils/addon_auto_imports.py b/power_sequencer/utils/addon_auto_imports.py
index 47f430b9..21a45615 100644
--- a/power_sequencer/utils/addon_auto_imports.py
+++ b/power_sequencer/utils/addon_auto_imports.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import pkgutil
import importlib
diff --git a/power_sequencer/utils/register_shortcuts.py b/power_sequencer/utils/register_shortcuts.py
index f928f7ff..29694cee 100644
--- a/power_sequencer/utils/register_shortcuts.py
+++ b/power_sequencer/utils/register_shortcuts.py
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: GPL-3.0-or-later
-# Copyright 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
-
-# This file is part of Power Sequencer.
-
+# Copyright (C) 2016-2020 by Nathan Lovato, Daniel Oakey, Razvan Radulescu, and contributors
import bpy
import operator as op
from .. import operators