diff options
author | Sukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com> | 2011-08-18 23:16:36 +0400 |
---|---|---|
committer | Sukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com> | 2011-08-18 23:16:36 +0400 |
commit | 2ee74be88cb045d403bc5145647da4262f131077 (patch) | |
tree | 11a29ffe144d930c89cad8f65c59f5fbc0cad7c5 /source/blender/collada/ArmatureExporter.cpp | |
parent | 475e0b8c0288e6f55d89d19489534884335744c4 (diff) |
Blender tip profile for bones with 2 or more children.
Diffstat (limited to 'source/blender/collada/ArmatureExporter.cpp')
-rw-r--r-- | source/blender/collada/ArmatureExporter.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/source/blender/collada/ArmatureExporter.cpp b/source/blender/collada/ArmatureExporter.cpp index 1c81c0b6e76..753d57b5af8 100644 --- a/source/blender/collada/ArmatureExporter.cpp +++ b/source/blender/collada/ArmatureExporter.cpp @@ -177,7 +177,7 @@ void ArmatureExporter::add_bone_node(Bone *bone, Object *ob_arm) node.setNodeName(node_name); node.setNodeSid(node_sid); - if ( bone->childbase.first == NULL ) + if ( bone->childbase.first == NULL || BLI_countlist(&(bone->childbase))>=2) add_blender_leaf_bone( bone, ob_arm , node ); else{ node.start(); @@ -202,6 +202,9 @@ void ArmatureExporter::add_blender_leaf_bone(Bone *bone, Object *ob_arm, COLLADA node.addExtraTechniqueParameter("blender", "tip_y", bone->tail[1] ); node.addExtraTechniqueParameter("blender", "tip_z", bone->tail[2] ); + for (Bone *child = (Bone*)bone->childbase.first; child; child = child->next) { + add_bone_node(child, ob_arm); + } node.end(); } |