Commit Graph
1 Commits
Author SHA1 Message Date
HanifKoh 6ba9eb49e7 Size the CLI's Filament Index Tables to the Loaded Filaments (#17244)
When `--load-filaments` names more presets than the project has filaments, the CLI now grows the project to the loaded count before the config merge. The new filament slots go in before the printer's slot in `inherits_group`, `different_settings_to_system` and `compatible_machine_expression_group`. Before, the merge read past the end of its index tables, which aborts under libstdc++ assertions, and the new filament overwrote the printer's inheritance, changed settings and compatibility condition.

The project's own filaments keep their per-variant values, also when the loaded count equals the project's variant count.

An empty `--load-filaments` entry past the project's filament count now fails with `CLI_INVALID_PARAMS` and names the slot, since there is no project filament to keep there. `--load-defaultfila` still fills such a slot with the first loaded preset.

Adds the `cli_load_filaments_count` CLI test.
2026-11-10 18:53:30 -06:00