-
Scripting question about shape layers
I’m trying to make a script that creates a shape layer, then a group, then a (freeform) path, stroke and fill within that. This is what I’ve got – the createPath function doesn’t work, and causes AE to white-out and crash. Any ideas why?
The script works fine if I comment that line out.
var shp = createShape(comp);
shp.name = ("Curve");var curvgrp = createShapeGroup(shp);
curvgrp.name = ("CurveGrp");// var curv = createPath(curvgrp); // COMMENTED BECAUSE IT KILLS AE
var curvstrk = createStroke(curvgrp);
var curvfll = createFill(curvgrp);
function createShape(targetComp) {return targetComp.layers.addShape();
}
function createShapeGroup(shape) {return shape.property("Contents").addProperty("ADBE Vector Group");}
function createPath(group) {return group.property("Contents").addProperty("ADBE Vector Shape");}
function createStroke(group) {return group.property("Contents").addProperty("ADBE Vector Graphic - Stroke");}
function createFill(group) {return group.property("Contents").addProperty("ADBE Vector Graphic - Fill");}