Skip to content

CURA-12544 saving and loading painted files in cura#20656

Merged
Erwan MATHIEU (wawanbreton) merged 28 commits into
CURA-12543_painting_uxfrom
CURA-12544_saving-and-loading-painted-files-in-Cura
Jun 19, 2025
Merged

CURA-12544 saving and loading painted files in cura#20656
Erwan MATHIEU (wawanbreton) merged 28 commits into
CURA-12543_painting_uxfrom
CURA-12544_saving-and-loading-painted-files-in-Cura

Conversation

@wawanbreton
Copy link
Copy Markdown
Contributor

@wawanbreton Erwan MATHIEU (wawanbreton) commented Jun 3, 2025

Save and load painted models textures in 3MF files

⚠️ Based on CURA-12543, do not merge before other one is merged

Requires Ultimaker/Uranium#1000, Ultimaker/libSavitar#57, Ultimaker/pySavitar#7

CURA-12544

…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
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Jun 3, 2025

Test Results

23 881 tests  ±0   23 878 ✅  - 1   49s ⏱️ +2s
     1 suites ±0        2 💤 ±0 
     1 files   ±0        1 ❌ +1 

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.

@casperlamboo
Copy link
Copy Markdown
Contributor

Casper Lamboo (casperlamboo) commented Jun 5, 2025

⚠️ Based on CURA-12543, do not merge before other one is merged

Why don't you chagne the base of this branch to CURA-12543?

@wawanbreton
Copy link
Copy Markdown
Contributor Author

Erwan MATHIEU (wawanbreton) commented Jun 5, 2025

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

Copy link
Copy Markdown
Contributor

Copilot AI left a 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 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 calculateColorSchemeLimits to 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 if block. 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()

Comment thread cura/Scene/SliceableObjectDecorator.py
Comment thread plugins/SimulationView/layers3d_shadow.shader Outdated
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).
@casperlamboo
Copy link
Copy Markdown
Contributor

Because it is supposed to be merged soon, so shouldn't exist anymore

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.

@wawanbreton Erwan MATHIEU (wawanbreton) changed the base branch from main to CURA-12543_painting_ux June 17, 2025 07:22
@wawanbreton Erwan MATHIEU (wawanbreton) merged commit 9a43db7 into CURA-12543_painting_ux Jun 19, 2025
2 of 4 checks passed
@wawanbreton Erwan MATHIEU (wawanbreton) deleted the CURA-12544_saving-and-loading-painted-files-in-Cura branch June 19, 2025 08:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants