Skip to content

Conversation

@ansonl
Copy link
Contributor

@ansonl ansonl commented Nov 7, 2025

Description

Show the user's currently selected filaments for slicing at the top of the AMS Material Settings filament dropdown if those filaments are available.

When the user is opening the AMS filament selection dropdown, the user likely wants to change the filament to match their selected filament in the sliced model to print with.

We can move these active filaments to the top of the list so that the user does not need to scroll down and hunt for the exact match. This is convenient, saves time, and helps the user select the correct filament in the AMS even if they have a custom filament name.

I got the active filament preset names with wxGetApp().preset_bundle->filament_presets and found the matching actual Preset() from all Presets in wxGetApp().preset_bundle->filaments. Bambu has hardcoded preferred filament names to sort first into sorted_names.
I add the preset's base filament alias based on following inherits matched to other filament's name to the top of sorted_names

Name: Generic PETG - Alias: Generic PETG - Inherits: - no inherits
Name: Bambu PLA-CF @BBL X1C - Alias: Bambu PLA-CF - Inherits: - no inherits
Name: PETG Kingroon - Alias: - Inherits: Generic PETG - no alias
Name Bambu PLA Silk - Bronze - Name: Bambu PLA Silk - Bronze - Alias: - Inherits: Bambu PLA Silk @BBL X1C - no alias, nested inherit

I think a base filament has no inherits and has an alias and renamed filament based off the base filament has inherits but no alias so the inheritance back to the parent filament can be traced back by inherits (name of the inherited filament) > name > alias (alias of the inherited filament).

If there is a way to get the active filament presets as Preset() objects directly, we could use that method instead.

Screenshots/Recordings/Graphs

Example user selected filaments for slicing. (PETG Kingroon inherits Generic PETG with a custom name)

image

Shows the following selected filaments at the top of the AMS filament dropdown.

image

Tests

I have tried setting my active filaments in OrcaSlicer and opening the AMS Material Selection. The top entries reflect my active filament selection.

…op of the AMS Material Selection combo box.

It is likely the user wants to set the material to the currently active filament.
@ansonl ansonl marked this pull request as draft November 7, 2025 04:27
@ansonl ansonl marked this pull request as ready for review November 7, 2025 18:19
@ansonl
Copy link
Contributor Author

ansonl commented Nov 12, 2025

This PR now handles nested inheritance!
e.g.: Bambu PLA Silk - Bronze > Bambu PLA Silk @BBL X1C (Bambu PLA Silk)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant