Fixes invalid inherits/compatible_printers/compatible_prints references that point at a deleted or renamed preset. (#14595)

* fix profile reference for Creality

* fix profile reference for Blocks

* fix profile reference for OrcaArena

* fix profile reference for re3D

* fix profile reference for Chuanying

* fix profile reference for Prusa

* fix profile reference for Wanhao France

* fix profile reference for MagicMaker

* fix profile reference for Afinia

Remove the ABS/ABS+/PLA/TPU/Value ABS/Value PLA filament presets that referenced the non-existent "Afinia H400 Pro" printer. The real printer is "Afinia H+1(HS)", already served by the @HS filament variants.

* fix profile reference for Comgrow

Remove the orphaned "0.20mm Standard @Comgrow T500 1.0" process preset and its process_list entry. Its only compatible printer "Comgrow T500 1.0 nozzle" never existed (the T500 model defines nozzle diameters 0.4/0.6/0.8 only).

* always run check_preset_references
This commit is contained in:
SoftFever
2026-07-05 20:26:36 +08:00
committed by GitHub
parent ee1f4ef1d6
commit 8747605930
109 changed files with 95 additions and 538 deletions

View File

@@ -96,7 +96,6 @@ int main(int argc, char* argv[])
("vendor,v", po::value<std::string>()->default_value(""), "Vendor name. Optional, all profiles present in the folder will be validated if not specified")
("generate_presets,g", po::value<bool>()->default_value(false), "Generate user presets for mock test")
("check_filament_subtypes,f", po::bool_switch()->default_value(false), "Also flag printers with duplicate (ambiguous) filament subtypes. Off unless this flag is present.")
("check_preset_references,r", po::bool_switch()->default_value(false), "Also flag presets whose inherits/compatible_printers/compatible_prints reference a deleted or renamed preset. Off unless this flag is present.")
("log_level,l", po::value<int>()->default_value(2), "Log level. Optional, default is 2 (warning). Higher values produce more detailed logs.");
// clang-format on
@@ -121,7 +120,6 @@ int main(int argc, char* argv[])
int log_level = vm["log_level"].as<int>();
bool generate_user_preset = vm["generate_presets"].as<bool>();
bool check_filament_subtypes = vm["check_filament_subtypes"].as<bool>();
bool check_preset_references = vm["check_preset_references"].as<bool>();
// check if path is valid, and return error if not
if (!fs::exists(path) || !fs::is_directory(path)) {
@@ -168,7 +166,7 @@ int main(int argc, char* argv[])
return 0;
}
if (preset_bundle->has_errors(check_filament_subtypes, check_preset_references)) {
if (preset_bundle->has_errors(check_filament_subtypes)) {
std::cout << "Validation failed" << std::endl;
return 1;
}

View File

@@ -5528,7 +5528,7 @@ void PresetBundle::set_default_suppressed(bool default_suppressed)
printers.set_default_suppressed(default_suppressed);
}
bool PresetBundle::has_errors(bool check_duplicate_filament_subtypes, bool check_references) const
bool PresetBundle::has_errors(bool check_duplicate_filament_subtypes) const
{
if (m_errors != 0 || printers.m_errors != 0 || filaments.m_errors != 0 || prints.m_errors != 0)
return true;
@@ -5551,7 +5551,7 @@ bool PresetBundle::has_errors(bool check_duplicate_filament_subtypes, bool check
if (check_duplicate_filament_subtypes && this->check_duplicate_filament_subtypes())
has_errors = true;
if (check_references && this->check_preset_references())
if (this->check_preset_references())
has_errors = true;
return has_errors;

View File

@@ -485,9 +485,8 @@ public:
return { Preset::TYPE_PRINTER, Preset::TYPE_SLA_PRINT, Preset::TYPE_SLA_MATERIAL };
}
// Orca: for validation only. The duplicate filament subtype and preset-reference checks are
// opt-in for now (enabled per-vendor by the profile-check CI as vendors are cleaned up).
bool has_errors(bool check_duplicate_filament_subtypes = false, bool check_preset_references = false) const;
// Orca: for validation only.
bool has_errors(bool check_duplicate_filament_subtypes = false) const;
// Orca: for validation only. Flag any system preset whose inherits / compatible_printers /
// compatible_prints references a deleted (unknown) or renamed (old) preset name.