104{
108
109
110
111
112
113
114
115 size_t presets_loaded = 0;
116 try {
117 auto [config_substitutions, loaded] =
preset_bundle->load_vendor_configs_from_json(
119 UNUSED(config_substitutions);
120
121 assert(config_substitutions.empty());
122 presets_loaded = loaded;
123 } catch (const std::exception &e) {
124 BOOST_LOG_TRIVIAL(fatal) << boost::format("Vendor bundle: `%1%`: cannot be loaded, leaving it out: %2%") % vendor_name % e.what();
125 return false;
126 }
129 BOOST_LOG_TRIVIAL(error) << boost::format("Vendor bundle: `%1%`: No vendor information defined, cannot install.") % vendor_name;
130 return false;
131 }
132 if (presets_loaded == 0) {
133 BOOST_LOG_TRIVIAL(error) << boost::format("Vendor bundle: `%1%`: No profile loaded.") % vendor_name;
134 return false;
135 }
136
137 BOOST_LOG_TRIVIAL(
trace) << boost::format(
"Vendor bundle: `%1%`: %2% profiles loaded.") % vendor_name % presets_loaded;
139 return true;
140}
@ LoadSystem
Definition PresetBundle.hpp:605
#define UNUSED(x)
Definition libslic3r.h:112
void trace(unsigned int level, const char *message)
Definition utils.cpp:247
@ Disable
Definition Config.hpp:243