UsdLayerManager/openspec/changes/implement-scene-hierarchy-p.../tasks.md

1.8 KiB

1. Wire SceneHierarchyPanel into Application

  • 1.1 Add SceneHierarchyPanel member variable to Application class
  • 1.2 Create SceneHierarchyPanel instance in Application::Initialize()
  • 1.3 Set PropertyManager on SceneHierarchyPanel instance
  • 1.4 Replace placeholder Scene Hierarchy panel code with call to m_sceneHierarchyPanel->Render()
  • 1.5 Ensure SceneHierarchyPanel is properly cleaned up in Application::Shutdown()

2. Enhance SceneHierarchyPanel with Visual Indicators

  • 2.1 Modify RenderPrimNode to display prim type icons before the display name
  • 2.2 Add visibility state indicators (eye/open vs eye/slash) based on prim.GetVisibility()
  • 2.3 Add active state indicators (circle/filled circle) based on prim.GetActive()
  • 2.4 Ensure proper indentation and spacing with the added indicators
  • 2.5 Update tooltip to include visibility and active state information

3. Add Context Menu Support

  • 3.1 Add context menu popup on right-click of prim tree nodes
  • 3.2 Add "Toggle Visibility" menu item that calls prim.SetVisibility() with toggled value
  • 3.3 Add "Toggle Active" menu item that calls prim.SetActive() with toggled value
  • 3.4 Add "Show/Hide Children" menu item to collapse/expand tree nodes
  • 3.5 Ensure context menu only appears for valid prim nodes and handles USD errors gracefully

4. Verify Selection and Integration

  • 4.1 Verify prim selection highlighting works correctly in enhanced tree view
  • 4.2 Confirm tooltip shows all relevant information (type, path, visibility, active)
  • 4.3 Test that selection callback is properly invoked when prim is clicked
  • 4.4 Ensure panel updates correctly when stage changes (new/loaded/closed)
  • 4.5 Verify panel integrates properly with docking system (can be undocked, floated, etc.)