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:
2026-09-06 21:43:47 +08:00
parent 1994d38ccd
commit 7e55af6722
58 changed files with 3607 additions and 200 deletions

View File

@@ -32,6 +32,8 @@ def _pie_button(
generate_normal,
point_spacing,
inward_axis,
alpha_threshold,
fine_outline,
):
operator = pie.operator(
"anyimage.cutout_selection_to_shape",
@@ -44,6 +46,8 @@ def _pie_button(
operator.generate_normal = generate_normal
operator.point_spacing = point_spacing
operator.inward_axis = inward_axis
operator.alpha_threshold = alpha_threshold
operator.fine_outline = fine_outline
def open_shape_pie(
@@ -61,6 +65,8 @@ def open_shape_pie(
getattr(settings, "cutout_generate_normal", False)
)
inward_axis = str(getattr(settings, "cutout_inward_axis", "NEGATIVE_Z"))
alpha_threshold = settings.cutout_alpha_threshold
fine_outline = settings.cutout_fine_outline
def draw(menu, _context):
pie = menu.layout.menu_pie()
@@ -76,6 +82,8 @@ def open_shape_pie(
generate_normal,
point_spacing,
inward_axis,
alpha_threshold,
fine_outline,
)
context.window_manager.popup_menu_pie(