Color change - handling Color Change data stored for different

printer configuration:

ss -> sm : Just apply the color changes of the original ss project at the active extruder.
ss -> mm : There are no tool changes stored. Ignore color changes, they are invalid because they are extruder non-specific.

sm -> ss : Apply tool changes as color changes (tool changes remember the target color), apply original color changes.
sm -> mm : Ignore both color changes and tool changes.

mm -> ss/sm : Ignore both color changes and tool changes.
This commit is contained in:
bubnikv 2020-02-06 14:03:18 +01:00
parent acf5bfd8e2
commit fb235cb675
4 changed files with 45 additions and 17 deletions

View file

@ -709,7 +709,11 @@ Print::ApplyStatus Print::apply(const Model &model, DynamicPrintConfig new_full_
model_object_status.emplace(model_object->id(), ModelObjectStatus::New);
} else {
if (m_model.custom_gcode_per_print_z != model.custom_gcode_per_print_z) {
update_apply_status(custom_per_printz_gcodes_tool_changes_differ(m_model.custom_gcode_per_print_z.gcodes, model.custom_gcode_per_print_z.gcodes) ?
update_apply_status(num_extruders_changed ||
// Tool change G-codes are applied as color changes for a single extruder printer, no need to invalidate tool ordering.
//FIXME The tool ordering may be invalidated unnecessarily if the custom_gcode_per_print_z.mode is not applicable
// to the active print / model state, and then it is reset, so it is being applicable, but empty, thus the effect is the same.
(num_extruders > 1 && custom_per_printz_gcodes_tool_changes_differ(m_model.custom_gcode_per_print_z.gcodes, model.custom_gcode_per_print_z.gcodes)) ?
// The Tool Ordering and the Wipe Tower are no more valid.
this->invalidate_steps({ psWipeTower, psGCodeExport }) :
// There is no change in Tool Changes stored in custom_gcode_per_print_z, therefore there is no need to update Tool Ordering.