fix D2552: Collada - use unique id for bones with same name but in different armatures. Co-authored-by: Gaia <gaia.clary@machiniamtrix.org>

This commit is contained in:
Jon Allee 2017-03-14 14:17:04 +01:00 committed by Gaia Clary
parent f3ff03b3c1
commit da6cd77628
4 changed files with 7 additions and 8 deletions

View File

@ -156,11 +156,6 @@ void ArmatureExporter::find_objects_using_armature(Object *ob_arm, std::vector<O
}
#endif
std::string ArmatureExporter::get_joint_sid(Bone *bone, Object *ob_arm)
{
return get_joint_id(bone, ob_arm);
}
// parent_mat is armature-space
void ArmatureExporter::add_bone_node(Bone *bone, Object *ob_arm, Scene *sce,
SceneExporter *se,

View File

@ -83,8 +83,6 @@ private:
void find_objects_using_armature(Object *ob_arm, std::vector<Object *>& objects, Scene *sce);
#endif
std::string get_joint_sid(Bone *bone, Object *ob_arm);
// Scene, SceneExporter and the list of child_objects
// are required for writing bone parented objects
void add_bone_node(Bone *bone, Object *ob_arm, Scene *sce, SceneExporter *se,

View File

@ -341,7 +341,12 @@ std::string get_light_id(Object *ob)
std::string get_joint_id(Bone *bone, Object *ob_arm)
{
return translate_id(/*id_name(ob_arm) + "_" +*/ bone->name);
return translate_id(id_name(ob_arm) + "_" + bone->name);
}
std::string get_joint_sid(Bone *bone, Object *ob_arm)
{
return translate_id(bone->name);
}
std::string get_camera_id(Object *ob)

View File

@ -104,6 +104,7 @@ extern std::string get_geometry_id(Object *ob, bool use_instantiation);
extern std::string get_light_id(Object *ob);
extern std::string get_joint_id(Bone *bone, Object *ob_arm);
extern std::string get_joint_sid(Bone *bone, Object *ob_arm);
extern std::string get_camera_id(Object *ob);