Variables

An overview of what Variables are and how to use them on your projects.

Christopher Han avatar
Written by Christopher Han
Updated over a week ago

With Variables, you can set up your own creative mission control on your projects to work more efficiently and flexibly.

Variables are custom controls that you create to customize the way you interface with a project. They can be connected to multiple inputs across your scene, so when you make changes to the variable, all connected values will be updated.

Variables are great for making macro changes across your project and exposing properties on deeply nested layers.

What this article covers:

  1. Creating Variables

  2. Connecting Variables to layer properties

  3. Disconnecting Variables

  4. Variable types

  5. Using variables with scene instances

  6. Deleting Variables


Creating Variables

Variables can be created on the Variables Manager or on the Connections Panel. You can create an unlimited amount of variables.

To create variables on the Variables Manager:

  1. Open the Variables Manager

  2. Click the + button in the top right

  3. Give your variable a name and select a variable type

  4. Click Create.

  5. A new variable will be created.

To create variables on the Connections Panel:

  1. Select a layer

  2. Open the Connections Panel for any property

  3. Click the Input connection field

  4. Select the Create new variable option

  5. Give your variable a name and select a variable type

  6. Click Create

  7. A new variable will be created and the selected property will have an input connection set to the new variable

Connecting Variables to Layer Properties

Variables can be connected to any properties that have a corresponding type – i.e. color variables can only be connected to color properties.

To connect a variable to a layer property:

  1. Select a layer

  2. Open the connection panel for the property you want connected to the variable

  3. Click the Input connection field

  4. Select the variable you’d like the property to be connected with

Disconnecting Variables

There are two ways to disconnect a variable from a specific property – using the Connections Panel or using the Variables Manager. When you disconnect a variable from a property, the property will inherit its current value.

Just like any other connection, variables can be disconnected using the Connections Panel:

  1. Select the layer with the property you’d like to disconnect

  2. Open the Connections Panel for the property you’d like to disconnect

  3. Click the Input field to disconnect the property from the variable

Disconnecting variables in the Variables Manager:

  1. Open the Variables Manager

  2. Open the Variables Settings for the variable you’d like to disconnect from the property

  3. Find the property on the list of connections within the Variables Settings panel

  4. Click the property input to disconnect the property

Variable Types

There are multiple variable types, below is an outline of each and the types of properties that can be connected to this variable type. The examples listed below are not comprehensive.

Type

Description

Example properties

Color

Outputs a HEX color value. Use with any color field

stroke color, fill color, text color

Text

Outputs a set of text characters. Use with any text field

text content

Number

Outputs an integer, decimal, percentage, or degree value. Use with any individual number field

rotation, width, stroke width, font size

Number pair

Outputs a 2d vector value. Use with any combined number fields

position, scale, skew

Toggle

Outputs a true/false boolean value. Use on any checkbox field

Box blur “is spreading”

Using Variables with Scene Instances

Variable scope

Variables on Fable are scoped to the scene/project they’re created in. This means that when you create a variable in a scene, those variables will not display on the primary project’s variable manager.

This scope limitation is designed to reduce clutter on your primary project as well as enable scene instance overrides

Overrides

Overrides enable you to to create unique variations of your scene, by allowing each scene instance to deviate from its parent scene. Variables determine how much an instance can deviate from its parent.

When you create a variable within a scene, any instance of the scene gains a new section in their Inspector – “Variables.” This section displays all variables scoped to the parent scene.

When you adjust these input values, the instance you have selected will deviate from the parent scene, and the underlying properties connected to the variable you’ve adjusted will be updated. While this instance deviates from the parent scene, all properties that are not connected to a variable will continue to update based on changes to the parent scene. In this way, overrides enable you to contextualize scenes or experiment with variations without losing the re-usability of scenes within your project.

Deleting Variables

You can delete variables using the Variables Manager:

  1. Open the Variables Manager

  2. Click the variable settings button for the variable you’d like to delete

  3. Click the trash can icon at the top of the variable settings panel

  4. If a variable is connected to a property, you’ll receive a warning that requires confirmation to delete the variable

    • Click the “Delete” button to delete the variable

    • Click the “Cancel” button to keep the variable and stop deletion

Related Articles

Scenes

Did this answer your question?