Refactor Cutout Tool to Use World Space Edge Length
- Replaced the Mesh Detail parameter with a new Edge Length property to define cutout sampling in physical units. - Introduced Minimum Relative Edge Length preference to control effective spacing based on the bounding box of the cutout content. - Updated tests to validate the new edge length functionality and ensure consistent behavior across different resolutions and canvas sizes. - Removed deprecated parameters and adjusted related properties to align with the new edge length implementation. - Enhanced geometry sampling logic to utilize effective world spacing for both standard and fine outline modes.
This commit is contained in:
@@ -29,7 +29,7 @@ def _group_node(group, node_tree):
|
||||
def _create_cutout_shape(
|
||||
source,
|
||||
shape,
|
||||
detail,
|
||||
edge_length,
|
||||
*,
|
||||
bounds=None,
|
||||
depth_image=None,
|
||||
@@ -52,7 +52,7 @@ def _create_cutout_shape(
|
||||
base_shape = cutout_geometry.build_base_shape(
|
||||
bpy.context,
|
||||
source,
|
||||
detail,
|
||||
edge_length,
|
||||
selection_mask.values,
|
||||
selection_mask.bounds,
|
||||
)
|
||||
@@ -60,7 +60,7 @@ def _create_cutout_shape(
|
||||
bpy.context,
|
||||
source,
|
||||
shape,
|
||||
detail,
|
||||
edge_length,
|
||||
selection_mask.values,
|
||||
selection_mask.bounds,
|
||||
base_shape,
|
||||
|
||||
Reference in New Issue
Block a user