110{
111
112 if (canceled || eptr)
113 return;
114
115 if (!
p->err.empty()) {
118 return;
119 }
120
121 std::string name = wxFileName(
p->path).GetName().ToUTF8().data();
122
123 if (
p->profile.empty()) {
124 p->plater->get_notification_manager()->push_notification(
127 _u8L(
"The imported SLA archive did not contain any presets. "
128 "The current SLA presets were used as fallback."));
129 }
130
131 if (
p->sel != Sel::modelOnly) {
132 if (
p->profile.empty())
133 p->profile =
p->plater->sla_print().full_print_config();
134
136 for (auto object : objects)
137 if (object->volumes.size() > 1)
138 {
140 _(
L(
"You cannot load an SLA project with a multi-part object on the bed")) +
"\n\n" +
141 _(
L(
"Please check your object list before preset changing.")),
142 _(
L(
"Attention!")) );
143 return;
144 }
145
146 DynamicPrintConfig config = {};
147 config.apply(SLAFullPrintConfig::defaults());
148 config += std::move(
p->profile);
149
150 wxGetApp().preset_bundle->load_config_model(name, std::move(config));
151 wxGetApp().load_current_presets();
152 }
153
154 if (!
p->mesh.empty()) {
155 bool is_centered = false;
156 p->plater->sidebar().obj_list()->load_mesh_object(TriangleMesh{std::move(
p->mesh)},
157 name, is_centered);
158 }
159
160 if (!
p->config_substitutions.empty())
162
164}
#define _(s)
Definition 3mf.cpp:306
#define L(s)
Definition ExtrusionEntity.cpp:25
@ WarningNotificationLevel
Definition NotificationManager.hpp:224
void reset()
Definition SLAImportJob.cpp:88
void show_error(wxWindow *parent, const wxString &message, bool has_code_excerpts)
Definition GUI.cpp:296
void show_substitutions_info(const PresetsConfigSubstitutions &presets_config_substitutions)
Definition GUI.cpp:429
void show_info(wxWindow *parent, const wxString &message, const wxString &title)
Definition GUI.cpp:316
@ CustomNotification
Definition NotificationManager.hpp:66
std::vector< ModelObject * > ModelObjectPtrs
Definition CutUtils.hpp:13
#define _u8L(s)
Definition I18N.hpp:11