diff --git a/tests/files/usd/compare/reference/unused_pointinstancer_crash.txt b/tests/files/usd/compare/reference/unused_pointinstancer_crash.txt index 7319cffc91f..1f16e37e4de 100644 --- a/tests/files/usd/compare/reference/unused_pointinstancer_crash.txt +++ b/tests/files/usd/compare/reference/unused_pointinstancer_crash.txt @@ -68,6 +68,19 @@ - (1.000, 1.000) - (0.000, 1.000) +==== Point Clouds: 1 +- PointCloud 'point_instancer' points:1 + - attr 'mask' BOOLEAN POINT + - 1 + - attr 'orientation' QUATERNION POINT + - (0.929, 0.301, 0.205, -0.066) + - attr 'position' FLOAT_VECTOR POINT + - (0.000, 0.000, 0.000) + - attr 'proto_index' INT POINT + - 0 + - attr 'scale' FLOAT_VECTOR POINT + - (1.000, 1.000, 1.000) + ==== Objects: 6 - Obj 'A' MESH data:'A' - pos 0.000, 0.000, 0.000 diff --git a/tests/files/usd/compare/reference/unused_prototypes_crash_139162.txt b/tests/files/usd/compare/reference/unused_prototypes_crash_139162.txt index aebb0fe1e96..1a344c41a70 100644 --- a/tests/files/usd/compare/reference/unused_prototypes_crash_139162.txt +++ b/tests/files/usd/compare/reference/unused_prototypes_crash_139162.txt @@ -13,6 +13,22 @@ - attr 'sharp_face' BOOLEAN FACE - 1 1 1 1 1 1 +==== Point Clouds: 1 +- PointCloud 'MainInstancer' points:2 + - attr 'mask' BOOLEAN POINT + - 1 1 + - attr 'orientation' QUATERNION POINT + - (1.000, 0.000, 0.000, 0.000) + - (1.000, 0.000, 0.000, 0.000) + - attr 'position' FLOAT_VECTOR POINT + - (2.000, 0.000, 0.000) + - (-2.000, 0.000, 0.000) + - attr 'proto_index' INT POINT + - 0 0 + - attr 'scale' FLOAT_VECTOR POINT + - (1.000, 1.000, 1.000) + - (1.000, 1.000, 1.000) + ==== Objects: 2 - Obj 'MainInstancer' POINTCLOUD data:'MainInstancer' - pos 0.000, 0.000, 0.000 diff --git a/tests/python/modules/io_report.py b/tests/python/modules/io_report.py index 195cd03db2d..dcef439fa5f 100644 --- a/tests/python/modules/io_report.py +++ b/tests/python/modules/io_report.py @@ -266,6 +266,8 @@ integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw return f"({fmtf(val.vector[0])}, {fmtf(val.vector[1])})" if isinstance(val, bpy.types.FloatColorAttributeValue) or isinstance(val, bpy.types.ByteColorAttributeValue): return f"({val.color[0]:.3f}, {val.color[1]:.3f}, {val.color[2]:.3f}, {val.color[3]:.3f})" + if isinstance(val, bpy.types.QuaternionAttributeValue): + return f"({val.value[0]:.3f}, {val.value[1]:.3f}, {val.value[2]:.3f}, {val.value[3]:.3f})" if isinstance(val, bpy.types.Int2AttributeValue) or isinstance(val, bpy.types.Short2AttributeValue): return f"({val.value[0]}, {val.value[1]})" if isinstance(val, bpy.types.ID): @@ -529,6 +531,27 @@ integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw Report._write_custom_props(curve, desc) desc.write(f"\n") + # pointclouds + if len(bpy.data.pointclouds): + desc.write(f"==== Point Clouds: {len(bpy.data.pointclouds)}\n") + for pointcloud in bpy.data.pointclouds: + # overview + desc.write( + f"- PointCloud '{pointcloud.name}' " + f"points:{len(pointcloud.points)}\n" + ) + # attributes + for attr in sorted(pointcloud.attributes, key=lambda x: x.name): + if not attr.is_internal: + Report._write_attr(attr, desc) + # materials + if pointcloud.materials: + desc.write(f" - {len(pointcloud.materials)} materials\n") + Report._write_collection_single(pointcloud.materials, desc) + Report._write_animdata_desc(pointcloud.animation_data, desc) + Report._write_custom_props(pointcloud, desc) + desc.write(f"\n") + # objects if len(bpy.data.objects): desc.write(f"==== Objects: {len(bpy.data.objects)}\n")