diff options
| author | Euclid Linden <euclid@lindenlab.com> | 2022-06-08 20:46:33 +0000 |
|---|---|---|
| committer | Euclid Linden <euclid@lindenlab.com> | 2022-06-08 20:46:33 +0000 |
| commit | 4ee387f971019fe4e2a5fce1578ba77387f1b7e1 (patch) | |
| tree | 0dd38cb047775a639a9f6df264caf67287f004c7 /indra/llprimitive/llmodelloader.cpp | |
| parent | d385c73b6e6df968a19a2bb7f0ec1e72bd01e8dc (diff) | |
| parent | d3219f57c12ec29025e5c9c68b2cf90d49258672 (diff) | |
Merged in euclid-gltf-17214 (pull request #1013)
Add tinygltf import library, and partial gltf loader implementation.
Approved-by: Brad Kittenbrink
Diffstat (limited to 'indra/llprimitive/llmodelloader.cpp')
| -rw-r--r-- | indra/llprimitive/llmodelloader.cpp | 13 |
1 files changed, 7 insertions, 6 deletions
diff --git a/indra/llprimitive/llmodelloader.cpp b/indra/llprimitive/llmodelloader.cpp index 5171621007..554ed54de1 100644 --- a/indra/llprimitive/llmodelloader.cpp +++ b/indra/llprimitive/llmodelloader.cpp @@ -160,7 +160,8 @@ bool LLModelLoader::getSLMFilename(const std::string& model_filename, std::strin std::string::size_type i = model_filename.rfind("."); if (i != std::string::npos) { - slm_filename.replace(i, model_filename.size()-1, ".slm"); + slm_filename.resize(i, '\0'); + slm_filename.append(".slm"); return true; } else @@ -172,7 +173,7 @@ bool LLModelLoader::getSLMFilename(const std::string& model_filename, std::strin bool LLModelLoader::doLoadModel() { //first, look for a .slm file of the same name that was modified later - //than the .dae + //than the specified model file if (mTrySLM) { @@ -182,13 +183,13 @@ bool LLModelLoader::doLoadModel() llstat slm_status; if (LLFile::stat(slm_filename, &slm_status) == 0) { //slm file exists - llstat dae_status; - if (LLFile::stat(mFilename, &dae_status) != 0 || - dae_status.st_mtime < slm_status.st_mtime) + llstat model_file_status; + if (LLFile::stat(mFilename, &model_file_status) != 0 || + model_file_status.st_mtime < slm_status.st_mtime) { if (loadFromSLM(slm_filename)) { //slm successfully loaded, if this fails, fall through and - //try loading from dae + //try loading from model file mLod = -1; //successfully loading from an slm implicitly sets all //LoDs |
