From 2e455b78c8c39cf5507a1ced9887192c61fe85df Mon Sep 17 00:00:00 2001 From: Steve Mokris Date: Thu, 11 May 2017 15:21:37 -0400 Subject: [PATCH] Add support for reading texture coordinates from PLY meshes with properties named 'texture_u' and 'texture_v'. --- code/PlyParser.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/code/PlyParser.cpp b/code/PlyParser.cpp index c97ea50..7e5a07d 100644 --- a/code/PlyParser.cpp +++ b/code/PlyParser.cpp @@ -196,11 +196,11 @@ PLY::ESemantic PLY::Property::ParseSemantic(const char* pCur,const char** pCurOu eOut = PLY::EST_Blue; } // NOTE: Blender3D exports texture coordinates as s,t tuples - else if (TokenMatch(pCur,"u",1) || TokenMatch(pCur,"s",1) || TokenMatch(pCur,"tx",2)) + else if (TokenMatch(pCur,"u",1) || TokenMatch(pCur,"s",1) || TokenMatch(pCur,"tx",2) || TokenMatch(pCur,"texture_u",9)) { eOut = PLY::EST_UTextureCoord; } - else if (TokenMatch(pCur,"v",1) || TokenMatch(pCur,"t",1) || TokenMatch(pCur,"ty",2)) + else if (TokenMatch(pCur,"v",1) || TokenMatch(pCur,"t",1) || TokenMatch(pCur,"ty",2) || TokenMatch(pCur,"texture_v",9)) { eOut = PLY::EST_VTextureCoord; } -- 2.7.4