Add new functionality for image rectification and depth metadata handling
- Implemented a preview tool for rectifying images with interactive aspect controls in `preview.py`. - Added tests for depth metadata loading to ensure consistent schema usage in `test_depth_metadata.py`. - Developed comprehensive tests for cutout calibration processes in `test_cutout_calibration.py`, including stability checks and depth calibration. - Created tests for frame compositing operations in `test_frame_compositing.py`, ensuring correct handling of depth and transparency. - Introduced material slot inheritance functionality in `material_slots.py` to manage geometry material assignments. - Built shared shader nodes for material processing in `shader.py`, including roughness and bump mapping setups.
This commit is contained in:
@@ -3,30 +3,22 @@
|
||||
import bpy
|
||||
import pytest
|
||||
|
||||
from anyimage.common.node import node_asset_path
|
||||
from tests.support.depth_surface import surface
|
||||
from tests.support.planes import create_surface
|
||||
from tests.tools.nodes.test_image_depth_panorama import panorama
|
||||
|
||||
|
||||
@pytest.mark.parametrize("source", ["definition", "asset"])
|
||||
@pytest.mark.parametrize("kind", ["cutout", "plane", "panorama"])
|
||||
def test_depth_attribute_cleanup_has_no_warnings(source, kind):
|
||||
def test_depth_attribute_cleanup_has_no_warnings(kind):
|
||||
if kind == "cutout":
|
||||
obj, set_value = surface()
|
||||
elif kind == "plane":
|
||||
obj, set_value, *_ = create_surface("definition", "DEPTH")
|
||||
obj, set_value, *_ = create_surface("DEPTH")
|
||||
else:
|
||||
obj, set_value = panorama(subdivide=2)
|
||||
modifier = obj.modifiers[0]
|
||||
if source == "asset":
|
||||
name = modifier.node_group.name
|
||||
modifier.node_group.name += " Definition"
|
||||
with bpy.data.libraries.load(str(node_asset_path())) as (_, target):
|
||||
target.node_groups = [name]
|
||||
modifier.node_group = target.node_groups[0]
|
||||
for split in (0.0, 0.5, 0.0):
|
||||
set_value("Split Threshold", split)
|
||||
set_value("Depth Split", split)
|
||||
for smooth in (0, 5):
|
||||
set_value("Boundary Smooth", smooth)
|
||||
evaluated = obj.evaluated_get(bpy.context.evaluated_depsgraph_get())
|
||||
|
||||
Reference in New Issue
Block a user