mirror of
https://git.mirrors.martin98.com/https://github.com/google/draco
synced 2025-08-11 19:59:01 +08:00
Adding support for "vertex_index" property to the ply decoder.
The old decoder expected "vertex_indices" for the face list property.
This commit is contained in:
parent
6da5d81b21
commit
a58a08b7a0
@ -86,8 +86,12 @@ bool PlyDecoder::DecodeFaceData(const PlyElement *face_element) {
|
||||
}
|
||||
const int64_t num_faces = face_element->num_entries();
|
||||
out_mesh_->SetNumFaces(num_faces);
|
||||
const PlyProperty *const vertex_indices =
|
||||
const PlyProperty *vertex_indices =
|
||||
face_element->GetPropertyByName("vertex_indices");
|
||||
if (vertex_indices == nullptr) {
|
||||
// The property name may be named either "vertex_indices" or "vertex_index".
|
||||
vertex_indices = face_element->GetPropertyByName("vertex_index");
|
||||
}
|
||||
if (vertex_indices == nullptr || !vertex_indices->is_list()) {
|
||||
return false; // No faces defined.
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user