Add Maya-style prim editing to SceneHierarchyPanel

- Inline rename: double-click prim label or F2 to edit name in-place;
  Enter commits, click-away or Esc cancels (undo-able)
- Drag-and-drop reparent: drag any prim onto another to make it a child;
  invisible root drop zone below tree to reparent to stage root (undo-able)
- Ctrl+G group: creates Xform group at common parent, reparents selection
  under it; filters descendant duplication; selects new group (undo-able)
- Delete key shortcut: opens existing remove-prim modal when panel focused
- Context menu: Rename (F2) and Group (Ctrl+G) items added
- Three new undo-able commands using UsdNamespaceEditor (USD 25.05):
  RenamePrimCommand, ReparentPrimCommand, GroupPrimsCommand

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-27 19:44:55 +08:00
parent 88ae8ccefa
commit b31ca69d4f
8 changed files with 586 additions and 28 deletions
+8
View File
@@ -114,6 +114,14 @@ private:
std::string m_arcModalVarSetName;
char m_arcModalBuf[512] = {};
bool m_openArcModal = false;
/// Inline rename state.
SdfPath m_renamingPath; ///< non-empty while renaming
char m_renameBuf[256] = {};
bool m_renameJustStarted = false;
void HandleKeyboardShortcuts();
SdfPath FindUniqueChildPath(const SdfPath& parent, const std::string& baseName);
};
} // namespace UsdLayerManager