-
Shape layer property customization via ExtendScript
Hi, I have to access the size position and roundness values of a shape layer so that I can change those values to the ones I desire.
The code snippet I tries is:
var shapeLayer = pipComp.layers.addShape(); // adding a shape layer to the pipComp
var contents = shapeLayer.property("ADBE Root Vectors Group"); // Accessing the contents of the shape layer
var shapeRect = contents.addProperty("ADBE Vector Shape - Rect"); // Adding a rectangle to the shape layer
var shapeFill = contents.addProperty("ADBE Vector Graphic - Fill");
var rectSize = shapeLayer.property("ADBE Vector Rect Size");
var rectPosition = shapeLayer.property("ADBE Vector Rect Position");
var rectRoundness = shapeLayer.property("ADBE Vector Rect Roundness");
rectSize.setValue([600, 400]);
rectPosition.setValue([0.0, -90]);
rectRoundness.setValue(10);ESTK throws an error stating, “null is not an object” at this line
rectSize.setValue([600, 400]);and the code terminates execution. How can I solve this to achieve what I am looking for. Kindly, Help!!
Thanks in advance,
Krishna