Commit graph

29 commits

Author SHA1 Message Date
Erwan MATHIEU
5d2aca4e31 Avoid crash when UV coordinates not loaded/generated
CURA-12664
2025-07-30 12:10:40 +02:00
Erwan MATHIEU
bbddcab4e9 Proper paint-on-seam UI
Some checks failed
conan-package / conan-package (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
CURA-12578
2025-07-03 11:05:09 +02:00
Erwan MATHIEU
7dcc5cd470 Expose brush shape to QML
CURA-12543
2025-06-24 13:11:00 +02:00
Erwan MATHIEU
7cca040033 Merge remote-tracking branch 'origin/CURA-12544_saving-and-loading-painted-files-in-Cura' into CURA-12566_save-proper-data-in-painted-texture 2025-06-19 10:35:53 +02:00
Erwan MATHIEU
810638a29a Merge remote-tracking branch 'origin/CURA-12543_painting_ux' into CURA-12544_saving-and-loading-painted-files-in-Cura 2025-06-19 10:24:33 +02:00
Erwan MATHIEU
960d2a2315 Optimized application of stroke
CURA-12566
2025-06-19 10:15:37 +02:00
Erwan MATHIEU
4caba52f05 Basically working multipurpose painting
CURA-12566
2025-06-18 16:00:47 +02:00
Remco Burema
e27926a968 Paint: Have a stroke properly propagate over the texture-triangles.
Some checks are pending
conan-package / conan-package (push) Waiting to run
unit-test / Run unit tests (push) Waiting to run
part of CURA-12543
2025-06-18 15:02:06 +02:00
Remco Burema
d2ade67cad Paint: 'Substrokes per face' data-structure.
part of CURA-12543
2025-06-18 13:41:20 +02:00
Remco Burema
56f669d1fd Paint: Replace undo-redo UI code with qml Action.
Some checks are pending
conan-package / conan-package (push) Waiting to run
unit-test / Run unit tests (push) Waiting to run
part of CURA-12543
2025-06-18 12:50:21 +02:00
Remco Burema
01c02e4479 Paint: Simplify and clarify input-event-code.
part of CURA-12543
2025-06-18 12:42:45 +02:00
Remco Burema
4fae9b231a Paint: Make calculation of Baricentric-coordinates a bit more robust.
part of CURA-12543
2025-06-18 12:06:04 +02:00
Remco Burema
75946d8871 Shape of brush is an enum now, not a string.
part of CURA-12543
2025-06-18 11:56:08 +02:00
Erwan MATHIEU
864ccbc33b Merge remote-tracking branch 'origin/CURA-12543_painting_ux' into CURA-12544_saving-and-loading-painted-files-in-Cura 2025-06-17 09:27:52 +02:00
Remco Burema
4a87b48084 Stopgap to prevent texture-patch borders from messing up the painting.
Some checks failed
conan-package / conan-package (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
This code is expandable into the real solution later, see the TODO left in the code by this commit.

part of CURA-12543
2025-06-05 08:25:20 +02:00
Remco Burema
40f02dc15f Defensive coding; deal with degenerate triangles, co-linearity or query 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
2025-06-05 08:23:22 +02:00
Remco Burema
12d788db62 Review comments: Fix crash when click next to object.
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
2025-06-04 21:00:27 +02:00
Erwan MATHIEU
21443faa92 Merge remote-tracking branch 'origin/CURA-12543_painting_ux' into CURA-12544_saving-and-loading-painted-files-in-Cura
Some checks failed
conan-package / conan-package (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
2025-06-03 16:08:40 +02:00
Erwan MATHIEU
f0764134cc Store painted texture to 3MF file
Some checks are pending
conan-package / conan-package (push) Waiting to run
unit-test / Run unit tests (push) Waiting to run
CURA-12544
Also allows having multiple texture for multiple models while painting
2025-06-03 13:27:57 +02:00
Remco Burema
d28c2aac68 Painting: Fix non-drag not producing a circle (square was already OK though).
Some checks failed
conan-package / conan-package (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
part of CURA-12543
2025-05-28 17:12:42 +02:00
Remco Burema
c9ca999f10 PaintTool: Undo/Redo should be working now.
Also fix missing pen-shape I suppose.

part of CURA-12543
2025-05-28 16:43:33 +02:00
Remco Burema
4e5b0115ea Painting: Separate brush image didn't work properly, construct stroke-image by pen instead.
This also simplifies things nicely.

part of CURA-12543
2025-05-28 14:39:07 +02:00
Remco Burema
109f37657b Painting UI work: Update image-part(s) instead of pixel(s) w.r.t. render-backend.
part of CURA-12543
2025-05-28 12:32:36 +02:00
Remco Burema
704f9453f0 Properly completed drag to paint (no more just clicking points).
Some checks are pending
conan-package / conan-package (push) Waiting to run
unit-test / Run unit tests (push) Waiting to run
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
2025-05-27 17:03:38 +02:00
Remco Burema
33b5918acd Painting: Sort-of able to drag the mouse now, not just click.
Some checks failed
conan-package / conan-package (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
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
2025-05-22 11:02:08 +02:00
Remco Burema
a176957fa7 Painting: Set color, brush-size, brush-shape.
part of CURA-12543
2025-05-22 10:48:22 +02:00
Remco Burema
3ae85e3e2a Refactored paint-view into its own thing.
part of CURA-12543
2025-05-21 21:53:37 +02:00
Remco Burema
c5592eea83 Slightly optimize and refactor the w.i.p. paint-tool.
Just enought so that the truly ugly things are out of it.

part of CURA-12543
2025-05-21 15:19:07 +02:00
Remco Burema
19ea88a8ce W.I.P. Start of paint-tool plugin UX work.
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
2025-05-20 15:56:21 +02:00