Place on bed gizmo disabled for individual object parts

This commit is contained in:
Lukas Matena 2018-11-28 12:06:17 +01:00
parent 1a8d98302e
commit ebac4c7eb8
2 changed files with 8 additions and 1 deletions

View File

@ -1291,6 +1291,13 @@ std::string GLGizmoFlatten::on_get_name() const
return L("Flatten");
}
bool GLGizmoFlatten::on_is_activable(const GLCanvas3D::Selection& selection) const
{
return (selection.is_from_single_object()
&& (selection.is_single_full_instance() || selection.is_multiple_full_instance() || selection.is_single_full_object())
&& !selection.is_wipe_tower() && !selection.is_modifier());
}
void GLGizmoFlatten::on_start_dragging(const GLCanvas3D::Selection& selection)
{
if (m_hover_id != -1)

View File

@ -435,7 +435,7 @@ public:
protected:
virtual bool on_init();
virtual std::string on_get_name() const;
virtual bool on_is_activable(const GLCanvas3D::Selection& selection) const { return (selection.is_from_single_object() && !selection.is_wipe_tower() && !selection.is_modifier()); }
virtual bool on_is_activable(const GLCanvas3D::Selection& selection) const;
virtual void on_start_dragging(const GLCanvas3D::Selection& selection);
virtual void on_update(const UpdateData& data) {}
virtual void on_render(const GLCanvas3D::Selection& selection) const;