diff options
author | Campbell Barton <ideasman42@gmail.com> | 2016-04-27 08:49:13 +0300 |
---|---|---|
committer | Campbell Barton <ideasman42@gmail.com> | 2016-04-27 08:49:13 +0300 |
commit | 0912bffb848dbb3fd13e736f1f60128e4a36a7f7 (patch) | |
tree | e37bc637ad8291fe3f70947bc5a8b28289057672 /source/blender/blenkernel | |
parent | 01cdd22a524b0f4a51d52d661268eb3758c68f35 (diff) |
Sequencer text strip color options
D1930 by @NiKoZLaB
Diffstat (limited to 'source/blender/blenkernel')
-rw-r--r-- | source/blender/blenkernel/intern/seqeffects.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/source/blender/blenkernel/intern/seqeffects.c b/source/blender/blenkernel/intern/seqeffects.c index dfce931cbf4..ef447412f2b 100644 --- a/source/blender/blenkernel/intern/seqeffects.c +++ b/source/blender/blenkernel/intern/seqeffects.c @@ -3084,6 +3084,10 @@ static void init_text_effect(Sequence *seq) data = seq->effectdata = MEM_callocN(sizeof(TextVars), "textvars"); data->text_size = 30; + + copy_v4_fl(data->color, 1.0f); + data->shadow_color[3] = 1.0f; + BLI_strncpy(data->text, "Text", sizeof(data->text)); data->loc[0] = 0.5f; @@ -3188,11 +3192,11 @@ static ImBuf *do_text_effect(const SeqRenderData *context, Sequence *seq, float fontx = BLF_width_max(mono); fonty = line_height; BLF_position(mono, x + max_ii(fontx / 25, 1), y + max_ii(fonty / 25, 1), 0.0f); - BLF_buffer_col(mono, (const float[4]){0.0f, 0.0f, 0.0f, 1.0f}); + BLF_buffer_col(mono, data->shadow_color); BLF_draw_buffer(mono, data->text, BLF_DRAW_STR_DUMMY_MAX); } BLF_position(mono, x, y, 0.0f); - BLF_buffer_col(mono, (const float[4]){1.0f, 1.0f, 1.0f, 1.0f}); + BLF_buffer_col(mono, data->color); BLF_draw_buffer(mono, data->text, BLF_DRAW_STR_DUMMY_MAX); BLF_buffer(mono, NULL, NULL, 0, 0, 0, NULL); |