Optimize Cutout Geometry Nodes
- Refactor Depth Cutout to reuse the projected outline field, reducing redundant boundary calculations and improving performance. - Derive the center field from shared low-frequency fields, eliminating an unnecessary blur operation. - Implement triangle-only strip cleanup for Depth Cutout, as the input is confirmed to be triangulated. - Short-circuit zero-thickness branches in both Cutout and Depth Cutout to avoid unnecessary geometry generation. - Standardize internal attribute naming with a new `_o_` prefix and implement wildcard cleanup for temporary attributes. - Update relevant tests to ensure functionality remains consistent and validate changes against existing behavior.
This commit is contained in:
@@ -27,7 +27,9 @@ def test_depth_attribute_cleanup_has_no_warnings(kind):
|
||||
assert mesh.vertices
|
||||
assert not {a.name for a in mesh.attributes} & {
|
||||
".o_anyimage_depth_cut", ".o_anyimage_original_boundary",
|
||||
"_o_anyimage_depth_cut",
|
||||
}
|
||||
assert not any(a.name.startswith("_o_") for a in mesh.attributes)
|
||||
assert not list(modifier.node_warnings), [
|
||||
warning.message for warning in modifier.node_warnings
|
||||
]
|
||||
|
||||
Reference in New Issue
Block a user