mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-11 16:57:53 -06:00
Sidebar matrix field behavior for single full instance selection
This commit is contained in:
parent
a394e55e07
commit
d453b6fb3f
3 changed files with 35 additions and 25 deletions
|
@ -1549,9 +1549,14 @@ void GLCanvas3D::Selection::rotate(const Vec3d& rotation, bool local)
|
|||
if (is_single_full_instance())
|
||||
#if ENABLE_WORLD_ROTATIONS
|
||||
{
|
||||
Transform3d m = Geometry::assemble_transform(Vec3d::Zero(), rotation);
|
||||
Vec3d new_rotation = Geometry::extract_euler_angles(m * m_cache.volumes_data[i].get_instance_rotation_matrix());
|
||||
(*m_volumes)[i]->set_instance_rotation(new_rotation);
|
||||
if (local)
|
||||
(*m_volumes)[i]->set_instance_rotation(rotation);
|
||||
else
|
||||
{
|
||||
Transform3d m = Geometry::assemble_transform(Vec3d::Zero(), rotation);
|
||||
Vec3d new_rotation = Geometry::extract_euler_angles(m * m_cache.volumes_data[i].get_instance_rotation_matrix());
|
||||
(*m_volumes)[i]->set_instance_rotation(new_rotation);
|
||||
}
|
||||
}
|
||||
#else
|
||||
#if ENABLE_MODELVOLUME_TRANSFORM
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue