[Bf-python] Making Vectors consistant.

Campbell J Barton cbarton at metavr.com
Mon Nov 15 06:37:30 CET 2004


Isnt this just a matter of adding vector  types to existing values??
Like making face.no return a vector-

Its just basic coding in most cases.

I know its not planned tho- I used blender before Mathutils vectors too :).

- Cam

Stephen Swaney wrote:

>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.
>
>  
>


-- 
Campbell J Barton

133 Hope Street
Geelong West, Victoria 3218 Australia

URL:    http://www.metavr.com
e-mail: cbarton at metavr.com
phone: AU (03) 5229 0241




More information about the Bf-python mailing list