fix(protobuf): close config migration gaps (orphaned settings, startup crash)

The proto extraction had dropped several settings that still had struct
members and were used by the engine, and had resurrected two commented-out
ones. This closes those gaps so the generated config matches main.

Fixes startup crash `UnknownOptionException: outer_wall_filament_id`:
- Add proto defs (ported from main) for the 6 struct-backed per-region
  filament-id keys the engine reads and handle_legacy resolves into:
  outer_wall/inner_wall/internal_solid/sparse_infill/top_surface/
  bottom_surface_filament_id. Registered + serialized, but intentionally no
  tab UI (the coarse wall_filament/sparse_infill_filament/solid_infill_filament
  settings provide the UI). Without a def these threw at profile load.

Restore user settings dropped from the proto (def + preset + UI, from main):
- bridge_line_width, relative_bridge_angle, lightning_overhang_angle,
  lightning_prune_angle, lightning_straightening_angle (print.proto)
- initial_layer_fan_speed (filament.proto)

Remove settings the bootstrap resurrected from commented-out code (absent in
main; commented-out struct members): filament_extruder_id (coInts),
spaghetti_detector. The separate custom-gcode filament_extruder_id placeholder
var is untouched.

Add missing printer virtual_preset_keys so vendor machine profiles are not
stripped on load: use_3mf, support_parallel_printheads,
parallel_printheads_count, parallel_printheads_bed_exclude_areas.

Verified: run_codegen validate PASSED (653 fields); libslic3r builds;
OrcaSlicer_profile_validator over all bundled profiles now exits 0 with zero
errors (previously crashed / stripped keys).
This commit is contained in:
ExPikaPaka
2026-07-09 08:38:08 +02:00
parent 1c576873fc
commit 4583516e4a
4 changed files with 188 additions and 12 deletions

View File

@@ -79,6 +79,13 @@ message PrinterSettings {
option (virtual_preset_keys) = "wrapping_detection_layers";
option (virtual_preset_keys) = "wrapping_exclude_area";
option (virtual_preset_keys) = "z_hop_types";
// Printer keys with hand-written defs in init_common_params (not proto fields);
// declared here so they land in s_Preset_printer_options and vendor machine
// profiles that set them are not stripped on load.
option (virtual_preset_keys) = "use_3mf";
option (virtual_preset_keys) = "support_parallel_printheads";
option (virtual_preset_keys) = "parallel_printheads_count";
option (virtual_preset_keys) = "parallel_printheads_bed_exclude_areas";
float extruder_clearance_height_to_rod = 1 [
(label) = "Height to rod",