__sub__ is simply implementing the standard operators..So this will work fine:

import nuke
vec1 = nuke.math.Vector3(1.0,1.0,1.0)
vec2 = nuke.math.Vector3(2.0,2.0,2.0)
print vec1-vec2

->

# Result:
{-1, -1, -1}

Regards,
Thorsten

________________________________
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 12:25
An: [email protected]
Betreff: [Nuke-python] Subtracting Vectors using nuke.math

Hi all

Can anyone shed some light on some vector math for me? I'm trying to subtract 1 
Vector3 from another and I'm totally stumped.

Running help(nuke.math.Vector3) gives me this info:

| __sub__(...)
| __sub__( (Vector3)arg1, (Vector3)arg2) -> object :

but I've no idea how to use it.

Any help greatly appreciated!
_______________________________________________
Nuke-python mailing list
[email protected], http://forums.thefoundry.co.uk/
http://support.thefoundry.co.uk/cgi-bin/mailman/listinfo/nuke-python

Reply via email to