Skip to content

feat: make filament Serial field optional in CreatePresetsDialog#10873

Open
BenJule wants to merge 2 commits into
bambulab:masterfrom
BenJule:upstream/feat-optional-filament-serial
Open

feat: make filament Serial field optional in CreatePresetsDialog#10873
BenJule wants to merge 2 commits into
bambulab:masterfrom
BenJule:upstream/feat-optional-filament-serial

Conversation

@BenJule
Copy link
Copy Markdown

@BenJule BenJule commented May 22, 2026

Summary

Closes #10866

The filament Serial field in the Create/Edit Filament Presets dialog is currently mandatory — the dialog silently requires a non-empty value to build the preset name. This is confusing for users who want to create a generic filament preset without a specific serial/variant number.

Changes

  • The Serial field is now optional (label updated to "Serial (optional)")
  • When Serial is left blank the preset name is built as <Vendor> <Type> instead of <Vendor> <Type> <Serial>
  • When Serial is filled in but contains only invalid/special characters (i.e. remove_special_key() strips everything), the dialog shows a clear validation error instead of silently dropping the value:

    "The filament serial contains only invalid characters or spaces. Please correct it or leave it blank."

  • Existing validation for the vendor name field is unchanged

Before / After

Before After
Serial field required Serial field optional
Blank serial → preset creation blocked Blank serial → preset named Vendor Type
Invalid serial silently dropped Invalid serial → validation error with message

Testing

Tested the following scenarios:

  • Create preset with Serial filled in → preset name includes serial ✓
  • Create preset with Serial left blank → preset name is Vendor Type
  • Enter !!! as serial (all special chars) → validation error shown, dialog stays open ✓
  • Vendor field left blank → existing error shown as before ✓

BenJule and others added 2 commits May 22, 2026 11:59
## Summary

- The **Serial** field (labeled \"Variant\" in the upstream issue) in
the *Create Filament Preset* dialog is now optional
- Users can leave it blank when a filament has no meaningful variant
(e.g. Polymaker PolyLite PC)
- The field label now reads **Serial (optional)** to make this clear
- When blank, the preset is named `Vendor Type` instead of `Vendor Type
` with a trailing space

## Changes

`src/slic3r/GUI/CreatePresetsDialog.cpp`
- Removed the hard error when Serial is empty
- Relaxed escape-character and all-spaces validation to check only the
Vendor field (Serial can legitimately be empty)
- Preset name construction skips the serial component when it is empty
- Field label changed from `Serial` → `Serial (optional)`

## Test plan

- [ ] Create a filament preset with Serial left blank → preset is
created as `Vendor Type`
- [ ] Create a filament preset with Serial filled in → preset is created
as `Vendor Type Serial` (existing behaviour unchanged)
- [ ] Vendor field still required: leaving Vendor blank still shows an
error

Upstream issue: bambulab#10866
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.

Make the "Variant" field optional

1 participant