Add background rectangle option to video sequencer Text strip

This adds a Box option to the Text strip's style properties, plus related Box Margin value:

{F9208309}

When enabled the text is placed on top of a solid-filled rectangle of a chosen color, as shown below:

{F9208324}

When the box option is disabled the text strip works the same as it does now. When the box option is enabled the meaning of the Shadow option changes to provide a drop-shadow on the rectangle (and not on the text itself). The latter made more sense to me.

The box margin is specified as a fraction of the image width. The offset of the drop-down box shadow is fixed to a specific fraction of the image width as well.

I tested this feature on a movie of a couple of minutes containing dozens of text strips (all with box background), edge cases like multi-line strings and text overlapping the image edges.

Reviewed By: ISS

Differential Revision: https://developer.blender.org/D9468
This commit is contained in:
Paul Melis
2020-11-06 15:42:52 +01:00
committed by Richard Antalik
parent f6524aaa80
commit 235c309e5f
4 changed files with 83 additions and 14 deletions

View File

@@ -1187,6 +1187,21 @@ class SEQUENCER_PT_effect_text_style(SequencerButtonsPanel, Panel):
subsub.active = strip.use_shadow and (not strip.mute)
subsub.prop(strip, "shadow_color", text="")
row.prop_decorator(strip, "shadow_color")
row = layout.row(align=True, heading="Box")
row.use_property_decorate = False
sub = row.row(align=True)
sub.prop(strip, "use_box", text="")
subsub = sub.row(align=True)
subsub.active = strip.use_box and (not strip.mute)
subsub.prop(strip, "box_color", text="")
row.prop_decorator(strip, "box_color")
row = layout.row(align=True, heading="Box Margin")
row.use_property_decorate = False
sub = row.row(align=True)
sub.prop(strip, "box_margin")
sub.active = strip.use_box and (not strip.mute)
class SEQUENCER_PT_source(SequencerButtonsPanel, Panel):