Reintroduced instances synchronization
This commit is contained in:
parent
7ffa22191d
commit
0810beae77
2 changed files with 9 additions and 3 deletions
|
@ -18,7 +18,7 @@
|
||||||
// Uses a unique opengl context
|
// Uses a unique opengl context
|
||||||
#define ENABLE_USE_UNIQUE_GLCONTEXT (1 && ENABLE_1_42_0)
|
#define ENABLE_USE_UNIQUE_GLCONTEXT (1 && ENABLE_1_42_0)
|
||||||
// Disable synchronization of unselected instances
|
// Disable synchronization of unselected instances
|
||||||
#define DISABLE_INSTANCES_SYNCH (1 && ENABLE_1_42_0)
|
#define DISABLE_INSTANCES_SYNCH (0 && ENABLE_1_42_0)
|
||||||
// Modified camera target behavior
|
// Modified camera target behavior
|
||||||
#define ENABLE_MODIFIED_CAMERA_TARGET (1 && ENABLE_1_42_0)
|
#define ENABLE_MODIFIED_CAMERA_TARGET (1 && ENABLE_1_42_0)
|
||||||
// Add Geometry::Transformation class and use it into ModelInstance, ModelVolume and GLVolume
|
// Add Geometry::Transformation class and use it into ModelInstance, ModelVolume and GLVolume
|
||||||
|
|
|
@ -1513,6 +1513,12 @@ void GLCanvas3D::Selection::flattening_rotate(const Vec3d& normal)
|
||||||
Vec3d new_rotation = Geometry::extract_euler_angles(extra_rotation * m_cache.volumes_data[i].get_instance_rotation_matrix() );
|
Vec3d new_rotation = Geometry::extract_euler_angles(extra_rotation * m_cache.volumes_data[i].get_instance_rotation_matrix() );
|
||||||
(*m_volumes)[i]->set_instance_rotation(new_rotation);
|
(*m_volumes)[i]->set_instance_rotation(new_rotation);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#if !DISABLE_INSTANCES_SYNCH
|
||||||
|
if (m_mode == Instance)
|
||||||
|
_synchronize_unselected_instances();
|
||||||
|
#endif // !DISABLE_INSTANCES_SYNCH
|
||||||
|
|
||||||
m_bounding_box_dirty = true;
|
m_bounding_box_dirty = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -2046,11 +2052,11 @@ void GLCanvas3D::Selection::_synchronize_unselected_instances()
|
||||||
continue;
|
continue;
|
||||||
|
|
||||||
#if ENABLE_MODELVOLUME_TRANSFORM
|
#if ENABLE_MODELVOLUME_TRANSFORM
|
||||||
v->set_instance_rotation(rotation);
|
v->set_instance_rotation(Vec3d(rotation(0), rotation(1), v->get_instance_rotation()(2)));
|
||||||
v->set_instance_scaling_factor(scaling_factor);
|
v->set_instance_scaling_factor(scaling_factor);
|
||||||
v->set_instance_mirror(mirror);
|
v->set_instance_mirror(mirror);
|
||||||
#else
|
#else
|
||||||
v->set_rotation(rotation);
|
v->set_rotation(Vec3d(rotation(0), rotation(1), v->get_rotation()(2)));
|
||||||
v->set_scaling_factor(scaling_factor);
|
v->set_scaling_factor(scaling_factor);
|
||||||
v->set_mirror(mirror);
|
v->set_mirror(mirror);
|
||||||
#endif // ENABLE_MODELVOLUME_TRANSFORM
|
#endif // ENABLE_MODELVOLUME_TRANSFORM
|
||||||
|
|
Loading…
Reference in a new issue