Access effect parameters


One more question. Is it possible to affect the parameters of an effect? For instance, in this case, I’d like to set the x position of the “Start Ramp” property in a Gradient Ramp to the layer’s Anchor Point x value. I feel like there has to be a way, but I’m struggling to figure it out.

Thanks again!

1 Like

@skimber Yes it is , you can loop over the effects of the layer, find the effect by its name, match name or index and then loop over its properties and find a specific property by its name/match name and set the value of this property to the anchor point x+",0" (position value format should be “x,y”).

Download -
Effect Settings.json (16.1 KB)

Let me know if you have any questions,

This is great. And then, to set the y value, would I just basically repeat the last 3 steps for y? Thanks!

No, in the set line that - sets the text variable to the layer’s anchor point x + “,0”.
the 0 is the y value so you can replace it with a variable for the y (for example - anchor point y),
but remember to keep the comma “,” between them, the value should be number+","+number (x,y).
let me know if you need more help with that.

This makes perfect sense. Thank you! Just learning the language still. :slight_smile: