-
Path property Expression to offset the path
So i have this expression for thePathproperty in aShape Group.
// Get the path from the Shape layer in the composition
var shapeLayer = thisComp.layer(“Shape Layer Name”);
var shapeGroup = shapeLayer.content(“Shape Group Name”);
var path = shapeGroup.content(“Path Name”).path;// Get path properties
var pts = path.points();
var inTans = path.inTangents();
var outTans = path.outTangents();
var closed = path.isClosed();// Move the path vertices 500 pixels to the right
for (var i = 0; i < pts.length; i++) {
pts[i][0] += 500; // Add 500 to the x-coordinate
}// Create a new path with modified vertices
createPath(pts, inTans, outTans, closed);It moves the path 500 pixel to the right. Only the path itself without touching the transform controls (postion etc..)
My issue is that i have to manually type the Shape Layer, Shape Group and Path name to make it work.
I can’t figure it out how to make this expression work in a way to automatically recognise this hierarchy within the Shape Layer.its something like ADBE Root Vectors Group, ADBE Vectors Group, ADBE Vector Shape.
Can anyone help? thx
Sorry, there were no replies found.