summaryrefslogtreecommitdiff
path: root/indra/llprimitive
diff options
context:
space:
mode:
authorAndrey Lihatskiy <alihatskiy@productengine.com>2021-04-01 20:49:26 +0300
committerAndrey Lihatskiy <alihatskiy@productengine.com>2021-04-01 20:49:26 +0300
commitb52384d9ef81ed91b52db853af349a1a8ec8bfdb (patch)
treeaa6d272de0228428d0217aa7f61fbbc84eddb5da /indra/llprimitive
parent19ff86fabd84ba45bbbdfd1fa5393fb9ab89dddf (diff)
parent167e45e309ebeaccb346b8ca05884b8e10bf05eb (diff)
Merge branch 'master' into DRTVWR-522-maint
# Conflicts: # indra/newview/lltoolpie.cpp
Diffstat (limited to 'indra/llprimitive')
-rw-r--r--indra/llprimitive/llmodel.cpp30
1 files changed, 19 insertions, 11 deletions
diff --git a/indra/llprimitive/llmodel.cpp b/indra/llprimitive/llmodel.cpp
index a2d9b4cd9b..702a1b5238 100644
--- a/indra/llprimitive/llmodel.cpp
+++ b/indra/llprimitive/llmodel.cpp
@@ -434,7 +434,7 @@ void LLModel::generateNormals(F32 angle_cutoff)
if (vol_face.mNumIndices > 65535)
{
- LL_WARNS() << "Too many vertices for normal generation to work." << LL_ENDL;
+ LL_WARNS("MESHSKININFO") << "Too many vertices for normal generation to work." << LL_ENDL;
continue;
}
@@ -1100,7 +1100,7 @@ bool LLModel::loadModel(std::istream& is)
{
if (!LLSDSerialize::fromBinary(header, is, 1024*1024*1024))
{
- LL_WARNS() << "Mesh header parse error. Not a valid mesh asset!" << LL_ENDL;
+ LL_WARNS("MESHSKININFO") << "Mesh header parse error. Not a valid mesh asset!" << LL_ENDL;
return false;
}
}
@@ -1132,7 +1132,7 @@ bool LLModel::loadModel(std::istream& is)
if (header[lod_name[lod]]["offset"].asInteger() == -1 ||
header[lod_name[lod]]["size"].asInteger() == 0 )
{ //cannot load requested LOD
- LL_WARNS() << "LoD data is invalid!" << LL_ENDL;
+ LL_WARNS("MESHSKININFO") << "LoD data is invalid!" << LL_ENDL;
return false;
}
@@ -1195,7 +1195,7 @@ bool LLModel::loadModel(std::istream& is)
}
else
{
- LL_WARNS() << "unpackVolumeFaces failed!" << LL_ENDL;
+ LL_WARNS("MESHSKININFO") << "unpackVolumeFaces failed!" << LL_ENDL;
}
return false;
@@ -1223,7 +1223,7 @@ bool LLModel::isMaterialListSubset( LLModel* ref )
if (!foundRef)
{
- LL_INFOS() << "Could not find material " << mMaterialList[src] << " in reference model " << ref->mLabel << LL_ENDL;
+ LL_INFOS("MESHSKININFO") << "Could not find material " << mMaterialList[src] << " in reference model " << ref->mLabel << LL_ENDL;
return false;
}
}
@@ -1259,7 +1259,7 @@ bool LLModel::matchMaterialOrder(LLModel* ref, int& refFaceCnt, int& modelFaceCn
bool isASubset = isMaterialListSubset( ref );
if ( !isASubset )
{
- LL_INFOS()<<"Material of model is not a subset of reference."<<LL_ENDL;
+ LL_INFOS("MESHSKININFO")<<"Material of model is not a subset of reference."<<LL_ENDL;
return false;
}
@@ -1398,6 +1398,14 @@ void LLMeshSkinInfo::fromLLSD(LLSD& skin)
mInvBindMatrix.push_back(mat);
}
+
+ if (mJointNames.size() != mInvBindMatrix.size())
+ {
+ LL_WARNS("MESHSKININFO") << "Joints vs bind matrix count mismatch. Dropping joint bindings." << LL_ENDL;
+ mJointNames.clear();
+ mJointNums.clear();
+ mInvBindMatrix.clear();
+ }
}
if (skin.has("bind_shape_matrix"))
@@ -1842,14 +1850,14 @@ bool validate_face(const LLVolumeFace& face)
{
if (face.mIndices[i] >= face.mNumVertices)
{
- LL_WARNS() << "Face has invalid index." << LL_ENDL;
+ LL_WARNS("MESHSKININFO") << "Face has invalid index." << LL_ENDL;
return false;
}
}
if (face.mNumIndices % 3 != 0 || face.mNumIndices == 0)
{
- LL_WARNS() << "Face has invalid number of indices." << LL_ENDL;
+ LL_WARNS("MESHSKININFO") << "Face has invalid number of indices." << LL_ENDL;
return false;
}
@@ -1879,7 +1887,7 @@ bool validate_model(const LLModel* mdl)
{
if (mdl->getNumVolumeFaces() == 0)
{
- LL_WARNS() << "Model has no faces!" << LL_ENDL;
+ LL_WARNS("MESHSKININFO") << "Model has no faces!" << LL_ENDL;
return false;
}
@@ -1887,13 +1895,13 @@ bool validate_model(const LLModel* mdl)
{
if (mdl->getVolumeFace(i).mNumVertices == 0)
{
- LL_WARNS() << "Face has no vertices." << LL_ENDL;
+ LL_WARNS("MESHSKININFO") << "Face has no vertices." << LL_ENDL;
return false;
}
if (mdl->getVolumeFace(i).mNumIndices == 0)
{
- LL_WARNS() << "Face has no indices." << LL_ENDL;
+ LL_WARNS("MESHSKININFO") << "Face has no indices." << LL_ENDL;
return false;
}