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:
authorGaia Clary <gaia.clary@machinimatrix.org>2013-07-18 00:22:08 +0400
committerGaia Clary <gaia.clary@machinimatrix.org>2013-07-18 00:22:08 +0400
commitf2db6949c2de2a45c5864384d14f669779a8d61a (patch)
tree8dc1ff4509017bf1bbc4fa0b25e734c9a13f84bc
parent64a172907ac12a940a4bcd0c2ad27e294c2f6192 (diff)
Fix: #36184 Collada import/export... leaf bone size was not set as needed.
-rw-r--r--source/blender/collada/ArmatureImporter.cpp20
1 files changed, 12 insertions, 8 deletions
diff --git a/source/blender/collada/ArmatureImporter.cpp b/source/blender/collada/ArmatureImporter.cpp
index 0cd48707566..5c69c7b1e63 100644
--- a/source/blender/collada/ArmatureImporter.cpp
+++ b/source/blender/collada/ArmatureImporter.cpp
@@ -133,11 +133,7 @@ void ArmatureImporter::create_bone(SkinInfo *skin, COLLADAFW::Node *node, EditBo
add_v3_v3v3(bone->tail, bone->head, vec);
// set parent tail
- 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;
+ if (parent) {
// XXX increase this to prevent "very" small bones?
const float epsilon = 0.000001f;
@@ -148,9 +144,17 @@ void ArmatureImporter::create_bone(SkinInfo *skin, COLLADAFW::Node *node, EditBo
leaf_bone_length = length;
}
- // treat zero-sized bone like a leaf bone
- if (length <= epsilon) {
- add_leaf_bone(parent_mat, parent, node);
+ if (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;
+
+
+ // treat zero-sized bone like a leaf bone
+ if (length <= epsilon) {
+ add_leaf_bone(parent_mat, parent, node);
+ }
}
}