Files
AnyImage/docs/internals/index.md
nan 08309f719d feat: Implement cutout tool and depth generation features
- Added a new cutout tool for selecting regions in images, allowing users to choose mesh shapes based on selected areas.
- Introduced depth generation capabilities for rasterized images, including normal data extraction.
- Created jobs for generating depth planes and region data, enhancing the AI data generation workflow.
- Developed a selection refinement process for cutout regions, improving accuracy in generated outputs.
- Established a new region module for handling rasterized image regions and their associated AI generation tasks.
- Enhanced node graph builders for asset generation, facilitating smoother integration of new features.
2026-08-30 23:09:13 +08:00

2.5 KiB
Raw Blame History

内部实现总览

AnyImage 的实现围绕一条清晰边界展开:Blender 进程负责交互与数据创建,独立 Job Server 负责模型推理和文件处理。两侧通过 BlendJob 传递可序列化参数与 Job 目录中的产物,不跨进程传递 Blender RNA 数据。

flowchart TD
    Input["Image Empty / 手势"] --> Operator["Blender Operator"]
    Operator --> Choice{"需要独立计算?"}
    Choice -- "否" --> Build["Blender 主线程构建"]
    Choice -- "是" --> Runtime["BlendJob Runtime"]
    Runtime --> Server["Job Server"]
    Server --> Files["Job 产物"]
    Files --> Build
    Build --> Result["Image / Mesh / Material / Modifier"]

项目主干

总览只展示稳定边界;各功能包的具体文件在对应实现页中展开。

.
├── src/anyimage/
│   ├── __init__.py          # Blender 注册入口
│   ├── menu.py              # Image Empty 右键菜单
│   ├── preferences.py       # 扩展级配置
│   ├── properties.py        # Scene 状态与模型枚举
│   ├── runtime.py           # BlendJob Runtime 配置
│   ├── operators/           # 交互、任务提交与结果导入
│   ├── server/              # 无 Blender 依赖的计算端
│   ├── assets/              # 随扩展分发的节点资产
│   └── wheels/              # 随扩展分发的 BlendJob wheel
├── tools/                   # Blender 资产构建与验证
├── tests/                   # Python 自动化测试
├── pack.py                  # 多平台扩展打包
└── sync_models.py           # ONNX 模型同步

文档分层

内部实现文档描述模块之间的职责和主要数据流。Common 公共函数按真实外部调用列出开发新功能时应优先复用的稳定入口;函数级分支、参数校验与异常处理仍以源码和测试为准。