Skip to content

Variables & Tokens

Variables let you define a value once, give it a name, and reuse it anywhere a token fits, in file paths (import and export) and in the Text node. Instead of typing C:\Assets\Textures into ten export nodes, you define TEXTURES once and write {TEXTURES} everywhere. Change it in one place and every path updates.

If you just want the short version, jump to The quick answer. The rest of this page explains the two kinds of variable and how projects stay portable when you share them.

Two words, kept separate:

  • A variable is a named value you define in the Variables panel (Window > Variables). For example CLIENT = Acme or TEXTURES = C:\Assets\Textures.
  • A token is a {name} reference you type into a field. {CLIENT} and {TEXTURES} are tokens. When the field is used, each token is replaced by its variable’s value.

ArcBrush also ships built-in tokens (like {date} or {index}) that are just references to values the app already knows. You reference all of them the same way, with {...}, so a field never cares whether a token came from you or from the app.

Every variable lives in one of two scopes, and choosing the right one is the whole game:

  1. Global variables: values I always want on this machine. A property of your setup. Saved in your app settings, available in every project.
  2. Project variables: values that belong to this document. A property of the project. Saved inside the .arcb file, so they travel with it.

A useful analogy: a global variable is a tool on your own workbench, always within reach. A project variable is packed inside the box you ship, so it arrives wherever the project goes. When both define the same name, the project value wins (it is more specific to the work in front of you).

ScopeWhere it livesReachUse it for
GlobalYour app settingsEvery project on this machinePaths and values you reuse constantly (TEXTURES, your initials, a studio name)
ProjectThe .arcb fileOnly this document, but travels with itValues specific to one job (CLIENT, VERSION, a shot code)

Portability: sharing a project without breaking paths

Section titled “Portability: sharing a project without breaking paths”

Here is the problem a two-scope system has to solve. If TEXTURES is a global variable on your machine and you send the project to a teammate, their machine has no TEXTURES, so every {TEXTURES} path would break.

ArcBrush handles this automatically. When you save, the project quietly records the current value of every global variable it uses. When your teammate opens the file and their machine is missing one of those globals, a single Reconcile Variables dialog appears, listing exactly what is needed with your last value pre-filled alongside it. For each one they choose Define globally (add it to their own Global scope, available in every project from then on), Define in this project (add it to this document only), or Ignore this session (leave it undefined for now). Paths never silently break; the recipient gets a clear, one-click fix.

Most of the time nobody sees that dialog, because the snapshot rides along inside the file. A project that only uses project variables never triggers it at all.

The Export Image and Export Batch nodes accept tokens in their path and filename fields, the same place the built-in naming tokens already work. Mix your variables with built-ins freely: {TEXTURES}/{CLIENT}/{name}_{index}.

The Image In, SVG Import, and Image Folder nodes accept tokens in their path fields too, so source assets can live behind the same variables as your outputs: {TEXTURES}/wood/base.png. Import paths resolve your variables plus the document and app tokens ({project_dir}, {graph}, {user}, {app_version}); the frame and export tokens describe a file being written, so they do not apply to one being read.

The Text node resolves tokens too, which means labels on your images can be dynamic. Drop {CLIENT} into a caption and it fills itself in. The most useful case is batch work: a Text node that reads {color} or {name} labels every generated palette variant automatically, with its variant name or hex swatch, no per-output editing.

These names are provided by the app and are reserved: you cannot define a variable with the same name (the panel tells you if you try). They fall into two groups.

Available anywhere (in Text and in export paths):

TokenExpands to
{project_dir}The folder the .arcb file lives in (empty until the project is saved)
{user}Your operating-system user name
{app_version}The ArcBrush version
{graph}The project filename without its extension (empty until the project is saved)
{source}, {name}, {label}The image’s origin name / frame name / custom label
{color}The palette-variant color, as a 6-digit hex value
{width}, {height}The image dimensions (in a Text node, the connected background image’s size, or the node’s own Output size when nothing is connected)
{node}The node’s own canonical name

Export only (resolved when a file is written):

TokenExpands to
{index}, {count}The frame’s number and the total frame count in a batch
{date}, {time}The export date and time
{quality}, {compression}Format settings; there’s no file format to read these from inside a Text node

A variable’s value can contain tokens, which is the natural way to build a family of related values on a shared base:

DRIVE = D:\Projects
CLIENT = D:\Projects\Acme (or: {DRIVE}\Acme)
TEXTURES = {CLIENT}\textures

Change DRIVE and everything built on it moves with it. (ArcBrush detects accidental loops and stops safely.)

  • Open Window > Variables. Add a variable in Global if you reuse it across projects, or Project if it belongs to this document.
  • Type {yourname} into any import path, export path, or Text field to use it. Start typing { to autocomplete from your variables and the built-in tokens; the list only offers tokens that work in that field.
  • Sharing a project? Just send the .arcb. If it relies on a global the other machine lacks, ArcBrush offers to fill it in on open, using your last value as the default.
  • Want a path that is portable by construction? Build it on {project_dir}.