From 836ddd0affbb2ed068f668ab22a60824d6faf0b5 Mon Sep 17 00:00:00 2001 From: "Asad M. Zaman" Date: Sat, 15 Nov 2003 02:32:22 +0000 Subject: [PATCH] I am confident that this version at least works for most models. Next step, move the vpools to the root, so that those will be written out first in the egg file. pluto is having order problem --- pandatool/src/softegg/softNodeDesc.cxx | 22 ++++++++-------------- 1 file changed, 8 insertions(+), 14 deletions(-) diff --git a/pandatool/src/softegg/softNodeDesc.cxx b/pandatool/src/softegg/softNodeDesc.cxx index fb95110edd..989bdf841c 100755 --- a/pandatool/src/softegg/softNodeDesc.cxx +++ b/pandatool/src/softegg/softNodeDesc.cxx @@ -380,11 +380,13 @@ void SoftNodeDesc:: get_transform(SAA_Scene *scene, EggGroup *egg_group, bool global) { // Get the model's matrix int scale_joint = 0; - + + /* if ( strstr( _parent->get_name().c_str(), "scale" ) != NULL ) { - scale_joint = 1; + scale_joint = 1; cout << "scale joint flag set!\n"; } + */ if (!global && _parent->is_joint() && !stec.flatten && !scale_joint) { @@ -410,10 +412,10 @@ get_transform(SAA_Scene *scene, EggGroup *egg_group, bool global) { matrix[1][0], matrix[1][1], matrix[1][2], matrix[1][3], matrix[2][0], matrix[2][1], matrix[2][2], matrix[2][3], matrix[3][0], matrix[3][1], matrix[3][2], matrix[3][3]); - // if (!m4d.almost_equal(LMatrix4d::ident_mat(), 0.0001)) { + if (!m4d.almost_equal(LMatrix4d::ident_mat(), 0.0001)) { egg_group->set_transform(m4d); cout << "set transform in egg_group\n"; - // } + } } return; } @@ -440,25 +442,17 @@ get_joint_transform(SAA_Scene *scene, EggGroup *egg_group, EggXfmSAnim *anim, b float i,j,k; float h,p,r; float x,y,z; - int size; - SAA_Boolean globalFlag = FALSE; - SAA_Boolean bigEndian; int scale_joint = 0; + /* if ( strstr( _parent->get_name().c_str(), "scale" ) != NULL ) { scale_joint = 1; cout << "scale joint flag set!\n"; } + */ cout << "\n\nanimating child " << name << endl; - SAA_elementGetUserDataSize( scene, skeletonPart, "GLOBAL", &size ); - - if ( size != 0 ) - SAA_elementGetUserData( scene, skeletonPart, "GLOBAL", - sizeof( SAA_Boolean), &bigEndian, (void *)&globalFlag ); - - // if ( global ) { if (_parent->is_joint() && !stec.flatten && !scale_joint ) { cout << "using local matrix\n";