Refactor and enhance geometry node groups for depth plane and material layers
- Updated the depth plane node group to load from an asset and simplified the interface. - Created a new build script for depth plane geometry nodes. - Introduced material layer groups for image and depth materials with appropriate sockets. - Added functionality to connect balloon normal scale to the image material. - Enhanced tests to validate the new node groups and their connections. - Ensured that production code does not create node groups directly.
This commit is contained in:
@@ -1,19 +1,21 @@
|
||||
# 节点资产
|
||||
|
||||
AnyImage 将稳定、可复用的 Geometry Nodes 和 Shader 节点组构建到 `O_AnyImage.blend`,运行时按名称加载。Depth Plane 节点图是例外:它由 Python 在当前 `.blend` 中按需创建。
|
||||
AnyImage 将生产功能使用的可复用 Geometry Nodes 和 Shader 节点组统一构建到 `O_AnyImage.blend`,运行时只按名称加载,不动态创建节点组。
|
||||
|
||||
## 对应文件
|
||||
|
||||
```text
|
||||
src/anyimage/
|
||||
├── assets/O_AnyImage.blend
|
||||
├── operators/common/mesh_result.py # 运行时资产加载与 Modifier 输入
|
||||
└── operators/convert_to_plane/nodes.py # Depth Plane 运行时节点图
|
||||
├── operators/common/mesh_result.py # 运行时资产加载与 Modifier 输入
|
||||
└── operators/convert_to_plane/nodes.py # Plane 节点资产名称与加载入口
|
||||
|
||||
tools/node_assets/
|
||||
├── build.py # 统一构建入口
|
||||
├── node_graph.py # Cutout 资产构建专用节点图函数
|
||||
├── build_mesh_plane.py
|
||||
├── build_depth_plane.py
|
||||
├── build_material_layers.py
|
||||
├── build_shadeless.py
|
||||
├── build_cutout.py
|
||||
├── validate.py # 资产清单与基础接口
|
||||
@@ -42,11 +44,11 @@ BLENDER_BIN="/c/Program Files/Blender Foundation/Blender 4.5/blender.exe"
|
||||
"$BLENDER_BIN" --background --python tools/node_assets/validate_cutout.py
|
||||
```
|
||||
|
||||
`build.py` 从空 Factory 文件开始,依次构建 `O Mesh Plane`、`O Shadeless`、四个 Cutout 内部节点组与公开修改器节点组 `O Image Cutout`,再保存唯一资产文件。`O Image Cutout` 用 Menu Switch 包装四个内部组;运行时 Loader 只加载这个稳定入口,Blender 4.5 根据 Shape 菜单依赖只显示当前分支实际使用的输入。
|
||||
`build.py` 从空 Factory 文件开始,依次构建 `O Mesh Plane`、`O Image Depth Plane`、`O Image Layer`、`O Image Depth Layer`、`O Shadeless`、四个 Cutout 内部节点组与公开修改器节点组 `O Image Cutout`,再保存唯一资产文件。`O Image Cutout` 用 Menu Switch 包装四个内部组;运行时 Loader 只加载这个稳定入口,Blender 4.5 根据 Shape 菜单依赖只显示当前分支实际使用的输入。
|
||||
|
||||
## 验证范围
|
||||
|
||||
基础验证检查发布资产清单、节点树类型、Modifier 标记、接口顺序和 Fake User。专项验证继续检查:
|
||||
基础验证检查完整发布资产清单、节点树类型、Modifier 标记、接口顺序和 Fake User。专项验证继续检查:
|
||||
|
||||
- Mesh Plane 的接口、细分、Thickness 和几何求值;
|
||||
- `O Image Cutout` 的公开接口、Shape 菜单和四个内部组的依赖关系;
|
||||
|
||||
Reference in New Issue
Block a user