# Question on getting all prim paths

**URL:** <https://forum.aousd.org/t/question-on-getting-all-prim-paths/2706>\
**Category:** USD\
**Created:** [September 29, 2025, 4:45pm UTC](https://forum.aousd.org/t/question-on-getting-all-prim-paths/2706 "2025-09-29T16:45:37Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![silviapalara](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@silviapalara](https://forum.aousd.org/u/silviapalara)\
**Post date:** [September 29, 2025, 4:45pm UTC](https://forum.aousd.org/t/question-on-getting-all-prim-paths/2706/1 "2025-09-29T16:45:38Z")

</div>

Good morning,

looking at the code, it seems stages and layers maintain a hash to map path to prim. I have been in situations where it would have been extremely convenient to get the full list of prim paths in the stage in no particular order, without the runtime penalty of a stage traversal.

Since it seems stages and layers already have that data, wouldn’t it be nice if it was available through public API?

---

<div class="post-metadata">

**Author:** ![spiff](https://sea2.discourse-cdn.com/flex016/user_avatar/forum.aousd.org/spiff/32/22_2.png) [@spiff](https://forum.aousd.org/u/spiff)\
**Post date:** [October 1, 2025, 11:38pm UTC](https://forum.aousd.org/t/question-on-getting-all-prim-paths/2706/2 "2025-10-01T23:38:07Z")

</div>

Hi @silviapalara ,  
I think we have two concerns with that:

1. Maps of paths to objects are hidden implementation details that we may want to change down the line, and having an accessor whose advertised purpose is that it’s faster than doing a traversal would tie our hands. (In the case of SdfLayer, it’s not even a detail of the Layer or AbstractData classes - it’s up to individual FileFormat classes.)
2. At the stage level, its internal map contains entries for prototype prims as well, which **never** show up directly in Traversals, which also points out the unawareness of instancing of the map.

---

<div class="post-metadata">

**Author:** ![silviapalara](https://avatars.discourse-cdn.com/v4/letter/s/a9a28c/32.png) [@silviapalara](https://forum.aousd.org/u/silviapalara)\
**Post date:** [October 2, 2025, 4:16pm UTC](https://forum.aousd.org/t/question-on-getting-all-prim-paths/2706/3 "2025-10-02T16:16:47Z")

</div>

Understood, thank you Spiff.
