diff options
author | Gaia Clary <gaia.clary@machinimatrix.org> | 2013-03-07 14:26:04 +0400 |
---|---|---|
committer | Gaia Clary <gaia.clary@machinimatrix.org> | 2013-03-07 14:26:04 +0400 |
commit | 172d624598b93590125594c84f5c97351474f3f4 (patch) | |
tree | 47888941e3805ecb416d7218778f2d860463178a /source/blender/collada/AnimationExporter.cpp | |
parent | a816b0b3d2708e9b064447cc3618ad9999be16c6 (diff) |
Collada fixed Collada ID name for exported animation curves
Diffstat (limited to 'source/blender/collada/AnimationExporter.cpp')
-rw-r--r-- | source/blender/collada/AnimationExporter.cpp | 25 |
1 files changed, 21 insertions, 4 deletions
diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp index 983e0fece5f..eb125d90635 100644 --- a/source/blender/collada/AnimationExporter.cpp +++ b/source/blender/collada/AnimationExporter.cpp @@ -259,6 +259,12 @@ std::string AnimationExporter::getObjectBoneName(Object *ob, const FCurve *fcu) return id_name(ob); } +std::string AnimationExporter::getAnimationPathId(const FCurve *fcu) +{ + std::string rna_path = std::string(fcu->rna_path); + return translate_id(rna_path); +} + //convert f-curves to animation curves and write void AnimationExporter::dae_animation(Object *ob, FCurve *fcu, char *transformName, bool is_param, Material *ma) { @@ -305,16 +311,27 @@ void AnimationExporter::dae_animation(Object *ob, FCurve *fcu, char *transformNa //Create anim Id if (ob->type == OB_ARMATURE) { ob_name = getObjectBoneName(ob, fcu); - BLI_snprintf(anim_id, sizeof(anim_id), "%s_%s.%s", (char *)translate_id(ob_name).c_str(), - transformName, axis_name); + BLI_snprintf( + anim_id, + sizeof(anim_id), + "%s_%s.%s", + (char *)translate_id(ob_name).c_str(), + (char *)translate_id(transformName).c_str(), + axis_name); } else { if (ma) ob_name = id_name(ob) + "_material"; else ob_name = id_name(ob); - BLI_snprintf(anim_id, sizeof(anim_id), "%s_%s_%s", (char *)translate_id(ob_name).c_str(), - fcu->rna_path, axis_name); + + BLI_snprintf( + anim_id, + sizeof(anim_id), + "%s_%s_%s", + (char *)translate_id(ob_name).c_str(), + (char *)getAnimationPathId(fcu).c_str(), + axis_name); } openAnimation(anim_id, COLLADABU::Utils::EMPTY_STRING); |