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?
Hi @silviapalara ,
I think we have two concerns with that:
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.)
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.