[Bf-python] Making Vectors consistant.

Stephen Swaney sswaney at swbell.net
Sun Nov 14 16:21:16 CET 2004


Campbell J Barton wrote:
> 
> Hi all
> I have been dealing with different types of mesh data and it gets
> frusterating how some types are treates as normals and some arnt.

This is just one more situation that comes from the historical
fact the very useful Vector and his other MathUtil friends came
to the party later than everyone else.  This sort of thing
happens as software evolves and is not the result of incompetence 
or evil.  There is also the issue of backwards-compatibility to be 
aware of.

> 
> Eg- f.v.co is a mathutils Vector
> and face.normal is a plane list.
> 
> Just to let you know, theres also a bug.
> 
> You can do a
> 
> for Vert in mesh.verts:
>   Vert.co.resize4D()
>   Vert.co.w = 0

The fact that you can deliberately break things bothers me
less than the inconsistency with parameter types.

In the short term, we should make sure we can use converions
like some_func( list( a_vector ) )  
or another_func( Vector( a_list ) to get where we need to.

I made a note in the 0-todo.txt file about this.

-- 
Stephen Swaney			
sswaney at swbell.net



More information about the Bf-python mailing list