Allow specifying print order within each layer (#3685)

* Allow reordering objects regardless of print seq

* Add option to control the layer print order

* Sort object by their order in object list instead of id

* Show print order when print order is the same as the object list

* Ensure the print order when print order is same as object list

* Update option name

---------

Co-authored-by: SoftFever <softfeverever@gmail.com>
This commit is contained in:
Noisyfox
2024-01-21 20:11:09 +08:00
committed by GitHub
parent 93bccf498c
commit d661ebcbdb
9 changed files with 54 additions and 28 deletions

View File

@@ -7304,10 +7304,10 @@ void GLCanvas3D::_render_overlays()
auto curr_plate = wxGetApp().plater()->get_partplate_list().get_curr_plate();
auto curr_print_seq = curr_plate->get_real_print_seq();
bool sequential_print = (curr_print_seq == PrintSequence::ByObject);
const Print* print = fff_print();
bool sequential_print = (curr_print_seq == PrintSequence::ByObject) || print->config().print_order == PrintOrder::AsObjectList;
std::vector<const ModelInstance*> sorted_instances;
if (sequential_print) {
const Print* print = fff_print();
if (print) {
for (const PrintObject *print_object : print->objects())
{