Add new tests and functionality for image processing and geometry handling
- Introduced color_image.py for preparing standalone color images for tests. - Added hdr_image.py to create HDR textures for testing. - Implemented test_image_depth_panorama.py to evaluate panorama topology, UVs, and depth discontinuities. - Created test_shadeless.py to validate the opacity and HDR color endpoints of the Shadeless group. - Developed moge3_export.py for exporting dynamic MoGe-3 backbone and ONNX graphs. - Added material.py to inherit material slots onto generated geometry. - Built image_depth_panorama.py to construct a quad panorama with depth separation and sampling.
This commit is contained in:
@@ -1,3 +1,4 @@
|
||||
from contextlib import nullcontext
|
||||
import importlib
|
||||
import json
|
||||
from pathlib import Path
|
||||
@@ -69,8 +70,8 @@ class CutoutOperatorsTest(BlenderTestCase):
|
||||
),
|
||||
patch.object(
|
||||
self.cutout_main,
|
||||
"create_cropped_color_image",
|
||||
return_value="Color",
|
||||
"material_color_image",
|
||||
return_value=nullcontext("Color"),
|
||||
),
|
||||
patch.object(
|
||||
self.cutout_main, "create_cutout_shape"
|
||||
@@ -163,9 +164,10 @@ class CutoutOperatorsTest(BlenderTestCase):
|
||||
),
|
||||
patch.object(
|
||||
self.cutout_main,
|
||||
"prepare_image_bounds_input",
|
||||
"prepare_material_color_input",
|
||||
return_value=Path(__file__),
|
||||
) as prepare_input,
|
||||
patch.object(self.cutout_main, "material_analysis_input", return_value=Path(__file__)),
|
||||
patch.object(
|
||||
self.cutout_main.JobOperatorBase,
|
||||
"execute",
|
||||
@@ -179,8 +181,8 @@ class CutoutOperatorsTest(BlenderTestCase):
|
||||
rasterize.assert_called_once()
|
||||
prepare_input.assert_called_once_with(
|
||||
source.data,
|
||||
source_rgba,
|
||||
selection_mask.bounds,
|
||||
source_rgba,
|
||||
)
|
||||
|
||||
|
||||
@@ -244,6 +246,7 @@ class CutoutOperatorsTest(BlenderTestCase):
|
||||
operator.alpha_threshold = 0.25
|
||||
operator.fine_outline = False
|
||||
operator.input_path = __file__
|
||||
operator.color_path = __file__
|
||||
operator.source_object_name = "Source"
|
||||
operator.shape = "DEPTH_SOLID"
|
||||
operator.model = self.anyimage.properties.DEFAULT_MOGE2_MODEL_KEY
|
||||
@@ -256,10 +259,10 @@ class CutoutOperatorsTest(BlenderTestCase):
|
||||
with (
|
||||
patch.object(self.cutout_main, "require_environment"),
|
||||
patch.object(self.cutout_main, "require_model") as require_model,
|
||||
patch.object(self.cutout_main, "require_input_path", return_value=Path("input.png")),
|
||||
patch.object(
|
||||
self.cutout_main, "production_device", return_value="CPU"
|
||||
),
|
||||
patch.object(self.cutout_main, "source_start_frame", return_value=1),
|
||||
patch.object(
|
||||
self.cutout_main,
|
||||
"moge2_parameters",
|
||||
@@ -372,6 +375,7 @@ class CutoutOperatorsTest(BlenderTestCase):
|
||||
operator.source_object_name = "Source"
|
||||
operator.selection_bounds_json = "[10,20,14,23]"
|
||||
operator.input_path = __file__
|
||||
operator.color_path = __file__
|
||||
operator.shape = "FLAT"
|
||||
operator.point_spacing = 32
|
||||
operator.generate_normal = True
|
||||
@@ -399,7 +403,6 @@ class CutoutOperatorsTest(BlenderTestCase):
|
||||
|
||||
color_result.assert_called_once_with(
|
||||
__file__,
|
||||
source,
|
||||
selection_mask.bounds,
|
||||
)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user