/* */ scene = window.getScene(); numObjects = scene.getNumObjects(); sel = scene.getSelection(); int numVerts = 0; int numFaces = 0; int numEdges = 0; int numMeshes = 0; if (sel.length > 0) { for (int i = 0; i < sel.length; ++i) { meshInfo = scene.getObject(sel[0]); { mesh = meshInfo.object; numVerts += mesh.getVertices().length; numEdges += mesh.getEdges().length; numFaces += mesh.getFaces().length; ++numMeshes; } } } else { for (int i = 0; i < numObjects; ++i) { meshInfo = scene.getObject(i); if (meshInfo.object.getClass().getName().equals("artofillusion.polymesh.PolyMesh")) { mesh = meshInfo.object; numVerts += mesh.getVertices().length; numEdges += mesh.getEdges().length; numFaces += mesh.getFaces().length; ++numMeshes; } } } new MessageDialog(window, numVerts + " vertices, " + numEdges/2 + " edges, " + numFaces + " faces in " + numMeshes + " mesh(es)");