[Bf-python] vector.negate() question

Germán Alonso german at sistrans.com
Tue May 9 13:36:14 CEST 2006


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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.blender.org/pipermail/bf-python/attachments/20060509/ce2e5724/attachment.html>


More information about the Bf-python mailing list