[Bf-blender-cvs] [31f922bff66] master: UI: use a label for strip 'frame_final_end'

Campbell Barton noreply at git.blender.org
Wed Jul 10 06:02:21 CEST 2019


Commit: 31f922bff66c3bbeb45c3d0f3574ead4b524136e
Author: Campbell Barton
Date:   Wed Jul 10 13:48:03 2019 +1000
Branches: master
https://developer.blender.org/rB31f922bff66c3bbeb45c3d0f3574ead4b524136e

UI: use a label for strip 'frame_final_end'

This is intended for Python access and allows temporary negative frames
which is a problem when accessed from the UI.

This allows:

    seq.frame_final_start, seq.frame_final_end = frame_range

However it allows invalid sequence strips,
using a label is fine since there is a duration property here which
can change the length.

===================================================================

M	release/scripts/startup/bl_ui/space_sequencer.py

===================================================================

diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py
index c290e3ed52e..d3b84760633 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -1371,13 +1371,19 @@ class SEQUENCER_PT_time(SequencerButtonsPanel, Panel):
 
         split = sub.split(factor=0.5 + max_factor, align=True)
         split.alignment = 'RIGHT'
-        split.label(text="End")
-        split.prop(strip, "frame_final_end", text=smpte_from_frame(strip.frame_final_end))
+        split.label(text="Duration")
+        split.prop(strip, "frame_final_duration", text=smpte_from_frame(strip.frame_final_duration))
 
+        # Use label, editing this value from the UI allows negative values,
+        # users can adjust duration.
         split = sub.split(factor=0.5 + max_factor, align=True)
         split.alignment = 'RIGHT'
-        split.label(text="Duration")
-        split.prop(strip, "frame_final_duration", text=smpte_from_frame(strip.frame_final_duration))
+        split.label(text="End")
+        split = split.split(factor=0.8 + max_factor, align=True)
+        split.label(text="{:>14}".format(smpte_from_frame(strip.frame_final_end) + ":"))
+        split.alignment = 'RIGHT'
+        split.label(text=str(strip.frame_final_end) + " ")
+
 
         if not isinstance(strip, bpy.types.EffectSequence):



More information about the Bf-blender-cvs mailing list