summaryrefslogtreecommitdiff
path: root/indra/newview
diff options
context:
space:
mode:
authorLoren Shih <seraph@lindenlab.com>2010-11-23 12:04:27 -0500
committerLoren Shih <seraph@lindenlab.com>2010-11-23 12:04:27 -0500
commitd49d1def45482bccf4600a34bc2fd5693e05d329 (patch)
treee6eadcf9db118b5ab1fe240011df981a77a09103 /indra/newview
parentb8a0549ac2be032d33a4fa427c8e430cd6df0cc6 (diff)
parente3df3baff7aebd247737fd3dbcb382f3b12df10b (diff)
automated merge from mesh-development
Diffstat (limited to 'indra/newview')
-rw-r--r--indra/newview/llfloatermodelpreview.cpp34
-rw-r--r--indra/newview/llfloatermodelpreview.h1
2 files changed, 10 insertions, 25 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp
index 92c70c9eaf..68c7e3c1a2 100644
--- a/indra/newview/llfloatermodelpreview.cpp
+++ b/indra/newview/llfloatermodelpreview.cpp
@@ -1173,21 +1173,7 @@ void LLModelLoader::run()
}
- /*{
- LLMatrix4 rotation;
- if (up == UPAXISTYPE_X_UP)
- {
- rotation.initRotation(0.0f, 90.0f * DEG_TO_RAD, 0.0f);
- }
- else if (up == UPAXISTYPE_Z_UP)
- {
- rotation.initRotation(90.0f * DEG_TO_RAD, 90.0f * DEG_TO_RAD, 0.0f);
- }
-
- rotation *= model->mBindShapeMatrix;
- model->mBindShapeMatrix = rotation;
- }*/
-
+
//The joint transfom map that we'll populate below
std::map<std::string,LLMatrix4> jointTransforms;
jointTransforms.clear();
@@ -1195,6 +1181,7 @@ void LLModelLoader::run()
//Some collada setup for accessing the skeleton
daeElement* pElement = 0;
dae.getDatabase()->getElement( &pElement, 0, 0, "skeleton" );
+
//Try to get at the skeletal instance controller
domInstance_controller::domSkeleton* pSkeleton = daeSafeCast<domInstance_controller::domSkeleton>( pElement );
bool missingSkeletonOrScene = false;
@@ -1281,8 +1268,6 @@ void LLModelLoader::run()
//Store the joint transform w/respect to it's name.
jointTransforms[(*jointIt).second.c_str()] = workingTransform;
}
-
-
}
//If anything failed in regards to extracting the skeleton, joints or translation id,
@@ -1317,17 +1302,16 @@ void LLModelLoader::run()
llwarns<<"Tried to apply joint position from .dae, but it did not exist in the avatar rig." << llendl;
}
//Reposition the avatars pelvis (avPos+offset)
- if ( lookingForJoint == "mPelvis" )
- {
- const LLVector3& pos = gAgentAvatarp->getCharacterPosition();
- gAgentAvatarp->setPelvisOffset( true, jointTransform.getTranslation() );
- gAgentAvatarp->setPosition( pos + jointTransform.getTranslation() );
- }
+ //if ( lookingForJoint == "mPelvis" )
+ //{
+ // const LLVector3& pos = gAgentAvatarp->getCharacterPosition();
+ // gAgentAvatarp->setPelvisOffset( true, jointTransform.getTranslation() );
+ // gAgentAvatarp->setPosition( pos + jointTransform.getTranslation() );
+ //}
}
}
} //missingSkeletonOrScene
-
-
+
domSkin::domJoints* joints = skin->getJoints();
domInputLocal_Array& joint_input = joints->getInput_array();
diff --git a/indra/newview/llfloatermodelpreview.h b/indra/newview/llfloatermodelpreview.h
index 7e9978f330..05106644dc 100644
--- a/indra/newview/llfloatermodelpreview.h
+++ b/indra/newview/llfloatermodelpreview.h
@@ -97,6 +97,7 @@ public:
LLColor4 getDaeColor(daeElement* element);
daeElement* getChildFromElement( daeElement* pElement, std::string const & name );
+
bool isNodeAJoint( domNode* pNode );
void processJointNode( domNode* pNode, std::map<std::string,LLMatrix4>& jointTransforms );
void extractTranslation( domTranslate* pTranslate, LLMatrix4& transform );