mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-08-05 09:07:39 +00:00
Divided filament for features (#14042)
* Implement legacy key handling to address possible profile issues following semantic change of per feature filaments * Reimport base * Fix inner wall * Profiles update --------- Co-authored-by: igiannakas <ioannis@my-spot.co.uk>
This commit is contained in:
@@ -2968,34 +2968,6 @@ private:
|
||||
|
||||
std::ostream& operator<<(std::ostream& os, const DynamicConfig::DynamicConfigDifference& diff);
|
||||
|
||||
namespace ConfigMigrations {
|
||||
|
||||
template <typename ConfigLike>
|
||||
inline int migrate_legacy_feature_filament_defaults(ConfigLike &cfg)
|
||||
{
|
||||
static const char *feature_filament_keys[] = {
|
||||
"wall_filament",
|
||||
"sparse_infill_filament",
|
||||
"solid_infill_filament"
|
||||
};
|
||||
|
||||
int converted_count = 0;
|
||||
for (const char *key : feature_filament_keys) {
|
||||
if (!cfg.has(key))
|
||||
continue;
|
||||
|
||||
const ConfigOption *opt = cfg.option(key);
|
||||
if (opt != nullptr && opt->getInt() == 1) {
|
||||
cfg.set_key_value(key, new ConfigOptionInt(0));
|
||||
++converted_count;
|
||||
}
|
||||
}
|
||||
|
||||
return converted_count;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Configuration store with a static definition of configuration values.
|
||||
// In Slic3r, the static configuration stores are during the slicing / g-code generation for efficiency reasons,
|
||||
// because the configuration values could be accessed directly.
|
||||
|
||||
Reference in New Issue
Block a user