5.3 KiB
W-075 Status
status: in_progress
task: 实现三种模式和修改器堆栈求值
The React Properties editor now exposes a Blender-style Decimate inspector for all three native modes. Collapse has ratio, triangulate and optional symmetry axis controls; Un-Subdivide has bounded iterations; Dissolve Planar has angle, boundary handling and Normal/Material/Seam/Sharp/UV delimit toggles. A shared attribute-policy selector makes preservation or dropping explicit. Browser E2E switches through the mode-specific controls, while native probes confirm all three BMesh entry points execute against the local WASM artifact.
Applying the inspector commits a revisioned decimateMesh command. A
previewDecimateMesh command now evaluates the profile in a separate WASM
module instance, returns temporary geometry to the Three.js viewport, keeps
the authoritative handle/revision unchanged and supports explicit cancellation
from the inspector.
The SceneIR contract now carries modifier UUID/type/name/enabled state and a
deterministic modifier-stack hash. The native .blend reader traverses each
Object.modifiers list, uses Blender's persistent modifier UID for a stable
UUID when available, and exports viewport/render modes plus common Subsurf,
Mirror, Decimate and Bevel parameters. The generated
rigged_shape_scene.blend fixture verifies the real Decimate modifier payload
instead of a mock stack. The native command
setModifierEnabled toggles a declared modifier, and the native history ring
implements bounded undo/redo with revisioned snapshots. React exposes the
modifier checkbox and top-bar undo/redo commands; browser E2E verifies that
undo/redo changes the authoritative native snapshot rather than a Three.js
shadow copy. Native smoke now covers the same modifier toggle and its
undo/redo cycle against a local WASM engine.
protocol/modifier-graph.ts now builds a stable per-mesh topological order from
stack order and explicit dependsOn edges. Cycles and unresolved external
inputs produce BLOCKED with the offending IDs; declared but unexecuted
modifiers remain METADATA_ONLY. The WebEngine Worker requires EVALUATED
before Decimate preview, commit or LOD generation. Browser E2E checks the
topological order, metadata-only handling and cycle blocking.
The WebEngine exposes evaluateDepsgraph and the native module executes
Blender 5.2's BLO_read_from_memory loader, headless runtime bootstrap,
view-layer sync, graph build, tagged update and frame evaluation. A wasm32 DNA
alignment bridge and the Web ID registry for NodeTree/Camera/Light preserve the
current C++ layout. The report contains evaluated mesh positions/triangles,
source Mesh IDs, object world matrices and modifier counts. The report also
contains ordered modifier entries with persistent UID, mode flags, stack
dependencies and explicit EVALUATED, DISABLED or BLOCKED status with
stable error codes and suggestions. Empty,
basic and rigged/shape-key fixtures now pass without a WASM trap; the rigged
positions match the Blender deformation golden. Broader modifier and constraint
parity is tracked separately and unsupported cases remain structured errors.
The lightweight reader's name table now covers all Blender 5.2 DNA modifier
slots 0 through 86, including the Grease Pencil range, with a compile-time size
check. Recognition remains separate from evaluated parity in
docs/web/modifier-support-matrix.md.
SceneIR now extracts target IDs and core parameters for Lattice, Curve,
Armature, Hook, Mesh Deform, Shrinkwrap and Surface Deform, and appends their
external objects to dependsOn; they deliberately remain METADATA_ONLY.
Six reproducible Blender 5.2 category goldens now cover Generate, Deform, legacy Curve, Physics/time, Geometry Nodes and Grease Pencil. The native report now includes non-Mesh objects, including all 26 Grease Pencil modifier types exposed by Blender 5.2 Python. Twenty-four category types now have evaluated Web goldens. Subdivision uses the local OpenSubdiv 3.7.0 CPU evaluator and matches the 26-vertex/48-triangle desktop result. Exact Boolean uses local GMP 6.3.0 and matches the 12-vertex/20-triangle surface result; coplanar triangulation is compared by oriented surface area because wasm32 and desktop can select different valid diagonals. Curve now runs its native modifier and matches the desktop golden after the Web ID registry was extended for Curves data.
Geometry Nodes has bounded native implementations for a single constant
Transform Geometry or Set Position node. Both topology/position results match
Blender 5.2. Unknown graphs retain BLENDER_MODIFIER_ERROR; simulation zones
and bake data preserve input geometry and return
GEOMETRY_NODES_SIMULATION_UNAVAILABLE. The full node registration/lazy-function
runtime is not claimed. Displace adds a bounded constant local-space closure;
resource-dependent configurations return MODIFIER_CONFIGURATION_UNSUPPORTED.
Grease Pencil modifiers remain disabled.
Mesh and Surface Deform fixtures continue to serialize real bind caches and
deform their cage/target after binding.
This is not yet complete native Blender dependency-graph parity. Unsupported external runtime resources and unsupported modifier/constraint types return structured errors; the lightweight SceneIR history remains separate and is not silently serialized as a full Blender undo stack.