[Bf-python] vector.negate() question

Gilbert, Joseph T. jgilbert at tigr.ORG
Tue May 9 16:29:14 CEST 2006


lol you make great points. -vector is really a shorthand for vector.negate(). No harm in having both available.

 
________________________________________
From: bf-python-bounces at projects.blender.org [mailto:bf-python-bounces at projects.blender.org] On Behalf Of Germán Alonso
Sent: Tuesday, May 09, 2006 7:36 AM
To: Blender Foundation Python list
Subject: [Bf-python] vector.negate() question

Good morning to all:
 
I'd love to know why vector.negate() has been depreciated, to use -vector instead of it.
 
I think that the explicit method would be better and more natural than the minus prefix, as this new can make undesired negations of vectors that may be difficult to detect if you're not used to this behaviour.
 
For example when you pass to a function an integer negated you use:
function( -integer )
and this don't change the integer variable value, but if you pass a vector:
function( -vector )
the vector value changes and you'll have to use:
function( -Vector(vector) )
if you don't want the vector variable to change.
 
I think this is a little odd, and purpose restore the old vector.negate() method, as is an explicit action instead of being hidden behind the minus symbol.
 
Thanks for reading.
 
Germán



More information about the Bf-python mailing list