diff options
author | Nathan Lovato <nathan@gdquest.com> | 2020-05-14 23:40:24 +0300 |
---|---|---|
committer | Nathan Lovato <nathan@gdquest.com> | 2020-05-14 23:40:24 +0300 |
commit | c9f09d722abbaeded92803fc8fbb3e286480b35e (patch) | |
tree | dc16b3524b860829515b9b34a45d4c87df8678be /power_sequencer/operators/gap_remove.py | |
parent | 3b7dd92024ac0ac2b58b3ef4e5cf7daee6dfdefb (diff) |
Power Sequencer: update to version 1.5, fix for Blender 2.83
This makes the add-on compatible with Blender 2.83 after renaming the cut operator to split.
The update brings mainly bug fixes and quality of life improvements.
Changelog: https://github.com/GDQuest/blender-power-sequencer/blob/master/CHANGELOG.md#power-sequencer-1
36 Commits: https://github.com/GDQuest/blender-power-sequencer/compare/1.4.0...fb55bc77cf31920ddfe6fd4342b11e53ac988c93
Diffstat (limited to 'power_sequencer/operators/gap_remove.py')
-rw-r--r-- | power_sequencer/operators/gap_remove.py | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/power_sequencer/operators/gap_remove.py b/power_sequencer/operators/gap_remove.py index 88a3484a..413d5466 100644 --- a/power_sequencer/operators/gap_remove.py +++ b/power_sequencer/operators/gap_remove.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. # @@ -53,6 +53,11 @@ class POWER_SEQUENCER_OT_gap_remove(bpy.types.Operator): description="Frame to remove gaps from, defaults at the time cursor", default=-1, ) + move_time_cursor: bpy.props.BoolProperty( + name="Move Time Cursor", + description="Move the time cursor when closing the gap.", + default=False, + ) @classmethod def poll(cls, context): @@ -84,11 +89,14 @@ class POWER_SEQUENCER_OT_gap_remove(bpy.types.Operator): ) self.gaps_remove(context, blocks_after_gap, gap_frame) + if self.move_time_cursor: + context.scene.frame_current = gap_frame return {"FINISHED"} def find_gap_frame(self, context, frame, sorted_sequences): """ - Takes a list sequences sorted by frame_final_start + Finds and returns the frame at which the gap starts. + Takes a list sequences sorted by frame_final_start. """ strips_start = min(sorted_sequences, key=attrgetter("frame_final_start")).frame_final_start strips_end = max(sorted_sequences, key=attrgetter("frame_final_end")).frame_final_end @@ -108,7 +116,7 @@ class POWER_SEQUENCER_OT_gap_remove(bpy.types.Operator): def gaps_remove(self, context, sequence_blocks, gap_frame_start): """ - Recursively removes gaps between blocks of sequences + Recursively removes gaps between blocks of sequences. """ gap_frame = gap_frame_start |