Allow for expressions in start/end machine/extruder code extruder_nr field #18025
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.
Description
When using templated string variables in start/end machine/extruder gcode users may enter an optional extruder nr
{expr[, extruder_nr]}
. When providing anextruder_nr
the expression is evaluated using the extruder stack with the provided extruder_nr. However, this workflow was broken when providing a variable that would evaluate to an extruder nr. E.g. the start codeM140 S{material_bed_temperature, 0}
will produce the expected result butM140 S{material_bed_temperature, initial_extruder_nr}
wouldn't.This was an oversight when implementing #16962, before merging this PR we did already support this behavior.
fixes #17501
CURA-11536
Type of change
How Has This Been Tested?
YEs
Test Configuration:
Checklist: