From 1bf95ddce5587c25258c9a7a7b07cf3a555b745b Mon Sep 17 00:00:00 2001 From: Simone Barbieri Date: Wed, 6 Jul 2022 17:00:35 +0100 Subject: [PATCH] Fix Maya transform --- openpype/hosts/maya/plugins/publish/extract_layout.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/openpype/hosts/maya/plugins/publish/extract_layout.py b/openpype/hosts/maya/plugins/publish/extract_layout.py index 7eb6a64e6d..991217684a 100644 --- a/openpype/hosts/maya/plugins/publish/extract_layout.py +++ b/openpype/hosts/maya/plugins/publish/extract_layout.py @@ -89,9 +89,12 @@ class ExtractLayout(openpype.api.Extractor): transform_mm = om.MMatrix(t_matrix_list) transform = om.MTransformationMatrix(transform_mm) - transform.scaleBy([1.0, 1.0, -1.0], om.MSpace.kWorld) + t = transform.translation(om.MSpace.kWorld) + t = om.MVector(t.x, t.z, -t.y) + transform.setTranslation(t, om.MSpace.kWorld) transform.rotateBy( om.MEulerRotation(math.radians(-90), 0, 0), om.MSpace.kWorld) + transform.scaleBy([1.0, 1.0, -1.0], om.MSpace.kObject) t_matrix_list = list(transform.asMatrix())