feat(web): Outliner restriction columns write the native flags

The web Outliner drew a single eye toggle while desktop draws the seven
restriction columns from SpaceOutliner.show_restrict_flags. The engine row
projection now carries restrict{...} read from the same flags the desktop
buttons use: the eye is Base.hide_viewport, the monitor/camera/select bits
live on Object, and exclusion/holdout/indirect-only come from the layer
collection. OUTLINER_SET_RESTRICTION writes the property through RNA; Shift
recurses through the collection subtree and its objects, Ctrl goes through
outliner_collection_isolate_flag (whose second click restores the default
visibility set). OUTLINER_SET_RESTRICT_COLUMNS toggles the popover
checkboxes; both are Main edits with changed=true.

The App renders the restriction buttons and the 限制列 popover group from
restrictColumns with optimistic drafts, except for isolate clicks, where
outliner_collection_isolate_flag forces the clicked collection back to
visible and a draft for that row could never reconcile with the snapshot.

Headed case [outliner-restrict-web] covers the popover columns, the object
eye plus the native VISIBLE filter, Shift recursion into a collection and
Ctrl isolate/restore on a product-created sibling collection; receipt
OUTLINER-HEADED-20261130-072807 (NOT_CLAIMED, 7/7). The armature panel
regression fails identically with this batch stashed, so it is tracked as
pre-existing.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
mes123456
2026-11-30 07:37:01 +08:00
parent 1c8cc73e3d
commit ecf69c6ef5
13 changed files with 596 additions and 24 deletions

View File

@@ -19,7 +19,7 @@ import path from "node:path";
import { fileURLToPath } from "node:url";
const REPO_ROOT = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "../..");
const EXPECTED_CASES = ["outliner-tree-baseline-web", "outliner-tools-baseline-web", "outliner-mirror-baseline-web", "outliner-metrics-web", "outliner-display-mode-web", "outliner-filter-web"];
const EXPECTED_CASES = ["outliner-tree-baseline-web", "outliner-tools-baseline-web", "outliner-mirror-baseline-web", "outliner-metrics-web", "outliner-display-mode-web", "outliner-filter-web", "outliner-restrict-web"];
/* Desktop Layout geometry the metrics case must reproduce (batch 2: UI sizes). */
const GEOMETRY_GOLDEN = path.join(REPO_ROOT, "tests/golden/OUTLINER-DESKTOP-METRICS/outliner-metrics.json");
const errors = [];

View File

@@ -37,6 +37,7 @@ const KNOWN_CASES = [
{ id: "outliner-metrics-web", title: /\[outliner-metrics-web\]/ },
{ id: "outliner-display-mode-web", title: /\[outliner-display-mode-web\]/ },
{ id: "outliner-filter-web", title: /\[outliner-filter-web\]/ },
{ id: "outliner-restrict-web", title: /\[outliner-restrict-web\]/ },
];
function usage() {
@@ -265,7 +266,7 @@ function writeBlocked(detail) {
const engineRestriction = fs.existsSync(wasm) ? await fileContains(wasm, "OUTLINER_SET_RESTRICTION") : false;
record("candidate engine has display modes", engineDisplayMode, engineDisplayMode ? true : "rebuild web_engine with the display-mode batch (OUTLINER_SET_DISPLAY_MODE)");
record("candidate engine has native outliner filter", engineOutlinerFilter, engineOutlinerFilter ? true : "rebuild web_engine with the filter batch (OUTLINER_SET_FILTER)");
record("candidate engine has restriction columns", engineRestriction, engineRestriction ? true : "probe only in this batch; becomes a gate with the restriction-column batch", false);
record("candidate engine has restriction columns", engineRestriction, engineRestriction ? true : "rebuild web_engine with the restriction-column batch (OUTLINER_SET_RESTRICTION)", true);
const uiOutlinerSearch = assetBundleHas("搜索场景");
record("candidate bundle has outliner search", uiOutlinerSearch, uiOutlinerSearch ? true : "candidate predates the outliner toolbar; run `cd web && npm run build`", !options.allowStale);