Expression With Master Controls

Example 1:

Property: position Controls: Slider Description: adjusts position with an x slider and y slider

/*
===expression.lib functions===
addMaster('master layer');
addSliderControl('master','X Position',0);
addSliderControl('master','Y Position',0);
===expression.lib end functions===
*/
//set master
var master = thisComp.layer("master layer");
//get effects from target
var xSlider = master.effect("X Position")("Slider");
var ySlider = master.effect("Y Position")("Slider");
//set x Position
var x = value[0] + xSlider;
//set y position
var y = value[1] + ySlider;
[x,y]

Example 2:

Property: rotation Controls: Slider, Angle Description: Sets the rotation to the angle * the slider

Example 3:

Property: scale Controls: Slider, Checkbox Description: Add the slider value to base value when checkbox is ticked.

Last updated

Was this helpful?