@@ -373,15 +373,15 @@ void save_mesh_ply(std::string filename,
373
373
bool has_v_positions = assert_shape_and_dtype (v_positions, " v_positions" , dtype_f, {-num_vertices, 3 });
374
374
bool has_v_normals = assert_shape_and_dtype (v_normals, " v_normals" , dtype_f, {-num_vertices, 3 });
375
375
bool has_v_texcoords = assert_shape_and_dtype (v_texcoords, " v_texcoords" , dtype_f, {-num_vertices, 2 });
376
- bool has_v_colors = assert_shape_and_dtype (v_colors, " v_colors" , dtype_f , {-num_vertices, 4 });
376
+ bool has_v_colors = assert_shape_and_dtype (v_colors, " v_colors" , pybind11::dtype::of<std:: uint8_t >() , {-num_vertices, 4 });
377
377
bool has_v_quality = assert_shape_and_dtype (v_quality, " v_quality" , dtype_f, {-num_vertices});
378
378
bool has_v_radius = assert_shape_and_dtype (v_radius, " v_radius" , dtype_f, {-num_vertices});
379
379
bool has_v_texids = assert_shape_and_dtype (v_texids, " v_texids" , dtype_i, {-num_vertices});
380
380
bool has_v_flags = assert_shape_and_dtype (v_flags, " v_flags" , dtype_i, {-num_vertices});
381
381
382
382
bool has_f_vertex_ids = assert_shape_and_dtype (f_vertex_ids, " f_vertex_ids" , dtype_i, {-num_faces, 3 });
383
383
bool has_f_normals = assert_shape_and_dtype (f_normals, " f_normals" , dtype_f, {-num_faces, 3 });
384
- bool has_f_colors = assert_shape_and_dtype (f_colors, " f_colors" , dtype_f , {-num_faces, 4 });
384
+ bool has_f_colors = assert_shape_and_dtype (f_colors, " f_colors" , pybind11::dtype::of<std:: uint8_t >() , {-num_faces, 4 });
385
385
bool has_f_quality = assert_shape_and_dtype (f_quality, " f_quality" , dtype_f, {-num_faces});
386
386
bool has_f_flags = assert_shape_and_dtype (f_flags, " f_flags" , dtype_i, {-num_faces});
387
387
@@ -417,7 +417,7 @@ void save_mesh_ply(std::string filename,
417
417
}
418
418
if (has_v_colors) {
419
419
plyf.add_properties_to_element (
420
- " vertex" , { " red" , " green" , " blue" , " alpha" }, ply_type_f , num_vertices,
420
+ " vertex" , { " red" , " green" , " blue" , " alpha" }, tinyply::Type::UINT8 , num_vertices,
421
421
reinterpret_cast <std::uint8_t *>(v_colors.mutable_data ()), tinyply::Type::INVALID, 0 );
422
422
}
423
423
if (has_v_quality) {
@@ -485,7 +485,7 @@ void save_mesh_ply(std::string filename,
485
485
}
486
486
if (has_f_colors) {
487
487
plyf.add_properties_to_element (
488
- " face" , { " red" , " green" , " blue" , " alpha" }, ply_type_f , num_faces,
488
+ " face" , { " red" , " green" , " blue" , " alpha" }, tinyply::Type::UINT8 , num_faces,
489
489
reinterpret_cast <std::uint8_t *>(f_colors.mutable_data ()), tinyply::Type::INVALID, 0 );
490
490
}
491
491
if (has_f_quality) {
0 commit comments