get_mesh_stats
Count faces, vertices, and triangles for all meshes under a prim to assess geometry budgets, measure simplification savings, and identify heavy subtrees for optimization.
Instructions
Count the faces, vertices and triangles of every mesh at or under a prim: the totals, then the prims under it to max_depth, each mesh with its counts and each prim above meshes with subtree_faces.
Use it for a geometry budget, what a simplification saved, or the heavy subtrees: a heavy one is the next call's prim_path. compare_prims puts two prims or variants side by side. Only UsdGeom.Mesh prims count, inside instances too, which get_scene_tree doesn't list: implicit shapes such as Cube and Sphere have no faces. Prims below max_depth aren't listed, but count in the totals and in their ancestors' subtree_faces. The totals always come inline; a tree too long to give with them goes to a file, its path in the answer.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"prim_path": "<prim_path>"
},
"name": "get_mesh_stats"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| max_depth | No | How many levels of the tree below prim_path to list; 0 for prim_path alone | |
| prim_path | Yes | The prim to measure, its descendant meshes included |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |