diff options
Diffstat (limited to 'source/blender/io/usd/intern/usd_reader_mesh.cc')
-rw-r--r-- | source/blender/io/usd/intern/usd_reader_mesh.cc | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/io/usd/intern/usd_reader_mesh.cc b/source/blender/io/usd/intern/usd_reader_mesh.cc index 9c75bc8afae..5c8bd88e87a 100644 --- a/source/blender/io/usd/intern/usd_reader_mesh.cc +++ b/source/blender/io/usd/intern/usd_reader_mesh.cc @@ -390,8 +390,9 @@ void USDMeshReader::read_uvs(Mesh *mesh, const double motionSampleTime, const bo const UVSample &sample = uv_primvars[layer_idx]; - if (!(sample.interpolation == pxr::UsdGeomTokens->faceVarying || - sample.interpolation == pxr::UsdGeomTokens->vertex)) { + if (!(ELEM(sample.interpolation, + pxr::UsdGeomTokens->faceVarying, + pxr::UsdGeomTokens->vertex))) { std::cerr << "WARNING: unexpected interpolation type " << sample.interpolation << " for uv " << layer->name << std::endl; continue; @@ -781,9 +782,10 @@ Mesh *USDMeshReader::read_mesh(Mesh *existing_mesh, bool is_uv = false; /* Assume all UVs are stored in one of these primvar types */ - if (type == pxr::SdfValueTypeNames->TexCoord2hArray || - type == pxr::SdfValueTypeNames->TexCoord2fArray || - type == pxr::SdfValueTypeNames->TexCoord2dArray) { + if (ELEM(type, + pxr::SdfValueTypeNames->TexCoord2hArray, + pxr::SdfValueTypeNames->TexCoord2fArray, + pxr::SdfValueTypeNames->TexCoord2dArray)) { is_uv = true; } /* In some cases, the st primvar is stored as float2 values. */ @@ -795,7 +797,7 @@ Mesh *USDMeshReader::read_mesh(Mesh *existing_mesh, pxr::TfToken interp = p.GetInterpolation(); - if (!(interp == pxr::UsdGeomTokens->faceVarying || interp == pxr::UsdGeomTokens->vertex)) { + if (!(ELEM(interp, pxr::UsdGeomTokens->faceVarying, pxr::UsdGeomTokens->vertex))) { continue; } |