Hi all
I'm new to python and am trying to learn some by writing a script that will
make one object look at another and I'm stuck. I have the positions of each
object and the vector between them but I can't figure out where to go next.
This is what I have so far...
################
cube1=nuke.toNode('Cube1')
cube2=nuke.toNode('Cube2')
cube1Trans=cube1.knob('translate').getValue()
cube2Trans=cube2.knob('translate').getValue()
cube1TransVec=nuke.math.Vector3()
for i in range(len(cube1Trans)):
cube1TransVec[i] = cube1Trans[i]
cube2TransVec=nuke.math.Vector3()
for i in range(len(cube2Trans)):
cube2TransVec[i] = cube2Trans[i]
vec=nuke.math.Vector3()
vec=cube1TransVec-cube2TransVec
###############
Can anyone help me out? Many thanks in advance
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python