Fix Elegoo CC2 layer stats G-code and missing Giga preset renamed_from (#14136)

* Sync Elegoo profiles from ElegooSlicer

Update vendor Elegoo.json, filament/machine/process trees, and OrcaFilamentLibrary
Elegoo entries. Align machine default material names with existing filament preset names.

* feat: expose filament_name for G-code export filename format

Derive from filament_settings_id for the first active extruder and strip the suffix after @, matching ElegooSlicer so filename_format can use {filament_name}.

* chore: reorder Elegoo entries in OrcaFilamentLibrary

Group Elegoo @base profiles and bump library version to 02.03.02.62.

* sync OrcaFilamentLibrary.json with Elegoo filament profiles

* fix: clean up Elegoo process renamed_from for profile validation

Add single renamed_from only where preset names changed from legacy Orca
names; remove duplicate Rapid @System library entries that conflicted with
ECC2 vendor presets.

* fix(profiles): add missing Elegoo renamed_from for profile validation

CI custom-preset tests still inherit legacy Orca preset names that no
longer exist after the Elegoo bundle update. Add renamed_from on process,
Neptune 4 machines, OrcaFilamentLibrary filaments, and Giga profiles so
inherits resolve again, without changing print parameters.

* fix(profiles,elegoo): resolve renamed presets and CC2 SET_PRINT_STATS_INFO G-code

Resolve legacy preset names through renamed_from when validating presets and loading external projects. Add missing renamed_from aliases for Elegoo Giga process and OrcaFilamentLibrary filaments. Combine TOTAL_LAYER and CURRENT_LAYER in one SET_PRINT_STATS_INFO command on Centauri Carbon 2 (ECC2), Centauri (EC), and Centauri Carbon (ECC) 0.4 nozzle profiles.

* chore(profiles): bump Elegoo and OrcaFilamentLibrary profile versions

Refresh installed profile bundles after renamed_from aliases, CC2 SET_PRINT_STATS_INFO G-code, and Preset.cpp renamed preset resolution fixes.
This commit is contained in:
wujie
2026-06-10 21:38:39 +08:00
committed by GitHub
parent a70b903a19
commit 3be36bdea4
46 changed files with 58 additions and 10 deletions

View File

@@ -2362,6 +2362,10 @@ bool PresetCollection::validate_preset(const std::string &preset_name, std::stri
const std::string canonical_inherit_name = this->canonical_preset_name(inherit_name);
it = this->find_preset_internal(canonical_inherit_name);
found = it != m_presets.end() && it->name == canonical_inherit_name && is_trusted(*it);
if (!found) {
it = this->find_preset_renamed(canonical_inherit_name);
found = it != m_presets.end() && is_trusted(*it);
}
if (found)
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": preset_name %1%, inherit_name %2%, found inherit in list")%preset_name %inherit_name;
else
@@ -2453,7 +2457,9 @@ std::pair<Preset*, bool> PresetCollection::load_external_preset(
if (!inherits.empty() && (different_settings_list.size() > 0)) {
auto iter = this->find_preset_internal(inherits);
if (iter != m_presets.end() && iter->name == inherits) {
if (iter == m_presets.end() || iter->name != inherits)
iter = this->find_preset_renamed(inherits);
if (iter != m_presets.end()) {
//std::vector<std::string> dirty_options = cfg.diff(iter->config);
BOOST_LOG_TRIVIAL(info) << __FUNCTION__ << boost::format(": change preset %1% inherit %2% 's value to %3% 's values")%original_name %inherits %path;
cfg.update_non_diff_values_to_base_config(iter->config, keys, different_settings_list, extruder_id_name, extruder_variant_name, *key_set1, *key_set2);
@@ -2505,7 +2511,9 @@ std::pair<Preset*, bool> PresetCollection::load_external_preset(
// and override its settings with the loaded ones.
assert(it == m_presets.end());
it = this->find_preset_internal(inherits);
found = it != m_presets.end() && it->name == inherits;
if (it == m_presets.end() || it->name != inherits)
it = this->find_preset_renamed(inherits);
found = it != m_presets.end();
if (found && profile_print_params_same(it->config, cfg)) {
// The system preset exists and it matches the values stored inside config.
if (select == LoadAndSelect::Always)