fix load obj texture filename when has any option

This commit is contained in:
alemuntoni 2021-07-08 12:56:06 +02:00
parent a282947a72
commit 735f93c256
1 changed files with 130 additions and 130 deletions

View File

@ -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;