feat(cutout): implement boundary padding for cutout textures
- Introduced a new `Boundary Padding` preference in the Cutout Tool with a default of 2 px and a configurable range of 1-4 px. - Updated the Cutout client to establish inward mapping from the final Mask, sampling in a fixed direction and processing independent material RGBA and Depth. - Enhanced the handling of RGBA and Depth during cutout operations, ensuring proper mapping and preservation of source data. - Added tests to validate the new boundary padding functionality and its integration with existing cutout processes. feat(geometry): remove overall mesh smoothing from geometry nodes - Removed the `Smooth` input from several geometry node groups to eliminate unnecessary overall mesh smoothing. - Retained `Smooth Weight` for depth nodes while removing it from Cutout and Relief Plane nodes. - Ensured that boundary, normal, and fill smoothing behaviors remain intact and consistent. - Updated tests and documentation to reflect the changes in node interfaces and behaviors. feat(normals): scale tangent normals with depth - Reused the existing `o_normal_reduction` attribute to adjust Tangent Normal strength based on the geometry's `Depth Scale`. - Ensured that Tangent Normal strength is consistent with the geometry depth, preserving full strength for materials that do not provide the attribute. - Updated tests to verify the correct behavior of normal strength adjustments in both Tangent and Object Space.
This commit is contained in:
@@ -40,29 +40,7 @@ class AiInputFailuresTest(BlenderTestCase):
|
||||
self.assertEqual(messages[0], messages[1])
|
||||
self.assertIn("Unsupported input format: .tiff", messages[0])
|
||||
|
||||
def test_remove_background_catches_nested_error(self):
|
||||
operator = self.remove_background.RemoveImageBackground()
|
||||
operator.report = Mock()
|
||||
ops = SimpleNamespace(anyimage=SimpleNamespace(
|
||||
run_background_removal=Mock(side_effect=RuntimeError("Error: invalid input\n"))))
|
||||
with patch.object(self.remove_background.bpy, "ops", ops, create=True):
|
||||
self.assertEqual(operator.execute(None), {"CANCELLED"})
|
||||
operator.report.assert_called_once_with({"ERROR"}, "invalid input")
|
||||
|
||||
def test_setup_failures_cancel_at_each_boundary(self):
|
||||
for ready in (True, False):
|
||||
operator = self.ai_setup.SetupAIEnvironment()
|
||||
operator.use_mirror = False
|
||||
operator.report = Mock()
|
||||
failing = Mock(side_effect=RuntimeError("Error: setup failed\n"))
|
||||
ops = SimpleNamespace(anyimage=SimpleNamespace(
|
||||
download_required_models=failing, install_environment=failing))
|
||||
with (
|
||||
patch.object(self.ai_setup, "ai_status", return_value={"ready": False, "environment_ready": ready}),
|
||||
patch.object(self.ai_setup.bpy, "ops", ops, create=True),
|
||||
):
|
||||
self.assertEqual(operator.execute(None), {"CANCELLED"})
|
||||
operator.report.assert_called_once_with({"ERROR"}, "setup failed")
|
||||
def test_invoke_ai_setup_reports_nested_failure(self):
|
||||
owner = SimpleNamespace(report=Mock())
|
||||
with (
|
||||
patch.object(self.ai, "ai_ready", return_value=False),
|
||||
|
||||
Reference in New Issue
Block a user