diff options
author | prep linden <prep@lindenlab.com> | 2011-01-10 11:04:13 -0500 |
---|---|---|
committer | prep linden <prep@lindenlab.com> | 2011-01-10 11:04:13 -0500 |
commit | e8423f150ffdd965da5b90ee625a8afc1519626f (patch) | |
tree | 78de6aa1af2fdb86e1efb6d7f83d0f66b7a45bf1 /indra/newview/llfloatermodelpreview.cpp | |
parent | f71228bf90b54f02f52b315d8a81c0cf296ba4ae (diff) |
Added support for parsing a matrix sids translation elements for joints
Diffstat (limited to 'indra/newview/llfloatermodelpreview.cpp')
-rwxr-xr-x | indra/newview/llfloatermodelpreview.cpp | 20 |
1 files changed, 19 insertions, 1 deletions
diff --git a/indra/newview/llfloatermodelpreview.cpp b/indra/newview/llfloatermodelpreview.cpp index c0b5b7cfa6..57b648769d 100755 --- a/indra/newview/llfloatermodelpreview.cpp +++ b/indra/newview/llfloatermodelpreview.cpp @@ -1789,7 +1789,25 @@ void LLModelLoader::processJointNode( domNode* pNode, std::map<std::string,LLMat daeElement* pTranslateElement = getChildFromElement( pNode, "translate" ); if ( !pTranslateElement || pTranslateElement->typeID() != domTranslate::ID() ) { - llwarns<< "The found element is not a translate node" <<llendl; + //llwarns<< "The found element is not a translate node" <<llendl; + daeSIDResolver jointResolver( pNode, "./matrix" ); + domMatrix* pMatrix = daeSafeCast<domMatrix>( jointResolver.getElement() ); + if ( pMatrix ) + { + //llinfos<<"A matrix SID was however found!"<<llendl; + domFloat4x4 domArray = pMatrix->getValue(); + for ( int i = 0; i < 4; i++ ) + { + for( int j = 0; j < 4; j++ ) + { + workingTransform.mMatrix[i][j] = domArray[i + j*4]; + } + } + } + else + { + llwarns<< "The found element is not translate or matrix node - most likely a corrupt export!" <<llendl; + } } else { |