summaryrefslogtreecommitdiff
path: root/indra
diff options
context:
space:
mode:
Diffstat (limited to 'indra')
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp23
-rw-r--r--indra/newview/llvoavatar.cpp4
-rw-r--r--indra/newview/llvovolume.cpp4
3 files changed, 26 insertions, 5 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 6bf9fdfb9b..190af6deef 100755
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1070,7 +1070,6 @@ LLModelLoader::LLModelLoader(std::string filename, S32 lod, LLModelPreview* prev
mMasterJointList.push_front("mChest");
mMasterJointList.push_front("mNeck");
mMasterJointList.push_front("mHead");
- mMasterJointList.push_front("mSkull");
mMasterJointList.push_front("mCollarLeft");
mMasterJointList.push_front("mShoulderLeft");
mMasterJointList.push_front("mElbowLeft");
@@ -1298,7 +1297,25 @@ void LLModelLoader::run()
bool missingSkeletonOrScene = false;
//If no skeleton, do a breadth-first search to get at specific joints
- if ( !pSkeleton )
+ bool rootNode = false;
+ bool skeletonWithNoRootNode = false;
+
+ //Need to test for a skeleton that does not have a root node
+ //This occurs when your instance controller does not have an associated scene
+ if ( pSkeleton )
+ {
+ daeElement* pSkeletonRootNode = pSkeleton->getValue().getElement();
+ if ( pSkeletonRootNode )
+ {
+ rootNode = true;
+ }
+ else
+ {
+ skeletonWithNoRootNode = true;
+ }
+
+ }
+ if ( !pSkeleton || !rootNode )
{
daeElement* pScene = root->getDescendant("visual_scene");
if ( !pScene )
@@ -1482,7 +1499,7 @@ void LLModelLoader::run()
//a skinned asset attached to a node in a file that contains an entire skeleton,
//but does not use the skeleton).
mPreview->setRigValid( doesJointArrayContainACompleteRig( model->mJointList ) );
- if ( !model->mJointList.empty() && mPreview->isRigValid() )
+ if ( !skeletonWithNoRootNode && !model->mJointList.empty() && mPreview->isRigValid() )
{
mResetJoints = true;
}
diff --git a/indra/newview/llvoavatar.cpp b/indra/newview/llvoavatar.cpp
index 5f0e4bcded..87a2c949b1 100644
--- a/indra/newview/llvoavatar.cpp
+++ b/indra/newview/llvoavatar.cpp
@@ -6032,7 +6032,9 @@ void LLVOAvatar::cleanupAttachedMesh( LLViewerObject* pVO )
if ( pSkinData )
{
const int jointCnt = pSkinData->mJointNames.size();
- bool fullRig = ( jointCnt>=20 ) ? true : false;
+ //19 is a magic number derived from the master joint list
+ //TODO# move that joint list into the bone controller and query
+ bool fullRig = ( jointCnt>=19 ) ? true : false;
if ( fullRig )
{
const int bindCnt = pSkinData->mAlternateBindMatrix.size();
diff --git a/indra/newview/llvovolume.cpp b/indra/newview/llvovolume.cpp
index 43d8b9d356..0e6110549e 100644
--- a/indra/newview/llvovolume.cpp
+++ b/indra/newview/llvovolume.cpp
@@ -3942,7 +3942,9 @@ void LLVolumeGeometryManager::rebuildGeom(LLSpatialGroup* group)
{
const int jointCnt = pSkinData->mJointNames.size();
const int pelvisZOffset = pSkinData->mPelvisOffset;
- bool fullRig = (jointCnt>=20) ? true : false;
+ //19 is a magic number derived from the master joint list
+ //TODO# move that joint list into the bone controller and query
+ bool fullRig = (jointCnt>=19) ? true : false;
if ( fullRig )
{
for ( int i=0; i<jointCnt; ++i )