How do I access the number of uv coords, or the number of vertices, or number of faces in an object with python? I know how to access the vertices or uvcoords themselves, shouldnt there be an entry for the ammount of vertices as well?
Thanks
How do I access the number of uv coords, or the number of vertices, or number of faces in an object with python? I know how to access the vertices or uvcoords themselves, shouldnt there be an entry for the ammount of vertices as well?
Thanks
import Blender
mesh = Blender.NMesh.GetRaw("mesh")
print len(mesh.verts)
the len() function returns the lenght of all the items in any type of subscriptable objects (strings, lists, dictionnaries, tuples, subscrictable user defined objects)
len is a built in function. You can get a list of the builtins with
print dir(__builtins__)
Martin
Martin
Thank you. Very quick and very helpfull