CURA-12544 saving and loading painted files in cura#20656
Conversation
…d-unretract-in-a-travel
…-loading-painted-files-in-Cura
…A-12544_saving-and-loading-painted-files-in-Cura
CURA-12544 Also allows having multiple texture for multiple models while painting
…A-12544_saving-and-loading-painted-files-in-Cura
Test Results23 881 tests ±0 23 878 ✅ - 1 49s ⏱️ +2s For more details on these failures, see this check. Results for commit 851d472. ± Comparison against base commit a789a5b. ♻️ This comment has been updated with latest results. |
Why don't you chagne the base of this branch to CURA-12543? |
Because it is supposed to be merged soon, so shouldn't exist anymore |
There was a problem hiding this comment.
Pull Request Overview
This PR adds full support for painting textures on models and persisting them in 3MF archives, and it extends handling of travel move types in the simulation view and G-code parser.
- Introduces four new travel move types (unretracted, retracted, while retracting, while unretracting) across shaders, Python logic, protos, and
LayerPolygon. - Implements the Paint Tool UI, view, and shader, and integrates texture embedding/extraction in the 3MF writer/reader.
- Updates Simulation View menu to show travel sub-types in a tooltip and extends color scheme limits.
Reviewed Changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| plugins/SimulationView/layers_shadow.shader | Extend travel‐move filter to new types, fix brace |
| plugins/SimulationView/layers3d_shadow.shader | Handle new travel move types in 3D shadow pass |
| plugins/SimulationView/layers3d.shader | Handle new travel move types in 3D pass |
| plugins/SimulationView/layers.shader | Handle new travel move types in 2D pass |
| plugins/SimulationView/SimulationViewMenuComponent.qml | Add travel sub-types model and tooltip UI |
| plugins/SimulationView/SimulationView.py | Include new travel types in color scheme limits |
| plugins/SimulationView/SimulationPass.py | Use new travel move types in previous-line array |
| plugins/PaintTool/plugin.json | Register Paint Tools plugin metadata |
| plugins/PaintTool/paint.shader | New vertex/fragment shaders for painting |
| plugins/PaintTool/init.py | Plugin module exports and metadata |
| plugins/PaintTool/PaintView.py | PaintView implementation with undo/redo stacks |
| plugins/PaintTool/PaintTool.qml | Paint Tool toolbar QML |
| plugins/PaintTool/PaintTool.py | PaintTool input handling and stroke logic |
| plugins/GCodeReader/FlavorParser.py | Map G-code combing/retraction to new types |
| plugins/CuraEngineBackend/Cura.proto | Rename Move types in 3MF proto |
| plugins/3MFWriter/ThreeMFWriter.py | Embed paint textures and relations in 3MF writer |
| plugins/3MFReader/ThreeMFReader.py | Extract paint textures from 3MF reader |
| cura/Scene/SliceableObjectDecorator.py | Add paint texture decorator and copying |
| cura/LayerPolygon.py | Define and map new travel move types |
| cura/LayerDataBuilder.py | Apply new travel move types to material colors |
Comments suppressed due to low confidence (3)
plugins/SimulationView/SimulationView.py:611
- New travel move types are added here; consider adding or updating unit tests for
calculateColorSchemeLimitsto verify these types are included correctly.
visible_line_types.append(LayerPolygon.MoveUnretractedType)
plugins/SimulationView/layers_shadow.shader:54
- There is an extra opening brace immediately after the
ifblock. Remove the second{so that the shader syntax is correct and compiles.
{
plugins/3MFWriter/ThreeMFWriter.py:168
- QBuffer is used here but not imported. Add
from PyQt6.QtCore import QBuffer(or the appropriate module) at the top to avoid a NameError.
texture_buffer = QBuffer()
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).
Because the base automatically updates to main once the ticket is merged. I think this makes the review process a bit easier if that branch is supposed to be merged earlier anyway. |
CURA-12544 Mistakenly commited after applying the daily rotated colors
…A-12544_saving-and-loading-painted-files-in-Cura
…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
9a43db7
into
CURA-12543_painting_ux
Save and load painted models textures in 3MF files
Requires Ultimaker/Uranium#1000, Ultimaker/libSavitar#57, Ultimaker/pySavitar#7
CURA-12544