diff options
Diffstat (limited to 'indra')
| -rw-r--r-- | indra/newview/llfloatermodelpreview.cpp | 16 | ||||
| -rw-r--r-- | indra/newview/llfloatermodelpreview.h | 1 | ||||
| -rw-r--r-- | indra/newview/llmeshrepository.cpp | 2 | 
3 files changed, 13 insertions, 6 deletions
| diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 96a03ce2a6..f76f39222b 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1090,9 +1090,7 @@ void LLFloaterModelPreview::onPhysicsUseLOD(LLUICtrl* ctrl, void* userdata)      }      else if (which_mode == cube_mode)      { -        std::string path = gDirUtilp->getAppRODataDir(); -        gDirUtilp->append(path, "cube.dae"); -        sInstance->loadModel(LLModel::LOD_PHYSICS, path); +        sInstance->loadModel(LLModel::LOD_PHYSICS, getBoundingBoxCubePath());      }      LLModelPreview *model_preview = sInstance->mModelPreview; @@ -1344,6 +1342,13 @@ std::string get_source_file_format(const std::string& filename)      }  } +std::string LLFloaterModelPreview::getBoundingBoxCubePath() +{ +    std::string path = gDirUtilp->getAppRODataDir(); +    gDirUtilp->append(path, "cube.dae"); +    return path; +} +  void LLFloaterModelPreview::fillLODSourceStatistics(LLFloaterModelPreview::lod_sources_map_t& lod_sources) const  {      lod_sources.clear(); @@ -1388,10 +1393,9 @@ void LLFloaterModelPreview::fillLODSourceStatistics(LLFloaterModelPreview::lod_s      else      {          const std::string& file = mModelPreview->mLODFile[LLModel::LOD_PHYSICS]; -        if (std::string::npos == file.rfind("cube.dae")) +        const std::string cube = getBoundingBoxCubePath(); +        if (cube != file) // check for "cube.dae"          { -            // There is a chance it will misfire if someone tries to upload a cube.dae mesh, -            // but should be negligible enough.              lod_sources["physics"] = get_source_file_format(file);          }          else diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h index 982f36c46e..20e5b2666a 100644 --- a/indra/newview/llfloatermodelpreview.h +++ b/indra/newview/llfloatermodelpreview.h @@ -223,6 +223,7 @@ private:      void createSmoothComboBox(LLComboBox* combo_box, float min, float max); +    static std::string getBoundingBoxCubePath();      typedef std::map<std::string, std::string> lod_sources_map_t;      void fillLODSourceStatistics(lod_sources_map_t& lod_sources) const; diff --git a/indra/newview/llmeshrepository.cpp b/indra/newview/llmeshrepository.cpp index fd3360b234..9e8ed3bb43 100644 --- a/indra/newview/llmeshrepository.cpp +++ b/indra/newview/llmeshrepository.cpp @@ -2685,6 +2685,8 @@ void dump_llsd_to_file(const LLSD& content, std::string filename)  {      if (gSavedSettings.getBOOL("MeshUploadLogXML"))      { +        filename = gDirUtilp->getExpandedFilename(LL_PATH_LOGS, +            filename);          llofstream of(filename.c_str());          LLSDSerialize::toPrettyXML(content,of);      } | 
