feat(web): close remaining editor, layout and persistence gaps

- Area headers get a per-area editor switcher backed by a shared
  AreaEditorContext; Preferences can hide it.
- Animation camera area is a real navigable viewport aligned to the
  scene camera; Graph Editor adds channel selection, keyframe drag/
  insert/delete and interpolation.
- Geometry Nodes node locations round-trip through the native writer
  and reader, so saved graphs keep their layout.
- Texture Paint can make linked library images local via a new native
  makeImageLocal command before packing strokes.
- Compositor IMAGE and Render Layers nodes now persist to Main and
  execute against packed images / the last PBR render.
- Spreadsheet row cap raised to 250k; Outliner gains Ctrl+A and arrow/
  Home/End navigation.

Co-Authored-By: Claude Code <noreply@anthropic.com>
This commit is contained in:
mes123456
2026-11-13 07:47:10 +08:00
parent d11387ef6b
commit d0b6d2a164
31 changed files with 877 additions and 61 deletions

View File

@@ -82,6 +82,34 @@ test("Compositor canvas builds, executes and commits a graph", async ({ page })
await expect.poll(async () => canvas.getAttribute("data-link-count"), { timeout: 30_000 }).toBe("2");
});
test("Compositor IMAGE and Render Layers nodes persist through OPFS", async ({ page }) => {
test.setTimeout(300_000);
await openStudio(page);
const canvas = await openCompositor(page);
await addNode(page, canvas, "IMAGE");
await addNode(page, canvas, "RENDER_LAYER");
await connect(page, "node-image-1", "node-composite");
await expect.poll(async () => canvas.getAttribute("data-link-count"), { timeout: 30_000 }).toBe("1");
const before = Number(await page.locator("main.blender-app").getAttribute("data-project-snapshot-revision") ?? "0");
await canvas.getByRole("button", { name: "提交图", exact: true }).click();
await expect.poll(async () => Number(await page.locator("main.blender-app").getAttribute("data-project-snapshot-revision") ?? "0"), { timeout: 60_000 }).toBeGreaterThan(before);
await expect.poll(async () => canvas.getAttribute("data-node-count"), { timeout: 30_000 }).toBe("3");
await page.locator('button[aria-label="保存项目"]').evaluate((element) => (element as HTMLElement).click());
await expect(page.locator("main.blender-app")).toHaveAttribute("data-user-action-save-status", "SUCCEEDED", { timeout: 60_000 });
await page.reload();
await page.locator("main.blender-app").waitFor({ timeout: 120_000 });
await expect.poll(async () => page.locator('[data-testid="recent-projects"] option').count(), { timeout: 60_000 }).toBeGreaterThan(1);
await page.locator('[data-testid="recent-projects"]').selectOption({ index: 1 });
const discard = page.getByRole("button", { name: "不保存,继续", exact: true });
if (await discard.count()) await discard.click();
await expect.poll(async () => page.getByTestId("scene-stats").innerText(), { timeout: 120_000 }).toMatch(/Objects 6/);
const reopened = await openCompositor(page);
await expect.poll(async () => reopened.getAttribute("data-node-count"), { timeout: 60_000 }).toBe("3");
await expect.poll(async () => reopened.getAttribute("data-link-count"), { timeout: 60_000 }).toBe("1");
await expect(reopened.locator(".react-flow__node", { hasText: "图像 Image" })).toHaveCount(1);
await expect(reopened.locator(".react-flow__node", { hasText: "渲染层 Render Layers" })).toHaveCount(1);
});
test("Compositor canvas graph survives an OPFS save and reopen", async ({ page }) => {
test.setTimeout(360_000);
await openStudio(page);