diff options
Diffstat (limited to 'source')
-rw-r--r-- | source/blender/collada/AnimationExporter.cpp | 2 | ||||
-rw-r--r-- | source/blender/collada/ArmatureExporter.cpp | 6 | ||||
-rw-r--r-- | source/blender/collada/ControllerExporter.cpp | 4 | ||||
-rw-r--r-- | source/blender/collada/collada_internal.cpp | 6 | ||||
-rw-r--r-- | source/blender/collada/collada_internal.h | 4 |
5 files changed, 11 insertions, 11 deletions
diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp index 53c1afd173f..1df0705c855 100644 --- a/source/blender/collada/AnimationExporter.cpp +++ b/source/blender/collada/AnimationExporter.cpp @@ -772,7 +772,7 @@ void AnimationExporter::dae_baked_animation(std::vector<float> &fra, Object *ob_ addSampler(sampler); - std::string target = get_joint_id(bone, ob_arm) + "/transform"; + std::string target = get_joint_id(ob_arm, bone) + "/transform"; addChannel(COLLADABU::URI(empty, sampler_id), target); closeAnimation(); diff --git a/source/blender/collada/ArmatureExporter.cpp b/source/blender/collada/ArmatureExporter.cpp index 844be2dd60b..fbceb6e077f 100644 --- a/source/blender/collada/ArmatureExporter.cpp +++ b/source/blender/collada/ArmatureExporter.cpp @@ -89,7 +89,7 @@ void ArmatureExporter::add_armature_bones(const EvaluationContext *eval_ctx, Obj void ArmatureExporter::write_bone_URLs(COLLADASW::InstanceController &ins, Object *ob_arm, Bone *bone) { if (bc_is_root_bone(bone, this->export_settings->deform_bones_only)) - ins.addSkeleton(COLLADABU::URI(COLLADABU::Utils::EMPTY_STRING, get_joint_id(bone, ob_arm))); + ins.addSkeleton(COLLADABU::URI(COLLADABU::Utils::EMPTY_STRING, get_joint_id(ob_arm, bone))); else { for (Bone *child = (Bone *)bone->childbase.first; child; child = child->next) { write_bone_URLs(ins, ob_arm, child); @@ -162,9 +162,9 @@ void ArmatureExporter::add_bone_node(const EvaluationContext *eval_ctx, Bone *bo std::list<Object *>& child_objects) { if (!(this->export_settings->deform_bones_only && bone->flag & BONE_NO_DEFORM)) { - std::string node_id = get_joint_id(bone, ob_arm); + std::string node_id = get_joint_id(ob_arm, bone); std::string node_name = std::string(bone->name); - std::string node_sid = get_joint_sid(bone, ob_arm); + std::string node_sid = get_joint_sid(bone); COLLADASW::Node node(mSW); diff --git a/source/blender/collada/ControllerExporter.cpp b/source/blender/collada/ControllerExporter.cpp index ae99e6bafde..f32cb624f78 100644 --- a/source/blender/collada/ControllerExporter.cpp +++ b/source/blender/collada/ControllerExporter.cpp @@ -71,7 +71,7 @@ bool ControllerExporter::is_skinned_mesh(Object *ob) void ControllerExporter::write_bone_URLs(COLLADASW::InstanceController &ins, Object *ob_arm, Bone *bone) { if (bc_is_root_bone(bone, this->export_settings->deform_bones_only)) - ins.addSkeleton(COLLADABU::URI(COLLADABU::Utils::EMPTY_STRING, get_joint_id(bone, ob_arm))); + ins.addSkeleton(COLLADABU::URI(COLLADABU::Utils::EMPTY_STRING, get_joint_id(ob_arm, bone))); else { for (Bone *child = (Bone *)bone->childbase.first; child; child = child->next) { write_bone_URLs(ins, ob_arm, child); @@ -456,7 +456,7 @@ std::string ControllerExporter::add_joints_source(Object *ob_arm, ListBase *defb for (def = (bDeformGroup *)defbase->first; def; def = def->next) { Bone *bone = get_bone_from_defgroup(ob_arm, def); if (bone) - source.appendValues(get_joint_sid(bone, ob_arm)); + source.appendValues(get_joint_sid(bone)); } source.finish(); diff --git a/source/blender/collada/collada_internal.cpp b/source/blender/collada/collada_internal.cpp index 6ebde6bd773..cf4dcb5eb42 100644 --- a/source/blender/collada/collada_internal.cpp +++ b/source/blender/collada/collada_internal.cpp @@ -327,12 +327,12 @@ std::string get_light_id(Object *ob) return translate_id(id_name(ob)) + "-light"; } -std::string get_joint_id(Bone *bone, Object *ob_arm) +std::string get_joint_id(Object *ob, Bone *bone) { - return translate_id(id_name(ob_arm) + "_" + bone->name); + return translate_id(id_name(ob) + "_" + bone->name); } -std::string get_joint_sid(Bone *bone, Object *ob_arm) +std::string get_joint_sid(Bone *bone) { return translate_id(bone->name); } diff --git a/source/blender/collada/collada_internal.h b/source/blender/collada/collada_internal.h index 1c7aa160f57..299e13326ce 100644 --- a/source/blender/collada/collada_internal.h +++ b/source/blender/collada/collada_internal.h @@ -97,8 +97,8 @@ 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_joint_id(Object *ob, Bone *bone); +extern std::string get_joint_sid(Bone *bone); extern std::string get_camera_id(Object *ob); |