NEW:active "import obj color" in command line

jira: none
Change-Id: I8bc5d4a1eea116305037b8194ff1d2e8aab83ce9
(cherry picked from commit 7df9f9d27d174b30a54ed27756d4a4a157557019)
(cherry picked from commit b97d44dae4854c342b835d3fd5265a22aec5d174)
This commit is contained in:
zhou.xu
2024-06-18 17:25:12 +08:00
committed by Noisyfox
parent b54c5769ff
commit cfa00b938f
10 changed files with 77 additions and 44 deletions

View File

@@ -63,13 +63,14 @@
#include "libslic3r/Utils.hpp"
#include "libslic3r/PresetBundle.hpp"
#include "libslic3r/ClipperUtils.hpp"
#include "libslic3r/ObjColorUtils.hpp"
// For stl export
#include "libslic3r/CSGMesh/ModelToCSGMesh.hpp"
#include "libslic3r/CSGMesh/PerformCSGMeshBooleans.hpp"
#include "GUI.hpp"
#include "GUI_App.hpp"
#include "GuiColor.hpp"
#include "GUI_ObjectList.hpp"
#include "GUI_Utils.hpp"
#include "GUI_Factories.hpp"
@@ -5015,7 +5016,6 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
std::vector<Preset *> project_presets;
bool is_xxx;
Semver file_version;
//ObjImportColorFn obj_color_fun=nullptr;
auto obj_color_fun = [this, &path](std::vector<RGBA> &input_colors, bool is_single_color, std::vector<unsigned char> &filament_ids,
unsigned char &first_extruder_id) {
@@ -5023,7 +5023,7 @@ std::vector<size_t> Plater::priv::load_files(const std::vector<fs::path>& input_
const std::vector<std::string> extruder_colours = wxGetApp().plater()->get_extruder_colors_from_plater_config();
ObjColorDialog color_dlg(nullptr, input_colors, is_single_color, extruder_colours, filament_ids, first_extruder_id);
color_dlg.CenterOnScreen();
if (color_dlg.ShowModal() != wxID_OK) {
if (color_dlg.ShowModal() != wxID_OK) {
filament_ids.clear();
}
};