mirror of
https://github.com/OrcaSlicer/OrcaSlicer.git
synced 2026-12-04 18:58:00 -05:00
Add printing_filament_types placeholder for the output filename (#14706)
Adds the printing_filament_types placeholder. It lists the filament types that are actually printed on the plate, with duplicates removed, in filament order, joined with "_" (for example ABS_PLA). It works in the file name template and in custom G-code. Before slicing, the file name shows the placeholder unfilled, the same way print_time does. Nothing changes for templates that don't use it.
This commit is contained in:
1 parent
5ea64864ef
commit
f273fe8ac1
5 files changed
+60
-4
No files matched your search
@@ -5873,6 +5873,7 @@ DynamicConfig PrintStatistics::config() const
|
||||
config.set_key_value("initial_tool", new ConfigOptionInt(static_cast<int>(this->initial_tool)));
|
||||
config.set_key_value("initial_extruder", new ConfigOptionInt(static_cast<int>(this->initial_tool)));
|
||||
config.set_key_value("initial_no_support_extruder", new ConfigOptionInt(static_cast<int>(this->initial_no_support_tool)));
|
||||
config.set_key_value("printing_filament_types", new ConfigOptionString(this->printing_filament_types));
|
||||
return config;
|
||||
}
|
||||
|
||||
@@ -5882,7 +5883,8 @@ DynamicConfig PrintStatistics::placeholders()
|
||||
for (const std::string key : {
|
||||
"print_time", "normal_print_time", "silent_print_time",
|
||||
"used_filament", "extruded_volume", "extruded_volume_total", "total_cost", "total_weight", "extruded_weight_total",
|
||||
"initial_tool", "initial_extruder", "initial_no_support_extruder", "total_toolchanges", "total_wipe_tower_cost", "total_wipe_tower_filament"})
|
||||
"initial_tool", "initial_extruder", "initial_no_support_extruder", "total_toolchanges", "total_wipe_tower_cost", "total_wipe_tower_filament",
|
||||
"printing_filament_types"})
|
||||
config.set_key_value(key, new ConfigOptionString(std::string("{") + key + "}"));
|
||||
return config;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user