diff options
author | Gaia Clary <gaia.clary@machinimatrix.org> | 2019-06-02 20:06:14 +0300 |
---|---|---|
committer | Gaia Clary <gaia.clary@machinimatrix.org> | 2019-06-03 00:00:57 +0300 |
commit | b7bd8d813fd92d25eceedc7b1f23894c12bba6f9 (patch) | |
tree | cb5e745611740dcf04fa707a74f2534c54feb8cb /source/blender/collada/BCAnimationCurve.cpp | |
parent | 0731b88ddbbef2ca53c45b93e58c39d4ec1ce1b3 (diff) |
feature collada: Allow export/import of skeletal animations as curves
Diffstat (limited to 'source/blender/collada/BCAnimationCurve.cpp')
-rw-r--r-- | source/blender/collada/BCAnimationCurve.cpp | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/source/blender/collada/BCAnimationCurve.cpp b/source/blender/collada/BCAnimationCurve.cpp index 57aa2f1bf29..2295821aaf8 100644 --- a/source/blender/collada/BCAnimationCurve.cpp +++ b/source/blender/collada/BCAnimationCurve.cpp @@ -174,7 +174,7 @@ const std::string BCAnimationCurve::get_animation_name(Object *ob) const } else { const char *boneName = BLI_str_quoted_substrN(fcurve->rna_path, "pose.bones["); - name = (boneName) ? std::string(boneName) : ""; + name = (boneName) ? id_name(ob)+"_"+std::string(boneName) : ""; } } break; @@ -331,15 +331,17 @@ void BCAnimationCurve::clean_handles() const bool BCAnimationCurve::is_transform_curve() const { - std::string channel_target = this->get_channel_target(); - return (is_rotation_curve() || channel_target == "scale" || channel_target == "location"); + std::string channel_type = this->get_channel_type(); + return (is_rotation_curve() || channel_type == "scale" || channel_type == "location"); } const bool BCAnimationCurve::is_rotation_curve() const { - std::string channel_target = this->get_channel_target(); - return (channel_target == "rotation" || channel_target == "rotation_euler" || - channel_target == "rotation_quaternion"); + std::string channel_type = this->get_channel_type(); + return (channel_type == "rotation" + || channel_type == "rotation_euler" + || channel_type == "rotation_quaternion" + ); } const float BCAnimationCurve::get_value(const float frame) |