Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com>2011-06-16 23:25:21 +0400
committerSukhitha Prabhath Jayathilake <pr.jayathilake@gmail.com>2011-06-16 23:25:21 +0400
commitd240733ae20612c98debd8c4226facae22350544 (patch)
treeacfdefd549a2f8303a012ba34f391f2014e9987e /source/blender/collada/AnimationExporter.cpp
parent6aa524f357154fd927fff537c04c32c46611f3d0 (diff)
Reverted Exporter unit conversion modifications.
Animation Importer Code Cleanup.
Diffstat (limited to 'source/blender/collada/AnimationExporter.cpp')
-rw-r--r--source/blender/collada/AnimationExporter.cpp28
1 files changed, 14 insertions, 14 deletions
diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp
index 8f6f3fae982..f0491af3a49 100644
--- a/source/blender/collada/AnimationExporter.cpp
+++ b/source/blender/collada/AnimationExporter.cpp
@@ -428,7 +428,7 @@ void AnimationExporter::exportAnimations(Scene *sce)
float AnimationExporter::convert_angle(float angle)
{
- return COLLADABU::Math::Utils::degToRadF(angle);
+ return COLLADABU::Math::Utils::radToDegF(angle);
}
std::string AnimationExporter::get_semantic_suffix(COLLADASW::InputSemantic::Semantics semantic)
@@ -491,12 +491,12 @@ void AnimationExporter::exportAnimations(Scene *sce)
break;
case COLLADASW::InputSemantic::OUTPUT:
*length = 1;
- /*if (rotation) {
- values[0] = convert_angle(bezt->vec[1][1]);
+ if (rotation) {
+ values[0] = (bezt->vec[1][1]) * 180.0f/M_PI;
}
- else {*/
+ else {
values[0] = bezt->vec[1][1];
- //}
+ }
break;
case COLLADASW::InputSemantic::IN_TANGENT:
@@ -507,11 +507,11 @@ void AnimationExporter::exportAnimations(Scene *sce)
values[0] = 0;
values[1] = 0;
}
- /* else if (rotation) {
- values[1] = convert_angle(bezt->vec[0][1]);
- } else {*/
+ else if (rotation) {
+ values[1] = (bezt->vec[0][1]) * 180.0f/M_PI;
+ } else {
values[1] = bezt->vec[0][1];
- //}
+ }
break;
case COLLADASW::InputSemantic::OUT_TANGENT:
@@ -522,11 +522,11 @@ void AnimationExporter::exportAnimations(Scene *sce)
values[0] = 0;
values[1] = 0;
}
- /* else if (rotation) {
- values[1] = convert_angle(bezt->vec[2][1]);
- } else {*/
+ else if (rotation) {
+ values[1] = (bezt->vec[0][1]) * 180.0f/M_PI;
+ } else {
values[1] = bezt->vec[2][1];
- //}
+ }
break;
break;
default:
@@ -601,7 +601,7 @@ void AnimationExporter::exportAnimations(Scene *sce)
// val = convert_time(val);
//else
if (is_rot)
- val = convert_angle(val);
+ val *= 180.0f / M_PI;
source.appendValues(val);
}