Use filament profile default colour on selection#10258
Open
A-Addinall wants to merge 1 commit intobambulab:masterfrom
Open
Use filament profile default colour on selection#10258A-Addinall wants to merge 1 commit intobambulab:masterfrom
A-Addinall wants to merge 1 commit intobambulab:masterfrom
Conversation
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.
PR Draft: Use Filament Profile Default Colour When Selecting Filament Presets
Proposed Title
Use filament profile default colour when selecting filament presets
Summary
This change updates Bambu Studio so filament selections use the selected filament preset's
default_filament_colourinstead of keeping the previous project or AMS slot colour.The affected flows are:
This makes the displayed project filament colour follow the selected filament profile, which is useful when filament profiles are used as the source of truth for material colour.
Problem
When a user selects a different filament profile, Bambu Studio can keep using the existing
filament_colourvalue from the project or AMS slot instead of the selected profile'sdefault_filament_colour.That means the filament type/name can change while the visible colour remains stale.
Example:
default_filament_colouris beige.Implementation
Added a small GUI helper:
src/slic3r/GUI/FilamentPresetUtils.hppThe helper centralises:
default_filament_colourUpdated:
src/slic3r/GUI/PresetComboBoxes.cppPresetComboBox::update_ams_color()now prefers the selected preset'sdefault_filament_colour.filament_colourwhen the preset has no default colour.src/slic3r/GUI/Plater.cppfilament_colourandfilament_multi_colourare updated from the selected preset's default colour.src/slic3r/GUI/AMSMaterialsSetting.cppBehaviour
If the selected filament preset has a non-empty
default_filament_colour, that colour is used.If the selected preset does not define a default colour, existing fallback behaviour is preserved.
Validation
Built locally on Windows with Visual Studio 2022, Release configuration.
Tested with local filament profiles and
.3mfprojects:.3mffiles retain the corrected project colours.Known Limitation
Hardware AMS slot updates cannot be fully validated from a locally compiled unsigned Bambu Studio build.
The network/printer layer reports:
Your software is not signed, and some printing functions have been restricted. Please use the officially signed software version.Because of that, local testing can validate the UI and project config behaviour, but actual printer/AMS hardware persistence requires an officially signed build.
Suggested Reviewer Notes
The change intentionally affects only the selected preset colour resolution and keeps existing fallback behaviour when no default colour is defined.
The AMS hardware command path is not changed directly; the dialog simply uses the selected profile colour before the existing Confirm flow sends the current dialog colour.