From 0ec450f3d7f29b9278968d95abe7e71244f3e7e9 Mon Sep 17 00:00:00 2001 From: bubnikv Date: Fri, 1 Mar 2019 15:35:48 +0100 Subject: [PATCH] Fix of instance rotations from the side panel in regard to instance synchronization. --- src/slic3r/GUI/GLCanvas3D.cpp | 1 + src/slic3r/GUI/GUI_ObjectManipulation.cpp | 3 ++- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/slic3r/GUI/GLCanvas3D.cpp b/src/slic3r/GUI/GLCanvas3D.cpp index 6f80b0165..ceea9a454 100644 --- a/src/slic3r/GUI/GLCanvas3D.cpp +++ b/src/slic3r/GUI/GLCanvas3D.cpp @@ -1271,6 +1271,7 @@ void GLCanvas3D::Selection::rotate(const Vec3d& rotation, GLCanvas3D::Transforma assert(! transformation_type.world() || transformation_type.relative()); int rot_axis_max; + //FIXME this does not work for absolute rotations (transformation_type.absolute() is true) rotation.cwiseAbs().maxCoeff(&rot_axis_max); // For generic rotation, we want to rotate the first volume in selection, and then to synchronize the other volumes with it. diff --git a/src/slic3r/GUI/GUI_ObjectManipulation.cpp b/src/slic3r/GUI/GUI_ObjectManipulation.cpp index 1fa28d65a..ab83df05d 100644 --- a/src/slic3r/GUI/GUI_ObjectManipulation.cpp +++ b/src/slic3r/GUI/GUI_ObjectManipulation.cpp @@ -365,7 +365,8 @@ void ObjectManipulation::change_rotation_value(const Vec3d& rotation) if (selection.is_single_full_instance() || selection.requires_local_axes()) transformation_type.set_independent(); if (selection.is_single_full_instance()) { - transformation_type.set_absolute(); + //FIXME GLCanvas3D::Selection::rotate() does not process absoulte rotations correctly: It does not recognize the axis index, which was changed. + // transformation_type.set_absolute(); transformation_type.set_local(); }