aboutsummaryrefslogtreecommitdiff
path: root/sdk/extensions/exporter/source/NvBlastExtExporterObjReader.cpp
diff options
context:
space:
mode:
authorbgaldrikian <[email protected]>2018-10-03 17:51:20 -0700
committerbgaldrikian <[email protected]>2018-10-03 17:51:20 -0700
commit6f51c0ad55f3ed33597b8b12391d426fe28a0923 (patch)
treeb132a8cb2485820ff9556dafc8e874bc9d41f255 /sdk/extensions/exporter/source/NvBlastExtExporterObjReader.cpp
parentFixes to UnitySample to make it build & run. ( In Unity 2018.2 ) (diff)
downloadblast-1.1.4_rc1.tar.xz
blast-1.1.4_rc1.zip
Blast 1.1.4. See docs/release_notes.txt.v1.1.4_rc1
Diffstat (limited to 'sdk/extensions/exporter/source/NvBlastExtExporterObjReader.cpp')
-rwxr-xr-xsdk/extensions/exporter/source/NvBlastExtExporterObjReader.cpp4
1 files changed, 4 insertions, 0 deletions
diff --git a/sdk/extensions/exporter/source/NvBlastExtExporterObjReader.cpp b/sdk/extensions/exporter/source/NvBlastExtExporterObjReader.cpp
index f188912..d43c1ae 100755
--- a/sdk/extensions/exporter/source/NvBlastExtExporterObjReader.cpp
+++ b/sdk/extensions/exporter/source/NvBlastExtExporterObjReader.cpp
@@ -68,6 +68,10 @@ void ObjFileReader::loadFromFile(const char* filename)
lastDelimeter--;
}
mtlPath = std::string(filename, filename + lastDelimeter);
+ if (mtlPath == "")
+ {
+ mtlPath = '.';
+ }
mtlPath += '/';
bool ret = tinyobj::LoadObj(shapes, mats, err, filename, mtlPath.c_str());