feat(node_assets): add image plane geometry nodes and validation scripts
- Implemented `image_plane.py` to build the Image Plane Geometry Nodes group with customizable parameters for geometry, subdivide, and thickness. - Created `image_plane_validation.py` to validate the functionality of the image plane, ensuring correct geometry generation and material assignment. - Developed `material_layers.py` to construct shader node groups for image materials, including depth and normal handling. - Authored `plane_layouts.py` to define node arrangements for image geometry assets. - Introduced `shadeless.py` to create a shadeless shader node group that displays color without scene lighting while preserving shadows and reflections.
This commit is contained in:
@@ -1,44 +1,27 @@
|
||||
# 内部实现总览
|
||||
|
||||
Blender 进程负责交互与数据创建,独立 Job Server 负责模型推理和文件处理。两侧通过 BlendJob 传递可序列化参数与 Job 目录中的产物。
|
||||
AnyImage 在 Blender 主线程处理交互、像素编辑和数据创建,通过 BlendJob 把模型推理交给独立 Job Server。
|
||||
|
||||
```mermaid
|
||||
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"]
|
||||
A[Image Empty 或剪贴板图片] --> B[Operator 与手势工具]
|
||||
B --> C{需要 AI?}
|
||||
C -- 是 --> D[准备文件与普通字典参数]
|
||||
D --> E[JobRuntime → Job Server]
|
||||
E --> F[图片与相机元数据]
|
||||
F --> G[Blender 主线程导入]
|
||||
C -- 否 --> G
|
||||
G --> H[Image 编辑或 Mesh 与材质创建]
|
||||
```
|
||||
|
||||
## 项目主干
|
||||
| 主题 | 对应职责 |
|
||||
| --- | --- |
|
||||
| [程序架构](architecture.md) | 进程、注册、配置与主线程边界 |
|
||||
| [Common](common.md) | Blender 侧图像、手势、几何与 AI 公共能力 |
|
||||
| [Runtime 与 Server](runtime.md) | Environment、Job、模型下载与 Session 生命周期 |
|
||||
| [Job 产物](outputs.md) | 文件协议、相机坐标和 Blender 消费方式 |
|
||||
| [Operator 索引](operators/index.md) | 按实际用户功能查找实现 |
|
||||
| [节点资产](node-assets.md) | 资产、源码职责、构建和验证 |
|
||||
| [开发与发布](development.md) | 测试组织、工具命令与发布流程 |
|
||||
|
||||
```text
|
||||
.
|
||||
├── src/anyimage/
|
||||
│ ├── __init__.py # Blender 注册入口
|
||||
│ ├── menu.py # Image Empty 右键菜单
|
||||
│ ├── preferences.py # 扩展级配置
|
||||
│ ├── properties.py # Scene 状态与模型枚举
|
||||
│ ├── runtime.py # BlendJob Runtime 配置
|
||||
│ ├── common/ # Blender 侧共享原子能力
|
||||
│ ├── operators/ # 交互、任务提交与结果导入
|
||||
│ ├── server/ # 无 Blender 依赖的计算端
|
||||
│ ├── assets/ # 随扩展分发的节点资产
|
||||
│ └── wheels/ # 随扩展分发的 BlendJob wheel
|
||||
├── tools/ # 打包、模型同步与 Blender 节点资产
|
||||
└── tests/ # Python 自动化测试
|
||||
```
|
||||
|
||||
## 文档分层
|
||||
|
||||
- [程序架构](architecture.md):注册、配置、线程和模块边界。
|
||||
- [Common 公共函数](common.md):仅列生产功能从 `common/` 外部调用的函数。
|
||||
- [Job Runtime 与 Server](runtime.md):任务生命周期、媒体输入和模型 Session。
|
||||
- [Operator 实现索引](operators/index.md):按 `src/anyimage/operators/` 中的完整功能拆分实现页。
|
||||
- [Job 产物](outputs.md):文件用途和 Blender 导入关系。
|
||||
- [开发与发布](development.md):本地环境、测试、打包和 CI。
|
||||
- [节点资产](node-assets.md):Geometry Nodes 的构建、加载与验证。
|
||||
源码位于 `src/anyimage/`,开发工具位于 `tools/`,自动化测试位于 `tests/`。扩展级设置由 `preferences.py` 定义,运行时资源由 `runtime.py` 接入 BlendJob。
|
||||
|
||||
Reference in New Issue
Block a user