fix load obj texture filename when has any option
This commit is contained in:
parent
a282947a72
commit
735f93c256
|
@ -1049,10 +1049,10 @@ public:
|
|||
std::string textureName;
|
||||
if (tokens.size() < 2)
|
||||
return false;
|
||||
else if (tokens.size() == 2)
|
||||
textureName = tokens[1]; //play it safe
|
||||
else
|
||||
textureName = line.substr(7); //get everything after "map_Kd "
|
||||
else {
|
||||
//the tex name is the last one (after any option)
|
||||
textureName = tokens[tokens.size()-1];
|
||||
}
|
||||
|
||||
currentMaterial.map_Kd=textureName;
|
||||
|
||||
|
|
Loading…
Reference in New Issue