mirror of
https://git.mirrors.martin98.com/https://github.com/prusa3d/PrusaSlicer.git
synced 2025-07-30 23:32:00 +08:00
Tech ENABLE_INSTANCE_COORDINATES_FOR_VOLUMES - Fixed orientation for sidebar hints in 3D scene for part manipulation in instance and local systems
This commit is contained in:
parent
41fc0be32a
commit
855bf4acfd
@ -1445,6 +1445,11 @@ void Sidebar::update_mode()
|
||||
|
||||
wxWindowUpdateLocker noUpdates(this);
|
||||
|
||||
#if ENABLE_INSTANCE_COORDINATES_FOR_VOLUMES
|
||||
if (m_mode == comSimple)
|
||||
p->object_manipulation->set_coordinates_type(ObjectManipulation::ECoordinatesType::World);
|
||||
#endif // ENABLE_INSTANCE_COORDINATES_FOR_VOLUMES
|
||||
|
||||
p->object_list->get_sizer()->Show(m_mode > comSimple);
|
||||
|
||||
p->object_list->unselect_objects();
|
||||
|
@ -1397,11 +1397,13 @@ void Selection::render_sidebar_hints(const std::string& sidebar_field) const
|
||||
#if ENABLE_WORLD_COORDINATE
|
||||
#if ENABLE_INSTANCE_COORDINATES_FOR_VOLUMES
|
||||
if (!wxGetApp().obj_manipul()->is_world_coordinates()) {
|
||||
Transform3d orient_matrix = Transform3d::Identity();
|
||||
if (wxGetApp().obj_manipul()->is_local_coordinates()) {
|
||||
#else
|
||||
if (!wxGetApp().obj_manipul()->get_world_coordinates()) {
|
||||
#endif // ENABLE_INSTANCE_COORDINATES_FOR_VOLUMES
|
||||
Transform3d orient_matrix = Transform3d::Identity();
|
||||
if (boost::starts_with(sidebar_field, "scale")) {
|
||||
#endif // ENABLE_INSTANCE_COORDINATES_FOR_VOLUMES
|
||||
const GLVolume* v = (*m_volumes)[*m_list.begin()];
|
||||
orient_matrix = v->get_instance_transformation().get_matrix(true, false, true, true) * v->get_volume_transformation().get_matrix(true, false, true, true);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user