Changeset View
Standalone View
release/scripts/startup/bl_ui/space_sequencer.py
| Context not available. | |||||
| col.prop(strip, "rotation_start", text="Rotation") | col.prop(strip, "rotation_start", text="Rotation") | ||||
| elif strip.type == 'MULTICAM': | 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") | ||||
| sub = row.row(align=True) | |||||
| sub.scale_x = 2.0 | # The multicam strip needs at least 2 strips to be useful | ||||
| if strip_channel > 2: | |||||
| BT_ROW = 4 | |||||
Severin: I'm not really familiar how multicam strip works, but it's a bit weird that there are no… | |||||
| sub.operator("screen.animation_play", text="", icon='PAUSE' if context.screen.is_animation_playing else 'PLAY') | col.label("Cut To:") | ||||
| row.label("Cut To") | for i in range(1, strip_channel): | ||||
| for i in range(1, strip.channel): | if (i % BT_ROW) == 1: | ||||
| row.operator("sequencer.cut_multicam", text="%d" % i).camera = i | row = col.row(align=True) | ||||
Done Inline ActionsI don't think PEP8 has strict rules here, but usually we don't add parentheses around single line if-statements. For this specific case, I suggest to reformat this to: Severin: I don't think PEP8 has strict rules here, but usually we don't add parentheses around single… | |||||
| if i == strip.multicam_source: | |||||
| row.operator("sequencer.cut_multicam", text="[%d]" % i).camera = i | |||||
| else: | |||||
| row.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.label("Warning, two or more channels needed below this strip.") | |||||
Done Inline ActionsWould remove the (strip.channel > BT_ROW) check here to avoid jumps in layout. Severin: Would remove the `(strip.channel > BT_ROW)` check here to avoid jumps in layout. | |||||
Not Done Inline ActionsI like having the layout always fill the width off the sidebar, this makes things more consistent. Blendify: I like having the layout always fill the width off the sidebar, this makes things more… | |||||
| elif strip.type == 'TEXT': | elif strip.type == 'TEXT': | ||||
Not Done Inline ActionsBetter use parentheses for readability: if strip.channel > BT_ROW and (strip_channel - 1) % BT_ROW: Severin: Better use parentheses for readability: `if strip.channel > BT_ROW and (strip_channel - 1) %… | |||||
| col = layout.column() | col = layout.column() | ||||
| Context not available. | |||||
Done Inline ActionsThe empty operator-buttons feel a bit weird, we usually don't have something like that in Blender. I'd just change this to row.label() to add placeholder elements. Note that this will solve the issue mentioned in the description (which only appeared with Region Overlap enabled). The operator-buttons invoked the sequencer.cut_multicam operator which allowed the event to pass through if no index was specified, just like here. When Region Overlap is enabled, we allow handlers from the main region to listen to events from the properties/toolshelf regions (if they haven't been caught by panel, button or operator handling) because these can be fully transparent. That's why the mouse-click invokes a operation in the main region, even if executed in properties region. Severin: The empty operator-buttons feel a bit weird, we usually don't have something like that in… | |||||
Not Done Inline ActionsWould get rid of the term "Warning" here, the info icon should be enough. Severin: Would get rid of the term "Warning" here, the info icon should be enough. | |||||
I'm not really familiar how multicam strip works, but it's a bit weird that there are no buttons other than the "Source Channel" one until the strip is moved to channel 3 or higher. There should be some hint to why nothing is shown when the strip is on channel 1 or 2.
Also note that the old code shows the cut_multicam button for channel 1 if the strip is on channel 2.