Fixed synchronization of instances while scaling
This commit is contained in:
parent
795d5120bf
commit
4695855f46
2 changed files with 4 additions and 13 deletions
|
@ -1047,14 +1047,7 @@ void Selection::rotate(const Vec3d& rotation, TransformationType transformation_
|
||||||
if (m_mode == Instance) {
|
if (m_mode == Instance) {
|
||||||
int rot_axis_max = 0;
|
int rot_axis_max = 0;
|
||||||
rotation.cwiseAbs().maxCoeff(&rot_axis_max);
|
rotation.cwiseAbs().maxCoeff(&rot_axis_max);
|
||||||
SyncRotationType synch;
|
synchronize_unselected_instances((transformation_type.world() && rot_axis_max == 2) ? SyncRotationType::NONE : SyncRotationType::GENERAL);
|
||||||
if (transformation_type.world() && rot_axis_max == 2)
|
|
||||||
synch = SyncRotationType::NONE;
|
|
||||||
else if (transformation_type.instance())
|
|
||||||
synch = SyncRotationType::FULL;
|
|
||||||
else
|
|
||||||
synch = SyncRotationType::GENERAL;
|
|
||||||
synchronize_unselected_instances(synch);
|
|
||||||
}
|
}
|
||||||
else if (m_mode == Volume)
|
else if (m_mode == Volume)
|
||||||
synchronize_unselected_volumes();
|
synchronize_unselected_volumes();
|
||||||
|
@ -1483,7 +1476,9 @@ void Selection::scale_and_translate(const Vec3d& scale, const Vec3d& translation
|
||||||
|
|
||||||
#if !DISABLE_INSTANCES_SYNCH
|
#if !DISABLE_INSTANCES_SYNCH
|
||||||
if (m_mode == Instance)
|
if (m_mode == Instance)
|
||||||
synchronize_unselected_instances(SyncRotationType::NONE);
|
// even if there is no rotation, we pass SyncRotationType::GENERAL to force
|
||||||
|
// synchronize_unselected_instances() to apply the scale to the other instances
|
||||||
|
synchronize_unselected_instances(SyncRotationType::GENERAL);
|
||||||
else if (m_mode == Volume)
|
else if (m_mode == Volume)
|
||||||
synchronize_unselected_volumes();
|
synchronize_unselected_volumes();
|
||||||
#endif // !DISABLE_INSTANCES_SYNCH
|
#endif // !DISABLE_INSTANCES_SYNCH
|
||||||
|
|
|
@ -497,10 +497,6 @@ public:
|
||||||
NONE = 0,
|
NONE = 0,
|
||||||
// Synchronize after rotation by an axis not parallel with Z.
|
// Synchronize after rotation by an axis not parallel with Z.
|
||||||
GENERAL = 1,
|
GENERAL = 1,
|
||||||
#if ENABLE_WORLD_COORDINATE
|
|
||||||
// Fully synchronize rotation.
|
|
||||||
FULL = 2,
|
|
||||||
#endif // ENABLE_WORLD_COORDINATE
|
|
||||||
};
|
};
|
||||||
void synchronize_unselected_instances(SyncRotationType sync_rotation_type);
|
void synchronize_unselected_instances(SyncRotationType sync_rotation_type);
|
||||||
void synchronize_unselected_volumes();
|
void synchronize_unselected_volumes();
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue