- 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>
53 lines
2.5 KiB
JavaScript
53 lines
2.5 KiB
JavaScript
#!/usr/bin/env node
|
|
/**
|
|
* Focused case: Edit mode -> 网格 -> 模态工具 -> 循环切割 in the ?ui=web entry.
|
|
*
|
|
* node tools/web/complete/probe-modal-tool.mjs --base-url http://127.0.0.1:5176
|
|
*/
|
|
import { ASSETS, parseArgs, launchBrowser, newPage, openFile, waitScene } from "../course/lib/lesson-recorder.mjs";
|
|
|
|
const args = parseArgs();
|
|
const BASE = args.baseUrl || "http://127.0.0.1:5176";
|
|
const browser = await launchBrowser(args.gpu);
|
|
const { context, page, consoleErrors } = await newPage(browser, { baseUrl: BASE });
|
|
page.setDefaultTimeout(60_000);
|
|
const log = (...parts) => console.log(new Date().toISOString().slice(11, 19), ...parts);
|
|
const state = async () => page.evaluate(() => ({
|
|
stats: document.querySelector('[data-testid="scene-stats"]')?.textContent ?? "",
|
|
status: document.querySelector('[data-testid="engine-status"]')?.textContent ?? "",
|
|
alerts: Array.from(document.querySelectorAll('[role="alert"]')).map((node) => node.textContent).slice(0, 4),
|
|
mode: document.querySelector('.mode-chip button')?.textContent ?? "",
|
|
}));
|
|
try {
|
|
await openFile(page, ASSETS.studio);
|
|
await waitScene(page, { objects: 6, timeout: 240_000 });
|
|
await page.getByRole("button", { name: "操作搜索", exact: true }).click();
|
|
await page.getByRole("textbox", { name: "搜索 Blender 操作" }).fill("Enter Edit Mode");
|
|
await page.waitForTimeout(500);
|
|
await page.getByRole("textbox", { name: "搜索 Blender 操作" }).press("Enter");
|
|
const deadline = Date.now() + 60_000;
|
|
while (Date.now() < deadline) {
|
|
const current = await state();
|
|
if (/Edit/i.test(current.mode)) break;
|
|
await page.waitForTimeout(250);
|
|
}
|
|
log("edit mode", JSON.stringify(await state()));
|
|
await page.getByRole("button", { name: "模态工具", exact: true }).click();
|
|
await page.getByRole("menuitem", { name: "循环切割", exact: true }).click();
|
|
for (let index = 0; index < 12; index++) {
|
|
await page.waitForTimeout(500);
|
|
const current = await state();
|
|
if (/失败|错误|CANCELLED|NOT_|FAILED|UNAVAILABLE|ALLOWLISTED|error/i.test(current.status) || current.alerts.length) {
|
|
log("result", JSON.stringify(current)); break;
|
|
}
|
|
if (index === 11) log("final", JSON.stringify(current));
|
|
}
|
|
} catch (error) {
|
|
log("probe error", error instanceof Error ? error.message : String(error));
|
|
log("state", JSON.stringify(await state().catch(() => null)));
|
|
} finally {
|
|
log("consoleErrors", JSON.stringify(consoleErrors.slice(-12)));
|
|
await context.close();
|
|
await browser.close();
|
|
}
|