mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 09:47:58 -06:00
Improved Instance splitting :
- Added icon and context menu for Instance. - Added multiple selection and splitting for the instances (add new object with selected instances)
This commit is contained in:
parent
322b954c1c
commit
8fd6194403
7 changed files with 121 additions and 37 deletions
|
@ -2362,8 +2362,7 @@ bool Plater::priv::init_common_menu(wxMenu* menu, const bool is_part/* = false*/
|
|||
[this](wxCommandEvent&) { q->set_number_of_copies(); }, "textfield.png");
|
||||
|
||||
menu->AppendSeparator();
|
||||
wxMenuItem* item_instance_to_object = append_menu_item(menu, wxID_ANY, _(L("Set as a Separated Object")) + dots, _(L("Set an Instance as a Separate Object")),
|
||||
[this](wxCommandEvent&) { q->instance_to_separated_object(); }, "");
|
||||
wxMenuItem* item_instance_to_object = sidebar->obj_list()->append_menu_item_instance_to_object(menu);
|
||||
|
||||
if (q != nullptr)
|
||||
{
|
||||
|
@ -2773,16 +2772,6 @@ void Plater::set_number_of_copies(/*size_t num*/)
|
|||
decrease_instances(-diff);
|
||||
}
|
||||
|
||||
void Plater::instance_to_separated_object()
|
||||
{
|
||||
const int obj_idx = p->get_selected_object_idx();
|
||||
const int inst_idx = p->get_selection().get_instance_idx();
|
||||
if (obj_idx == -1 || inst_idx == -1)
|
||||
return;
|
||||
|
||||
sidebar().obj_list()->instance_to_separated_object(obj_idx, inst_idx);
|
||||
}
|
||||
|
||||
bool Plater::is_selection_empty() const
|
||||
{
|
||||
return p->get_selection().is_empty();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue