I used to do this by getting the animated XYZ for some part of a rig out of 
Maya, then importing it onto an Axis and computing the distance to a Camera by 
plugging both into this:

Scene {
 inputs 2
 name Distance
 addUserKnob {20 Distance}
 addUserKnob {7 o R 0 1000}
 o {{"sqrt(pow(input1.translate.x - input0.translate.x, 2) + 
pow(input1.translate.y - input0.translate.y, 2) + pow(input1.translate.z - 
input0.translate.z, 2))" i}}
}

To be honest though, this gives you an inhuman level of accuracy.  I think 
setting a keyframe every second or so will look more like a real focus puller 
who can't necessarily twist the knob fast enough...

-- 
Lewis Saunders
robotic 1st ac
London



_______________________________________________
Nuke-users mailing list
Nuke-users@support.thefoundry.co.uk, http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-users

Reply via email to