Expression Library Guide
  • After Effects - Expression Library
  • Expression Library UI Overview
    • Import To Expression Library
    • Export Expression Library
      • Adding An Item To Export
      • Removing An Item From Export
      • Exporting
    • Guide
    • Expression Library
      • Expression Library Item Icon Guide
    • Information
    • Expression Functions
    • Add Expression Library Item
    • Remove Expression Library Item
    • Apply Expression
      • Applying To Properties
      • Applying To Layers
    • Delete Expression
      • Deleting With Combined Effects
  • Creating An Expression Library Item
    • Expression Library Info
    • Selection
      • Single Property Selection
      • Multiple Property Selection
      • Layer Selection
    • Including Keyframes
    • 3D or 2D Layer
    • Javascript or Extendscript
    • Naming Your Expression
  • Adding Custom Controls
    • thisLayer & Master Layers
    • Custom Functions
      • addMaster()
      • add3DPointControl()
      • add2DPointControl()
      • addColorControl()
      • addCheckboxControl()
      • addSliderControl()
      • addAngleControl()
      • addLayerControl()
    • Combining Custom Controls
    • Example Expressions
      • Standard Expression
      • Expression with thisLayer Controls
      • Expression With Master Controls
  • Tutorials
    • Tutorial Series 01
  • Changelog
    • Updates
  • Expression Pack
    • COMING SOON
  • FAQ
    • Installing The Script
      • Install As A Script Panel
      • Avoiding Those Darn Errors
      • Loading The Script
    • Reporting A Problem
    • After Effects Expression Error
    • Supported Versions
Powered by GitBook
On this page
  • Understanding thisLayer and Masters
  • What Is thisLayer?
  • What Is Master?
  • Expression Set-up

Was this helpful?

  1. Adding Custom Controls

thisLayer & Master Layers

PreviousAdding Custom ControlsNextCustom Functions

Last updated 5 years ago

Was this helpful?

When creating custom controls within an expression you always have an option to select either 'thisLayer' or a 'master' layer.

Understanding thisLayer and Masters

What Is thisLayer?

If you haven't been writing expressions for long you may be unaware that you can reference a layer with a simple line: thisLayer basically means what it says, this layer.

var target = thisLayer;
target.name;

The variable doesn't matter in this situation. However, I like to set layers as targets to easily reference back to them for later.

What Is Master?

A master layer referes to a layer that normally contains effect controlls for properties on other layers. Basically this means you are able to maipulate layers by using the master instead of having to find the layer itself. You can reference a master by doing the following

var master = thisComp.layer("masterLayerName");
master.name;

I like to set master variables inside the expression so I can quickly reference them again if I need to.

Expression Set-up

The easiest way to explain how to set-up expressions to use masters or likewise. Head over to this sections

Example Expressions