Files
workinf_Blender_Wasm/tools/web/complete/probe-reopen.mjs
mes123456 4eb08faf31 chore(web): checkpoint export fixes, operator routing and three-domain evidence
- Web engine CMake: apply WITH_WEB_USD_PYTHON to blender_web_engine_core,
  embed /usd resources, link pxr Python bindings after the core archive and
  whole-archive the monolithic OpenUSD archive. Fixes the wm.usd_export abort
  and restores Alembic/USD embedded export.
- ?ui=web menus: fix inverted localOnly gating and route queueLocalDesktopOperator
  and nativeAdd through the desktop operator channel with a VIEW_3D context;
  non-mesh edit-mode selection uses the native VIEW3D_SELECT bridge.
- Refresh WebEngine wasm/js artifacts, manual/course pages and the complete
  course video asset.
- Record focused Chromium probes for Add/F3/parameters/modifier/UV/curve/deform,
  scene operations, OPFS save/reopen and worker restart. Evidence is NOT_CLAIMED.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-14 06:12:44 +08:00

35 lines
2.1 KiB
JavaScript

import { parseArgs, waitForServer, launchBrowser, newPage, openFile, waitScene } from "../course/lib/lesson-recorder.mjs";
const args = parseArgs();
const BASE = `http://127.0.0.1:${args.port}`;
await waitForServer(`${BASE}/?ui=web`);
const browser = await launchBrowser(args.gpu);
const { context, page } = await newPage(browser, { baseUrl: BASE });
const dump = async (label) => {
const data = await page.evaluate(() => ({
projectId: document.querySelector("main.blender-app")?.getAttribute("data-project-id"),
saveStatus: document.querySelector("main.blender-app")?.getAttribute("data-user-action-save-status"),
engine: document.querySelector('[data-testid="engine-status"]')?.textContent,
stats: document.querySelector('[data-testid="scene-stats"]')?.textContent,
buttons: Array.from(document.querySelectorAll("button[aria-label]")).map((b) => b.getAttribute("aria-label")).slice(0, 60),
selects: Array.from(document.querySelectorAll("select[aria-label]")).map((s) => ({ label: s.getAttribute("aria-label"), value: s.value, options: Array.from(s.options).map((o) => o.textContent).slice(0, 10) })),
bodyText: document.body.innerText.slice(0, 1200),
}));
console.log(`=== ${label} ===`);
console.log(JSON.stringify(data, null, 1));
await page.screenshot({ path: `/tmp/probe-${label}.png`, fullPage: true });
};
await openFile(page, "/home/mes123456/workinf_Blender_Wasm/web/app/public/tutorial/pbr/studio.blend");
await waitScene(page, { objects: 6, timeout: 180000 });
await openFile(page, "/home/mes123456/workinf_Blender_Wasm/re/猴头.glb");
await waitScene(page, { objects: 7, active: "Suzanne", timeout: 180000 });
await page.locator('button[aria-label="保存项目"]').click();
await page.waitForFunction(() => document.querySelector("main.blender-app")?.getAttribute("data-user-action-save-status") === "SUCCEEDED", null, { timeout: 180000 });
await dump("saved");
const close = page.locator('button[aria-label="关闭项目"]').first();
console.log("close count", await close.count());
if (await close.count()) await close.click();
await page.waitForTimeout(1500);
await dump("after-close");
await context.close();
await browser.close();