SH-1169 Fix for convex decompositions not working post mesh-asset-deprecation work. (also default SLM usage to on)
parent
4df70b5523
commit
12e08417bf
|
|
@ -1798,7 +1798,7 @@ bool LLModel::loadModel(std::istream& is)
|
|||
is.seekg(cur_pos);
|
||||
}
|
||||
|
||||
if (lod == LLModel::LOD_PHYSICS)
|
||||
if (lod == LLModel::LOD_HIGH || lod == LLModel::LOD_PHYSICS)
|
||||
{
|
||||
std::ios::pos_type cur_pos = is.tellg();
|
||||
loadDecomposition(header, is);
|
||||
|
|
@ -2015,7 +2015,7 @@ LLModel::Decomposition::Decomposition(LLSD& data)
|
|||
|
||||
void LLModel::Decomposition::fromLLSD(LLSD& decomp)
|
||||
{
|
||||
if (decomp.has("HullList"))
|
||||
if (decomp.has("HullList") && decomp.has("Positions"))
|
||||
{
|
||||
// updated for const-correctness. gcc is picky about this type of thing - Nyx
|
||||
const LLSD::Binary& hulls = decomp["HullList"].asBinary();
|
||||
|
|
|
|||
|
|
@ -5587,7 +5587,7 @@
|
|||
<key>Type</key>
|
||||
<string>Boolean</string>
|
||||
<key>Value</key>
|
||||
<real>0</real>
|
||||
<real>1</real>
|
||||
</map>
|
||||
<key>MeshUploadLogXML</key>
|
||||
<map>
|
||||
|
|
|
|||
|
|
@ -1968,10 +1968,6 @@ bool LLModelLoader::loadFromSLM(const std::string& filename)
|
|||
mPreview->critiqueRigForUploadApplicability( loaded_model->mSkinInfo.mJointNames );
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
@ -1980,6 +1976,12 @@ 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;
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue