Copy link to clipboard
Copied
Im just wondering, how it works?
var sliderX = myLayer.Effects.addProperty("ADBE Slider Control");
sliderX.name = "Size_X";
var sliderY = myLayer.Effects.addProperty("ADBE Slider Control");
sliderY.name = "Size_Y";
sliderX.name = "tmp"; // ERROR here, ReferenceError: Object is invalid
Copy link to clipboard
Copied
Yes, that's the way it works. If you add a new property to an indexed group, it invalidates all existing references to properties in that group. If you replace your last line with this, it should work:
sliderX = myLayer.Effects.property("Size_X");
sliderX.name = "tmp";
Find more inspiration, events, and resources on the new Adobe Community
Explore Now