mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-08-16 18:05:57 +08:00
Tech ENABLE_TRANSFORMATIONS_BY_MATRICES - Allow skew in matrices
This commit is contained in:
parent
d6df61d4bb
commit
d64d89ac52
@ -1289,6 +1289,7 @@ void ObjectManipulation::set_uniform_scaling(const bool use_uniform_scale)
|
|||||||
const Selection &selection = wxGetApp().plater()->canvas3D()->get_selection();
|
const Selection &selection = wxGetApp().plater()->canvas3D()->get_selection();
|
||||||
#if ENABLE_WORLD_COORDINATE_SCALE_REVISITED
|
#if ENABLE_WORLD_COORDINATE_SCALE_REVISITED
|
||||||
if (!use_uniform_scale) {
|
if (!use_uniform_scale) {
|
||||||
|
#if !ENABLE_TRANSFORMATIONS_BY_MATRICES
|
||||||
int res = selection.bake_transform_if_needed();
|
int res = selection.bake_transform_if_needed();
|
||||||
if (res == -1) {
|
if (res == -1) {
|
||||||
// Enforce uniform scaling.
|
// Enforce uniform scaling.
|
||||||
@ -1296,6 +1297,7 @@ void ObjectManipulation::set_uniform_scaling(const bool use_uniform_scale)
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
else if (res == 0)
|
else if (res == 0)
|
||||||
|
#endif // !ENABLE_TRANSFORMATIONS_BY_MATRICES
|
||||||
// Recalculate cached values at this panel, refresh the screen.
|
// Recalculate cached values at this panel, refresh the screen.
|
||||||
this->UpdateAndShow(true);
|
this->UpdateAndShow(true);
|
||||||
}
|
}
|
||||||
|
@ -75,6 +75,7 @@ bool GLGizmoScale3D::on_mouse(const wxMouseEvent &mouse_event)
|
|||||||
{
|
{
|
||||||
if (mouse_event.Dragging()) {
|
if (mouse_event.Dragging()) {
|
||||||
if (m_dragging) {
|
if (m_dragging) {
|
||||||
|
#if !ENABLE_TRANSFORMATIONS_BY_MATRICES
|
||||||
#if ENABLE_WORLD_COORDINATE_SCALE_REVISITED
|
#if ENABLE_WORLD_COORDINATE_SCALE_REVISITED
|
||||||
int res = 1;
|
int res = 1;
|
||||||
if (m_scale.x() != m_scale.y() || m_scale.x() != m_scale.z())
|
if (m_scale.x() != m_scale.y() || m_scale.x() != m_scale.z())
|
||||||
@ -86,6 +87,7 @@ bool GLGizmoScale3D::on_mouse(const wxMouseEvent &mouse_event)
|
|||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
#endif // ENABLE_WORLD_COORDINATE_SCALE_REVISITED
|
#endif // ENABLE_WORLD_COORDINATE_SCALE_REVISITED
|
||||||
|
#endif // !ENABLE_TRANSFORMATIONS_BY_MATRICES
|
||||||
// Apply new temporary scale factors
|
// Apply new temporary scale factors
|
||||||
#if ENABLE_WORLD_COORDINATE
|
#if ENABLE_WORLD_COORDINATE
|
||||||
TransformationType transformation_type;
|
TransformationType transformation_type;
|
||||||
@ -103,10 +105,12 @@ bool GLGizmoScale3D::on_mouse(const wxMouseEvent &mouse_event)
|
|||||||
#else
|
#else
|
||||||
if (mouse_event.CmdDown()) selection.translate(m_offset, true);
|
if (mouse_event.CmdDown()) selection.translate(m_offset, true);
|
||||||
#endif // ENABLE_WORLD_COORDINATE
|
#endif // ENABLE_WORLD_COORDINATE
|
||||||
|
#if !ENABLE_TRANSFORMATIONS_BY_MATRICES
|
||||||
#if ENABLE_WORLD_COORDINATE_SCALE_REVISITED
|
#if ENABLE_WORLD_COORDINATE_SCALE_REVISITED
|
||||||
}
|
}
|
||||||
#endif // ENABLE_WORLD_COORDINATE_SCALE_REVISITED
|
#endif // ENABLE_WORLD_COORDINATE_SCALE_REVISITED
|
||||||
}
|
#endif // !ENABLE_TRANSFORMATIONS_BY_MATRICES
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return use_grabbers(mouse_event);
|
return use_grabbers(mouse_event);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user