Stage Editor Panel — sublayer editing with ET control, mute, reorder, dirty state

Replace LayerPanel with StageEditorPanel for full sublayer composition workflow:
- Edit target (ET) checkbox on root/session and each sublayer; pen icon header
- Dirty indicator (*) per layer; muted layers remain visible in list
- Drag-drop and Move Up/Down reordering with undo (LayerReorderCommand)
- Add existing sublayer via file dialog; create new sublayer modal
- Fixed LayerReorderCommand::ApplyOrder using full-stack indices on sublayer-local
  list (silent remove failure → duplicate insert → USD _ValidateEdit error)
- Fixed muted sublayer visibility: walk GetSubLayerPaths() + FindOrOpenRelativeToLayer
  + m_layerRefs to keep muted layers alive and visible

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-06-14 16:37:30 +08:00
parent 9ec9761dd7
commit 9816fb8759
13 changed files with 514 additions and 333 deletions
+7 -6
View File
@@ -57,9 +57,9 @@ bool Application::Initialize(const std::string& windowTitle, int width, int heig
m_layerManager = std::make_unique<LayerManager>();
m_propertyManager = std::make_unique<PropertyManager>();
m_propertyManager->SetCommandHistory(&m_commandHistory);
m_layerPanel = std::make_unique<LayerPanel>();
m_layerPanel->SetLayerManager(m_layerManager.get());
m_layerPanel->SetCommandHistory(&m_commandHistory);
m_stageEditorPanel = std::make_unique<StageEditorPanel>();
m_stageEditorPanel->SetLayerManager(m_layerManager.get());
m_stageEditorPanel->SetCommandHistory(&m_commandHistory);
m_sceneHierarchyPanel = std::make_unique<SceneHierarchyPanel>();
m_sceneHierarchyPanel->SetPropertyManager(m_propertyManager.get());
m_sceneHierarchyPanel->SetCommandHistory(&m_commandHistory);
@@ -82,6 +82,7 @@ bool Application::Initialize(const std::string& windowTitle, int width, int heig
m_sceneHierarchyPanel->SetIconManager(m_iconManager.get());
m_viewportPanel->SetIconManager(m_iconManager.get());
m_timelinePanel->SetIconManager(m_iconManager.get());
m_stageEditorPanel->SetIconManager(m_iconManager.get());
m_sceneHierarchyPanel->SetOnPrimSelected(
[this](const std::string& path) {
@@ -132,7 +133,7 @@ void Application::Shutdown() {
m_viewportPanel.reset();
m_sceneHierarchyPanel.reset();
m_propertyPanel.reset();
m_layerPanel.reset();
m_stageEditorPanel.reset();
m_propertyManager.reset();
m_layerManager.reset();
@@ -206,8 +207,8 @@ void Application::RenderUI() {
RenderStageInfo();
}
ImGui::Begin("Layer Panel", nullptr, ImGuiWindowFlags_NoCollapse);
m_layerPanel->Render();
ImGui::Begin("Stage Editor", nullptr, ImGuiWindowFlags_NoCollapse);
m_stageEditorPanel->Render();
ImGui::End();
m_viewportPanel->Render();