Files
workinf_Blender_Wasm/docs/status/N-016.md
2026-08-12 19:31:41 -04:00

3.2 KiB
Raw Blame History

N-016 Grease Pencil

状态:BLOCKED(协议、有限 reader/Main transaction、当前帧及相邻帧 onion preview 已落地; 完整 2D/3D 编辑器、modifier 语义和桌面 golden 仍阻断)

已验证切片

  1. N-016-ASceneIR 中提供 Layer/Frame/Drawing/Stroke/Point/Attribute schema校验 finite position、radius、opacity、vertex color、cyclic、material index并以 1024 layer、100k frame、1M stroke、1M point、65,536 attribute 预算拒绝越界输入。 超预算只允许 blocked + GREASE_PENCIL_BUDGET_EXCEEDED 摘要。
  2. N-016-ABlender 5.2 Main reader 输出真实 Grease Pencil layer/frame/drawing/stroke 数据,稳定映射 grease-pencil:*grease-pencil-layer:* ID对象 dataId 不再降级 为 Empty。
  3. N-016-BMain 支持有界 create/remove/reorder layer、insert/remove frame以及整帧 setGreasePencilStrokes transaction空 stroke 数组用于擦除)。命令要求单用户数据块, 使用既有 authoritative Main、undo/redo 和 save/reopen 流程。
  4. N-016-C部分radius、opacity、vertex color、cyclic stroke 和 material index 已读写;开启 layer onion skin 时只取最近前一帧和后一帧,使用独立色调、透明材质和关闭 depth write 的有界 preview当前 drawing 不被替换。
  5. N-016-D部分共享 Three.js 适配器按当前 frame 选择每个可见 layer 最近的有效 drawing渲染真实 3D stroke/闭环Chromium 主线程与 OffscreenCanvas 均通过非空像素门。
  6. N-016-Deditor 部分editor context schema 绑定 data/layer/frame、onion 开关、stroke/ point selection 和 revision拒绝 stale/重复/超 1M selectionProperties 面板已连接真实 Main layer create/remove、当前 frame insert/remove 和整帧 clear transaction。完整 2D stroke/point 画布选择和 dope sheet integration 仍阻断。
  7. N-016-D点编辑部分Properties 面板可在当前 layer/frame 选择实际 stroke/point执行 有界 X 轴平移;协议先校验 point identity、revision、有限坐标和 1M 点预算,再保留 radius、 opacity、vertex color、cyclic、material index 并合并为一个 setGreasePencilStrokes Main transaction。它是点级整帧原子写回不等同于完整 2D 画布选择或连续 gizmo。

仍然阻断

  • N-016-Cmaterial datablock 事务、onion fade/range 完整语义和完整 Grease Pencil modifier reader。
  • N-016-D2D 画布 raycast/marquee、多点可视选择、timeline/dope integration、连续 gizmo 和 worker restart3D current-frame stroke viewport 与 Properties 单点原子平移已完成。
  • N-016-Edesktop drawing hash、Chromium 像素 golden、GLB/USD loss report 和 OPFS。

验收

npm --prefix web run typecheck
npm --prefix web run lint
npm --prefix web run test:grease-pencil
WEB_TEST_PORT=5205 npm --prefix web run test:grease-pencil-editor
WEB_TEST_PORT=5202 npm --prefix web run test:e2e -- --grep "N-016 Grease Pencil"

test:grease-pencil 使用 modifier_grease_pencil_scene.blend,覆盖 reader、layer/frame/stroke Main transaction、undo/redo 和保存重开。它不替代桌面 drawing hash。