Short answer
The -hierarchy (or -hi) flag on xform -q -ws -bb forces Maya to compute the bounding box from every shape that descends from the queried transform. In practice, this means the returned min/max coordinates encompass all geometry in the hierarchy, not just the transform node itself.
Why the confusion?
Older documentation (2022) sometimes described the flag as “affecting the selection of transforms”, while newer docs (2024) state that it “includes all descendant shapes”. The underlying implementation has not changed; the flag always aggregates geometry. The discrepancy stems from wording rather than behavior.
Key points to remember
- The flag does not ignore geometry that is hidden or disabled unless you also use
-all to force inclusion.
- Non‑geometry nodes (lights, cameras) contribute nothing to the volume but are still traversed.
- Any non‑uniform scale on a transform in the path will affect the world‑space bounding box.
Quick verification test
Follow these steps in Maya 2022–2024 to confirm the behavior:
- Open a new scene and create a parent transform:
parent1 = group -n "parent1";
- Add two child meshes of known size:
pCube -n "childA"; parent1.childA; and pSphere -n "childB"; parent1.childB;
- Position the children so their extents do not overlap.
- Query the bounding box with hierarchy:
xform -q -ws -bb -hierarchy parent1;
- Record the returned
min and max vectors.
- Repeat the query without
-hierarchy:
xform -q -ws -bb parent1;
- The result should be a zero‑volume box (or the transform’s own bounds) because the transform has no geometry of its own.
- Optionally, compare with
polyBoundingBox -q -bbox parent1; – the values should match the hierarchy query.
What if you need hidden shapes?
To include them, add the -all flag:
xform -q -ws -bb -hierarchy -all parent1;
This forces Maya to consider every descendant shape, regardless of visibility.
Final takeaway
Across Maya 2022, 2023, and 2024, the -hierarchy flag on xform -bb always aggregates child shape geometry. The command’s output is the combined world‑space bounding box of the entire hierarchy.