Merge branch 'master' into blender2.8

This commit is contained in:
2018-03-17 14:24:06 +01:00
5 changed files with 11 additions and 11 deletions

View File

@@ -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();

View File

@@ -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);

View File

@@ -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();

View File

@@ -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);
}

View File

@@ -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);