Autodesk / maya-usd

A common USD (Universal Scene Description) plugin for Autodesk Maya
774 stars 201 forks source link

Chasers to provide more robust methods to get translated paths #3363

Open gelshoffNV opened 1 year ago

gelshoffNV commented 1 year ago

There is currently a useful method for returning a mapping of translated Maya DagPaths to USD paths, using GetDagToUsdMap. It could be more useful to be able to call methods like GetDagPath() by providing the USD path and GetUsdPath() by providing the DagPath. It's also important to be able to fetch DG nodes, like GetDepNode() by providing the USD Path and GetUsdPath() by providing just the DG name.

This is especially important when maya nodes have namespaces, since they will either be stripped in USD or sanitized by replacing ':' with '_', which makes it difficult to figure out which maya node belongs to which usd node and vise versa.

The translator could keep a running map of all translated nodes and where they went in USD and either make that private and expose functions like I suggested or just make the mapping public, but not limited to DagPaths.

maya-usd-git-sync[bot] commented 1 year ago

Issue synced internally to EMSUSD-826