-
Extendscript – Adding a vector shape to a group.
I need help figuring out how to add the shape to a group. I need access to the group transforms so I can position each of the paths I am creating.
Here is an image of what I would like to achieve.
https://drive.google.com/file/d/1OEzRtp1ILlZR7L5T_7BPfk-JlYiaQRPg/view?usp=sharingvar sVerts= [[-4.66796875,-4.614013671875],[-4.66796875,-1.584716796875],[4.701171875,-1.584716796875],[8.44921875,1.823486328125],[8.44921875,3.798095703125],[4.701171875,7.206298828125],[-4.66796875,7.206298828125],[-8.44921875,3.798095703125],[-8.44921875,3.387939453125],[-5.3125,2.809814453125],[-5.3125,4.512939453125],[5.283203125,4.512939453125],[5.283203125,1.208251953125],[-4.048828125,1.208251953125],[-7.833984375,-2.199462890625],[-7.833984375,-3.797607421875],[-4.048828125,-7.206298828125],[4.498046875,-7.206298828125],[8.283203125,-4.072998046875],[8.283203125,-3.729248046875],[5.248046875,-3.082275390625],[5.248046875,-4.614013671875]];
var sITans= [[0,0],[0,0],[0,0],[0,-2.7265625],[0,0],[2.86328125,0],[0,0],[0,2.693359375],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,2.728515625],[0,0],[-2.83203125,0],[0,0],[0,-2.51806640625],[0,0],[0,0],[0,0]];
var sOTans = [[0,0],[0,0],[0,0],[0,-2.7265625],[0,0],[2.86328125,0],[0,0],[0,2.693359375],[0,0],[0,0],[0,0],[0,0],[0,0],[0,0],[0,2.728515625],[0,0],[-2.83203125,0],[0,0],[0,-2.51806640625],[0,0],[0,0],[0,0]];
logoShapeLayer = activeItem.layers.addShape();
logoShapeLayer.name="S Path";
sShapeGroup = logoShapeLayer.property("ADBE Root Vectors Group");
sShapeGroup.addProperty("ADBE Vector Shape - Group");
logoShapeGroup.addProperty("ADBE Vector Graphic - Fill");var sShape = new Shape();
sShape.vertices = sVerts;
sShape.inTangents = sITans;
sShape.outTangents = sOTans;
sShape.closed = true;sShapeGroup.property(1).property("ADBE Vector Shape").setValue(sShape);
-bsides