diff options
author | Richard Antalik <richardantalik@gmail.com> | 2019-01-14 08:28:07 +0300 |
---|---|---|
committer | Richard Antalik <richardantalik@gmail.com> | 2019-01-14 08:57:09 +0300 |
commit | b3dbe17658fe8ca5115abab642cc0f1680d1f0d5 (patch) | |
tree | 9ee5fa8e6f8e4e8a009a9f6ed4bb2af0f91693f8 /source/blender/blenloader | |
parent | c450461e68cdd723825c7bf4a4ebde079ba7b57b (diff) |
Add font selection to VSE text strips
Allows users to select a font for text strips in the video sequence editor.
Related: 3610f1fc43d0 Sequencer: refactor clipboard copy to no longer increase user count.
Reviewed by: Brecht
Differential Revision: https://developer.blender.org/D3621
Diffstat (limited to 'source/blender/blenloader')
-rw-r--r-- | source/blender/blenloader/intern/readfile.c | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/source/blender/blenloader/intern/readfile.c b/source/blender/blenloader/intern/readfile.c index 4029f9f9a31..c27e70c9a7e 100644 --- a/source/blender/blenloader/intern/readfile.c +++ b/source/blender/blenloader/intern/readfile.c @@ -6061,6 +6061,10 @@ static void lib_link_scene(FileData *fd, Main *main) seq->scene_sound = BKE_sound_add_scene_sound_defaults(sce, seq); } } + if (seq->type == SEQ_TYPE_TEXT) { + TextVars *t = seq->effectdata; + t->text_font = newlibadr_us(fd, sce->id.lib, t->text_font); + } BLI_listbase_clear(&seq->anims); lib_link_sequence_modifiers(fd, sce, &seq->modifiers); @@ -6314,6 +6318,11 @@ static void direct_link_scene(FileData *fd, Scene *sce) s->frameMap = NULL; } + if (seq->type == SEQ_TYPE_TEXT) { + TextVars *t = seq->effectdata; + t->text_blf_id = SEQ_FONT_NOT_LOADED; + } + seq->prop = newdataadr(fd, seq->prop); IDP_DirectLinkGroup_OrFree(&seq->prop, (fd->flags & FD_FLAGS_SWITCH_ENDIAN), fd); @@ -9951,6 +9960,11 @@ static void expand_scene(FileData *fd, Main *mainvar, Scene *sce) if (seq->clip) expand_doit(fd, mainvar, seq->clip); if (seq->mask) expand_doit(fd, mainvar, seq->mask); if (seq->sound) expand_doit(fd, mainvar, seq->sound); + + if (seq->type == SEQ_TYPE_TEXT && seq->effectdata) { + TextVars *data = seq->effectdata; + expand_doit(fd, mainvar, data->text_font); + } } SEQ_END; } |