Files
workinf_Blender_Wasm/docs/tasks/WBV2-P1424-001-desktop-completion/DW02.md
mes123456 f3e21c6b98
Some checks failed
M6 deployable RC / quick (push) Has been cancelled
M6 deployable RC / chromium (push) Has been cancelled
M6 deployable RC / release (push) Has been cancelled
chore: checkpoint web Blender migration source, tools and docs
Accumulated uncommitted work: GHOST Web backend, WebGL/GPU web layer,
web workflow engine and protocol, tooling, docs and task records.
Large generated evidence, user-testing archives, build snapshots and
imported test assets remain untracked.

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-11-10 11:18:01 +08:00

62 lines
3.8 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
# DW02:启动脚本、原生菜单控件与操作入口
- stage: `main-desktop`
- queueTask: `WBV2-P1424-001`;parent: `WBV2-P1424-000`;nextTask: `null`
- 包状态:`planned_gap_closure`(并不表示已有源码尚未实现)
- 完整交付依赖:DW01
- 工作量级:L;不表示日期承诺
- validation: `NOT_RUN`;acceptance: `NOT_CLAIMED`
## 优先复用的十多天成果
已有嵌入式 CPython、原生 bpy 接线、键盘入口、菜单/F3 和 operator properties 实现。
既有任务:`WEBUI-OPERATOR-PALETTE`(记录为 implemented)、`NATIVE-OPERATOR-BRIDGE`(记录为 implemented)、`SERVER-OPERATOR-SCHEMA-PALETTE`(记录为 implemented)。按需读取一个任务结果的 summary/remaining/ownedPaths,不打开完整产品报告。
相关交接仅作按需引用:
- `tests/golden/WBV2-P1424-001/embedded-python-implementation.md`
- `tests/golden/WBV2-P1424-001/desktop-operator-properties-implementation.md`
- `tests/golden/WBV2-P1424-001/gpu-keyboard-implementation.md`
先对照当前小范围源码和最新交接保留已实现子项;只有缺功能、缺接线或缺必要依赖才新增实现。历史状态不自动当作当前缺口。
## 操作者工作流与交付
默认启动 → 注册原生 UI/工具/快捷键 → 菜单或 F3 调用 operator → 参数调整/撤销
主桌面具备实际可操作的原生 UI、快捷键与搜索;所有入口有精确 context 和失败表现。
## 最小生产入口
- `blender-5.2.0/source/blender/web_engine/web_engine_python.cpp`
- `blender-5.2.0/source/blender/web_engine/web_engine_python_bootstrap.py`
- `blender-5.2.0/source/blender/python/intern/bpy_interface.cc`
- `blender-5.2.0/source/blender/windowmanager/intern/wm_init_exit.cc`
- `blender-5.2.0/source/blender/windowmanager/intern/wm_event_system.cc`
- `web/app/src/app/App.tsx`
- `web/protocol/blender-operator.ts`
以上为聚焦入口,非要求全文加载。使用源码聚焦工具、精确 --source/--unit 和函数片段;接入新 operator 时追加其具体原生文件,单次最多 8 个精确源码文件。没有默认测试入口或要运行的 fixture;功能完成前不执行任何验证。
## 只补未完成部分
1. 复用 scripts/startup/bl_ui、bl_operators 与 keymap 的真实注册顺序,明确 Main/Window/Screen/Area/Region 归属。
2. 完成默认菜单、面板、按钮、属性控件、工具提示、字体/图标、弹出菜单和 operator redo panel 所需 native UI 依赖。
3. 确保 F3、工具栏、快捷键和菜单入口调用同一原生 operator,动态 RNA 参数、poll 条件和只读/不可用状态一致。
4. 补齐本阶段需要的 Python register/unregister、回调保活、类型替换、上下文 override、撤销标志和异常传递;通用扩展由 DW26 继续。
5. 处理文本输入、IME、修饰键、快捷键冲突、modal 确认/取消与窗口焦点。
6. 先补本卡启动/工具依赖,再扩展具体编辑器控件;不把注册成功当作操作已完成。
## 失败边界
仅显示菜单、列出 operator 名或 Python 仿制 bpy 均不算实现。启动回调失败不得发布半注册 UI。
## 实现交接与后续使用
交付前必须具有实际入口→原生执行→消费者/结果→错误/取消→适用 history/save 的生产代码。这里是实现交付条件,不运行验收;编译成功不能替代功能。旧的已完成子项可引用并保留,不能声称本轮重新实现。
用户使用阶段的场景(现在不执行):从菜单创建对象,用 F3 调用同一操作并修改参数,使用快捷键撤销/重做,中文重命名。
每次记录保留成果、补齐断点、仍有缺口、必要构件与下一动作。共同规则见同目录 `EXECUTION.md`,首次领取时阅读;不要将完整计划作为后续执行上下文。