Overwritte common transformation stored in gl_volume by emboss surface transformation instead of rewrite result in CallAfter
This commit is contained in:
parent
a32b2764c6
commit
e02c5e84cc
@ -526,15 +526,11 @@ bool GLGizmoEmboss::on_mouse_for_translate(const wxMouseEvent &mouse_event)
|
|||||||
// with Mesa driver OR on Linux
|
// with Mesa driver OR on Linux
|
||||||
if (!m_temp_transformation.has_value()) return false;
|
if (!m_temp_transformation.has_value()) return false;
|
||||||
|
|
||||||
// TODO: Disable applying of common transformation after draggig
|
// Override of common transformation after draggig by set transformation into gl_volume
|
||||||
// Call after is used for apply transformation after common dragging to rewrite it
|
|
||||||
Transform3d volume_trmat =
|
Transform3d volume_trmat =
|
||||||
gl_volume->get_instance_transformation().get_matrix().inverse() *
|
gl_volume->get_instance_transformation().get_matrix().inverse() *
|
||||||
*m_temp_transformation;
|
*m_temp_transformation;
|
||||||
wxGetApp().plater()->CallAfter([volume_trmat, mv = m_volume]() {
|
gl_volume->set_volume_transformation(volume_trmat);
|
||||||
mv->set_transformation(volume_trmat);
|
|
||||||
});
|
|
||||||
|
|
||||||
m_parent.toggle_model_objects_visibility(true);
|
m_parent.toggle_model_objects_visibility(true);
|
||||||
// Apply temporary position
|
// Apply temporary position
|
||||||
m_temp_transformation = {};
|
m_temp_transformation = {};
|
||||||
|
Loading…
Reference in New Issue
Block a user