That is because the translate knob is an XYZ_Knob which stores x,y,z as properties (so instead of .getValue() you can just access .x of the knob) and not as a Vector3
________________________________ Thorsten Kaufmann Head of Production MACKEVISION Medien Design GmbH, Stuttgart Forststrasse 7 70174 Stuttgart Tel: +49 (0) 711-933048-0 Fax: +49 (0) 711-933048-90 [email protected]<mailto:[email protected]> www.mackevision.de<http://www.mackevision.de> Geschäftsführer: Armin Pohl, Joachim Lincke HRB 243735 Amtsgericht Stuttgart Von: [email protected] [mailto:[email protected]] Im Auftrag von j00ey Gesendet: Dienstag, 5. Juli 2011 15:02 An: [email protected] Betreff: [Nuke-python] Re: Subtracting Vectors using nuke.math Wow, that simple eh?! I tried just about everything I could think of but not that! Thanks very much. So I came across another question while testing your solution - when I query the translation of a cube I assumed I would get a vector but it seems I get a 'list' [which I assume is like an array in MEL] and subtracting one from another gives me an error. So to cast the list contents into a vector I did this but somehow I imagine there is a more elegant method...? cube1=nuke.toNode('Cube1') cube2=nuke.toNode('Cube2') cube1Trans=cube1.knob('translate').getValue() cube2Trans=cube2.knob('translate').getValue() cube1TransVec=nuke.math.Vector3(cube1Trans[0] , cube1Trans[1] , cube1Trans[2]) cube2TransVec=nuke.math.Vector3(cube2Trans[0] , cube2Trans[1] , cube2Trans[2]) Thanks again
_______________________________________________ Nuke-python mailing list [email protected], http://forums.thefoundry.co.uk/ http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python
