Align web editor with Blender 5.2 interface
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled

This commit is contained in:
mes123456
2026-09-07 18:11:57 +08:00
parent 70721187c0
commit 98cebd381a
6 changed files with 154 additions and 83 deletions

View File

@@ -1,4 +1,18 @@
export type WorkspaceId = "Layout" | "Modeling" | "Animation";
export const BLENDER_WORKSPACE_IDS = [
"Layout",
"Modeling",
"Sculpting",
"UV Editing",
"Texture Paint",
"Shading",
"Animation",
"Rendering",
"Compositing",
"Geometry Nodes",
"Scripting",
] as const;
export type WorkspaceId = typeof BLENDER_WORKSPACE_IDS[number];
export type EditorType = "3D Viewport" | "Outliner" | "Properties" | "Timeline";
export type BlenderMode = "Object" | "Edit" | "Pose";
@@ -75,11 +89,7 @@ function workspace(id: WorkspaceId): WorkspaceIR {
}
export function createDefaultWebWorkspaceState(): WebWorkspaceState {
const workspaces = {
Layout: workspace("Layout"),
Modeling: workspace("Modeling"),
Animation: workspace("Animation"),
} satisfies Record<WorkspaceId, WorkspaceIR>;
const workspaces = Object.fromEntries(BLENDER_WORKSPACE_IDS.map((id) => [id, workspace(id)])) as Record<WorkspaceId, WorkspaceIR>;
return {
workspaces,
context: {