Super noob question: I'm trying to create one shape layer with two rectangles, but can't figure out how to access/add properties (change size, fill, stroke, etc) to the second rectangle.
var curComp = app.project.activeItem; var curCompHeight = curComp.height; var curCompWidth = curComp.width; var rulerLayer = curComp.layers.addShape(); var contents = rulerLayer.property("ADBE Root Vectors Group"); contents.addProperty("ADBE Vector Shape - Rect"); contents.addProperty("ADBE Vector Shape - Rect"); contents.property("ADBE Vector Shape - Rect")("ADBE Vector Rect Size").setValue([2,curCompHeight]); contents(2).property("ADBE Vector Shape - Rect")("ADBE Vector Rect Size").setValue([2,curCompHeight]);
Line 10 throws an error of "null is not an object". Any help would be greatly appreciated!