浏览代码

Merge pull request #1264 from smokris/master

Add support for reading texture coordinates from PLY meshes with properties named 'texture_u' and 'texture_v'
Alexander Gessler 8 年之前
父节点
当前提交
24790398b9
共有 1 个文件被更改,包括 2 次插入2 次删除
  1. 2 2
      code/PlyParser.cpp

+ 2 - 2
code/PlyParser.cpp

@@ -196,11 +196,11 @@ PLY::ESemantic PLY::Property::ParseSemantic(const char* pCur,const char** pCurOu
         eOut = PLY::EST_Blue;
         eOut = PLY::EST_Blue;
     }
     }
     // NOTE: Blender3D exports texture coordinates as s,t tuples
     // 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;
         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;
         eOut = PLY::EST_VTextureCoord;
     }
     }