Files
AnyImage/openspec/changes/update-pasted-brush-preview/specs/pasted-brush-preview/spec.md
nan 31074bd511 Add tests and implement boundary smoothing and cutout functionality
- Introduced tests for boundary smoothing in `test_boundary_smoothing.py`, verifying that smoothing reduces stair-step artifacts while preserving boundary integrity.
- Added tests for cutout boundary behavior in `test_cutout_boundary.py`, ensuring proper handling of boundary triangles and normal blending.
- Created `test_temporary_attributes.py` to check the cleanup of temporary attributes across depth modifier branches, ensuring no warnings are raised.
- Implemented point culling functionality in `test_validity.py`, confirming that invalid points are removed without affecting adjacent geometry.
- Developed boundary smoothing logic in `boundary_smoothing.py`, allowing for depth smoothing while maintaining edge integrity.
- Added cutout boundary management in `cutout_boundary.py`, including functions for removing boundary triangles and tapering thickness profiles.
- Implemented validity checks in `validity.py` to ensure proper deletion of invalid vertices and associated wire edges.
2026-09-11 20:37:20 +08:00

1.9 KiB

ADDED Requirements

Requirement: Texture Paint 粘贴同步笔刷预览

系统 SHALL 在 Texture Paint 模式成功绑定粘贴图片后,将当前可编辑笔刷的自定义预览更新为该图片,并刷新相关界面。

Scenario: 外部库笔刷首次粘贴

  • WHEN 当前笔刷来自外部库,用户在 Texture Paint 模式粘贴图片
  • THEN 创建并激活的本地笔刷副本使用该图片作为纹理和自定义预览

Scenario: 已有笔刷重复粘贴

  • WHEN 用户向当前可编辑笔刷粘贴另一张图片
  • THEN 同一笔刷的纹理和预览同步更新为新图片

Scenario: 其他绘制模式粘贴

  • WHEN 用户在 Sculpt 或 Vertex Paint 模式粘贴图片
  • THEN 系统沿用该模式现有纹理绑定行为并保留笔刷原预览

Requirement: 预览使用已打包图片并保留显示效果

系统 SHALL 支持从已打包的剪贴板图片生成预览,保持图片宽高比和透明区域;源图片像素、尺寸及打包状态 MUST 保持。

Scenario: 非正方形透明图片

  • WHEN 用户粘贴已打包且原临时文件已删除的非正方形透明图片
  • THEN 笔刷预览展示完整图片,保持比例和透明区域,源图片数据保持

Requirement: 预览随文件保存

笔刷自定义预览 SHALL 随当前 .blend 文件保存,在预览临时文件清理后仍可恢复。

Scenario: 保存后重新打开

  • WHEN 用户成功更新笔刷预览,保存并重新打开 .blend 文件
  • THEN 对应本地笔刷仍显示该图片预览

Requirement: 预览失败保留可用纹理

预览更新失败时系统 SHALL 保留已绑定纹理并提示预览更新失败;预览临时文件 MUST 在成功或失败后清理。

Scenario: Blender 拒绝加载预览

  • WHEN 纹理已绑定但自定义预览加载失败
  • THEN 笔刷仍可使用粘贴纹理绘制,用户收到预览失败提示,临时文件被清理