Thanks a lot for your help Andrei! I just narrowed down this up to the point, that it definitely works in a blank project, but it doesn’t in my ‘shape case’.
If I trigger this script in a dummy project and stop after ‘copy’ step, data is copied.
If I do the same in my script – it doesn’t.
This leads to the point, where copying does not execute, just passes that step without any thrown error either. I can see the only reason myself:
*Not properly built shape path?* I have a shape layer in the comp, which contains plain ‘Contents’ such as stoke and fill.
var shapeLayer = comp.layer(1);
var pathShape = new Shape();
var pathGroup = shapeLayer.property("Contents").addProperty("ADBE Vector Group");
pathGroup.name = "path";
var myPath = pathGroup.property("Contents").addProperty("ADBE Vector Shape - Group");
Then just applying vertices array built in other step:
pathShape.vertices = verticesArray;
myPath.property("Path").setValue(pathShape)
pathGroup.moveTo(1);
Path builds without any problems, with proper vertices.
If you see a way where to look further, it would be amazing to receive some guideline, as I am hitting head into a wall for a while already!
Find out more:
After Effects Tutorials: motion design, expressions, scripting.
Boxer – Dynamic Text Boxes Template with a Live Preview
Social Media Profiles