Browse Source

Merge pull request #1256 from johnmaf/bugfix/gltf-bin-uri

Fix incorrect truncation of binary URI in glTF exporter
Kim Kulling 8 years ago
parent
commit
7f014ea889
1 changed files with 1 additions and 1 deletions
  1. 1 1
      code/glTFExporter.cpp

+ 1 - 1
code/glTFExporter.cpp

@@ -511,7 +511,7 @@ void glTFExporter::ExportMeshes()
     // Variables needed for compression. END.
 
     std::string fname = std::string(mFilename);
-    std::string bufferIdPrefix = fname.substr(0, fname.find("."));
+    std::string bufferIdPrefix = fname.substr(0, fname.rfind(".gltf"));
     std::string bufferId = mAsset->FindUniqueID("", bufferIdPrefix.c_str());
 
     Ref<Buffer> b = mAsset->GetBodyBuffer();