+ Added CutObjectBase class which contains cut attributes for object
+ ObjectList and ManipulationPanel :
    * Disable all ManipulationEditors for solid/negative volumes of cut object
    * Disable Scale/Size ManipulationEditors for objects/instances of objects which are CutParts of initial object
+ Scale/Rotation/Move gizmos are disabled for solid/negative volumes of cut object
+ Select whole CutParts of initial object when ScaleGizmo is active
This commit is contained in:
YuSanka 2022-04-11 11:20:00 +02:00
parent f9e22513c1
commit 463e9ab530
12 changed files with 261 additions and 10 deletions

View file

@ -5,6 +5,7 @@
#if ENABLE_GL_SHADERS_ATTRIBUTES
#include "slic3r/GUI/Plater.hpp"
#endif // ENABLE_GL_SHADERS_ATTRIBUTES
#include "libslic3r/Model.hpp"
#include <GL/glew.h>
@ -63,7 +64,13 @@ std::string GLGizmoMove3D::on_get_name() const
bool GLGizmoMove3D::on_is_activable() const
{
return !m_parent.get_selection().is_empty();
const Selection& selection = m_parent.get_selection();
if (selection.is_any_volume() || selection.is_any_modifier()) {
if (int obj_idx = selection.get_object_idx(); obj_idx >= 0)
return !m_parent.get_model()->objects[obj_idx]->is_cut();
}
return !selection.is_empty();
}
void GLGizmoMove3D::on_start_dragging()