Skip to content

Commit 9e14511

Browse files
committed
Fix not looking ObjReaderConfig.mtl_search_path. Fixes #223
1 parent 994a5ad commit 9e14511

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tiny_obj_loader.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2891,6 +2891,8 @@ bool ObjReader::ParseFromFile(const std::string &filename,
28912891
if (filename.find_last_of("/\\") != std::string::npos) {
28922892
mtl_search_path = filename.substr(0, filename.find_last_of("/\\"));
28932893
}
2894+
} else {
2895+
mtl_search_path = config.mtl_search_path;
28942896
}
28952897

28962898
valid_ = LoadObj(&attrib_, &shapes_, &materials_, &warning_, &error_,

0 commit comments

Comments
 (0)