From 43382f2849d5b2e8a5826a7a7d4f41254ab41735 Mon Sep 17 00:00:00 2001 From: prep linden Date: Mon, 22 Nov 2010 13:16:39 -0500 Subject: merge of earlier code that got stomped from a previous merge --- indra/newview/llfloatermodelpreview.cpp | 22 +++------------------- 1 file changed, 3 insertions(+), 19 deletions(-) (limited to 'indra/newview/llfloatermodelpreview.cpp') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 92c70c9eaf..85cc205dab 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 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( 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, @@ -1326,8 +1311,7 @@ void LLModelLoader::run() } } } //missingSkeletonOrScene - - + domSkin::domJoints* joints = skin->getJoints(); domInputLocal_Array& joint_input = joints->getInput_array(); -- cgit v1.2.3 From e3df3baff7aebd247737fd3dbcb382f3b12df10b Mon Sep 17 00:00:00 2001 From: prep linden Date: Tue, 23 Nov 2010 09:52:31 -0500 Subject: Fix for SH-479 --- indra/newview/llfloatermodelpreview.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'indra/newview/llfloatermodelpreview.cpp') diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index 85cc205dab..68c7e3c1a2 100644 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1302,12 +1302,12 @@ 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 -- cgit v1.2.3