- Introduced new test files for image layer, image plane, normal scale, object normal rotation, shadeless, and temporary attributes. - Implemented tests to validate the behavior of alpha curves, depth layers, and normal scales in various rendering engines. - Refactored import paths for node groups to align with the new directory structure. - Added checks for temporary attribute lifetimes and ensured proper cleanup without warnings. - Enhanced CLI commands to require the Blender group and validate the presence of generated node assets before packaging. - Updated packaging scripts to enforce the existence of necessary assets, preventing build failures.
2.5 KiB
2.5 KiB
1. 拆分节点源码与工具
- 1.1 创建顶层
nodespackage,将tools/nodes/groups和tools/nodes/common移入并删除旧路径 - 1.2 更新构建、布局、预览、测试和辅助代码的导入,使节点定义只从
nodes.groups与nodes.common加载 - 1.3 将
nodes加入 Hatch wheel 包清单,验证安装后的node-group入口可加载节点定义 - 1.4 将节点定义行为测试移动到
tests/nodes,仅将构建、布局、校验和预览工具测试保留在tests/tools/nodes
2. 将节点资产改为构建产物
- 2.1 将
src/anyimage/assets/O_AnyImage.blend加入.gitignore并从 Git 索引移除,不改变扩展运行时资产路径 - 2.2 为打包器增加节点资产存在性检查,并覆盖缺失失败与归档包含资产的行为
- 2.3 增加版本控制边界测试,确认生成的节点资产不会再次进入 Git
3. 统一节点工具运行环境
- 3.1 删除
--blender、BLENDER_BIN、.env读取、Blender 路径发现及外部进程 bootstrap - 3.2 让 build、check 和 preview 通过当前 Python 的独立子进程运行,让 build/check 只运行节点相关测试,并在缺少 bpy 时给出
--group blender提示 - 3.3 更新节点 CLI 测试,覆盖命令顺序、参数传递、失败停止和不再支持外部 Blender 配置
4. 接入 CI 构建
- 4.1 修改测试工作流,通过统一的
node-group入口从干净源码生成并校验节点资产后再运行常规测试 - 4.2 修改发布工作流,在测试和打包前生成并校验节点资产,确保生成文件进入全部平台归档
- 4.3 更新工作流测试,验证 CI 不要求
BLENDER_BIN或额外下载完整 Blender
5. 同步规范与文档
- 5.1 更新
AGENTS.md,将节点资产定义为必须由源码构建、不得提交的发布构建产物,并删除外部 Blender 配置规则 - 5.2 更新
docs/internals/node-assets.md及相关内部引用,说明nodes/、tools/nodes/、bpy 环境和 CI 生成链
6. 验证
- 6.1 从不存在
O_AnyImage.blend的状态运行统一的节点资产构建与独立检查 - 6.2 运行节点定义、节点工具、常规及全量测试,确认重组前后节点行为一致
- 6.3 运行打包相关测试并检查生成归档,确认包含节点资产且源码树未重新跟踪该文件
- 6.4 搜索旧导入、外部 Blender 配置和路径引用,检查最终差异并严格验证 OpenSpec 变更