diff options
-rw-r--r-- | indra/llprimitive/llmodel.cpp | 7 | ||||
-rw-r--r-- | indra/llprimitive/llmodel.h | 3 | ||||
-rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 8 |
3 files changed, 7 insertions, 11 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp index 34b81c9672..d3f42c63d5 100644 --- a/indra/llprimitive/llmodel.cpp +++ b/indra/llprimitive/llmodel.cpp @@ -1347,7 +1347,8 @@ LLSD LLModel::writeModel( const LLModel::Decomposition& decomp, BOOL upload_skin, BOOL upload_joints, - BOOL nowrite) + BOOL nowrite, + BOOL as_slm) { LLSD mdl; @@ -1371,8 +1372,8 @@ LLSD LLModel::writeModel( !decomp.mHull.empty()) { mdl["physics_convex"] = decomp.asLLSD(); - if (!decomp.mHull.empty()) - { //convex decomposition exists, physics mesh will not be used + if (!decomp.mHull.empty() && !as_slm) + { //convex decomposition exists, physics mesh will not be used (unless this is an slm file) model[LLModel::LOD_PHYSICS] = NULL; } } diff --git a/indra/llprimitive/llmodel.h b/indra/llprimitive/llmodel.h index cd9f76fcb7..1ece877f0f 100644 --- a/indra/llprimitive/llmodel.h +++ b/indra/llprimitive/llmodel.h @@ -137,7 +137,8 @@ public: const LLModel::Decomposition& decomp, BOOL upload_skin, BOOL upload_joints, - BOOL nowrite = FALSE); + BOOL nowrite = FALSE, + BOOL as_slm = FALSE); static LLSD writeModelToStream( std::ostream& ostr, diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index a452bcebb2..ab370a221f 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -2034,12 +2034,6 @@ bool LLModelLoader::loadFromSLM(const std::string& filename) return false; } - if (model[LLModel::LOD_PHYSICS].empty()) - { //no explicit physics block, copy HIGH_LOD into physics array to recover convex decomp - model[LLModel::LOD_PHYSICS] = model[LLModel::LOD_HIGH]; - } - - //load instance list model_instance_list instance_list; @@ -3248,7 +3242,7 @@ void LLModelPreview::saveUploadData(const std::string& filename, bool save_skinw instance.mLOD[LLModel::LOD_LOW], instance.mLOD[LLModel::LOD_IMPOSTOR], decomp, - save_skinweights, save_joint_positions); + save_skinweights, save_joint_positions, FALSE, TRUE); data["mesh"][instance.mModel->mLocalID] = str.str(); |