Add comprehensive tests for cutout and mesh functionalities
- Introduced `test_cutout.py` to validate cutout pie menu behavior, image lasso options, and mesh detail calculations. - Added `test_mesh.py` to ensure correct tangent normal rasterization, plane source topology, and depth surface evaluations. - Created `test_mesh_blender.py` to verify material node groups, tangent baking, and local cutout building from Blender images. - Implemented tests for handling alpha regions and ensuring geometry nodes maintain expected behavior.
This commit is contained in:
@@ -8,28 +8,20 @@ class AnyImageImageMenu(bpy.types.Menu):
|
||||
bl_label = "AnyImage"
|
||||
|
||||
def draw(self, context):
|
||||
from .properties import (
|
||||
ai_setup_label,
|
||||
ai_status,
|
||||
)
|
||||
from .properties import ai_setup_label, ai_status
|
||||
|
||||
layout = self.layout
|
||||
layout.operator_context = "INVOKE_DEFAULT"
|
||||
layout.operator(
|
||||
"anyimage.convert_to_mesh_plane",
|
||||
text="Convert to Mesh Plane…",
|
||||
"anyimage.convert_to_plane",
|
||||
text="Convert to Plane",
|
||||
icon="MESH_PLANE",
|
||||
)
|
||||
layout.operator(
|
||||
"anyimage.convert_to_depth_plane",
|
||||
text="Convert to Depth Plane…",
|
||||
text="Convert to Depth Plane",
|
||||
icon="MOD_DISPLACE",
|
||||
)
|
||||
layout.operator(
|
||||
"anyimage.convert_to_surface",
|
||||
text="Convert to Surface…",
|
||||
icon="MESH_GRID",
|
||||
)
|
||||
layout.separator()
|
||||
layout.operator(
|
||||
"anyimage.remove_image_background",
|
||||
@@ -46,7 +38,7 @@ class AnyImageImageMenu(bpy.types.Menu):
|
||||
if status["ready"]:
|
||||
layout.operator(
|
||||
"anyimage.open_ai_environment_settings",
|
||||
text="AI Environment Settings…",
|
||||
text="AI Environment Settings",
|
||||
icon="PREFERENCES",
|
||||
)
|
||||
else:
|
||||
@@ -72,9 +64,5 @@ def upscale_menu_label(context):
|
||||
def draw_image_context_menu(self, context):
|
||||
if not is_image_empty(context.object):
|
||||
return
|
||||
self.layout.menu(
|
||||
AnyImageImageMenu.bl_idname,
|
||||
text="AnyImage",
|
||||
icon="PLUGIN",
|
||||
)
|
||||
self.layout.menu(AnyImageImageMenu.bl_idname, text="AnyImage", icon="PLUGIN")
|
||||
self.layout.separator()
|
||||
|
||||
Reference in New Issue
Block a user