export bone transform matrix with sid.

This commit is contained in:
Sukhitha Prabhath Jayathilake 2011-08-08 16:38:57 +00:00
parent 60eec89cda
commit cbec4e2768
2 changed files with 7 additions and 2 deletions

@ -586,7 +586,7 @@ void AnimationExporter::exportAnimations(Scene *sce)
addSampler(sampler);
std::string target = translate_id(ob_name + "_" + bone_name) + "/transform";
std::string target = translate_id(bone_name) + "/transform";
addChannel(COLLADABU::URI(empty, sampler_id), target);
closeAnimation();

@ -48,8 +48,13 @@ void TransformWriter::add_node_transform(COLLADASW::Node& node, float mat[][4],
copy_m4_m4(local, mat);
}
double dmat[4][4];
for ( int i = 0 ; i< 4 ; i ++ )
for ( int j =0 ; j < 4 ; j++)
dmat[i][j] = (double)local[i][j];
TransformBase::decompose(local, loc, rot, NULL, scale);
node.addMatrix("transform",dmat);
add_transform(node, loc, rot, scale);
}