Files
workinf_Blender_Wasm/docs/status/W-060.md
2026-08-12 04:47:48 -04:00

2.2 KiB

W-060 Status

status: done_current_scope
task: 对象模式命令

The first native command registry slice is implemented end to end. The Worker serializes validated WebEngineEditCommand payloads into the local Blender WASM ABI, and the native engine currently supports:

  • setFrame: updates the current timeline frame and emits a frame SceneDelta.
  • setObjectVisibility: updates an existing object node and emits a node update SceneDelta.
  • setModifierEnabled: updates the persistent modifier mode in Blender Main.
  • decimateMesh: commits ordinary mesh topology/UV/color/material output to Blender Main; skin/shape-key replacement remains structurally blocked from save.
  • undo/redo: restore both SceneIR and a reopenable Blender Main history entry.
  • createPrimitive, duplicateObject, deleteObject: mutate Main IDs and Collections, then rebuild SceneIR from the writer buffer; linked duplicate preserves the shared Mesh datablock for instancing.
  • setObjectTransform, translateMeshVertices: persist Object Mode TRS and the first Edit Mode vertex workflow.
  • meshEdit: Main-authoritative Merge, Dissolve, Extrude, Inset, Bevel and Loop Cut transactions.
  • UV/material/image commands: UV map lifecycle/projection, material slots/face assignment, bounded Principled graph and packed PNG/JPEG images.
  • animation/hierarchy commands: keyframes/interpolation/actions, constraints, parent/collection moves, rename, Join/Separate, Apply Transform and Origin.

The commands have native smoke coverage and browser E2E tests that check revision base/next values and the resulting snapshot. Unknown commands and malformed payloads return typed native errors.

The Blender-style UI now routes Timeline frame changes and Outliner eye-button visibility changes through the same command path. React SceneIR, transferable geometry state, Three visibility and the dirty marker are updated from the command response; the browser E2E suite covers the Outliner interaction.

Every declared command writes back to .blend, survives undo/redo and passes save/reopen regression. Unsupported modifier families, mutations of read-only linked-library IDs and topology changes that would invalidate shape keys remain structured native blocks.