CompaToon
Trace: • Glossary • Work with Kitsu / ShotGrid • What's new • % Variables

% Variables

Variables build file names and paths that adapt to the context: episode, shot, output folder…
Type them directly into the fields, for example BG_EP%03e_SC%03a.psd.

Not to be confused with wildcards * and ?, which are used to search for several files (see Matching Table).

List of variables

Variable Value Where to set it
%p Production name Job Settings block
%e Episode number Job Settings block
%n Episode name Job Settings block
%s Sequence name Job Settings block
%a Asset name or shot number Computed (BDL, folder, tracker…)
%o Output folder Task's Output Folder
%t Take number to be specified
%x %y %z Free variables (%z to be confirmed) Job Settings block


The Job's Settings block.

A field linked to a variable shows its code in its name, for example for %p:

Variables work in most fields, but not all of them. If in doubt, test on a single file.

Formatting a number

Put a number between % and the letter to pad the value with leading zeros:

Syntax Source value Result
%e 6 6
%03e 6 006
%04e 6 0006
%03a 32 032

Cropping a value (HyperCrop)

Add a HyperCrop rule between < > right after the variable: %x<rule>.
The crop is applied to the variable's value before it is inserted.

Syntax Source value Result Explanation
%n<3:3> My Episode Epis Removes 3 characters at the start and 3 at the end

Full examples

With: episode number 6, episode name “My Episode”, shot 32.

You write You get
BG_EP%e_out BG_EP6_out
BG_EP%03e_out BG_EP006_out
sc_%03a sc_032
CH_%n_%04e_ CH_My Episode_0006_
CH_%n<3:3>_%04e_ CH_Epis_0006_
%o/EP%03e/SC%03a.mov D:/out/EP006/SC032.mov

See also

  • HyperCrop
  • Matching Table: using variables in asset names
  • Harmony actions: variables in Write node paths
Previous Next

Site Tools

  • Media Manager
  • Sitemap

Page Tools

  • Export to PDF
  • Fold/unfold all
  • Back to top

User Tools

  • Log In
en/compatoon/manuals/toonbox/v2/reference/variables.txt · Last modified: 2026/12/02 16:15 by twinstef
CompaToon

Table of Contents

Table of Contents

  • % Variables
    • List of variables
    • Formatting a number
    • Cropping a value (HyperCrop)
    • Full examples
    • See also

Translations of this page:
  • fr
  • en

ToonBox

  • Documentation home

Getting started

  • Installation
  • Jobs and Tasks
  • The interface
  • First Job
  • Configure the software
  • Videos

I want to…

  • Create the scenes
  • Prepare the backgrounds
  • Export for compositing
  • Generate movies
  • Make a rough cut
  • Modify scenes
  • Tracker (Kitsu / ShotGrid)
  • Manage files

Reference

  • All tasks
  • % Variables
  • HyperCrop
  • Regular expressions
  • BDL format
  • Matching Table
  • Libraries
  • Action table
  • FFmpeg
  • Glossary

Help

  • Known issues
  • FAQ
  • What's new
  • Production cases

Other tools

  • ToonBox AE Plugin
  • ToonBrowser
  • ToonExpo