summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xindra/llcharacter/lljoint.h2
-rw-r--r--indra/llprimitive/lldaeloader.cpp4
-rw-r--r--indra/llprimitive/lldaeloader.h1
-rw-r--r--indra/llprimitive/llmodelloader.cpp17
-rw-r--r--indra/llprimitive/llmodelloader.h4
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp1
6 files changed, 24 insertions, 5 deletions
diff --git a/indra/llcharacter/lljoint.h b/indra/llcharacter/lljoint.h
index 113742ad74..2a8ebed408 100755
--- a/indra/llcharacter/lljoint.h
+++ b/indra/llcharacter/lljoint.h
@@ -42,7 +42,7 @@
const S32 LL_CHARACTER_MAX_JOINTS_PER_MESH = 15;
// BENTO JOINT COUNT LIMIT
const U32 LL_CHARACTER_MAX_JOINTS = 152; // must be divisible by 4!
-const U32 LL_MAX_JOINTS_PER_MESH_OBJECT = 132;
+const U32 LL_MAX_JOINTS_PER_MESH_OBJECT = 110;
// FIXME BENTO - these should be higher than the joint_num of any
// other joint, to avoid conflicts in updateMotionsByType()
diff --git a/indra/llprimitive/lldaeloader.cpp b/indra/llprimitive/lldaeloader.cpp
index c50db824af..c7eaba412d 100644
--- a/indra/llprimitive/lldaeloader.cpp
+++ b/indra/llprimitive/lldaeloader.cpp
@@ -811,6 +811,7 @@ LLDAELoader::LLDAELoader(
JointTransformMap& jointTransformMap,
JointNameSet& jointsFromNodes,
JointNameSet& legalJointNames,
+ U32 maxJointsPerMesh,
U32 modelLimit)
: LLModelLoader(
filename,
@@ -822,7 +823,8 @@ LLDAELoader::LLDAELoader(
opaque_userdata,
jointTransformMap,
jointsFromNodes,
- legalJointNames),
+ legalJointNames,
+ maxJointsPerMesh),
mGeneratedModelLimit(modelLimit)
{
}
diff --git a/indra/llprimitive/lldaeloader.h b/indra/llprimitive/lldaeloader.h
index 79856741db..ebc6acf18f 100644
--- a/indra/llprimitive/lldaeloader.h
+++ b/indra/llprimitive/lldaeloader.h
@@ -57,6 +57,7 @@ public:
JointTransformMap& jointTransformMap,
JointNameSet& jointsFromNodes,
JointNameSet& legalJointNames,
+ U32 maxJointsPerMesh,
U32 modelLimit);
virtual ~LLDAELoader() ;
diff --git a/indra/llprimitive/llmodelloader.cpp b/indra/llprimitive/llmodelloader.cpp
index 9cf0f10a7e..4acf695f22 100644
--- a/indra/llprimitive/llmodelloader.cpp
+++ b/indra/llprimitive/llmodelloader.cpp
@@ -111,12 +111,14 @@ LLModelLoader::LLModelLoader(
void* opaque_userdata,
JointTransformMap& jointTransformMap,
JointNameSet& jointsFromNodes,
- JointNameSet& legalJointNames)
+ JointNameSet& legalJointNames,
+ U32 maxJointsPerMesh)
: mJointList( jointTransformMap )
, mJointsFromNode( jointsFromNodes )
, LLThread("Model Loader")
, mFilename(filename)
, mLod(lod)
+, mTrySLM(false)
, mFirstTransform(TRUE)
, mNumOfFetchingTextures(0)
, mLoadCallback(load_cb)
@@ -124,9 +126,13 @@ LLModelLoader::LLModelLoader(
, mTextureLoadFunc(texture_load_func)
, mStateCallback(state_cb)
, mOpaqueData(opaque_userdata)
+, mRigParityWithScene(false)
+, mRigValidJointUpload(false)
+, mLegacyRigValid(false)
, mNoNormalize(false)
, mNoOptimize(false)
, mCacheOnlyHitIfRigged(false)
+, mMaxJointsPerMesh(maxJointsPerMesh)
{
// Recognize all names we've been told are legal.
for (JointNameSet::iterator joint_name_it = legalJointNames.begin();
@@ -456,7 +462,14 @@ void LLModelLoader::loadModelCallback()
void LLModelLoader::critiqueRigForUploadApplicability( const std::vector<std::string> &jointListFromAsset )
{
critiqueJointToNodeMappingFromScene();
-
+
+ if (jointListFromAsset.size()>mMaxJointsPerMesh)
+ {
+ LL_WARNS() << "Rigged to " << jointListFromAsset.size() << " joints, max is " << mMaxJointsPerMesh << LL_ENDL;
+ LL_WARNS() << "Skinning disabled" << LL_ENDL;
+ return;
+ }
+
//Determines the following use cases for a rig:
//1. It is suitable for upload with skin weights & joint positions, or
//2. It is suitable for upload as standard av with just skin weights
diff --git a/indra/llprimitive/llmodelloader.h b/indra/llprimitive/llmodelloader.h
index 894de2c76f..0b5d7168fa 100644
--- a/indra/llprimitive/llmodelloader.h
+++ b/indra/llprimitive/llmodelloader.h
@@ -117,6 +117,7 @@ public:
JointMap mJointMap;
JointTransformMap& mJointList;
JointNameSet& mJointsFromNode;
+ U32 mMaxJointsPerMesh;
LLModelLoader(
std::string filename,
@@ -128,7 +129,8 @@ public:
void* opaque_userdata,
JointTransformMap& jointTransformMap,
JointNameSet& jointsFromNodes,
- JointNameSet& legalJointNames);
+ JointNameSet& legalJointNames,
+ U32 maxJointsPerMesh);
virtual ~LLModelLoader() ;
virtual void setNoNormalize() { mNoNormalize = true; }
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 9c72238d87..a8069dd569 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1786,6 +1786,7 @@ void LLModelPreview::loadModel(std::string filename, S32 lod, bool force_disable
mJointTransformMap,
mJointsFromNode,
legal_joint_names,
+ LLSkinningUtil::getMaxJointCount(),
gSavedSettings.getU32("ImporterModelLimit"));
if (force_disable_slm)