diff options
author | William Reynish <billrey@me.com> | 2019-08-09 15:08:20 +0300 |
---|---|---|
committer | William Reynish <billrey@me.com> | 2019-08-09 15:08:20 +0300 |
commit | fbc90ae2bfb11e8991e1d5826c5c329828a5a041 (patch) | |
tree | 74480021db7a203bcf4d4db2c48b48c6fc25b180 /release/scripts/startup/bl_ui | |
parent | 97336dbb3d2bed239318c29632124da7b3ed1630 (diff) |
UI: Sequencer Sidebar Text-Strip Panel adjustments
The functions are now divided into two nested sub panels, since it makes it easier to navigate through the options.
The Location values are moved above the Alignment values, to avoid the confusion that the alignment values could be presets for the location.
In the menu and context menu the Text Effect strip was among the functions which had the Input sub menu visible. Text strips do not take strip inputs, so this is a bug, which is solved with this diff.
Patch by Peter Fog (tintwotin)
Differential Revision: https://developer.blender.org/D5142
Diffstat (limited to 'release/scripts/startup/bl_ui')
-rw-r--r-- | release/scripts/startup/bl_ui/space_sequencer.py | 107 |
1 files changed, 85 insertions, 22 deletions
diff --git a/release/scripts/startup/bl_ui/space_sequencer.py b/release/scripts/startup/bl_ui/space_sequencer.py index a7600552cbc..b5e70f45a47 100644 --- a/release/scripts/startup/bl_ui/space_sequencer.py +++ b/release/scripts/startup/bl_ui/space_sequencer.py @@ -269,6 +269,9 @@ class SEQUENCER_MT_view(Menu): props.sequencer = True layout.separator() + layout.operator("sequencer.export_subtitles", text="Export Subtitles", icon="EXPORT") + + layout.separator() layout.menu("INFO_MT_area") @@ -663,7 +666,7 @@ class SEQUENCER_MT_strip(Menu): 'CROSS', 'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP', 'WIPE', 'GLOW', 'TRANSFORM', 'COLOR', 'SPEED', 'MULTICAM', 'ADJUSTMENT', - 'GAUSSIAN_BLUR', 'TEXT', + 'GAUSSIAN_BLUR', }: layout.separator() layout.menu("SEQUENCER_MT_strip_effect") @@ -674,6 +677,9 @@ class SEQUENCER_MT_strip(Menu): layout.separator() layout.operator("sequencer.rendersize") layout.operator("sequencer.images_separate") + elif strip_type == 'TEXT': + layout.separator() + layout.menu("SEQUENCER_MT_strip_effect") elif strip_type == 'META': layout.separator() layout.operator("sequencer.meta_make") @@ -745,7 +751,7 @@ class SEQUENCER_MT_context_menu(Menu): 'CROSS', 'ADD', 'SUBTRACT', 'ALPHA_OVER', 'ALPHA_UNDER', 'GAMMA_CROSS', 'MULTIPLY', 'OVER_DROP', 'WIPE', 'GLOW', 'TRANSFORM', 'COLOR', 'SPEED', 'MULTICAM', 'ADJUSTMENT', - 'GAUSSIAN_BLUR', 'TEXT', + 'GAUSSIAN_BLUR', }: layout.separator() layout.menu("SEQUENCER_MT_strip_effect") @@ -756,6 +762,9 @@ class SEQUENCER_MT_context_menu(Menu): layout.separator() layout.operator("sequencer.rendersize") layout.operator("sequencer.images_separate") + elif strip_type == 'TEXT': + layout.separator() + layout.menu("SEQUENCER_MT_strip_effect") elif strip_type == 'META': layout.separator() layout.operator("sequencer.meta_make") @@ -1031,26 +1040,10 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel): col.label(text="Two or more channels are needed below this strip", icon='INFO') elif strip_type == 'TEXT': - col = layout.column() - col.prop(strip, "text") - col.template_ID(strip, "font", open="font.open", unlink="font.unlink") - col.prop(strip, "font_size") - - row = col.row() - row.prop(strip, "color") - row = col.row() - row.prop(strip, "use_shadow") - rowsub = row.row() - rowsub.active = strip.use_shadow - rowsub.prop(strip, "shadow_color", text="") - - col.prop(strip, "align_x", text="Horizontal") - col.prop(strip, "align_y", text="Vertical") - row = col.row(align=True) - row.prop(strip, "location", text="Location", slider=True) - col.prop(strip, "wrap_width") - - layout.operator("sequencer.export_subtitles", text="Export Subtitles", icon='EXPORT') + layout = self.layout + layout.use_property_split = False + layout.prop(strip, "text", text="") + layout.use_property_split = True col = layout.column(align=True) if strip_type == 'SPEED': @@ -1069,6 +1062,73 @@ class SEQUENCER_PT_effect(SequencerButtonsPanel, Panel): row.prop(strip, "factor", slider=True) +class SEQUENCER_PT_effect_text_layout(SequencerButtonsPanel, Panel): + bl_label = "Layout" + bl_parent_id = "SEQUENCER_PT_effect" + bl_category = "Strip" + + @classmethod + def poll(cls, context): + strip = act_strip(context) + return strip.type == 'TEXT' + + def draw(self, context): + strip = act_strip(context) + layout = self.layout + layout.use_property_split = True + col = layout.column() + col.prop(strip, "location", text="Location") + col.prop(strip, "align_x", text="Alignment X") + col.prop(strip, "align_y", text="Y") + col.prop(strip, "wrap_width", text="Wrap Width") + + +class SEQUENCER_PT_effect_text_style(SequencerButtonsPanel, Panel): + bl_label = "Style" + bl_parent_id = "SEQUENCER_PT_effect" + bl_category = "Strip" + + @classmethod + def poll(cls, context): + strip = act_strip(context) + return strip.type == 'TEXT' + + def draw(self, context): + strip = act_strip(context) + layout = self.layout + layout.use_property_split = True + col = layout.column() + col.template_ID(strip, "font", open="font.open", unlink="font.unlink") + col.prop(strip, "font_size") + col.prop(strip, "color") + + +class SEQUENCER_PT_effect_text_style_shadow(SequencerButtonsPanel, Panel): + bl_label = "Shadow" + bl_parent_id = "SEQUENCER_PT_effect_text_style" + bl_options = {'DEFAULT_CLOSED'} + bl_category = "Strip" + + @classmethod + def poll(cls, context): + strip = act_strip(context) + return strip.type != 'SOUND' + + def draw_header(self, context): + strip = act_strip(context) + self.layout.prop(strip, "use_shadow", text="") + + def draw(self, context): + strip = act_strip(context) + layout = self.layout + layout.use_property_split = True + + layout.active = strip.use_shadow and (not strip.mute) + + col = layout.column(align=True) + col.prop(strip, "shadow_color", text="Color") + + class SEQUENCER_PT_source(SequencerButtonsPanel, Panel): bl_label = "Source" bl_options = {'DEFAULT_CLOSED'} @@ -2055,6 +2115,9 @@ classes = ( SEQUENCER_PT_effect, SEQUENCER_PT_scene, SEQUENCER_PT_mask, + SEQUENCER_PT_effect_text_style, + SEQUENCER_PT_effect_text_layout, + SEQUENCER_PT_effect_text_style_shadow, SEQUENCER_PT_time, SEQUENCER_PT_source, |