-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
[CURA-12543] Painting UI #20640
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
[CURA-12543] Painting UI #20640
Conversation
…feature. Currently replacing the 'disabled' batch until we can get it to switch out on command (when we have the painting stage/tool/... pluging up and running. part of CURA-12543
Should be able to paint pixels now if the tools is active, and the model loaded is with UV-coords (that rules out our current impl. of 3MF at the moment -- use OBJ instead), and you position the model outside of the build-plate so the paint-shadr that is temporarily replacing the 'disabled' one is showing. Will need a lot of extra features and optimizations still! part of CURA-12543
Just enought so that the truly ugly things are out of it. part of CURA-12543
Also typing. The way it now works is way too slow though, and it doesn't add 'inbetween' the moude-move-positions yet. Also several other things of course. part of CURA-12543
The most important thing to make it work is actually notifying the scene that something has changed -- the rest are just refactorings and (hopefully) optimizations. part of CURA-12543
…-loading-painted-files-in-Cura
…der-backend. part of CURA-12543
…-image by pen instead. This also simplifies things nicely. part of CURA-12543
…A-12544_saving-and-loading-painted-files-in-Cura
Also fix missing pen-shape I suppose. part of CURA-12543
Test Results23 953 tests 23 951 ✅ 48s ⏱️ Results for commit 4aea580. ♻️ This comment has been updated with latest results. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR introduces a new Paint Tool for Cura that allows users to select brush properties and paint on models with textures. Key changes include adding new plugin files for the Paint Tool UI and shader, integrating a new PaintView for rendering strokes, and implementing core painting functionality in PaintTool.py.
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
File | Description |
---|---|
plugins/SolidView/SolidView.py | Refactored overhang preference usage to improve consistency |
plugins/PaintTool/plugin.json | Added plugin metadata for the new Paint Tool |
plugins/PaintTool/paint.shader | Added shader definitions for painting with support for multiple GLSL versions |
plugins/PaintTool/init.py | Registered the Paint Tool and associated view |
plugins/PaintTool/PaintView.py | Implemented the view for painting with stroke management and texture updates |
plugins/PaintTool/PaintTool.qml | Created the UI for selecting brush properties and actions |
plugins/PaintTool/PaintTool.py | Added core painting logic and event handling for brush strokes |
Comments suppressed due to low confidence (1)
plugins/PaintTool/PaintTool.py:241
- The '_selection_pass' variable is referenced for face selection and stroke rendering but is never initialized, which will prevent the painting functionality from working. Consider initializing '_selection_pass' appropriately or revising the reference if a different selection mechanism was intended.
if not self._selection_pass:
CURA-12544 Also allows having multiple texture for multiple models while painting
…A-12544_saving-and-loading-painted-files-in-Cura
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, this is much smaller than I would have expected ! And the calculations look very much like the ones in the engine.
Some remarks/suggestions, nothing huge. I'll make other UX remarks in the ticket.
Refactoring that part to up top caused the problem I think -- getSelectedObject(0) over getAllSelectedObjects()[0] is clearly the better call in this case anyway. part of CURA-12543
…ry pt equal to corner. This shouldn't happen on a well UV-mapped, manifold mesh -- well, unless someone manages to click exactly on one of the triangle corners. Better to get this fixed now then to run into floating point shenanigans later. part of CURA-12543
This code is expandable into the real solution later, see the TODO left in the code by this commit. part of CURA-12543
CURA-12544 The word in French to describe a geometric flat surface if "plan", which is a valid word in English but it doesn't have the same meaning, this got me confused. So replacing "plan" by "plane" because we are actually dealing with a geometrical "plane" (although it doesn't fly).
CURA-12544 Mistakenly commited after applying the daily rotated colors
…A-12544_saving-and-loading-painted-files-in-Cura
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for the changes, looks good 🙂
…A-12544_saving-and-loading-painted-files-in-Cura
…inted-files-in-Cura' into CURA-12566_save-proper-data-in-painted-texture
…in-painted-texture CURA-12566 save proper data in painted texture
…g-painted-files-in-Cura CURA-12544 saving and loading painted files in cura
Tool (and view) to be used for paint-on-anything. Quite rudimentary for the moment, but should allow for smooth painting. Note that this doesn't do UV-unwrapping or assigning the textures properly yet, so for now you can only tests it on models that load properly with textures (so just OBJ with attached UV-coords for now). Needless to say, the paint doesn't do anything yet. -- For all of those things, see the other branches that may now be floating around.
Backend PR (needed for all of this): Ultimaker/Uranium#999
Engine: Ultimaker/CuraEngine#2239