Add comprehensive tests for edge depth extension, empty image edits, and material view adaptation
- Introduced `test_edge_depth.py` to validate the functionality of edge depth extension, ensuring core alpha preservation, proper depth handling, and edge padding behavior. - Created `test_empty_image_edits.py` to verify the behavior of image edits in Blender, focusing on shared edits, preservation of image properties, and handling of failed operations. - Developed `test_material_view_adaptation.py` to test material adaptation preferences, ensuring color space and alpha settings are correctly applied and preserved across various scenarios.
This commit is contained in:
22
openspec/changes/isolate-shared-empty-image-edits/tasks.md
Normal file
22
openspec/changes/isolate-shared-empty-image-edits/tasks.md
Normal file
@@ -0,0 +1,22 @@
|
||||
## 1. 固定共享判断与身份约定
|
||||
|
||||
- [x] 1.1 增加真实 Blender 数据测试,覆盖两个 Empty 共享、隐藏共享者、跨场景共享者及同一物体链接多个集合,按数据块身份验证判断结果。
|
||||
- [x] 1.2 增加单独使用回归,覆盖普通图片、Fake User、手动材质引用,验证结果内容、源 Image 身份、完整名称及临时 Image 数量。
|
||||
- [x] 1.3 在 `common/image.py` 复用 `is_image_empty()` 实现其他存活 Empty 的引用查找,支持 Frame 排除待删除对象,并验证提交时重新判断共享。
|
||||
|
||||
## 2. 统一图片编辑提交
|
||||
|
||||
- [x] 2.1 调整公共结果提交入口,共享分支只更新当前物体绑定,验证其他 Empty 与原图像素、打包及动画状态保持不变。
|
||||
- [x] 2.2 实现单独使用时的静态结果原位提交及临时结果释放,覆盖尺寸变化、Alpha、颜色空间、Packed 内容、名称和 Fake User 保留。
|
||||
- [x] 2.3 实现动画 Job 结果原位提交,验证帧来源、打包内容、播放设置及保存重开;复用现有图片与动画辅助函数。
|
||||
- [x] 2.4 为内容写入和显示配置注入失败,完善源图内容及物体状态恢复,验证失败与取消不残留临时数据。
|
||||
|
||||
## 3. 整合工具与 Frame
|
||||
|
||||
- [x] 3.1 检查全部 `replace_empty_image()` 调用方,包括 Mask、Rectify、Frame、Remove Background 和 Upscale,使用最终返回 Image 并统一临时结果清理职责。
|
||||
- [x] 3.2 Frame 按合并后存活对象判断共享,移除重复命名处理,覆盖共享者全部参与合并及外部共享者保留两种情况。
|
||||
|
||||
## 4. 验证
|
||||
|
||||
- [x] 4.1 运行相关图片数据、Alpha、图片编辑及 Operator 回归,验证连续编辑、保存重开、共享保护和异常恢复。
|
||||
- [x] 4.2 运行 `uv run pytest`,确认全部测试通过。
|
||||
Reference in New Issue
Block a user