-
Layer Control and Focus Distance
I’ve modified Dan Ebberts terrific Focus Distance expression so it can be keyframed, however it would be much easier if the Layer Control could be keyframed.
Is it possible to do so, either through a custom preset or another method?
Is this method the best way?
Here’s what I’m doing:
currentTarget = thisComp.layer("Focus Control").effect("Layer Target")("Slider");
currentTarget = Math.round(currentTarget);
target = thisComp.layer(currentTarget);
v1 = target.toWorld(target.anchorPoint) - toWorld([0,0,0]);
v2 = toWorldVec([0,0,1]);
dot(v1,v2)