Add comprehensive tests for image processing and mask functionalities

- Introduced tests for color image handling, ensuring source preservation and premultiplied alpha usage.
- Implemented tests for brush stroke operations, validating segment boundaries and brush anti-aliasing.
- Added tests for frame anti-aliasing, confirming correct rendering behavior with various alpha values and depth settings.
- Created tests for frame projection, ensuring accurate overlap calculations and half-plane clipping.
- Developed tests for image premultiplied retention, verifying behavior during loading and packing processes.
- Added undo functionality tests for mask operations, ensuring single transaction behavior during edits.
This commit is contained in:
2026-09-05 21:33:11 +08:00
parent bbaa4bff46
commit 1994d38ccd
111 changed files with 7691 additions and 2341 deletions

View File

@@ -29,7 +29,6 @@ def _pie_button(
icon,
source_name,
selection_path_json,
refine_selection,
generate_normal,
point_spacing,
inward_axis,
@@ -42,7 +41,6 @@ def _pie_button(
operator.source_object_name = source_name
operator.selection_path_json = selection_path_json
operator.shape = shape
operator.refine_selection = refine_selection
operator.generate_normal = generate_normal
operator.point_spacing = point_spacing
operator.inward_axis = inward_axis
@@ -53,14 +51,12 @@ def open_shape_pie(
event,
source_object,
selection_path,
refine_selection=False,
):
source_name = source_object.name
selection_path_json = selection_path.to_json()
settings = context.scene.anyimage_settings
point_spacing = cutout_mesh_detail_spacing(settings.cutout_mesh_detail)
ready = ai_ready()
refine_selection = ready and refine_selection
generate_normal = ready and bool(
getattr(settings, "cutout_generate_normal", False)
)
@@ -77,7 +73,6 @@ def open_shape_pie(
icon,
source_name,
selection_path_json,
refine_selection,
generate_normal,
point_spacing,
inward_axis,