Appearance
Inline expressions
Inline expressions format the Property values in a text layer in Studio, so you don't need to clean up your data before you upload it. The result shows straight away in Live Preview and on the Viewport, and the rendered video matches it.
Inline expressions work in text layers only.
Add a function
- Select a text layer that contains a Property.
- Click the Property to open Format.
- Click Add Function and choose a function.
- Optionally, set the If empty text.
Functions
| Function | What it does | Example |
|---|---|---|
| Replace | Replaces part of the value with other text. Leave the second box empty to remove that part instead. | "Dr. Anna", replacing "Dr. " with nothing, becomes "Anna" |
| Split and use | Keeps only the first word. | "Anna Maria Berg" becomes "Anna" |
| Trim proper | Keeps only the first word and capitalises it. Each part of a hyphenated name is capitalised. | "anna-maria berg" becomes "Anna-Maria" |
| Get character | Keeps the first character, for initials. | "Anna" becomes "A" |
| Possessive suffix | Adds the possessive ending. Choose Anna's (English), Annas (German, Danish, Norwegian) or Annas · Lars (Swedish), or choose … to type your own. | "Anna" becomes "Anna's" |
| Case | Changes the Property value to upper or lower case. | "Anna" becomes "ANNA" |
| Normalize | Removes accents from capital letters, for fonts that can't display them. | "ÉLODIE" becomes "ELODIE" |
| Max characters | If the value is longer than the number you set, shows your own text instead, or nothing. | With 10 characters and "friend", "Victoria-Helena" becomes "friend" |
If the text after the Property already has the possessive ending, Studio warns you, so the ending isn't added twice.
Case only changes the Property value. To change the case of the whole text layer, use the layer's own Case setting.
To remove accents from every letter, add Case set to upper case as well as Normalize. The Property value then shows in capitals.
If empty
The If empty text is shown to viewers who have no value for the Property, or whose value is blank. In Format, it reads "When a viewer has no [Property], show…".
For example, enter "there" so the line reads "Hi there" rather than "Hi ".
Studio checks the original value before any function runs, so the If empty text isn't used when a function leaves nothing:
- If the last function leaves nothing, for example Max characters is set to show nothing, the viewer sees nothing there.
- If a later function has nothing left to work on, for example Case after Replace has removed the whole value, the video won't render. See Test your expressions.
Number Properties
Number Properties only offer Replace and Max characters. They have no If empty text, because a missing number shows as 0.
Use several functions
A Property can have several functions. They always run in this order, whatever order you add them in:
- Replace
- Split and use
- Trim proper
- Get character
- Possessive suffix
- Case
- Normalize
- Max characters
Hover over a Property in the text layer to see its functions, the result and the If empty text.
Test your expressions
Enter a Test value at the top of Format to see the result after each function.
If a function has nothing left to work on, it's marked Fails here. This can happen when an earlier function, such as Replace, removes the whole value. A video for a viewer with that value won't render.
Apply to other uses
Click Apply to N Other Uses, where N is the number of other places the Property appears, to copy the same settings to all of them in the Project.