This commit is contained in:
enricoturri1966 2022-12-12 08:40:39 +01:00
parent dffd26be14
commit c7e23a5a5f
2 changed files with 7 additions and 7 deletions

View File

@ -565,15 +565,15 @@ void ObjectManipulation::Show(const bool show)
bool show_world_local_combo = wxGetApp().get_mode() != comSimple && (selection.is_single_full_instance() || selection.is_single_volume_or_modifier());
if (selection.is_single_volume_or_modifier() && m_word_local_combo->GetCount() < 3) {
#ifdef __linux__
m_word_local_combo->Insert(coordinate_type_str(ECoordinatesType::Instance), 1);
m_word_local_combo->Insert(coordinate_type_str(ECoordinatesType::Local), 2);
#else
m_word_local_combo->Insert(coordinate_type_str(ECoordinatesType::Instance), wxNullBitmap, 1);
m_word_local_combo->Insert(coordinate_type_str(ECoordinatesType::Local), wxNullBitmap, 2);
#endif // __linux__
m_word_local_combo->Select((int)ECoordinatesType::World);
this->set_coordinates_type(m_word_local_combo->GetString(m_word_local_combo->GetSelection()));
}
else if (selection.is_single_full_instance() && m_word_local_combo->GetCount() > 2) {
m_word_local_combo->Delete(1);
m_word_local_combo->Delete(2);
m_word_local_combo->Select((int)ECoordinatesType::World);
this->set_coordinates_type(m_word_local_combo->GetString(m_word_local_combo->GetSelection()));
}

View File

@ -828,7 +828,7 @@ void Selection::translate(const Vec3d& displacement, TransformationType transfor
assert(is_from_fully_selected_instance(i));
if (transformation_type.world())
v.set_instance_transformation(Geometry::translation_transform(displacement) * volume_data.get_instance_full_matrix());
else if (transformation_type.local()) {
else if (transformation_type.instance()) {
const Vec3d world_displacement = volume_data.get_instance_rotation_matrix() * displacement;
v.set_instance_transformation(Geometry::translation_transform(world_displacement) * volume_data.get_instance_full_matrix());
}
@ -918,7 +918,7 @@ void Selection::rotate(const Vec3d& rotation, TransformationType transformation_
else {
if (transformation_type.world())
new_rotation_matrix = rotation_matrix * inst_trafo.get_rotation_matrix();
else if (transformation_type.local())
else if (transformation_type.instance())
new_rotation_matrix = inst_trafo.get_rotation_matrix() * rotation_matrix;
else
assert(false);
@ -948,7 +948,7 @@ void Selection::rotate(const Vec3d& rotation, TransformationType transformation_
SyncRotationType synch;
if (transformation_type.world() && rot_axis_max == 2)
synch = SyncRotationType::NONE;
else if (transformation_type.local())
else if (transformation_type.instance())
synch = SyncRotationType::FULL;
else
synch = SyncRotationType::GENERAL;
@ -1365,7 +1365,7 @@ void Selection::scale_and_translate(const Vec3d& scale, const Vec3d& translation
Geometry::translation_transform(translation) * inst_trafo.get_offset_matrix();
v.set_instance_transformation(offset_matrix * scale_matrix * inst_trafo.get_matrix_no_offset());
}
else if (transformation_type.local()) {
else if (transformation_type.instance()) {
const Transform3d scale_matrix = Geometry::scale_transform(relative_scale);
Vec3d offset;
if (transformation_type.joint() && translation.isApprox(Vec3d::Zero())) {