Refactor Cutout and Image Editing Logic

- Renamed "Base Plane Depth" to "Reference Depth" across validate_cutout.py for consistency.
- Introduced a new specification for Cutout mesh sampling to ensure source pixel spacing is preserved and limits are applied correctly.
- Unified naming conventions for image editing results to maintain consistency across Remove Background, Upscale, and Crop operations.
- Updated the handling of Refine Selection to ensure it retains the original bounds and does not apply unnecessary cropping.
- Enhanced material generation logic to connect image color directly to IOR Level, improving the rendering of dark areas.
- Established clear requirements for geometry depth controls and image result materials to ensure consistent behavior across different components.
- Removed outdated logic and ensured all changes are documented and tested for regression.
This commit is contained in:
2026-09-03 01:02:10 +08:00
parent a6041cbe03
commit bdbde1a10d
47 changed files with 1120 additions and 257 deletions

View File

@@ -59,7 +59,7 @@ def build_depth_plane_group(mesh_plane_group):
options = group.interface.new_panel(name="Options", default_closed=True)
base_plane_depth = _interface_socket(
group,
"Base Plane Depth",
"Reference Depth",
"INPUT",
"NodeSocketFloat",
parent=options,
@@ -98,7 +98,7 @@ def build_depth_plane_group(mesh_plane_group):
shape_input = _group_input(
nodes,
(-1550.0, 950.0),
{"Thickness", "Depth Scale", "Base Plane Depth"},
{"Thickness", "Depth Scale", "Reference Depth"},
)
image_input = _group_input(
nodes,
@@ -142,7 +142,7 @@ def build_depth_plane_group(mesh_plane_group):
links.new(depth_components.outputs["X"], metric_depth.inputs[0])
links.new(image_input.outputs["Uniform Scale"], metric_depth.inputs[1])
relative_depth = _math(nodes, "SUBTRACT", (50.0, -350.0))
links.new(shape_input.outputs["Base Plane Depth"], relative_depth.inputs[0])
links.new(shape_input.outputs["Reference Depth"], relative_depth.inputs[0])
links.new(metric_depth.outputs[0], relative_depth.inputs[1])
full_offset = _math(nodes, "MULTIPLY", (300.0, -350.0))
links.new(relative_depth.outputs[0], full_offset.inputs[0])