Object Polygons
Add this script to a "Batch Script" editor (F10) and execute it with Script > Run.
Get a torus object's polygons, store them in a list container, and print out their number:
polygonObject = scene.getObject("Torus01") polygons = polygonObject.getFaces() scene.message("Number of polygons: "+str(len(polygons)))
Object Vertices
Add this script to a "Batch Script" editor (F10) and execute it with Script > Run.
Get a torus object's vertices, store them in a list container, and print out their number:
polygonObject = scene.getObject("Torus01") vertices = polygonObject.getVertices() scene.message("Number of vertices: "+str(len(vertices)))
Polygon Vertices
Add this script to a "Batch Script" editor (F10) and execute it with Script > Run.
Get a torus object's polygons, store them in a list container, and get the three vertices of each polygon. Print out their Ids: