-
create comp, create shape, import file and add track matte.
Everything works fine except one little issue. I want the shape to be created first. then add the file and add a track matte.
var myComp = proj.items.addComp(“Logo”, 500, 600, 1, 10, 25);
var shapeLayer = myComp.layers.addShape();
var shapeGroup = shapeLayer.property(“Contents”).addProperty(“ADBE Vector Group”);
shapeGroup.property(“Contents”).addProperty(“ADBE Vector Shape – Ellipse”);
shapeGroup.property(“Contents”).addProperty(“ADBE Vector Graphic – Stroke”);
shapeGroup.property(“Contents”).addProperty(“ADBE Vector Graphic – Fill”);var io = new ImportOptions(File(“filepath”));
var proj = app.project;
var imp = proj.importFile(io);
imp;myComp.layers.add(imp);
myComp.layers[2].trackMatteType = TrackMatteType.ALPHA_INVERTED;
Even though I’ve put it in order. Top to bottom, which I always thought was the logic of this. I don’t understand why it’s adding the image first, then creates the shape layer.
Any thoughts?