[Bf-python] Mesh.Face() constructor

Ken Hughes khughes at pacific.edu
Thu Mar 2 06:50:02 CET 2006


Campbell Barton wrote:
> I dont have a problem with making a face and then assigning, though for 
> performance reasons Id like to be able to do
> me.faces.extend( (v1, v2, v3, uv_vec, img, col, flag) )
> This would be faster because dummy data dosent need to be assigned and 
> then modified later.

Only problem is that parsing this mess of parameters is just that... a 
mess.  I appreciated everyone's input early in the process and tried to 
make the methods take as general an input as possible, but the end 
result has been that any time I fix a bug in the .extend() methods I 
usually end up breaking something else.  So if I'm likely to add 
anything to the current list of accepted parameters it will probably 
just be to accept a PFace type (similar to the existing PVerts) with all 
the data filled in.

Of course, since in the next release we're allegedly breaking all sorts 
of backward compatibility, I wouldn't be opposed to making it simpler 
and more useful.  If everyone can agree on what that means :-)

I just want to reiterate the main design goal of the extend() methods; 
they are designed to work best by adding many faces at once, not adding 
single faces many times.  It will be that was as long as Blender 
internally uses arrays instead of linked list for verts, faces and edges.

Ken



More information about the Bf-python mailing list