summaryrefslogtreecommitdiff
path: root/indra/newview/llfloatermodelpreview.cpp
diff options
context:
space:
mode:
authorBrad Payne (Vir Linden) <vir@lindenlab.com>2016-08-17 16:31:28 -0400
committerBrad Payne (Vir Linden) <vir@lindenlab.com>2016-08-17 16:31:28 -0400
commit72d5ff36f56c4afee85f5863f64f237980341014 (patch)
tree3afd0fa622ad507e087d7b5b2d6724a71119cbec /indra/newview/llfloatermodelpreview.cpp
parent9044a8b8156e5812f99c39d35be096a35df8f6d0 (diff)
MAINT-6647 - ignore previously created slm files on model upload. SL-442 - change coloring for show bones, to highlight joint positions and rigging
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rw-r--r--indra/newview/llfloatermodelpreview.cpp17
1 files changed, 11 insertions, 6 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 0f0fafcce6..1fd2d429a7 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1656,12 +1656,11 @@ void LLModelPreview::saveUploadData(bool save_skinweights, bool save_joint_posit
if (!mLODFile[LLModel::LOD_HIGH].empty())
{
std::string filename = mLODFile[LLModel::LOD_HIGH];
-
- std::string::size_type i = filename.rfind(".");
- if (i != std::string::npos)
- {
- filename.replace(i, filename.size()-1, ".slm");
- saveUploadData(filename, save_skinweights, save_joint_positions);
+ std::string slm_filename;
+
+ if (LLModelLoader::getSLMFilename(filename, slm_filename))
+ {
+ saveUploadData(slm_filename, save_skinweights, save_joint_positions);
}
}
}
@@ -1818,6 +1817,12 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable
}
else
{
+ // For MAINT-6647, we have set force_disable_slm to true,
+ // which means this code path will never be taken. Trying to
+ // re-use SLM files has never worked properly; in particular,
+ // it tends to force the UI into strange checkbox options
+ // which cannot be altered.
+
//only try to load from slm if viewer is configured to do so and this is the
//initial model load (not an LoD or physics shape)
mModelLoader->mTrySLM = gSavedSettings.getBOOL("MeshImportUseSLM") && mUploadData.empty();