mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-11-25 23:01:09 -05:00
Some calls of the same script set fewer placeholders than the others, so a placeholder the editor offers could stop the slice with "Variable does not exist" on one path only: - layer_change_gcode set max_layer_z after processing the template. - Belt brim layers ran layer_change_gcode without most_used_physical_extruder_id or the mass values. Both layer change paths now share one helper. - Printers that aren't bed slingers ran time_lapse_gcode with only layer_num, layer_z and max_layer_z. Both timelapse paths now share one helper for the snapshot placeholders, which picks the snapshot position only when the template uses it. - The Type 1 wipe tower ran filament_start_gcode without layer_num, layer_z and max_layer_z, and filament_end_gcode without filament_extruder_id and max_layer_z. filament_extruder_id is the filament being unloaded, as in the Type 1 filament start G-code and the end-of-print filament end G-code. - The first filament start G-code on Bambu Lab printers had no layer_z or max_layer_z. The editor looks up a script's placeholder list by its option key, but the timelapse list was keyed timelapse_gcode while the option is time_lapse_gcode, so the editor showed no timelapse placeholders. The list and the name passed to placeholder_parser_process, which the placeholder validator looks up by, are now both time_lapse_gcode. previous_extruder and next_extruder hold filament indexes, and previous_extruder is -1 before any filament is loaded. filament_extruder_id is the extruder index in filament end G-code at a tool change outside the Type 1 wipe tower, and machine end G-code gets the value from the last end-of-print filament end G-code. layer_num is -1 before the first layer. total_wipe_tower_filament is a length in mm.
OrcaSlicer tests
Building, running and writing tests is documented on the wiki, under How to Test.
Two files here rather than there, because coding agents only read what is in the repository: