From 4b891b40c218ef5f45706cbc4636a5333469dd1c Mon Sep 17 00:00:00 2001 From: Gaia Clary Date: Fri, 23 Sep 2016 12:56:04 +0200 Subject: Fix: Collada Importer did not import the Blender Profile information correctly when multiple objects are bound to same armature. This caused Bone tails to be placed wrong. --- source/blender/collada/ArmatureImporter.h | 12 +++++------- 1 file changed, 5 insertions(+), 7 deletions(-) (limited to 'source/blender/collada/ArmatureImporter.h') diff --git a/source/blender/collada/ArmatureImporter.h b/source/blender/collada/ArmatureImporter.h index 524c524c9c9..17173f157e5 100644 --- a/source/blender/collada/ArmatureImporter.h +++ b/source/blender/collada/ArmatureImporter.h @@ -68,8 +68,7 @@ private: // std::map joint_index_to_joint_info_map; // std::map joint_id_to_joint_index_map; - - std::map extended_bones; + BoneExtensionManager bone_extension_manager; // int bone_direction_row; // XXX not used float leaf_bone_length; int totbone; @@ -108,16 +107,15 @@ private: int create_bone(SkinInfo* skin, COLLADAFW::Node *node, EditBone *parent, int totchild, float parent_mat[4][4], bArmature *arm, std::vector &layer_labels); - BoneExtended &add_bone_extended(EditBone *bone, COLLADAFW::Node * node, int sibcount, std::vector &layer_labels); - void clear_extended_boneset(); + BoneExtended &add_bone_extended(EditBone *bone, COLLADAFW::Node * node, int sibcount, std::vector &layer_labels, BoneExtensionMap &extended_bones); - void fix_leaf_bones(bArmature *armature, Bone *bone, bool fix_orientation); + void fix_leaf_bone_hierarchy(bArmature *armature, Bone *bone, bool fix_orientation); + void fix_leaf_bone(bArmature *armature, EditBone *ebone, BoneExtended *be, bool fix_orientation); void fix_parent_connect(bArmature *armature, Bone *bone); void connect_bone_chains(bArmature *armature, Bone *bone, const int max_chain_length); void set_pose( Object *ob_arm, COLLADAFW::Node *root_node, const char *parentname, float parent_mat[4][4]); - #if 0 void set_leaf_bone_shapes(Object *ob_arm); void set_euler_rotmode(); @@ -132,7 +130,7 @@ private: #endif Object *create_armature_bones(SkinInfo& skin); - Object *create_armature_bones(std::vector &arm_objs); + void create_armature_bones(std::vector &arm_objs); /** TagsMap typedef for uid_tags_map. */ typedef std::map TagsMap; -- cgit v1.2.3