Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/prusa3d/PrusaSlicer.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/slic3r/GUI/GUI_ObjectParts.cpp')
-rw-r--r--src/slic3r/GUI/GUI_ObjectParts.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/slic3r/GUI/GUI_ObjectParts.cpp b/src/slic3r/GUI/GUI_ObjectParts.cpp
index 4fc3b88c0..96483721b 100644
--- a/src/slic3r/GUI/GUI_ObjectParts.cpp
+++ b/src/slic3r/GUI/GUI_ObjectParts.cpp
@@ -1802,11 +1802,15 @@ void update_scale_values(double scaling_factor)
void update_rotation_values()
{
+#if ENABLE_MODELINSTANCE_3D_ROTATION
+ update_rotation_value((*m_objects)[m_selected_object_id]->instances.front()->get_rotation());
+#else
auto og = get_optgroup(ogFrequentlyObjectSettings);
auto instance = (*m_objects)[m_selected_object_id]->instances.front();
og->set_value("rotation_x", 0);
og->set_value("rotation_y", 0);
og->set_value("rotation_z", int(Geometry::rad2deg(instance->rotation)));
+#endif // ENABLE_MODELINSTANCE_3D_ROTATION
}
void update_rotation_value(double angle, Axis axis)
@@ -1836,6 +1840,16 @@ void update_rotation_value(double angle, Axis axis)
og->set_value(axis_str, int(Geometry::rad2deg(angle)));
}
+#if ENABLE_MODELINSTANCE_3D_ROTATION
+void update_rotation_value(const Vec3d& rotation)
+{
+ auto og = get_optgroup(ogFrequentlyObjectSettings);
+ og->set_value("rotation_x", int(Geometry::rad2deg(rotation(0))));
+ og->set_value("rotation_y", int(Geometry::rad2deg(rotation(1))));
+ og->set_value("rotation_z", int(Geometry::rad2deg(rotation(2))));
+}
+#endif // ENABLE_MODELINSTANCE_3D_ROTATION
+
void set_uniform_scaling(const bool uniform_scale)
{
g_is_uniform_scale = uniform_scale;