feat: Add restore cutout depth extension with edge depth correction
- Introduced a new extension for restoring cutout depth with edge correction. - Implemented edge depth extension algorithm in `edge_depth.py` to enhance depth accuracy near cutout edges. - Updated `generate_moge_artifacts` to include an option for extending depth edges during depth generation. - Modified cutout job processing to enable edge depth extension based on depth request. - Added comprehensive tests for edge depth functionality, ensuring correct behavior under various scenarios. - Updated existing node loading functions to remove asset revision dependencies, simplifying the loading process. - Created new design and proposal documentation outlining the goals and decisions for the extension.
This commit is contained in:
@@ -74,7 +74,6 @@ def test_clipboard_plane_uses_the_mesh_material_slot():
|
||||
def test_converted_planes_center_the_origin_without_moving_world_corners():
|
||||
bpy.ops.wm.read_factory_settings(use_empty=True)
|
||||
saved = build_image_depth_plane_group(build_image_plane_group())
|
||||
saved["anyimage_asset_revision"] = 11
|
||||
|
||||
def create_source(name):
|
||||
image = bpy.data.images.new(name, width=200, height=100)
|
||||
@@ -150,9 +149,8 @@ def test_converted_planes_center_the_origin_without_moving_world_corners():
|
||||
assert_centered(depth_plane, depth_bounds, depth_matrix)
|
||||
assert depth_plane["anyimage_mesh_shape"] == "DEPTH_PLANE"
|
||||
depth_modifier = depth_plane.modifiers[0]
|
||||
assert depth_modifier.node_group != saved
|
||||
assert depth_modifier.node_group["anyimage_asset_revision"] == 16
|
||||
assert saved in bpy.data.node_groups.values() and saved["anyimage_asset_revision"] == 11
|
||||
assert depth_modifier.node_group == saved
|
||||
assert saved.name == "O Image Depth Plane"
|
||||
uniform_scale = depth_modifier[
|
||||
object_data.modifier_input_identifier(
|
||||
depth_modifier.node_group,
|
||||
|
||||
Reference in New Issue
Block a user