-
Path follows Nulls Issue – the stroke dosen’t match the path
Hello folks!
I’m working on a simple animation made with some expressions and a Path follows Nulls function.
In my case the path follow the nulls but the stroke doesn’t match the path.
Here is a screen to better understand.Anyone know how I can fix this and why this happens?
The expression used in the path property is this one:
var nullLayerNames = ["Start","Leader","child_2","child_3","End"];var origPath = thisProperty;
var origPoints = origPath.points();
var origInTang = origPath.inTangents();
var origOutTang = origPath.outTangents();
var getNullLayers = [];
for (var i = 0, il = nullLayerNames.length; i < il; i++){
try{
getNullLayers.push(effect(nullLayerNames[i])("ADBE Layer Control-0001"));
} catch(err) {
getNullLayers.push(null);
}}
for (var i = 0, il = getNullLayers.length; i < il; i++){
if (getNullLayers[i] != null && getNullLayers[i].index != thisLayer.index){
origPoints[i] = fromCompToSurface(getNullLayers[i].toComp(getNullLayers[i].anchorPoint));
}}
createPath(origPoints,origInTang,origOutTang,origPath.isClosed());