Add tests for clipboard image functionality and mesh plane asset creation
- Implemented a comprehensive test suite for the clipboard image module, covering various functionalities including operator registration, context handling, and image processing. - Created a new mesh plane asset with customizable parameters and integrated it into the geometry node system. - Developed a validation script to ensure the correct behavior of the mesh plane asset, including input handling and output verification.
This commit is contained in:
@@ -13,6 +13,9 @@ from .depth import (
|
||||
from .geometry import INFLATION, POINT_SPACING, triangulate_balloon
|
||||
from ...properties import (
|
||||
BEN2_MODEL_KEY,
|
||||
ai_ready,
|
||||
ai_setup_label,
|
||||
ai_status,
|
||||
balloon_contour_analysis_property as contour_analysis_property,
|
||||
balloon_depth_analysis_property as depth_analysis_property,
|
||||
balloon_depth_model_property as depth_model_property,
|
||||
@@ -500,10 +503,24 @@ class ExtractBalloon(bpy.types.Operator):
|
||||
layout.prop(self, "thickness")
|
||||
layout.prop(self, "resolution", text="Resolution (m)")
|
||||
layout.prop(self, "reuse_material")
|
||||
layout.prop(self, "contour_analysis")
|
||||
layout.prop(self, "depth_analysis")
|
||||
status = ai_status()
|
||||
ready = status["ready"]
|
||||
contour_row = layout.row()
|
||||
contour_row.enabled = ready
|
||||
contour_row.prop(self, "contour_analysis")
|
||||
depth_row = layout.row()
|
||||
depth_row.enabled = ready
|
||||
depth_row.prop(self, "depth_analysis")
|
||||
if self.depth_analysis:
|
||||
layout.prop(self, "depth_model")
|
||||
model_row = layout.row()
|
||||
model_row.enabled = ready
|
||||
model_row.prop(self, "depth_model")
|
||||
if not ready:
|
||||
layout.operator(
|
||||
"anyimage.setup_ai_environment",
|
||||
text=ai_setup_label(status),
|
||||
icon="IMPORT",
|
||||
)
|
||||
|
||||
@classmethod
|
||||
def poll(cls, context):
|
||||
@@ -541,8 +558,9 @@ class ExtractBalloon(bpy.types.Operator):
|
||||
self.thickness = settings.balloon_thickness
|
||||
self.resolution = settings.balloon_resolution
|
||||
self.reuse_material = settings.balloon_reuse_material
|
||||
self.contour_analysis = settings.balloon_contour_analysis
|
||||
self.depth_analysis = settings.balloon_depth_analysis
|
||||
ready = ai_ready()
|
||||
self.contour_analysis = ready and settings.balloon_contour_analysis
|
||||
self.depth_analysis = ready and settings.balloon_depth_analysis
|
||||
self.depth_model = settings.balloon_depth_model
|
||||
self.source_object_name = source_object.name
|
||||
self.source_matrix_data = serialize_matrix(source_object.matrix_world)
|
||||
@@ -835,7 +853,21 @@ class BalloonTool(bpy.types.WorkSpaceTool):
|
||||
layout.prop(settings, "balloon_thickness")
|
||||
layout.prop(settings, "balloon_resolution", text="Resolution (m)")
|
||||
layout.prop(settings, "balloon_reuse_material")
|
||||
layout.prop(settings, "balloon_contour_analysis")
|
||||
layout.prop(settings, "balloon_depth_analysis")
|
||||
status = ai_status()
|
||||
ready = status["ready"]
|
||||
contour_row = layout.row()
|
||||
contour_row.enabled = ready
|
||||
contour_row.prop(settings, "balloon_contour_analysis")
|
||||
depth_row = layout.row()
|
||||
depth_row.enabled = ready
|
||||
depth_row.prop(settings, "balloon_depth_analysis")
|
||||
if settings.balloon_depth_analysis:
|
||||
layout.prop(settings, "balloon_depth_model", text="Depth Model")
|
||||
model_row = layout.row()
|
||||
model_row.enabled = ready
|
||||
model_row.prop(settings, "balloon_depth_model", text="Depth Model")
|
||||
if not ready:
|
||||
layout.operator(
|
||||
"anyimage.setup_ai_environment",
|
||||
text=ai_setup_label(status),
|
||||
icon="IMPORT",
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user