Refactor new editor scene runtime ownership

This commit is contained in:
2026-04-18 00:45:14 +08:00
parent 2fe1076218
commit b48760ca3d
12 changed files with 792 additions and 326 deletions

View File

@@ -2,6 +2,7 @@
#include "State/EditorContext.h"
#include <XCEditor/App/EditorPanelIds.h>
#include <XCEditor/Foundation/UIEditorTheme.h>
namespace XCEngine::UI::Editor::App::Internal {
@@ -121,6 +122,7 @@ void EditorShellRuntime::Update(
const Widgets::UIEditorDockHostLayout preUpdateDockLayout =
m_shellFrame.workspaceInteractionFrame.dockHostFrame.layout;
m_hierarchyPanel.SetSceneRuntime(&context.GetSceneRuntime());
context.BindEditCommandRoutes(&m_hierarchyPanel, &m_projectPanel);
context.SyncSessionFromWorkspace(workspaceController);
UIEditorShellInteractionDefinition definition =
@@ -175,15 +177,16 @@ void EditorShellRuntime::Update(
m_shellFrame.workspaceInteractionFrame.composeFrame.contentHostFrame,
hostedContentEvents,
!m_shellFrame.result.workspaceInputSuppressed,
activePanelId == "hierarchy");
activePanelId == kHierarchyPanelId);
m_projectPanel.Update(
m_shellFrame.workspaceInteractionFrame.composeFrame.contentHostFrame,
hostedContentEvents,
!m_shellFrame.result.workspaceInputSuppressed,
activePanelId == "project");
activePanelId == kProjectPanelId);
m_traceEntries = SyncWorkspaceEvents(context, *this);
m_inspectorPanel.Update(
context.GetSession(),
context.GetSceneRuntime(),
m_shellFrame.workspaceInteractionFrame.composeFrame.contentHostFrame);
m_consolePanel.Update(
context.GetSession(),