Refactor depth node groups and simplify options

- Removed `Smooth Weight` input from `O Image Depth Plane`, `O Image Depth Cutout`, and `O Image Depth Panorama` to streamline the interface and maintain consistent boundary smoothing behavior.
- Adjusted the `Reference Depth` input to appear last in the options panel for better organization, reflecting its role as a calibration value.
- Consolidated the `expand_smooth()` function to only accept necessary parameters, eliminating unused branches related to `Smooth Weight` and `pin_sharp`.
- Updated related tests and node assets to ensure functionality remains intact and consistent with the new structure.
- Introduced new specifications to document the changes and ensure compliance with the updated requirements.
This commit is contained in:
2026-09-16 13:12:12 +08:00
parent 6ca084ee4a
commit 7f69630371
26 changed files with 741 additions and 178 deletions

View File

@@ -23,7 +23,7 @@ from anyimage.server.geometry.depth_texture import (
write_depth_texture,
)
from anyimage.server.models.geometry import GeometryFrame
from tests.support.image_objects import _add_cutout_modifier, _create_cutout_shape, _depth_image, _depth_metadata, _evaluated_positions, _group_node
from tests.support.image_objects import _create_cutout_shape, _depth_image, _depth_metadata, _evaluated_positions, _group_node
def test_depth_result_image_loads_camera_exr_and_keeps_data_name(tmp_path):
@@ -169,7 +169,6 @@ def test_depth_surface_object_evaluates(gesture):
object_data.modifier_input_identifier(modifier.node_group, "Thickness", subtype="DISTANCE"),
0.0,
)
assert np.isclose(modifier_value(modifier, object_data.modifier_input_identifier(modifier.node_group, "Smooth Weight")), 1.0)
for name, value in (("Mode", 1), ("Front Inflation", 0.0)):
object_data.set_modifier_input(modifier, object_data.modifier_input_identifier(modifier.node_group, name), value)
scale_id = object_data.modifier_input_identifier(
@@ -186,8 +185,8 @@ def test_depth_surface_object_evaluates(gesture):
)
object_data.set_modifier_input(
modifier,
object_data.modifier_input_identifier(modifier.node_group, "Smooth Weight"),
0.0,
object_data.modifier_input_identifier(modifier.node_group, "Boundary Smooth"),
0,
)
evaluated = result.evaluated_get(bpy.context.evaluated_depsgraph_get())
baseline_mesh = evaluated.to_mesh()