mirror of
https://github.com/SoftFever/OrcaSlicer.git
synced 2025-07-13 17:58:03 -06:00
Updated AMF/3MF import to pass configuration into a DynamicPrintConfig
instead of PresetBundle.
This commit is contained in:
parent
1398d5d09a
commit
9a3db200a5
10 changed files with 81 additions and 134 deletions
|
@ -133,11 +133,12 @@ int main(int argc, char **argv)
|
|||
// apply command line options to a more specific DynamicPrintConfig which provides normalize()
|
||||
// (command line options override --load files)
|
||||
print_config.apply(config, true);
|
||||
print_config.normalize();
|
||||
|
||||
// write config if requested
|
||||
if (! cli_config.save.value.empty())
|
||||
if (! cli_config.save.value.empty()) {
|
||||
print_config.normalize();
|
||||
print_config.save(cli_config.save.value);
|
||||
}
|
||||
|
||||
if (cli_config.help) {
|
||||
printUsage();
|
||||
|
@ -153,7 +154,7 @@ int main(int argc, char **argv)
|
|||
}
|
||||
Model model;
|
||||
try {
|
||||
model = Model::read_from_file(file);
|
||||
model = Model::read_from_file(file, &print_config, true);
|
||||
} catch (std::exception &e) {
|
||||
boost::nowide::cerr << file << ": " << e.what() << std::endl;
|
||||
exit(1);
|
||||
|
@ -226,6 +227,7 @@ int main(int argc, char **argv)
|
|||
print.auto_assign_extruders(mo);
|
||||
print.add_model_object(mo);
|
||||
}
|
||||
print_config.normalize();
|
||||
print.apply_config(print_config);
|
||||
std::string err = print.validate();
|
||||
if (err.empty())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue