UI: Redesign the VSE multicam strip

Idea from https://rightclickselect.com/p/sequencer/zfbbbc/sequencer-panels-update by @pauloup

|{F434631}|{F434624}|
|Before |After|

Test file:
{F434643}
This commit is contained in:
Aaron Carlisle
2017-02-11 11:35:02 -05:00
parent 3ede515b5b
commit 1ac6e4c7a2

View File

@@ -652,17 +652,39 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel):
col.prop(strip, "rotation_start", text="Rotation")
elif strip.type == 'MULTICAM':
layout.prop(strip, "multicam_source")
col = layout.column(align=True)
strip_channel = strip.channel
row = layout.row(align=True)
col.prop(strip, "multicam_source", text="Source Channel")
# The multicam strip needs at least 2 strips to be useful
if strip_channel > 2:
BT_ROW = 4
col.label("Cut To:")
row = col.row()
for i in range(1, strip_channel):
if (i % BT_ROW) == 1:
row = col.row(align=True)
# Workaround - .active has to have a separate UI block to work
if i == strip.multicam_source:
sub = row.row(align=True)
sub.scale_x = 2.0
sub.active = False
sub.operator("sequencer.cut_multicam", text="%d" % i).camera = i
else:
sub_1 = row.row(align=True)
sub_1.active = True
sub_1.operator("sequencer.cut_multicam", text="%d" % i).camera = i
sub.operator("screen.animation_play", text="", icon='PAUSE' if context.screen.is_animation_playing else 'PLAY')
if strip.channel > BT_ROW and (strip_channel - 1) % BT_ROW:
for i in range(strip.channel, strip_channel + ((BT_ROW + 1 - strip_channel) % BT_ROW)):
row.label("")
else:
col.separator()
col.label(text="Two or more channels are needed below this strip.", icon="INFO")
row.label("Cut To")
for i in range(1, strip.channel):
row.operator("sequencer.cut_multicam", text="%d" % i).camera = i
elif strip.type == 'TEXT':
col = layout.column()