diff options
-rw-r--r-- | source/blender/collada/AnimationExporter.cpp | 2 | ||||
-rw-r--r-- | source/blender/collada/TransformReader.cpp | 36 | ||||
-rw-r--r-- | source/blender/collada/TransformWriter.cpp | 8 |
3 files changed, 25 insertions, 21 deletions
diff --git a/source/blender/collada/AnimationExporter.cpp b/source/blender/collada/AnimationExporter.cpp index f0491af3a49..ade1475c871 100644 --- a/source/blender/collada/AnimationExporter.cpp +++ b/source/blender/collada/AnimationExporter.cpp @@ -132,7 +132,7 @@ void AnimationExporter::exportAnimations(Scene *sce) boneName = strtok(NULL,"\""); if( boneName != NULL ) - return id_name(ob) + "_" + std::string(boneName); + return /*id_name(ob) + "_" +*/ std::string(boneName); else return id_name(ob); } diff --git a/source/blender/collada/TransformReader.cpp b/source/blender/collada/TransformReader.cpp index 3d624520e53..625a0220830 100644 --- a/source/blender/collada/TransformReader.cpp +++ b/source/blender/collada/TransformReader.cpp @@ -45,24 +45,24 @@ void TransformReader::get_node_mat(float mat[][4], COLLADAFW::Node *node, std::m COLLADAFW::Transformation *tm = node->getTransformations()[i]; COLLADAFW::Transformation::TransformationType type = tm->getTransformationType(); - switch(type) { - case COLLADAFW::Transformation::TRANSLATE: - dae_translate_to_mat4(tm, cur); - break; - case COLLADAFW::Transformation::ROTATE: - dae_rotate_to_mat4(tm, cur); - break; - case COLLADAFW::Transformation::SCALE: - dae_scale_to_mat4(tm, cur); - break; - case COLLADAFW::Transformation::MATRIX: - dae_matrix_to_mat4(tm, cur); - break; - case COLLADAFW::Transformation::LOOKAT: - case COLLADAFW::Transformation::SKEW: - fprintf(stderr, "LOOKAT and SKEW transformations are not supported yet.\n"); - break; - } + switch(type) { + case COLLADAFW::Transformation::TRANSLATE: + dae_translate_to_mat4(tm, cur); + break; + case COLLADAFW::Transformation::ROTATE: + dae_rotate_to_mat4(tm, cur); + break; + case COLLADAFW::Transformation::SCALE: + dae_scale_to_mat4(tm, cur); + break; + case COLLADAFW::Transformation::MATRIX: + dae_matrix_to_mat4(tm, cur); + break; + case COLLADAFW::Transformation::LOOKAT: + case COLLADAFW::Transformation::SKEW: + fprintf(stderr, "LOOKAT and SKEW transformations are not supported yet.\n"); + break; + } copy_m4_m4(copy, mat); mul_m4_m4m4(mat, cur, copy); diff --git a/source/blender/collada/TransformWriter.cpp b/source/blender/collada/TransformWriter.cpp index 8638e16e1c2..546ca3e3019 100644 --- a/source/blender/collada/TransformWriter.cpp +++ b/source/blender/collada/TransformWriter.cpp @@ -98,8 +98,12 @@ void TransformWriter::add_node_transform_identity(COLLADASW::Node& node) void TransformWriter::add_transform(COLLADASW::Node& node, float loc[3], float rot[3], float scale[3]) { node.addTranslate("location", loc[0], loc[1], loc[2]); - node.addRotateZ("rotationZ", COLLADABU::Math::Utils::radToDegF(rot[2])); + /*node.addRotateZ("rotationZ", COLLADABU::Math::Utils::radToDegF(rot[2])); node.addRotateY("rotationY", COLLADABU::Math::Utils::radToDegF(rot[1])); - node.addRotateX("rotationX", COLLADABU::Math::Utils::radToDegF(rot[0])); + node.addRotateX("rotationX", COLLADABU::Math::Utils::radToDegF(rot[0]));*/ + node.addRotateZ("rotationZ", rot[2] * 180.0f/M_PI); + node.addRotateY("rotationY", (rot[1]* 180.0f/M_PI)); + node.addRotateX("rotationX", (rot[0]* 180.0f/M_PI)); + node.addScale("scale", scale[0], scale[1], scale[2]); } |