Implemented naming of the SLA export file based on the output file name

template.

Reworked naming of the plater exports to not use the output file name
template, but to derive the file name from the first printable object's name.

Fixed error handling: Reimpemented the Perl's "eval" blocks
as try / catch blocks.
This commit is contained in:
bubnikv 2018-12-03 13:14:28 +01:00
parent 041fae8148
commit d46d0dc365
25 changed files with 474 additions and 344 deletions
src/libslic3r

View file

@ -540,6 +540,15 @@ void Model::reset_auto_extruder_id()
s_auto_extruder_id = 1;
}
std::string Model::propose_export_file_name() const
{
for (const ModelObject *model_object : this->objects)
for (ModelInstance *model_instance : model_object->instances)
if (model_instance->is_printable())
return model_object->input_file;
return std::string();
}
ModelObject::~ModelObject()
{
this->clear_volumes();