EMSUSD-3660 create USD ref at stage root - #4700
Merged
Merged
Conversation
- Added new menu item in context op handler. The stage proxy shape context menu now shows a "USD" submenu (Layer Editor, Path Editor, "Add Reference...". - Proxy shape transform node's Outliner context menu now nests "USD Layer Editor" and "USD Path Editor" under a "USD" submenu (with cleanup if neither item is available). - Added support to create a USD reference at the stage root in `UsdUndoAddRefOrPayloadToNewPrimCommand`. - Added unit test.
Contributor
There was a problem hiding this comment.
Pull request overview
Adds stage-root USD reference creation and reorganizes USD context-menu actions.
Changes:
- Groups stage and Outliner USD actions into submenus.
- Supports references beneath the USD pseudo-root.
- Adds command-level undo/redo coverage.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
test/lib/ufe/testReferenceCommands.py |
Tests stage-root reference creation. |
plugin/adsk/scripts/mayaUsdMenu.mel |
Groups Outliner USD editor actions. |
lib/usdUfe/ufe/UsdUndoAddRefOrPayloadToNewPrimCommand.cpp |
Handles pseudo-root parent paths. |
lib/mayaUsd/ufe/MayaUsdContextOps.cpp |
Adds the gateway USD submenu and reference action. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| items.emplace_back(kAssetResolverDialogItem, kAssetResolverDialogLabel); | ||
| // Stage root: group all USD-level items (Layer Editor, Path Editor, Add | ||
| // Reference...) under a single "USD" submenu. | ||
| items.emplace_back(kUSDMenuItem, kUSDMenuLabel, Ufe::ContextItem::kHasChildren); |
The test cannot call the menu because the menu opens a dialog.
Collaborator
Author
AramAzhari-adsk
approved these changes
Aug 18, 2026
AramAzhari-adsk
left a comment
Collaborator
There was a problem hiding this comment.
LGTM,
A comment for a followup PR, I think by the same logic the Add New Prim should also be moved under USD menu and that we should remove the USD from start of the Layer Editor and Path Editor now that they are directly under USD menu item.
Collaborator
Author
|
Yes, Scott asked to moved all items, will be done in next PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

UsdUndoAddRefOrPayloadToNewPrimCommand.