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:
@@ -35,7 +35,7 @@ def _create_cutout_shape(
|
||||
depth_image=None,
|
||||
depth_metadata=None,
|
||||
selection_values=None,
|
||||
inward_axis=cutout_object.CutoutInwardAxis.NEGATIVE_Z,
|
||||
gesture="LASSO",
|
||||
):
|
||||
if bounds is None:
|
||||
bounds = (0, 0, *tuple(int(value) for value in source.data.size))
|
||||
@@ -66,7 +66,7 @@ def _create_cutout_shape(
|
||||
base_shape,
|
||||
depth_image=depth_image,
|
||||
depth_metadata=depth_metadata,
|
||||
inward_axis=inward_axis,
|
||||
gesture=gesture,
|
||||
color_image=color_image,
|
||||
)
|
||||
|
||||
@@ -117,7 +117,7 @@ def _add_cutout_modifier(obj, shape):
|
||||
object_data.set_modifier_input(modifier, object_data.modifier_input_identifier(group, "Mode"), 1)
|
||||
object_data.set_modifier_input(
|
||||
modifier,
|
||||
object_data.modifier_input_identifier(group, "Inward Axis"),
|
||||
object_data.modifier_input_identifier(group, "Depth Axis"),
|
||||
0,
|
||||
)
|
||||
object_data.set_modifier_input(
|
||||
@@ -171,7 +171,10 @@ def _depth_surface_step_object():
|
||||
):
|
||||
object_data.set_modifier_input(
|
||||
modifier,
|
||||
object_data.modifier_input_identifier(modifier.node_group, name),
|
||||
object_data.modifier_input_identifier(
|
||||
modifier.node_group, name,
|
||||
subtype="DISTANCE" if name == "Thickness" else None,
|
||||
),
|
||||
value,
|
||||
)
|
||||
return obj, modifier
|
||||
|
||||
Reference in New Issue
Block a user