Collada: removed unnecessary dup[licate matrix conversion in matrix data exporter
authorGaia Clary <gaia.clary@machinimatrix.org>
Tue, 27 Feb 2018 15:55:18 +0000 (16:55 +0100)
committerGaia Clary <gaia.clary@machinimatrix.org>
Tue, 27 Feb 2018 16:02:52 +0000 (17:02 +0100)
source/blender/collada/AnimationExporter.cpp

index 3eefe84b21460cff23239bf27d52f13b1b4402f6..cc9e7d2b0881196f219c6dd2c44048291c5da648 100644 (file)
@@ -213,19 +213,15 @@ void AnimationExporter::export_sampled_matrix_animation(Object *ob, std::vector<
 
        for (std::vector<float>::iterator ctime = ctimes.begin(); ctime != ctimes.end(); ++ctime) {
                float fmat[4][4];
-               float outmat[4][4];
 
                bc_update_scene(scene, *ctime);
                BKE_object_matrix_local_get(ob, fmat);
-
-               converter.mat4_to_dae(outmat, fmat);
-
                if (this->export_settings->limit_precision)
-                       bc_sanitize_mat(outmat, 6);
+                       bc_sanitize_mat(fmat, 6);
 
                for (int i = 0; i < 4; i++)
                        for (int j = 0; j < 4; j++)
-                               values.push_back(outmat[j][i]);
+                               values.push_back(fmat[i][j]);
        }
 
        std::string ob_name = id_name(ob);
@@ -251,7 +247,6 @@ void AnimationExporter::export_sampled_transrotloc_animation(Object *ob, std::ve
                float feul[3];
 
                bc_update_scene(scene, *ctime);
-
                BKE_object_matrix_local_get(ob, fmat);
                mat4_decompose(floc, fquat, fsize, fmat);
                quat_to_eul(feul, fquat);