feat(web): armature properties split edit, pose and object modes with Ctrl+Tab
- Properties gates the rest-edit forms (add bone, per-bone rest form, bone operations) to Edit mode and the pose readback form to Pose mode; Object mode shows a read-only summary with 进入编辑模式 / 进入姿态模式 buttons. The workbench root carries data-armature-mode for assertions. - Ctrl+Tab on an armature object toggles Pose/Object; Tab still enters Edit. - armature-ui-readback-web waits for the native object.mode_set to report 模式:Pose/模式:Object before pressing shortcuts, matching the app's pending guard that ignores keys during a mode change. - armature-editor-coverage-ui-production enters Edit mode before the rest-edit operations. The coverage spec still cannot run as written: the app worker already holds the web-blender:native-files lock, so the spec's own WebEngineClient fails with WASM_INIT_FAILED. Pre-existing on this branch (also fails with the previous App.tsx); tracked separately from this change. Co-Authored-By: Claude Fable 5.2 <noreply@anthropic.com>
This commit is contained in:
@@ -32,7 +32,7 @@ node tools/web/check-armature-robot-headed.mjs --dir /abs/tests/golden/ARMATURE-
|
||||
| `armature-pose-web` | `setPoseBoneTransform` | poseMatrix/子物体 world 变化、重复写入幂等、归零复原 |
|
||||
| `armature-viewport-web` | 属性面板姿态表单 → Apply Pose | 画布 `data-armature-bone-count`、截图前后不同 |
|
||||
| `armature-decimal-input-web` | 用户逐键输入 `0.5` | `缩放 X` 与姿态 `Scale X` 保留小数;姿态提交后 poseScale 读回 0.5 |
|
||||
| `armature-ui-readback-web` | 姿态表单回填 | UI 显示角度/缩放 = 引擎 pose 通道(弧度×180/π),`data-testid="armature-pose-readback"` |
|
||||
| `armature-ui-readback-web` | 物体模式 → 进入姿态模式;姿态表单回填;Ctrl+Tab 往返 | 物体模式只读(无 rest 操作/姿态表单);UI 显示角度/缩放 = 引擎 pose 通道(弧度×180/π),`data-testid="armature-pose-readback"`;Ctrl+Tab 回到物体模式并再进姿态 |
|
||||
| `armature-reopen-web` | 文件 → 保存到浏览器 OPFS → 最近打开 | worker `openBlend` 成功回复为前置;重开后骨骼、骨骼父级、姿态与世界矩阵与保存前一致 |
|
||||
|
||||
## 门禁(checker 硬校验)
|
||||
@@ -74,4 +74,10 @@ node tools/web/check-armature-robot-headed.mjs --dir /abs/tests/golden/ARMATURE-
|
||||
- `armature-reopen-web` 已落地:保存走「文件 → 保存到浏览器 OPFS」,重开走「文件 → 最近打开」。
|
||||
断言前必须等到 worker 的 `openBlend` 成功回复计数增长(证据 `openBlendReplies` 1→2),否则活着的
|
||||
Main 会直接回答快照、比较恒真;实测重开前 r4 → 重开后 r1,骨骼 / 父级 / 姿态 / 世界矩阵零偏差。
|
||||
- 姿态表单「编辑 / 姿态 / 物体」模式分离与 Ctrl+Tab 进入姿态待实现。
|
||||
- 姿态表单已按 `uiState.context.mode` 分离,与桌面骨骼模式一致:编辑模式显示 rest 编辑(添加骨骼、
|
||||
逐骨 rest 变换、`armature-edit-operations` 五项操作);姿态模式显示姿态读回/提交表单
|
||||
(`armature-pose-readback`);物体模式只读,显示 `armature-mode-actions` 与「进入编辑模式 / 进入姿态模式」
|
||||
按钮。工作台根节点带 `data-armature-mode`,便于断言当前模式。
|
||||
- 快捷键:骨骼对象上 Ctrl+Tab 在姿态 / 物体间切换,Tab 仍进入编辑模式。原生 `object.mode_set`
|
||||
进行中(状态栏显示「正在切换到 … 模式…」)时 App 会忽略快捷键,属刻意的 pending 守卫;物体模式按钮
|
||||
始终可用,切换完成后再按快捷键生效。
|
||||
|
||||
Reference in New Issue
Block a user