projects
/
platform
/
upstream
/
assimp.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9ffc1a9
)
Fixed texture bug due simultaneously using 'usemtl' and 'usemap' attributes
author
Vitaly Kovalev
<vkovalev@gkmsoft.ru>
Tue, 27 Jun 2017 10:52:43 +0000
(13:52 +0300)
committer
Vitaly Kovalev
<vkovalev@gkmsoft.ru>
Tue, 27 Jun 2017 10:52:43 +0000
(13:52 +0300)
Signed-off-by: Vitaly Kovalev <vkovalev@gkmsoft.ru>
code/ObjFileParser.cpp
patch
|
blob
|
history
diff --git
a/code/ObjFileParser.cpp
b/code/ObjFileParser.cpp
index
bd73a88
..
dfa77db
100644
(file)
--- a/
code/ObjFileParser.cpp
+++ b/
code/ObjFileParser.cpp
@@
-179,7
+179,18
@@
void ObjFileParser::parseFile( IOStreamBuffer<char> &streamBuffer ) {
case 'u': // Parse a material desc. setter
{
- getMaterialDesc();
+ std::string name;
+
+ getNameNoSpace(m_DataIt, m_DataItEnd, name);
+
+ size_t nextSpace = name.find(" ");
+ if (nextSpace != std::string::npos)
+ name = name.substr(0, nextSpace);
+
+ if(name == "usemtl")
+ {
+ getMaterialDesc();
+ }
}
break;