diff options
author | Iyad Ahmed <iyadahmed430@gmail.com> | 2022-06-15 21:44:22 +0300 |
---|---|---|
committer | Aras Pranckevicius <aras@nesnausk.org> | 2022-06-15 21:46:38 +0300 |
commit | 28044973123516b0ecce5a29d22e70eb6965542e (patch) | |
tree | a852088ab79f36b1b796ceb24d9af933b38bf8f5 /source/blender/io/wavefront_obj/importer/importer_mesh_utils.cc | |
parent | 43ddfdb1a530b5424fa150bb38f8dfe311acd25e (diff) |
io: remove unnecessary transposes when using mat3_from_axis_conversion
Some I/O code paths (Collada, OBJ) were using mat3_from_axis_conversion
followed by transpose_m3, instead of swapping the axis arguments
which achieves exactly the same result.
Reviewed By: Aras Pranckevicius
Differential Revision: https://developer.blender.org/D15158
Diffstat (limited to 'source/blender/io/wavefront_obj/importer/importer_mesh_utils.cc')
-rw-r--r-- | source/blender/io/wavefront_obj/importer/importer_mesh_utils.cc | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/source/blender/io/wavefront_obj/importer/importer_mesh_utils.cc b/source/blender/io/wavefront_obj/importer/importer_mesh_utils.cc index 3c0ef646e13..f33753d720d 100644 --- a/source/blender/io/wavefront_obj/importer/importer_mesh_utils.cc +++ b/source/blender/io/wavefront_obj/importer/importer_mesh_utils.cc @@ -100,9 +100,7 @@ void transform_object(Object *object, const OBJImportParams &import_params) unit_m4(obmat); /* +Y-forward and +Z-up are the default Blender axis settings. */ mat3_from_axis_conversion( - import_params.forward_axis, import_params.up_axis, IO_AXIS_Y, IO_AXIS_Z, axes_transform); - /* mat3_from_axis_conversion returns a transposed matrix! */ - transpose_m3(axes_transform); + IO_AXIS_Y, IO_AXIS_Z, import_params.forward_axis, import_params.up_axis, axes_transform); copy_m4_m3(obmat, axes_transform); BKE_object_apply_mat4(object, obmat, true, false); |