Skip to content

Layers

Layers are the building blocks of compositions. Each layer must have exactly one source: type, file, or composition.

Top-level layer authoring is done via _timeline:

yaml
_timeline:
  layers:
    - name: title
      type: text
      text: Hello World

You can also update or remove existing layers:

yaml
_timeline:
  set:
    layers:
      - name: title
        transform:
          position: [960, 500]
  remove:
    layers:
      - name: temp guide

For selected-layer updates/removals, use _selected (see Actions).

Rules for set/remove:

  • Layers are matched by exact name.
  • If no layer matches, Compdown errors.
  • If multiple layers match the same name, Compdown errors.

Layer source

Every layer needs exactly one of:

PropertyDescription
typeBuilt-in layer type
fileReference to an imported file
compositionReference to another composition
yaml
layers:
  # Type-based layer
  - name: background
    type: solid
    color: 000000

  # File-based layer
  - name: footage
    file: my-video  # References a file id

  # Composition-based layer
  - name: nested
    composition: Lower Third  # References a composition name

Built-in layer types

TypeDescriptionRequired properties
solidSolid color layercolor
nullNull object (invisible)
adjustmentAdjustment layer
textText layertext
cameraCamera layer
lightLight layerlightType
shapeShape layershapes

Common properties

These apply to all layer types:

Core identity

PropertyTypeRequiredDescription
_idstringnoReusable layer template id (within the same layer array)
_extendsstringnoInherit from a layer _id in the same layer array
namestringyesLayer name
essentialPropertiesobjectno (composition layers only)Override Essential Graphics controller values on this precomp instance

Inheritance (_id / _extends)

You can define base layer templates and derive new layers from them.

yaml
_timeline:
  layers:
    - _id: textBase
      name: Base
      type: text
      text: Hello
      fontSize: 96

    - _extends: textBase
      name: Title
      text: World

Rules:

  • Works in compositions[].layers and _timeline.layers.
  • _extends can only target _id values in the same layer array.
  • Object values are merged deeply.
  • Array values are replaced (not concatenated).
  • Duplicate _id, missing _extends targets, and circular inheritance fail validation.

See Inheritance for full inheritance behavior and additional examples.

Essential Graphics overrides (essentialProperties)

Use essentialProperties on precomp instance layers (composition layers):

yaml
- name: Intro Instance
  composition: Intro
  essentialProperties:
    Headline: "New headline"
    Accent Color: [1, 0.4, 0.2]

Rules:

  • Only valid on layers that use composition.
  • Keys are controller names shown in Essential Graphics.
  • Keys must match exactly one controller per layer.
  • Color controllers accept hex strings like ff0000 (or #ff0000).

Timing

PropertyTypeDescription
inPointnumberIn point (seconds)
outPointnumberOut point (seconds)
startTimenumberStart time offset

Switches and toggles

PropertyTypeDescription
enabledbooleanLayer visibility
shybooleanShy flag
lockedbooleanLock flag
solobooleanSolo the layer
threeDLayerbooleanEnable 3D
audioEnabledbooleanEnable audio
motionBlurbooleanEnable motion blur
collapseTransformationbooleanContinuously rasterize
guideLayerbooleanMark as guide layer
effectsActivebooleanGlobal effects toggle
timeRemapEnabledbooleanEnable time remapping

Parenting and rendering

PropertyTypeDescription
parentstringParent layer name
blendingModestringBlending mode
qualitystringbest, draft, wireframe
samplingQualitystringbicubic, bilinear
autoOrientstringoff, alongPath, cameraOrPointOfInterest
frameBlendingTypestringnone, frameMix, pixelMotion
trackMatteTypestringnone, alpha, alphaInverted, luma, lumaInverted
labelintColor label (0-16)

Solid layers

Solid color layers. Require a color property.

yaml
- name: background
  type: solid
  color: 1a1a2e

Solid properties

PropertyTypeRequiredDescription
colorstringyes6-char hex color
widthintnoWidth (defaults to comp)
heightintnoHeight (defaults to comp)

Null layers

Invisible layers used for parenting and expressions.

yaml
- name: controller
  type: null
  threeDLayer: true

Adjustment layers

Apply effects to all layers below.

yaml
- name: color grade
  type: adjustment
  effects:
    - name: Curves
      matchName: ADBE CurvesCustom

Text layers

Text layers with styling options. Require a text property.

yaml
- name: headline
  type: text
  text: Breaking News
  fontSize: 72
  font: Arial
  fillColor: FFFFFF
  justification: center

Text properties

PropertyTypeRequiredDescription
textstringyesText content
fontSizenumbernoFont size
fontstringnoFont family
fillColorstringnoFill color (hex)
strokeColorstringnoStroke color (hex)
strokeWidthnumbernoStroke width
trackingnumbernoCharacter spacing
leadingnumbernoLine spacing
justificationstringnoleft, center, right

Camera layers

3D cameras for perspective views.

yaml
- name: Main Camera
  type: camera
  cameraType: twoNode
  zoom: 1000
  depthOfField: true
  focusDistance: 500

Camera properties

PropertyTypeDescription
cameraTypestringoneNode, twoNode
zoomnumberCamera zoom
depthOfFieldbooleanEnable DOF
focusDistancenumberFocus distance
aperturenumberAperture
blurLevelnumberBlur level (0-100)

Light layers

3D lights for illumination. Require a lightType property.

yaml
- name: Key Light
  type: light
  lightType: spot
  intensity: 100
  lightColor: FFFFEE
  coneAngle: 90
  castsShadows: true

Light properties

PropertyTypeRequiredDescription
lightTypestringyesparallel, spot, point, ambient
intensitynumbernoLight intensity
lightColorstringnoLight color (hex)
coneAnglenumbernoSpot cone angle (0-180)
coneFeathernumbernoCone feather (0-100)
castsShadowsbooleannoEnable shadows
shadowDarknessnumbernoShadow darkness (0-100)
shadowDiffusionnumbernoShadow diffusion

Shape layers

Parametric shapes with fill and stroke. See Shapes for complete documentation.

yaml
- name: Button
  type: shape
  shapes:
    - type: rectangle
      size: [200, 50]
      roundness: 10
      fill:
        color: 3498db

File-based layers

Layers sourced from imported footage.

yaml
files:
  - id: hero
    path: /path/to/video.mp4

compositions:
  - name: Main
    layers:
      - name: Hero Video
        file: hero
        transform:
          position: [960, 540]

Composition layers (nesting)

Embed another composition as a layer.

yaml
compositions:
  - name: Lower Third
    layers:
      - name: bar
        type: solid
        color: FF0000

  - name: Main Comp
    layers:
      - name: lower third instance
        composition: Lower Third
        transform:
          position: [960, 980]

Blending modes

Available values for blendingMode:

normal, dissolve, darken, multiply, colorBurn, linearBurn, darkerColor, lighten, screen, colorDodge, linearDodge, lighterColor, overlay, softLight, hardLight, vividLight, linearLight, pinLight, hardMix, difference, exclusion, subtract, divide, hue, saturation, color, luminosity


Parenting

Link layers with the parent property:

yaml
layers:
  - name: controller
    type: null

  - name: element
    type: solid
    color: FF0000
    parent: controller  # Will follow controller's transform

The parent layer must exist (by name) in the same composition.

Released under the MIT License.