Add tests for foreground preservation and refactor geometry node asset
- Implement test to ensure foreground preserves source RGB and Ben2 alpha in WorkerTest. - Remove outdated tests related to background distance and original background depth. - Update geometry node asset to reflect new naming conventions and structure. - Introduce validation for depth plane asset, ensuring correct input/output configurations and attribute handling. - Adjust confidence and edge parameters in geometry node asset to support a wider range of values.
This commit is contained in:
@@ -37,6 +37,14 @@ def main():
|
||||
group = load_geometry_node_group()
|
||||
assert load_geometry_node_group() == group
|
||||
assert group.is_modifier
|
||||
geometry_input = next(
|
||||
item
|
||||
for item in group.interface.items_tree
|
||||
if item.item_type == "SOCKET"
|
||||
and item.in_out == "INPUT"
|
||||
and item.name == "Geometry"
|
||||
)
|
||||
assert geometry_input.structure_type == "SINGLE"
|
||||
assert group.asset_data is None
|
||||
assert not any(node.bl_idname == "GeometryNodeGroup" for node in group.nodes)
|
||||
assert not any(node.bl_idname == "GeometryNodeTriangulate" for node in group.nodes)
|
||||
@@ -72,6 +80,16 @@ def main():
|
||||
assert [item.name for item in panels["Options"].interface_items] == [
|
||||
"Fix Topology",
|
||||
]
|
||||
for name, default_value in (("Confidence", 0.0), ("Stretch", 10.0)):
|
||||
item = next(
|
||||
item
|
||||
for item in panels["Culling"].interface_items
|
||||
if item.name == name
|
||||
)
|
||||
assert item.min_value == 0.0
|
||||
assert item.max_value == 100.0
|
||||
assert item.default_value == default_value
|
||||
assert item.subtype == "PERCENTAGE"
|
||||
if bpy.app.version >= (5, 0, 0):
|
||||
assert group.library is not None
|
||||
|
||||
@@ -104,13 +122,13 @@ def main():
|
||||
finally:
|
||||
evaluated.to_mesh_clear()
|
||||
|
||||
set_input(modifier, group, "Stretch", 1.0)
|
||||
set_input(modifier, group, "Stretch", 100.0)
|
||||
stretch_item = next(
|
||||
item
|
||||
for item in group.interface.items_tree
|
||||
if item.item_type == "SOCKET" and item.name == "Stretch"
|
||||
)
|
||||
assert modifier[stretch_item.identifier] == 1.0
|
||||
assert modifier[stretch_item.identifier] == 100.0
|
||||
obj.update_tag(refresh={"DATA"})
|
||||
bpy.context.view_layer.update()
|
||||
culled = obj.evaluated_get(bpy.context.evaluated_depsgraph_get())
|
||||
|
||||
Reference in New Issue
Block a user