EG/IMGUI_MODULE_ANALYSIS.md

63 lines
3.0 KiB
Markdown
Raw Permalink 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.

# EG 本地项目模块分析Qt 清理后)
更新时间2026-02-28
分析范围:`d:\IMGUI\EG` 本地文件,不包含任何远程仓库信息。
## 1. 当前结论
- 主编辑器路径已切换为 ImGui 方案Qt/PySide 在项目代码主路径中已清理完成。
- 本地扫描结果(排除 `RenderPipelineFile` 第三方目录):
- `PyQt/PySide/Qt` 关键引用:`0`
- Python 脚本数:`385`
- 当前主要技术债已从“Qt 运行时依赖”转为“旧接口命名和耦合残留”。
- 已完成基础稳定性优化:入口保护、兼容字段初始化、脚本恢复拼写错误修复。
- 已完成第一轮接口收敛:`event_handler/selection/runtime_actions/InfoPanelManager` 已改为 helper 访问模式。
## 2. 本轮 Qt 清理落点
已完成清理的关键文件:
- [core/InfoPanelManager.py](d:/IMGUI/EG/core/InfoPanelManager.py)
- [core/selection.py](d:/IMGUI/EG/core/selection.py)
- [scene/scene_manager_convert_tiles_mixin.py](d:/IMGUI/EG/scene/scene_manager_convert_tiles_mixin.py)
- [ui/widgets.py](d:/IMGUI/EG/ui/widgets.py)
- [ui/icon_manager.py](d:/IMGUI/EG/ui/icon_manager.py)
- [core/world.py](d:/IMGUI/EG/core/world.py)
- [core/vr_manager.py](d:/IMGUI/EG/core/vr_manager.py)
- [core/vr/testing/test_mode.py](d:/IMGUI/EG/core/vr/testing/test_mode.py)
- [scene/tree_roles.py](d:/IMGUI/EG/scene/tree_roles.py)
- [TransformGizmo/move_gizmo.py](d:/IMGUI/EG/TransformGizmo/move_gizmo.py)
- [TransformGizmo/rotate_gizmo.py](d:/IMGUI/EG/TransformGizmo/rotate_gizmo.py)
- [TransformGizmo/scale_gizmo.py](d:/IMGUI/EG/TransformGizmo/scale_gizmo.py)
- [requirements/requirements.txt](d:/IMGUI/EG/requirements/requirements.txt)
- [requirements/clean-requirements.txt](d:/IMGUI/EG/requirements/clean-requirements.txt)
- [requirements/environment.yml](d:/IMGUI/EG/requirements/environment.yml)
- [requirements/DEPLOYMENT_README.md](d:/IMGUI/EG/requirements/DEPLOYMENT_README.md)
## 3. 仍需优化的结构点(非 Qt 依赖问题)
- 旧接口命名残留仍较多:`interface_manager/treeWidget/gui_manager` 引用约 `92` 处。
- `main.py` 仍是脚本式入口(模块导入副作用风险仍在)。
- 场景树与 GUI 元素生命周期在多个模块分散维护,后续建议继续做单一上下文收敛。
## 4. 风险分级Qt 清理后)
- 高风险:
- 多处旧接口命名仍在调用链中,后续重构若不做适配层可能引发行为回归。
- 中风险:
- 场景保存/加载与树状态同步仍跨模块分散,维护成本高。
- 低风险:
- 文档和模板文件中仍有历史术语,易造成新成员理解偏差。
## 5. 后续建议顺序
1. 建立统一 EditorContext收敛 `interface_manager/gui_manager` 访问入口。
2. 将场景树操作抽象为 ImGui 专用接口,逐步移除 `treeWidget` 语义。
3. 统一入口规范(`if __name__ == "__main__":`)并补最小回归脚本。
## 6. 全量目录与脚本清单
为后续优化分析,完整目录树与全部脚本行数/用途清单见:
- [PROJECT_FULL_CATALOG.md](d:/IMGUI/EG/PROJECT_FULL_CATALOG.md)