- 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>
38 lines
2.3 KiB
JavaScript
38 lines
2.3 KiB
JavaScript
import fs from "node:fs";
|
|
import { parseArgs, waitForServer, launchBrowser, newPage, openFile, waitScene, switchWorkspace } 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 });
|
|
page.setDefaultTimeout(15000);
|
|
await openFile(page, "/home/mes123456/workinf_Blender_Wasm/web/app/public/tutorial/pbr/studio.blend");
|
|
await waitScene(page, { objects: 6, timeout: 240000 });
|
|
await openFile(page, "/home/mes123456/workinf_Blender_Wasm/re/猴头.glb");
|
|
await waitScene(page, { objects: 7, active: "Suzanne", timeout: 240000 });
|
|
await switchWorkspace(page, "Shading");
|
|
await page.locator(".pbr-asset-library").waitFor({ timeout: 60000 });
|
|
await page.locator('select[aria-label="资产来源"]').selectOption("library:re-pbr-v1");
|
|
await page.waitForFunction(() => document.querySelectorAll('[data-library="library:re-pbr-v1"]').length === 6, null, { timeout: 60000 });
|
|
const dump = async (label) => {
|
|
const data = await page.evaluate(() => ({
|
|
engine: document.querySelector('[data-testid="engine-status"]')?.textContent,
|
|
engineTitle: document.querySelector('[data-testid="engine-status"]')?.getAttribute("title"),
|
|
alerts: Array.from(document.querySelectorAll('[role="alert"], [role="status"]')).map((e) => e.textContent).filter(Boolean).slice(0, 20),
|
|
libraryText: document.querySelector(".pbr-asset-library")?.textContent?.slice(0, 800),
|
|
slots: Array.from(document.querySelectorAll('select[aria-label^="材质槽"]')).map((s) => ({ value: s.value, options: Array.from(s.options).map((o) => o.textContent).slice(0, 12) })),
|
|
images: document.querySelectorAll('.pbr-asset-card img').length,
|
|
}));
|
|
console.log(`=== ${label} ===`);
|
|
console.log(JSON.stringify(data, null, 1));
|
|
};
|
|
await dump("before");
|
|
const card = page.locator('[data-library="library:re-pbr-v1"]', { hasText: "black_tiles_wall" }).first();
|
|
console.log("card count", await card.count());
|
|
await card.evaluate((element) => element.dispatchEvent(new MouseEvent("dblclick", { bubbles: true, cancelable: true, view: window })));
|
|
await page.waitForTimeout(8000);
|
|
await dump("after-dblclick");
|
|
await page.screenshot({ path: "/tmp/probe-library.png", fullPage: true });
|
|
await context.close();
|
|
await browser.close();
|