From 31f922bff66c3bbeb45c3d0f3574ead4b524136e Mon Sep 17 00:00:00 2001 From: Campbell Barton Date: Wed, 10 Jul 2019 13:48:03 +1000 Subject: 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. --- release/scripts/startup/bl_ui/space_sequencer.py | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) (limited to '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): -- cgit v1.2.3