diff --git a/src/GUI/Plater.cpp b/src/GUI/Plater.cpp index 678edfca5..c6eaf0421 100644 --- a/src/GUI/Plater.cpp +++ b/src/GUI/Plater.cpp @@ -109,8 +109,27 @@ Plater::Plater(wxWindow* parent, const wxString& title, std::shared_ptrobject_identifier; + const auto& input_files{open_model(this, *(this->settings), wxTheApp->GetTopWindow())}; + for (const auto& f : input_files) { + Log::info(LogChannel, (wxString(L"Calling Load File for ") + f).ToStdWstring()); + this->load_file(f); + } + + // abort if no objects actually added. + if (start_object_id == this->object_identifier) return; + + // save the added objects + + // get newly added objects count + } +std::vector Plater::load_file(const wxString& file) { + return std::vector(); + +} }} // Namespace Slic3r::GUI diff --git a/src/GUI/Plater.hpp b/src/GUI/Plater.hpp index 58a25d0a1..316c0b034 100644 --- a/src/GUI/Plater.hpp +++ b/src/GUI/Plater.hpp @@ -44,14 +44,19 @@ private: bool processed {false}; - std::vector objects {}; + std::vector objects {}; //< Main object vector. + + size_t object_identifier {0U}; //< Counter for adding objects to Slic3r std::stack undo {}; std::stack redo {}; wxNotebook* preview_notebook {new wxNotebook(this, -1, wxDefaultPosition, wxSize(335,335), wxNB_BOTTOM)}; - Plate2D* canvas2D {}; + Plate2D* canvas2D {}; //< 2D plater canvas + + /// Handles the actual load of the file from the dialog handoff. + std::vector load_file(const wxString& file); const std::string LogChannel {"GUI_Plater"}; //< Which log these messages should go to.