[Bf-blender-cvs] SVN commit: /data/svn/bf-blender [25638] branches/soc-2009-chingachgook/ source/blender/collada/DocumentImporter.cpp: COLLADA branch: fixed a small bug in bone anim import code.
Arystanbek Dyussenov
arystan.d at gmail.com
Thu Dec 31 15:31:43 CET 2009
Revision: 25638
http://projects.blender.org/plugins/scmsvn/viewcvs.php?view=rev&root=bf-blender&revision=25638
Author: kazanbas
Date: 2009-12-31 15:31:42 +0100 (Thu, 31 Dec 2009)
Log Message:
-----------
COLLADA branch: fixed a small bug in bone anim import code.
Modified Paths:
--------------
branches/soc-2009-chingachgook/source/blender/collada/DocumentImporter.cpp
Modified: branches/soc-2009-chingachgook/source/blender/collada/DocumentImporter.cpp
===================================================================
--- branches/soc-2009-chingachgook/source/blender/collada/DocumentImporter.cpp 2009-12-31 10:07:59 UTC (rev 25637)
+++ branches/soc-2009-chingachgook/source/blender/collada/DocumentImporter.cpp 2009-12-31 14:31:42 UTC (rev 25638)
@@ -624,6 +624,9 @@
if (parent && totchild == 1) {
copy_v3_v3(parent->tail, bone->head);
+ // not setting BONE_CONNECTED because this would lock child bone location with respect to parent
+ // bone->flag |= BONE_CONNECTED;
+
// XXX increase this to prevent "very" small bones?
const float epsilon = 0.000001f;
@@ -2430,7 +2433,7 @@
Bone *bone = get_named_bone((bArmature*)ob->data, bone_name);
if (!bone) {
- fprintf(stderr, "cannot find bone \"%s\"", bone_name);
+ fprintf(stderr, "cannot find bone \"%s\"\n", bone_name);
#ifdef ARMATURE_TEST
return NULL;
#else
@@ -2773,9 +2776,14 @@
// use bind matrix if available or calc "current" world mat
if (!armature_importer->get_joint_bind_mat(m, node)) {
- float temp[4][4];
- get_node_mat(temp, node, NULL, NULL);
- mul_m4_m4m4(m, temp, par);
+ if (par) {
+ float temp[4][4];
+ get_node_mat(temp, node, NULL, NULL);
+ mul_m4_m4m4(m, temp, par);
+ }
+ else {
+ get_node_mat(m, node, NULL, NULL);
+ }
}
COLLADAFW::NodePointerArray& children = node->getChildNodes();
More information about the Bf-blender-cvs
mailing list