refactor: Update cutout and depth handling by removing unused functions and adjusting parameters
This commit is contained in:
@@ -25,7 +25,7 @@ def test_saved_parameter_descriptions_match_definitions():
|
||||
"O Image Cutout": {"Thickness", "Smooth", "Smooth Weight"},
|
||||
"O Image Depth Cutout": {
|
||||
"Thickness", "Depth Split", "Smooth", "Smooth Weight",
|
||||
"Boundary Smooth", "Outline Depth Fix", "Front Inflation",
|
||||
"Boundary Smooth", "Normal Smooth", "Front Inflation",
|
||||
},
|
||||
"O Image Depth Balloon": {"Thickness", "Smooth", "Smooth Weight"},
|
||||
"O Image Depth Panorama": {
|
||||
@@ -48,6 +48,12 @@ def test_saved_parameter_descriptions_match_definitions():
|
||||
]
|
||||
assert {item.name for item in sockets} == parameters[group.name]
|
||||
assert all(item.description for item in sockets), group.name
|
||||
if group.name in {"O Image Depth Plane", "O Image Depth Cutout"}:
|
||||
boundary = next(item for item in sockets if item.name == "Boundary Smooth")
|
||||
assert boundary.default_value == (4 if group.name == "O Image Depth Plane" else 0)
|
||||
assert boundary.min_value == 0
|
||||
assert boundary.max_value == 16
|
||||
assert boundary.parent.name == "Options"
|
||||
if group.name == "O Image Depth Panorama":
|
||||
defaults = {item.name: item.default_value for item in sockets
|
||||
if item.name in {"Subdivide", "Depth Split", "Boundary Smooth"}}
|
||||
@@ -66,8 +72,16 @@ def test_saved_parameter_descriptions_match_definitions():
|
||||
thickness = [item.description for item in sockets if item.name == "Thickness"]
|
||||
assert len(thickness) == 2 and len(set(thickness)) == 2
|
||||
if group.name == "O Image Depth Cutout":
|
||||
assert not {"Outline Depth Fix", "Center Smooth", "Center Subdivide", "Show Center"} & {
|
||||
item.name for item in group.interface.items_tree if item.item_type == "SOCKET"
|
||||
}
|
||||
inflation = next(item for item in sockets if item.name == "Front Inflation")
|
||||
assert inflation.default_value == 0.0
|
||||
assert inflation.default_value == pytest.approx(0.2)
|
||||
normal_smooth = next(item for item in sockets if item.name == "Normal Smooth")
|
||||
assert normal_smooth.default_value == 64
|
||||
assert normal_smooth.min_value == 16
|
||||
assert normal_smooth.max_value == 512
|
||||
assert normal_smooth.parent.name == "Options"
|
||||
result[group.name] = [
|
||||
(item.identifier, item.name, item.description) for item in sockets
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user