Repository navigation
feat: exports open in Bambu Studio with their process; shambu verify; include order fix (0.6.0) - #10
Merged
Merged
Conversation
…iff_keys for the preset bookkeeping; spec and post-mortem for the GUI process loss
…des ∪ diff, secondary filament slots, verifier)
…recipe, soft recipe scope WARN
…d) with the override values, the plate unsliced, the GUI slice as the check
… the project opens behind a running window
…et with the diff list
… mirror the GUI's derived infill keys; fix Plan's filament_resolution argument
…g into the export
…nd filament override lists
…pening a project in Studio
…spect override lists, slice --settings-from
…ts, settings, filaments, maps, plates, objects, positions)
…the file or spec does not load
…rintConfig key does nothing per object)
…ight is global and lives in two-filament-plate
…er-key note, interface key provenance, shorter Next line
…roject before verifying it
…al keys, CLI reset path, Studio cites
…, split numeric vectors only, PatchSet enforces declared touches
…ch, keep the input's lists on slice --settings-from, resolve the inherits parent first, refuse filament and printer keys in --process-set
…erived infill keys
…ill and reference text, 0.6.0
…rints only after a match, names the search box
…pin, object filament and plate, embedded copies, plate map mode, variant blocks, project options, tower keys, exit 1 for a bad spec; open warning wording
…n shambu's chain does not define it (Studio lists only keys that differ from its base)
…eset); the fake export can write the loaded presets and object settings as the CLI does
…) for Pipeline.plan and verify.expected_object_settings
…the colour count before it names a slot, so slots 0..N+1 in ascending order work
… the explicit process values before the bookkeeping patch; a mismatch is a verify problem and keeps the export in the run folder; the test fakes write the loaded presets as the CLI does
….slot_keys), FAIL any inherits_group parent other than the system base for every slot, and keep the % sign significant except for percent-only keys
… (modified) suffix, no Print until verify exits 0, each filament on its planned nozzle, a bad spec is exit 1, the open WARN asks to check the front window
…he bookkeeping; pad filament ids
…parent per slot, percent-only keys; hand-back and docs text
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why
On 29 October a shambu project opened in Bambu Studio 02.08.02.61 showed the stock
0.20mm Standard @BBL X2Dprocess: 2 walls, 15 % grid, no PLA interface, and the GUI re-sliced at 157 g instead of 216 g. Post-mortem:docs/errors/2026-10-29-gui-open-drops-process.md. Spec and review record:docs/specs/2026-10-29-gui-preset-bookkeeping.md.Root cause, confirmed in the Studio source at tag
v02.08.02.61: shambu exported the process as a user preset that exists only in the file, withdifferent_settings_to_system = ["", "", "", ""]. Studio resets every key not named in that list to the base preset (Preset.cpp:2258-2269,PrintConfig.cpp:9218), then selects the base clean. Per-object settings never pass through presets, which is why the per-object recipes survived.Two more defects found on the way:
presets.resolve()mergedincludetemplates after the preset's own keys (Studio: parent, include, leaf;PresetBundle.cpp:5109,:5142-5144,:5158), so the headless slice used three X2D filament values the GUI never uses; andskeleton_/skin_infill_densitydid not followsparse_infill_densityas the GUI couples them (Tab.cpp:2106-2111).What changes
print_settings_id= the base system preset,inherits_group[slot] = "", anddifferent_settings_to_system[slot]= sorted(explicit overrides ∪ keys that differ from the base), merged with the CLI's own entries, for the process, each filament and the printer. Sliced exports keep their G-code (bookkeeping-only write).slice --settings-fromdoes the same and keeps the input's listed keys.presets.resolve()in Studio's order;diff_keys(); the derived infill keys.dual-material-interfaceis an[object]recipe (where the GUI keeps it);two-filament-platecarries the plate-wide keys; a mis-scoped recipe gets a WARN.shambu patch FILE --process-set KEY=VALUE/--process-unset KEY, keeping the list right;inspectshows the override lists.shambu verify FILE.3mf --against SPECreports every process, filament, printer, map, bed, object setting and position that differs from the spec, with the Studio reason; exit 0 no FAIL, 1 any FAIL or a spec that does not load, 3 a project that does not read.Plater.cpp:9578-9581); the GUI estimate must land within 1 min and 1 g of shambu's, else save the project under a new name andshambu verifyit; Print only then. No bypass of the GUI anywhere.shambu openwarns when Studio was already running.Verification
make check: ruff, mypy, pytest green (see the last commit's CI).print_settings_id0.20mm Standard @BBL X2D, 16 listed process keys, system filament ids, Studio estimate 7 h 37 min / 241.0 g;shambu verifyon that export exits 0 (98 items).shambu verifyon the 29 October GUI-saved file lists the resets (wall_loops 4→2, sparse_infill_density, brim_type, support_interface_filament 2→0, ...) with thePreset.cppcite.shambu verifythe save.