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) | ||||
| row = layout.row(align=True) | col.prop(strip, "multicam_source", text="Source Channel") | ||||
| sub = row.row(align=True) | |||||
| sub.scale_x = 2.0 | strip_channel = strip.channel | ||||
| # The multicam strip needs at least 2 strips to be useful | |||||
| if (strip_channel > 2 ): | |||||
Severin: I'm not really familiar how multicam strip works, but it's a bit weird that there are no… | |||||
| col = layout.column(align=True) | |||||
| BT_ROW = 4 | |||||
| col.label("Cut To:") | |||||
| for i in range(1, strip_channel): | |||||
| if (i % BT_ROW == 1): | |||||
SeverinUnsubmitted 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… | |||||
| row = col.row(align=True) | |||||
| if (i == strip.multicam_source): | |||||
| sub = row.row(align=True) | |||||
| sub.enabled = False | |||||
| sub.operator("sequencer.cut_multicam", text="[%d]" % i).camera = i | |||||
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) %… | |||||
| else: | |||||
| row.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)): | ||||
SeverinUnsubmitted 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. | |||||
BlendifyAuthorUnsubmitted 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… | |||||
| sub = row.row(align=True) | |||||
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. | |||||
| sub.enabled = False | |||||
| row.label("Cut To") | for i in range(strip.channel, strip_channel + ((BT_ROW + 1 - strip_channel) % BT_ROW)): | ||||
| for i in range(1, strip.channel): | sub.operator("sequencer.cut_multicam", text="" ) | ||||
SeverinUnsubmitted 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… | |||||
| row.operator("sequencer.cut_multicam", text="%d" % i).camera = i | |||||
| elif strip.type == 'TEXT': | elif strip.type == 'TEXT': | ||||
| col = layout.column() | col = layout.column() | ||||
| Context not available. | |||||
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.