1

e.g.

my composition width is 4480

I have a layer with a gradient ramp effect with an x start positon of 1026 and I want to generate and store the value of the x position on the other side of the composition which would be 3454.

Then have a duplicate of that effect on another layer get the stored value or have the value sent to it

1 Answer 1

2

I think what you're asking to do is simple using Expressions. If you alt-click on the stop watch of any keyframe-able control you can write an expression to connect that control to another control. So if you want to control the end of ramp's x position using the start of ramp's x position in your example, it would be:

x = 4480-(effect("Gradient Ramp")("Start of Ramp")[0]);
y = 1080;
[x,y];

screengrab

The [0] indicates an array - it means "take the x position of the "start of ramp", which has two values, x and y, which can be called as [0] or 2 in the array.

To duplicate this in another layer, duplicate your first layer using cmd+D, then add an Expression to the start of ramp in the duplicated layer:

grab2

You can use the pickwhip to select the control you want to enter into the expression

1
  • 1
    A more robust way of doing this is to avoid hard-coded constants and use x = thisComp.width - (effect("Gradient Ramp")("Start of Ramp")[0]); and y = thisComp.height;. You can use this in any comp and it will be right.
    – stib
    Feb 2, 2021 at 23:52

This site is temporarily in read-only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .