From c07a08205008124ccd646c20990974fb7e91f361 Mon Sep 17 00:00:00 2001 From: ExPikaPaka Date: Mon, 12 Oct 2026 14:03:43 +0200 Subject: [PATCH 1/3] Add the pipette icon on a line of its own Three other open texture-displacement branches add an icon to this list too. Reflowing the lines they also touch is what turns four one-word additions into four conflicts; a new line four lines away from the next one merges in any order. Order in the list is irrelevant - the map keys by file name. --- src/slic3r/GUI/Gizmos/GLGizmoTextureDisplacement.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoTextureDisplacement.cpp b/src/slic3r/GUI/Gizmos/GLGizmoTextureDisplacement.cpp index cda48ea06c..95384d3269 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoTextureDisplacement.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoTextureDisplacement.cpp @@ -3700,6 +3700,7 @@ void GLGizmoTextureDisplacement::ensure_panel_icons() // a monochrome ("normal", grey in the current theme) and an original-colour variant. static const std::vector names = { "texture_displacement_brush.svg", "texture_displacement_face.svg", "texture_displacement_connected_area.svg", + "texture_displacement_pipette.svg", // the Image panel's background dropper "texture_displacement_real_preview.svg", "texture_displacement_fast_preview.svg", "texture_displacement_checker.svg", "texture_displacement_distortion.svg", "texture_displacement_wireframe.svg", "texture_displacement_cross.svg", @@ -3709,8 +3710,7 @@ void GLGizmoTextureDisplacement::ensure_panel_icons() "texture_displacement_add.svg", "texture_displacement_add_negative.svg", "circle_paint.svg", "menu_obj_sphere.svg", "menu_obj_cube.svg", "menu_obj_cylinder.svg", "texture_displacement_map_unwrap.svg", "texture_displacement_map_view.svg", "texture_displacement_tile_repeat.svg", "menu_mirror_x.svg", - "texture_displacement_adjust.svg", "texture_displacement_pipette.svg", "canvas_drag.svg", - "texture_displacement_move_up.svg", + "texture_displacement_adjust.svg", "canvas_drag.svg", "texture_displacement_move_up.svg", "texture_displacement_move_down.svg", "texture_displacement_drag.svg", "texture_displacement_select_all.svg", "texture_displacement_erase_all.svg", }; From 60248cadd3d2d7304e40474842d91b18b8de8aa7 Mon Sep 17 00:00:00 2001 From: ExPikaPaka Date: Mon, 12 Oct 2026 15:14:22 +0200 Subject: [PATCH 2/3] Move the Image tool's declarations off the line main now uses store_panel_state() landed in the same place, from the .3mf persistence branch. Same declarations, a few lines down, after bake_standard(). --- src/slic3r/GUI/Gizmos/GLGizmoTextureDisplacement.hpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoTextureDisplacement.hpp b/src/slic3r/GUI/Gizmos/GLGizmoTextureDisplacement.hpp index 24eaaa1f9b..47b5495a85 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoTextureDisplacement.hpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoTextureDisplacement.hpp @@ -310,6 +310,12 @@ private: // Standard is active so what Preview shows is always what Bake will do. Returns true if it actually // changed something, so the caller can invalidate the preview. bool apply_standard_mode_presets(ModelVolume *mv); + // Standard mode's Bake: remesh to an even density, refine where the texture bends, then displace. + // The order matters and is the whole reason this is one button - a height map can only move + // existing vertices, so the mesh has to be prepared first, and remeshing after painting would drop + // the paint if it were not carried across (see prepare_mesh()). + void bake_standard(); + // Image mode's fixed values, on top of Standard's and pinned the same way (every frame, so the // preview cannot disagree with the bake): zero depth on every layer, and colour on wherever the // picture has any. Those two are what turn the displacement bake into "put this picture on the @@ -339,11 +345,6 @@ private: bool m_image_sec_place = true; bool m_image_sec_color = true; bool m_image_sec_bg = true; - // Standard mode's Bake: remesh to an even density, refine where the texture bends, then displace. - // The order matters and is the whole reason this is one button - a height map can only move - // existing vertices, so the mesh has to be prepared first, and remeshing after painting would drop - // the paint if it were not carried across (see prepare_mesh()). - void bake_standard(); // Queues one prepare_mesh() run on the job worker and commits its result when it lands. Every // mesh-preparation button goes through here - Pro's Remesh, Pro's adaptive Subdivide and Standard's From 8ac8a75056f4a354b26c0ae20132fa1dab8ea0ac Mon Sep 17 00:00:00 2001 From: ExPikaPaka Date: Mon, 12 Oct 2026 15:31:21 +0200 Subject: [PATCH 3/3] Include the headers GLGizmoImage.cpp uses directly Adds the includes misc-include-cleaner named: libslic3r/Point.hpp for Vec2d, Vec3f and Transform3d, GLGizmoTextureDisplacement.hpp for the base class, IconManager.hpp for the icon lookup, and cmath, cstddef and cstdlib for round, size_t and abs. --- src/slic3r/GUI/Gizmos/GLGizmoImage.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/slic3r/GUI/Gizmos/GLGizmoImage.cpp b/src/slic3r/GUI/Gizmos/GLGizmoImage.cpp index 4af7c0b21e..3dbc631e65 100644 --- a/src/slic3r/GUI/Gizmos/GLGizmoImage.cpp +++ b/src/slic3r/GUI/Gizmos/GLGizmoImage.cpp @@ -1,6 +1,7 @@ #include "GLGizmoImage.hpp" #include "libslic3r/Model.hpp" +#include "libslic3r/Point.hpp" #include "libslic3r/TextureDisplacement.hpp" #include "libslic3r/format.hpp" @@ -10,17 +11,22 @@ #include "slic3r/GUI/GUI.hpp" #include "slic3r/GUI/GUI_App.hpp" #include "slic3r/GUI/I18N.hpp" +#include "slic3r/GUI/IconManager.hpp" #include "slic3r/GUI/ImGuiWrapper.hpp" #include "slic3r/GUI/Plater.hpp" #include "slic3r/GUI/TextureLibrary.hpp" #include "slic3r/GUI/Shortcuts.hpp" #include "slic3r/GUI/Gizmos/GLGizmoPainterBase.hpp" +#include "slic3r/GUI/Gizmos/GLGizmoTextureDisplacement.hpp" #include "slic3r/GUI/Gizmos/GLGizmoUtils.hpp" #include "slic3r/GUI/Jobs/Worker.hpp" #include #include +#include +#include #include +#include #include #include #include