[Bf-extensions-cvs] [f2df91ea] master: Update power sequencer to work with Blender 3.3
Nathan Lovato
noreply at git.blender.org
Wed Jul 27 19:56:52 CEST 2022
Commit: f2df91eae2db3a34f8b8f355d5c7a6aa1eef1437
Author: Nathan Lovato
Date: Wed Jul 27 19:30:39 2022 +0200
Branches: master
https://developer.blender.org/rBAf2df91eae2db3a34f8b8f355d5c7a6aa1eef1437
Update power sequencer to work with Blender 3.3
fix: update code to work with sequencer API changes in Blender 3.X
fix: Error when calling grab sequence handles due to type mismatch
fix: remove FAST and FASTER playback speeds, simplify playback speed code
fix: rewrite select_all_left_or_right after API change causing error
fix: fix error with jump_to_cut when encountering animation frames
fix: fix jump_to_cut skipping some strip ends when moving forward in time
fix: jump_to_cut sometimes not working when going left
fix: error when trimming effect strips
chore: update license text upstream to match Blender's short format
===================================================================
M power_sequencer/__init__.py
M power_sequencer/addon_preferences.py
M power_sequencer/addon_properties.py
M power_sequencer/handlers.py
M power_sequencer/operators/__init__.py
M power_sequencer/operators/channel_offset.py
M power_sequencer/operators/concatenate_strips.py
M power_sequencer/operators/copy_selected_sequences.py
M power_sequencer/operators/crossfade_add.py
M power_sequencer/operators/crossfade_edit.py
M power_sequencer/operators/cut_strips_under_cursor.py
M power_sequencer/operators/delete_direct.py
M power_sequencer/operators/deselect_all_left_or_right.py
M power_sequencer/operators/deselect_handles_and_grab.py
M power_sequencer/operators/duplicate_move.py
M power_sequencer/operators/expand_to_surrounding_cuts.py
M power_sequencer/operators/fade_add.py
M power_sequencer/operators/fade_clear.py
M power_sequencer/operators/gap_remove.py
M power_sequencer/operators/grab.py
M power_sequencer/operators/grab_closest_handle_or_cut.py
M power_sequencer/operators/grab_sequence_handles.py
M power_sequencer/operators/import_local_footage.py
M power_sequencer/operators/jump_time_offset.py
M power_sequencer/operators/jump_to_cut.py
M power_sequencer/operators/make_hold_frame.py
M power_sequencer/operators/marker_delete_closest.py
M power_sequencer/operators/marker_delete_direct.py
M power_sequencer/operators/marker_snap_to_cursor.py
M power_sequencer/operators/markers_as_timecodes.py
M power_sequencer/operators/markers_create_from_selected.py
M power_sequencer/operators/markers_set_preview_in_between.py
M power_sequencer/operators/markers_snap_matching_strips.py
M power_sequencer/operators/meta_resize_to_content.py
M power_sequencer/operators/meta_trim_content_to_bounds.py
M power_sequencer/operators/meta_ungroup_and_trim.py
M power_sequencer/operators/mouse_toggle_mute.py
M power_sequencer/operators/mouse_trim_instantly.py
M power_sequencer/operators/mouse_trim_modal.py
M power_sequencer/operators/open_project_directory.py
D power_sequencer/operators/playback_speed_decrease.py
D power_sequencer/operators/playback_speed_increase.py
M power_sequencer/operators/playback_speed_set.py
M power_sequencer/operators/preview_closest_cut.py
M power_sequencer/operators/preview_to_selection.py
M power_sequencer/operators/render_apply_preset.py
M power_sequencer/operators/render_presets/twitter_720p.py
M power_sequencer/operators/render_presets/youtube_1080.py
M power_sequencer/operators/ripple_delete.py
M power_sequencer/operators/save_direct.py
M power_sequencer/operators/scene_create_from_selection.py
M power_sequencer/operators/scene_cycle.py
M power_sequencer/operators/scene_merge_from.py
M power_sequencer/operators/scene_open_from_strip.py
M power_sequencer/operators/scene_rename_with_strip.py
M power_sequencer/operators/select_all_left_or_right.py
M power_sequencer/operators/select_closest_to_mouse.py
M power_sequencer/operators/select_linked_effect.py
M power_sequencer/operators/select_linked_strips.py
M power_sequencer/operators/select_related_strips.py
M power_sequencer/operators/select_strips_under_cursor.py
M power_sequencer/operators/set_timeline_range.py
M power_sequencer/operators/snap.py
M power_sequencer/operators/snap_selection.py
M power_sequencer/operators/space_sequences.py
M power_sequencer/operators/speed_remove_effect.py
M power_sequencer/operators/speed_up_movie_strip.py
M power_sequencer/operators/swap_strips.py
M power_sequencer/operators/toggle_selected_mute.py
M power_sequencer/operators/toggle_waveforms.py
M power_sequencer/operators/transitions_remove.py
M power_sequencer/operators/trim_left_or_right_handles.py
M power_sequencer/operators/trim_three_point_edit.py
M power_sequencer/operators/trim_to_surrounding_cuts.py
M power_sequencer/operators/utils/__init__.py
M power_sequencer/operators/utils/doc.py
M power_sequencer/operators/utils/draw.py
M power_sequencer/operators/utils/functions.py
M power_sequencer/operators/utils/global_settings.py
M power_sequencer/operators/utils/info_progress_bar.py
M power_sequencer/operators/value_offset.py
M power_sequencer/tools/__init__.py
M power_sequencer/tools/trim.py
M power_sequencer/ui/__init__.py
M power_sequencer/ui/menu_contextual.py
M power_sequencer/ui/menu_toolbar.py
M power_sequencer/utils/addon_auto_imports.py
M power_sequencer/utils/register_shortcuts.py
===================================================================
diff --git a/power_sequencer/__init__.py b/power_sequencer/__init__.py
index c646da7c..e8f920f7 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, 1),
+ "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,21 +1,9 @@
# 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
- at 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):
"""
@@ -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_
@@ Diff output truncated at 10240 characters. @@
More information about the Bf-extensions-cvs
mailing list