[Bf-python] face.index?

jms jmsoler at free.fr
Sat Mar 19 10:21:25 CET 2005


Martin Poirier a écrit :

>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
>	
>  
>
Are you sure that you need this ?
http://www.blender.org/modules/documentation/236PythonDoc/NMesh.NMVert-class.html

>for f in mesh.faces:
>	print "Face: " + " ".join([str(v.index) for v in
>f.v])
>
>
>  
>

Just to say that python can return the face index without any more list :

import Blender
mesh = Blender.NMesh.GetRaw("Plane")
for f in mesh.faces:
      print  mesh.faces.index(f)
 

-jms-




More information about the Bf-python mailing list