diff options
author | Campbell Barton <ideasman42@gmail.com> | 2019-07-10 06:48:03 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2019-07-10 06:48:03 +0300 |
commit | 31f922bff66c3bbeb45c3d0f3574ead4b524136e (patch) | |
tree | b252bba8eb52722562f83881f11ba9c39f4ac80e | |
parent | 95fcdb0401a8b949d6cf750c8c9fe6faa06d0b71 (diff) |
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.
-rw-r--r-- | release/scripts/startup/bl_ui/space_sequencer.py | 14 |
1 files changed, 10 insertions, 4 deletions
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): |