From 3596c03d899419057679f0c9504cdad1f718e6b9 Mon Sep 17 00:00:00 2001 From: Nathan Lovato Date: Sat, 16 May 2020 14:43:41 -0600 Subject: Remove periods from docstrings, format code with black --- power_sequencer/operators/fade_add.py | 2 +- power_sequencer/operators/fade_clear.py | 2 +- power_sequencer/operators/gap_remove.py | 18 +++++++++++++----- power_sequencer/operators/make_hold_frame.py | 12 ++++++++---- power_sequencer/operators/scene_merge_from.py | 3 +-- 5 files changed, 24 insertions(+), 13 deletions(-) diff --git a/power_sequencer/operators/fade_add.py b/power_sequencer/operators/fade_add.py index 70a0798b..1f4d0bfa 100644 --- a/power_sequencer/operators/fade_add.py +++ b/power_sequencer/operators/fade_add.py @@ -22,7 +22,7 @@ from .utils.doc import doc_name, doc_idname, doc_brief, doc_description class POWER_SEQUENCER_OT_fade_add(bpy.types.Operator): - """*brief* Adds or updates a fade animation for either visual or audio strips. + """*brief* Adds or updates a fade animation for either visual or audio strips Fade options: diff --git a/power_sequencer/operators/fade_clear.py b/power_sequencer/operators/fade_clear.py index 16443691..06b320b0 100644 --- a/power_sequencer/operators/fade_clear.py +++ b/power_sequencer/operators/fade_clear.py @@ -21,7 +21,7 @@ from .utils.doc import doc_name, doc_idname, doc_brief, doc_description class POWER_SEQUENCER_OT_fade_clear(bpy.types.Operator): """ - *brief* Removes fade animation from selected sequences. + *brief* Removes fade animation from selected sequences Removes opacity or volume animation on selected sequences and resets the property to a value of 1.0. Works on all types of sequences diff --git a/power_sequencer/operators/gap_remove.py b/power_sequencer/operators/gap_remove.py index 413d5466..4a736051 100644 --- a/power_sequencer/operators/gap_remove.py +++ b/power_sequencer/operators/gap_remove.py @@ -55,7 +55,7 @@ class POWER_SEQUENCER_OT_gap_remove(bpy.types.Operator): ) move_time_cursor: bpy.props.BoolProperty( name="Move Time Cursor", - description="Move the time cursor when closing the gap.", + description="Move the time cursor when closing the gap", default=False, ) @@ -71,7 +71,9 @@ class POWER_SEQUENCER_OT_gap_remove(bpy.types.Operator): else context.sequences ) sequences = [ - s for s in sequences if s.frame_final_start >= frame or s.frame_final_end > frame + s + for s in sequences + if s.frame_final_start >= frame or s.frame_final_end > frame ] sequence_blocks = slice_selection(context, sequences) if not sequence_blocks: @@ -98,12 +100,18 @@ class POWER_SEQUENCER_OT_gap_remove(bpy.types.Operator): 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 + 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 gap_frame = -1 if strips_start > frame: - strips_before_frame_start = [s for s in context.sequences if s.frame_final_end <= frame] + strips_before_frame_start = [ + s for s in context.sequences if s.frame_final_end <= frame + ] frame_target = 0 if strips_before_frame_start: frame_target = max( diff --git a/power_sequencer/operators/make_hold_frame.py b/power_sequencer/operators/make_hold_frame.py index b8aef4c0..c6893d04 100644 --- a/power_sequencer/operators/make_hold_frame.py +++ b/power_sequencer/operators/make_hold_frame.py @@ -24,10 +24,10 @@ from .utils.doc import doc_name, doc_idname, doc_brief, doc_description class POWER_SEQUENCER_OT_make_hold_frame(bpy.types.Operator): """ - *brief* Make a hold frame from the active strip. + *brief* Make a hold frame from the active strip Converts the image under the cursor to a hold frame, to create a pause effect in the video, - using the active sequence. + using the active sequence """ doc = { @@ -77,7 +77,9 @@ class POWER_SEQUENCER_OT_make_hold_frame(bpy.types.Operator): try: next_strip_start = next( s - for s in sorted(context.sequences, key=operator.attrgetter("frame_final_start")) + for s in sorted( + context.sequences, key=operator.attrgetter("frame_final_start") + ) if s.frame_final_start > active.frame_final_end ).frame_final_start offset = next_strip_start - active.frame_final_end @@ -88,7 +90,9 @@ class POWER_SEQUENCER_OT_make_hold_frame(bpy.types.Operator): source_blend_type = active.blend_type sequencer.split(frame=scene.frame_current, type="SOFT", side="RIGHT") transform.seq_slide(value=(offset, 0)) - sequencer.split(frame=scene.frame_current + offset + 1, type="SOFT", side="LEFT") + sequencer.split( + frame=scene.frame_current + offset + 1, type="SOFT", side="LEFT" + ) transform.seq_slide(value=(-offset, 0)) sequencer.meta_make() diff --git a/power_sequencer/operators/scene_merge_from.py b/power_sequencer/operators/scene_merge_from.py index 2908ebcd..16b2710d 100644 --- a/power_sequencer/operators/scene_merge_from.py +++ b/power_sequencer/operators/scene_merge_from.py @@ -22,8 +22,7 @@ from .utils.doc import doc_name, doc_idname, doc_brief, doc_description class POWER_SEQUENCER_OT_merge_from_scene_strip(bpy.types.Operator): """ *brief* Copies all sequences and markers from a SceneStrip's scene into - the active scene. Optionally delete the source scene and the strip. - + the active scene. Optionally delete the source scene and the strip WARNING: Currently the operator doesn't recreate any animation data, be careful by choosing to delete the scene after the merge -- cgit v1.2.3