feat(web): Outliner Data menu exposes the library override Troubleshoot operations

Desktop OUTLINER_MT_liboverride draws Make/Reset/Clear, a separator, then a
Troubleshoot enum menu (space_outliner.py) that runs
OUTLINER_OT_liboverride_troubleshoot_operation with selection_set=SELECTED:
Resync / Resync Enforce | Delete. Override rows now get the same submenu; the
web entry dispatches OUTLINER_LIBOVERRIDE_TROUBLESHOOT to the engine, which
sets the desktop type enum and executes the native operator in the outliner
context, reporting 已重同步库覆盖 / 已强制重同步库覆盖 / 已删除库覆盖层级.

Verified: headed [outliner-liboverride-troubleshoot-web] plus the full
Outliner headed suite 41/41, check-outliner-headed PASS, and the
outliner-treeview-production regression. armature-editor-coverage-ui still
fails only on the pre-existing PoseConstraintArmatureObject row timeout.

Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
mes123456
2026-12-01 14:13:57 +08:00
parent 0ec223e2a1
commit 32d9f000f2
12 changed files with 176 additions and 14 deletions

View File

@@ -1607,6 +1607,19 @@ function assertFutureCapability(payload: Extract<WebEngineRequest["command"], {
}
return;
}
if (edit.action === 'OUTLINER_LIBOVERRIDE_TROUBLESHOOT') {
const rows = area.space?.outliner?.rows ?? [];
const row = rows.find(item => item.id === edit.rowId);
if (area.nativeLayout?.editorType !== 'OUTLINER' ||
!area.regions.some(item => item.kind === 'MAIN' && item.visible) ||
!row || row.libraryOverride !== true ||
(edit.type !== 'OVERRIDE_LIBRARY_RESYNC_HIERARCHY' &&
edit.type !== 'OVERRIDE_LIBRARY_RESYNC_HIERARCHY_ENFORCE' &&
edit.type !== 'OVERRIDE_LIBRARY_DELETE_HIERARCHY')) {
throw report('EDITOR_LAYOUT_INVALID', 'Native Outliner library override troubleshoot requires a visible override row and a desktop operation');
}
return;
}
if (edit.action === 'OUTLINER_RELOCATE') {
const rows = area.space?.outliner?.rows ?? [];
const row = rows.find(item => item.id === edit.rowId);