From 4a026690549eece385d6dc753c558848d7afad15 Mon Sep 17 00:00:00 2001 From: "zhimin.zeng" Date: Thu, 5 Jun 2025 18:27:27 +0800 Subject: [PATCH] FIX: cannot slice when print by object with one multi-color object jira: STUDIO-12518 Change-Id: Ia54f979c69aa19aaa44bf1cb1d83ec973f6eb8f3 (cherry picked from commit 6c48ded6b54bd20cb55ae6e4c2c155dc25473ed7) --- src/libslic3r/GCode.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/GCode.cpp b/src/libslic3r/GCode.cpp index bc219f694e..705369cb7a 100644 --- a/src/libslic3r/GCode.cpp +++ b/src/libslic3r/GCode.cpp @@ -2415,7 +2415,6 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato // Find tool ordering for all the objects at once, and the initial extruder ID. // If the tool ordering has been pre-calculated by Print class for wipe tower already, reuse it. tool_ordering = print.tool_ordering(); - tool_ordering.cal_most_used_extruder(print.config()); tool_ordering.assign_custom_gcodes(print); if (tool_ordering.all_extruders().empty()) // No object to print was found, cancel the G-code export. @@ -2982,6 +2981,9 @@ void GCode::_do_export(Print& print, GCodeOutputStream &file, ThumbnailsGenerato } print.throw_if_canceled(); } + + tool_ordering.cal_most_used_extruder(print.config()); + // Process all layers of all objects (non-sequential mode) with a parallel pipeline: // Generate G-code, run the filters (vase mode, cooling buffer), run the G-code analyser // and export G-code into file. @@ -6666,7 +6668,7 @@ std::string GCode::travel_to(const Point& point, ExtrusionRole role, std::string // if (used_external_mp_once) m_avoid_crossing_perimeters.reset_once_modifiers(); // } } - + // if needed, write the gcode_label_objects_end then gcode_label_objects_start m_writer.add_object_change_labels(gcode);