feat(web): Outliner Data menu exposes the collection view-layer operators
Desktop OUTLINER_MT_collection_view_layer's exclude/holdout entries now run OUTLINER_OT_collection_exclude_set/clear and collection_holdout_set/clear on the selected layer collections; the Cycles-only indirect-only entries are gated on the active scene's render engine, like the desktop menu. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -1221,4 +1221,46 @@ test.describe("Outliner headed baseline", () => {
|
||||
await visibility(archiveRow, "隔离 (Isolate)");
|
||||
await expect.poll(async () => eye("显示", "Parts").count(), { timeout: 30_000 }).toBe(1);
|
||||
});
|
||||
|
||||
test("[outliner-collection-view-layer-web] the Data menu sets collection view-layer flags", async ({ page }) => {
|
||||
test.setTimeout(180_000);
|
||||
await page.goto("/?ui=web");
|
||||
const status = page.locator('[data-testid="engine-status"]');
|
||||
await page.locator('[data-testid="blend-file-input"]').setInputFiles(HIERARCHY_SCENE);
|
||||
await expect(page.locator(".blender-app")).toHaveAttribute("data-project-id", /.+/, { timeout: 60_000 });
|
||||
await expect(page.getByText(/Engine: SceneIR/).first()).toBeVisible({ timeout: 60_000 });
|
||||
const webTools = page.locator('[data-testid="native-web-tools-toggle"]');
|
||||
if (await webTools.count()) await webTools.click();
|
||||
const partsRow = page.locator('.tree-row[aria-label="Parts"]').first();
|
||||
await expect(partsRow).toBeVisible({ timeout: 30_000 });
|
||||
await expect(page.locator('.outliner-tree button[aria-label="从视图层排除 Parts"]')).toHaveCount(1);
|
||||
|
||||
const viewLayer = async (label: string) => {
|
||||
await partsRow.locator(".tree-node-name").first().click({ button: "right" });
|
||||
await page.getByRole("menuitem", { name: "视图层 (View Layer)", exact: true }).click();
|
||||
await page.getByRole("menuitem", { name: label, exact: true }).click();
|
||||
};
|
||||
|
||||
/* OUTLINER_OT_collection_exclude_set/clear write LAYER_COLLECTION_EXCLUDE
|
||||
* on the selected layer collection (outliner_collections.cc). */
|
||||
await viewLayer("排除 (Exclude)");
|
||||
await expect.poll(async () => page.locator('.outliner-tree button[aria-label="包含于视图层 Parts"]').count(), { timeout: 30_000 }).toBe(1);
|
||||
await viewLayer("取消排除 (Clear Exclude)");
|
||||
await expect.poll(async () => page.locator('.outliner-tree button[aria-label="从视图层排除 Parts"]').count(), { timeout: 30_000 }).toBe(1);
|
||||
|
||||
/* Holdout sits behind the restriction-column options; enable the column,
|
||||
* then the menu entry must write LayerCollection HOLDout. */
|
||||
const filterButton = page.locator('button[aria-label="筛选"]').first();
|
||||
await filterButton.click();
|
||||
const menu = page.locator(".outliner-filter-menu").first();
|
||||
await expect(menu).toBeVisible();
|
||||
await menu.getByRole("group", { name: "限制列" }).getByLabel("阻隔").check();
|
||||
await filterButton.click();
|
||||
await expect(menu).toBeHidden();
|
||||
await expect(page.locator('.outliner-tree button[aria-label="遮罩阻隔 Parts"]')).toHaveCount(1);
|
||||
await viewLayer("阻隔 (Holdout)");
|
||||
await expect.poll(async () => page.locator('.outliner-tree button[aria-label="清除阻隔 Parts"]').count(), { timeout: 30_000 }).toBe(1);
|
||||
await viewLayer("取消阻隔 (Clear Holdout)");
|
||||
await expect.poll(async () => page.locator('.outliner-tree button[aria-label="遮罩阻隔 Parts"]').count(), { timeout: 30_000 }).toBe(1);
|
||||
});
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user