[Bf-blender-cvs] [1ac6e4c7a2] master: UI: Redesign the VSE multicam strip
Aaron Carlisle
noreply at git.blender.org
Sat Feb 11 17:35:13 CET 2017
Commit: 1ac6e4c7a2f0c3a38468edb0c501e52c0aea5f28
Author: Aaron Carlisle
Date: Sat Feb 11 11:35:02 2017 -0500
Branches: master
https://developer.blender.org/rB1ac6e4c7a2f0c3a38468edb0c501e52c0aea5f28
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}
===================================================================
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 6bb516cf92..8ab5b4724b 100644
--- a/release/scripts/startup/bl_ui/space_sequencer.py
+++ b/release/scripts/startup/bl_ui/space_sequencer.py
@@ -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")
-
- row = layout.row(align=True)
- sub = row.row(align=True)
- sub.scale_x = 2.0
-
- sub.operator("screen.animation_play", text="", icon='PAUSE' if context.screen.is_animation_playing else 'PLAY')
+ col = layout.column(align=True)
+ strip_channel = strip.channel
+
+ 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.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
+
+ 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()
More information about the Bf-blender-cvs
mailing list