summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview')
-rwxr-xr-xindra/newview/llfloatermodelpreview.cpp23
1 files changed, 20 insertions, 3 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index eb0816adb5..7d60258ca4 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");
@@ -1316,7 +1315,25 @@ bool LLModelLoader::doLoadModel()
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 )
@@ -1500,7 +1517,7 @@ bool LLModelLoader::doLoadModel()
//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;
}