From 3e67d9480383f4a639a26c861f8939b2ab8ef31b Mon Sep 17 00:00:00 2001 From: Lukas Matena Date: Tue, 4 Feb 2025 17:42:06 +0100 Subject: [PATCH] Make wipe tower position and rotation accessible in placeholder parser again --- src/libslic3r/PrintApply.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/libslic3r/PrintApply.cpp b/src/libslic3r/PrintApply.cpp index da73f2bc68..eac7d8df5d 100644 --- a/src/libslic3r/PrintApply.cpp +++ b/src/libslic3r/PrintApply.cpp @@ -1123,10 +1123,13 @@ Print::ApplyStatus Print::apply(const Model &model, DynamicPrintConfig new_full_ } // Check the position and rotation of the wipe tower. - if (model.wipe_tower() != m_model.wipe_tower()) { + if (model.wipe_tower() != m_model.wipe_tower()) update_apply_status(this->invalidate_step(psSkirtBrim)); - } m_model.wipe_tower() = model.wipe_tower(); + // Inform the placeholder parser about the position and rotation of the wipe tower. + m_placeholder_parser.set("wipe_tower_x", model.wipe_tower().position.x()); + m_placeholder_parser.set("wipe_tower_y", model.wipe_tower().position.y()); + m_placeholder_parser.set("wipe_tower_rotation_angle", model.wipe_tower().rotation); ModelObjectStatusDB model_object_status_db;