UI: use a label for strip 'frame_final_end'
authorCampbell Barton <ideasman42@gmail.com>
Wed, 10 Jul 2019 03:48:03 +0000 (13:48 +1000)
committerCampbell Barton <ideasman42@gmail.com>
Wed, 10 Jul 2019 03:48:03 +0000 (13:48 +1000)
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.

release/scripts/startup/bl_ui/space_sequencer.py

index c290e3ed52e0be765368e56e24ebe9edb072366a..d3b847606339a0ee83648d91be244bbca9807fde 100644 (file)
@@ -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):