[Bf-python] face.index?

Martin Poirier theeth at yahoo.com
Sat Mar 19 08:14:11 CET 2005


Why can't people just do this:

import Blender

mesh = Blender.NMesh.GetRaw("Plane")

i = 0
for v in mesh.verts:
	v.index = i
	i += 1
	
for f in mesh.faces:
	print "Face: " + " ".join([str(v.index) for v in
f.v])


Works great.

Martin


--- "Gilbert, Joseph" <jgilbert at tigr.org> wrote:
> Maybe a dictionary. {face object : C-data index}
> just a thought. A lot
> of import formats number faces, triangles, etc so
> it's important as to
> which order they are in. 
> 
> -----Original Message-----
> From: bf-python-bounces at projects.blender.org
> [mailto:bf-python-bounces at projects.blender.org] On
> Behalf Of joeedh
> Sent: Thursday, March 17, 2005 3:57 PM
> To: Blender Foundation Python list
> Subject: Re: [Bf-python] face.index?
> 
> Gert De Roost wrote:
> 
> >And edge.index too, pretty please ?
> >  
> >
> Well, you have to understand that all .index would
> do is indicate the 
> element's place in it's associated Python List.  I
> wouldn't be hard to 
> add, but would it be the best way of doing it?
> 
> joeedh
> _______________________________________________
> Bf-python mailing list
> Bf-python at projects.blender.org
>
http://projects.blender.org/mailman/listinfo/bf-python
> _______________________________________________
> Bf-python mailing list
> Bf-python at projects.blender.org
>
http://projects.blender.org/mailman/listinfo/bf-python
> 


		
__________________________________ 
Do you Yahoo!? 
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/ 



More information about the Bf-python mailing list