Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorArystanbek Dyussenov <arystan.d@gmail.com>2009-12-31 17:31:42 +0300
committerArystanbek Dyussenov <arystan.d@gmail.com>2009-12-31 17:31:42 +0300
commit18eb6d98274126c7c26b85be8cba7a49b3699bab (patch)
treeac91cd0632dada99970585ae77536574440132c8 /source/blender/collada
parent4654afb34c040e54d44308ad338ed5ba14aec176 (diff)
COLLADA branch: fixed a small bug in bone anim import code.
Diffstat (limited to 'source/blender/collada')
-rw-r--r--source/blender/collada/DocumentImporter.cpp16
1 files changed, 12 insertions, 4 deletions
diff --git a/source/blender/collada/DocumentImporter.cpp b/source/blender/collada/DocumentImporter.cpp
index 9ebcc8b191f..3e64f29247b 100644
--- a/source/blender/collada/DocumentImporter.cpp
+++ b/source/blender/collada/DocumentImporter.cpp
@@ -624,6 +624,9 @@ private:
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 @@ public:
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 @@ public:
// 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();