Text (FreeType2) With Templates

Text (FreeType2) With Templates 2024-02-19

Supported Bit Versions
  1. 64-bit
Source Code URL
https://github.com/marktheminer/text-freetype2-mustache
Minimum OBS Studio Version
30.0.0
Supported Platforms
  1. Windows
  2. Mac OS X
  3. Linux
This is an enhancement to the Text (FreeType2) source for Windows. With it, you can enter text such as:

1708367756457.png

Then, you can go to Tools->Edit Text (GDI+) With Templates Variables

That will show you the variables that it has found across all of your scenes:
1708369726841.png


Then, you can fill them in:

1708369740226.png


And, you see your source update:

1708369775211.png


Open up your source again, and you'll see the template as well as the preview:

1708367851929.png


As of v1.1.0 you can take advantage of DateTime functionality:

1708369693030.png


It updates every quarter of a second (250ms).

You can also take advantage of conditional rendering as of v1.2.0.

You can now do:

Code:
{{#if dj4name}}   {{dj4name}} {{#if dj4twitch}}- {{dj4twitch}}@twitch{{/if dj4twitch}}{{/if dj4name}}

And, if dj4name is defined, it'll try to render
Code:
   {{dj4name}} {{#if dj4twitch}}- {{dj4twitch}}@twitch{{/if dj4twitch}}

And, then if dj4twitch is defined it will render:

Code:
   {{dj4name}} - {{dj4twitch}}@twitch

but of course with {{dj4name}} and {{dj4twitch}} substituted with whatever they are defined to. Nesting is shown above to show that it supports it, you don't have to do complex things like that.

Note to Mac Users
Upon download, it will not let you install due to the bundle being self signed. After you see this:

1708367979234.png

You need to open Security and Privacy settings and you'll see an option about the plugin that allows you to open it anyway and that is what you need to do.
  • Like
Reactions: ASchneider
Author
markjay
Downloads
1,168
Views
6,496
First release
Last update
Rating
3.50 star(s) 2 ratings

More resources from markjay

Latest reviews

the plugin box for text template is blank even after restarting my computer, cool idea.
markjay
markjay
Which plugin box? Can you share a screenshot?
Thanks for porting this to MacOS in such a timely manner! It works very well. - I tried to remove the Text source and obs quit, but then I remembered to remove the {{}} from the Text source before deleting...
markjay
markjay
Is this easily reproduceable and if so, can you give steps?
Top