maya-usd
maya-usd copied to clipboard
Ability to route prim metadata edits
Is your feature request related to a problem? Please describe.
Currently, maya-usd supports routing various operations to a USD layer. For instance we can route attribute edits and target a layer based on the edited prim and attribute name. However, it does not yet support routing prim metadata
which would be beneficial for some workflows.
Our first usecase is routing variant selections: some of our variants configure the stage just for the artist work and should be routed to the stage's session, while others need to be public and target identified layers.
Describe the solution you'd like
We would like to be able to register a custom editRouter for "primMetadata" edits, similar to the current support for attributes. the router could consider the metadata name and the edited key path for dictionary-valued metadata like VariantSelection
.
A fist look of the UFE code suggests that it could be added to the following commands:
- SetVariantSelection
- Set kind
- Toggle instanceable
- Prim reorder
- Add/Clear payload/reference
- Set/Clear SceneItemMetadata
Describe alternatives you've considered
Overriding standart context ops to execute custom commands, eg a custom SetVariantSelectionCommand.
Additional context
We have implemented it on our end for a custom command. If we haven't overlooked anything, we should be able to file a PR straightforwardly.
Would you consider accepting this enhancement as a PR?