diff options
author | Sukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com> | 2011-06-26 19:35:02 +0400 |
---|---|---|
committer | Sukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com> | 2011-06-26 19:35:02 +0400 |
commit | 12e5d69af0cbb7c42601ea2541a9bdd536147d42 (patch) | |
tree | 45deb653f26454fc8793ffda1224dd0ce3a9b7f3 /source/blender/collada/AnimationImporter.cpp | |
parent | 10d775df3d31ce7622ebb74ed7276cff5f1ffe90 (diff) |
pose channel -> pose matrix import ( in progress )
Diffstat (limited to 'source/blender/collada/AnimationImporter.cpp')
-rw-r--r-- | source/blender/collada/AnimationImporter.cpp | 34 |
1 files changed, 32 insertions, 2 deletions
diff --git a/source/blender/collada/AnimationImporter.cpp b/source/blender/collada/AnimationImporter.cpp index 69beac653d2..3b33ad0dee6 100644 --- a/source/blender/collada/AnimationImporter.cpp +++ b/source/blender/collada/AnimationImporter.cpp @@ -705,8 +705,8 @@ void AnimationImporter::translate_Animations_NEW ( COLLADAFW::Node * node , return; } - - /*float irest_dae[4][4]; + /* + float irest_dae[4][4]; float rest[4][4], irest[4][4]; if (is_joint) { @@ -776,6 +776,36 @@ void AnimationImporter::translate_Animations_NEW ( COLLADAFW::Node * node , ob->rotmode = ROT_MODE_EUL; } } + // if (is_joint) + //{ + // float mat[4][4]; + // float obmat[4][4]; + + // // object-space + // get_node_mat(obmat, node, NULL, NULL); + // bPoseChannel *chan = get_pose_channel(ob->pose, bone_name); + // + // bArmature * arm = (bArmature *) ob->data; + // + // Bone *cur = get_named_bone( arm , bone_name ); + + // if (cur->parent){ + // COLLADAFW::Node * parent = armature_importer->joint_parent_map.find(node->getUniqueId()); + // float[4][4] parent_mat; + // get_node_mat ( parent_mat, parent, NULL, NULL ); + // mul_m4_m4m4(mat, obmat, parent_mat); + // bPoseChannel *parchan = get_pose_channel(ob->pose, cur->parent->name); + // if ( parchan && chan) + // mul_m4_m4m4(pchan->pose_mat, mat , parchan->pose_mat); + // } + // else { + // copy_m4_m4(mat, obmat); + // float invObmat[4][4]; + // invert_m4_m4(invObmat, ob->obmat); + // if(pchan) + // mul_m4_m4m4(pchan->pose_mat, mat, invObmat); + // } + //} } } |