Commit graph

749 commits

Author SHA1 Message Date
HellAholic
b564d2005e Defer 3MF node loading until machine activation
Postpone reading/adding 3MF scene nodes until after the target machine/UCP is activated to ensure correct build volume and settings are applied. Adds a deferred filename field and stores the file during initial load, then reads and adds nodes in new _loadAndAddNodesToScene using AddSceneNodeOperation after activation. Fixes _updateActiveMachine calls to use the reader's is_ucp state, resets is_ucp only after nodes are added, and clears the deferred filename in _clearState. Also updates WorkspaceDialog and QML logic so machine selection/combobox visibility behave correctly for UCP files.
2026-03-02 15:40:01 +01:00
HellAholic
8cc504d765 code-review comments part II
Some checks failed
conan-package / conan-package (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
Add type hints to ThreeMFWorkspaceReader methods
2026-02-23 12:36:40 +01:00
HellAholic
590e98b41b code-review comments part I 2026-02-23 12:28:58 +01:00
HellAholic
a0e3911922
Apply suggestion from @Copilot
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2026-02-21 14:36:32 +01:00
HellAholic
aefe8333c6 Refactor logging to use specific Logger methods
Replace generic Logger.log(...) calls with explicit Logger.error/warning/info/debug methods and standardize message formatting using f-strings. Also update Logger.logException call formatting for clarity. This is a stylistic refactor to make log severities and messages consistent across ThreeMFWorkspaceReader.py with no behavioral changes intended.
2026-02-21 14:26:25 +01:00
HellAholic
ab1cedd919 Defer machine activation and material apply
Delay active-machine switching and postpone applying materials/user settings until after machine activation so container/metadata signals can propagate. Removed the immediate _updateActiveMachine/_applyMaterials calls and replaced them with deferred callbacks using Application.getInstance().callLater: _finalizeMachineActivation -> _applyMaterialsAndFinalize for non-UCP flows, and _finalizeUcpActivation -> _applyUcpUserSettings for UCP flows. Adjusted _updateActiveMachine signature to accept is_ucp and moved containersChanged.emit to the deferred finalizers to ensure re-validation occurs after all changes are applied.
2026-02-21 13:36:06 +01:00
Erwan MATHIEU
d64c3629eb Fix possible crash when loading a 3MF file
CURA-12872
2026-02-13 08:54:48 +01:00
Erwan MATHIEU
2fa770b559 Move intents name and description to resource file
NP-250
2025-10-30 14:41:32 +01:00
Erwan MATHIEU
55ee4ec6e1 Calculate and apply UV coordinates
Some checks failed
conan-package-resources / conan-package (push) Has been cancelled
conan-package / conan-package (push) Has been cancelled
printer-linter-format / Printer linter auto format (push) Has been cancelled
unit-test / Run unit tests (push) Has been cancelled
conan-package-resources / signal-curator (push) Has been cancelled
CURA-12528
2025-07-08 15:47:46 +02:00
Erwan MATHIEU
4cb7a0dc9f Merge remote-tracking branch 'origin/CURA-12543_painting_ux' into CURA-12528_unwrap_uvs 2025-07-08 10:50:28 +02:00
Erwan MATHIEU
3c04680c71 Load and save texture data mapping in 3MF
CURA-12566
2025-06-19 15:57:48 +02:00
Remco Burema
14e49c5c73 Merge remote-tracking branch 'origin/CURA-12544_saving-and-loading-painted-files-in-Cura' into CURA-12528_unwrap_uvs 2025-06-05 12:48:17 +02:00
Remco Burema
44042eef6a Start to set up UV-unwrapping.
Needs the new libreary set up for that.

part of CURA-12528
2025-06-05 12:45:34 +02:00
Erwan MATHIEU
57f811af88 Load painted texture from 3MF file
CURA-12544
2025-06-03 15:59:02 +02:00
Erwan MATHIEU
96d2caf195 Load UV coordinates from 3MF file
CURA-12544
2025-05-28 11:00:55 +02:00
Remco Burema
de8bf1a5df Fix 3MF export imports.
done as part of CURA-12099
2025-04-23 11:06:31 +02:00
Erwan MATHIEU
7731ee4b24 Basically working import from BambuStudio/OrcaSlicer 3MF
CURA-12099
2025-04-22 16:01:32 +02:00
Remco Burema
44cfdb935f Quality groups names are case-sensitive, so don't lower-case search.
This caused some settings not to load silently, since it has a fall-back to default.

CURA-12112
2024-10-16 10:27:21 +02:00
Erwan MATHIEU
a96eefd8cc Fix duplicated file reloading
CURA-11905

Instead of using the object name for reloading meshes inside a 3MF file, use a dedicated mesh ID property that is only stored internally, doesn't have to be unique (because the combination filename+ID will be) and can't be changed by the user. This should improve 3MF file reloading, and also fixes reloading of duplicated instances, because multiple meshes can now have the same mesh ID.
2024-10-07 17:50:25 +02:00
Remco Burema
285a241eb2 Drop-to-buildplate/3MF-reading: Simplify boolean parsing.
Avoid heavy methods like previously here for a number of reasons.
2024-07-16 09:20:00 +02:00
c.lamboo
16ce5c8b6f Merge remote-tracking branch 'origin/5.7' into 5.7 2024-03-29 16:23:50 +01:00
c.lamboo
600f5cdaf6 Fix opening empty ucp files
CURA-11703
2024-03-29 16:23:38 +01:00
HellAholic
6d5966472c
Merge pull request #18754 from Ultimaker/CURA-11783-enum-instead-of-text-value
Cura 11783 enum instead of text value
2024-03-29 15:26:51 +01:00
c.lamboo
0d01f7523e Also translate label
CURA-11783
2024-03-29 13:04:56 +01:00
c.lamboo
b2fea2c1b5 Point to correct catalog
CURA-11783
2024-03-29 12:52:31 +01:00
c.lamboo
b2c0767165 Add translations to enum values
CURA-11783
2024-03-29 11:52:09 +01:00
HellAholic
29c3c2f098
Merge pull request #18756 from Ultimaker/CURA-11703_fix_ucp_jump_coords
[CURA-11703] Reset entire scene around center for UCP.
2024-03-29 11:36:45 +01:00
Casper Lamboo
4c9b74edff
Remove unintuitive comment 2024-03-29 10:38:27 +01:00
Remco Burema
0d585f367f Reset entire scene around center for UCP.
Since we can't rely on the build-volume --because we can't know on which printer we open-- the safest bet (and the thing alowed by 3mf if I recall) is to just center the entire scene on the buildplate for Universal Cura Project files.

CURA-11703
2024-03-28 23:51:35 +01:00
Saumya Jain
cf61a78fbf Added enumname while reading ucp
Added a connection in WorkspaceDialog.qml to call function whenever the 'exportedSettingModel' changes. This ensures that any changes in the model will now be reflected in the UI table. Furthermore, an added adjustment in SpecificSettingsModel.py now correctly handles the enum type settings, retrieving the correct value from the options list.

CURA-11783
2024-03-28 17:16:42 +01:00
Remco Burema
93861073d3 Fix another open-file resulting in a crash.
If the materials doesn't have the right key in it, just continue. It should be somewhere after all.

part of CURA-11772
2024-03-28 17:00:57 +01:00
Remco Burema
e85e50cce4 Merge remote-tracking branch 'origin/5.7' into CURA-11772_fix_crash_on_open 2024-03-28 14:58:13 +01:00
Saumya Jain
55d4cd44c4 Aligning the title horizontally
CURA-11781
2024-03-28 09:51:06 +01:00
Saumya Jain
dc34fbc047 learn more button alligned in UCP
CURA-11781
2024-03-26 16:35:59 +01:00
Remco Burema
bc5532dab3 Prevent crash if the variants only have an 'empty' entry.
Just get the one you'd get if no variant was asked (like in the other branch of the if) then.

CURA-11772
2024-03-26 14:01:35 +01:00
c.lamboo
35d3ff2b5c Only emit model once when all items have been added
CURA-11720
2024-03-20 13:35:24 +01:00
c.lamboo
9662aefa37 Revert "Update model data handling in 3MFReader plugin"
This reverts commit 4da17d643d.
2024-03-20 13:34:41 +01:00
Saumya Jain
6a7fe9a423
Merge branch '5.7' into CUR-11720-ucp-correct-ovverrides-ii 2024-03-18 15:45:11 +01:00
Saumya Jain
eac2d3b173 removes the unnecessary 'z' attribute
CURA-11700
2024-03-18 14:51:55 +01:00
Saumya Jain
37dc9e5dcb Update UI layering and MachineSelector properties in 3MFReader
The z-index property of combobox and Loader elements in WorkspaceSection.qml was adjusted to ensure proper layering.

CURA-11700
2024-03-18 14:47:24 +01:00
Saumya Jain
4da17d643d Update model data handling in 3MFReader plugin
partially revert 4dd0113a78
CURA-11720
2024-03-18 12:46:10 +01:00
Saumya Jain
5eeee37f0e Update visibility condition in WorkspaceDialog
CURA-11700
2024-03-18 12:32:34 +01:00
Saumya Jain
1ebab878fe
Merge branch '5.7' into CURA-11700-trigger-area-for-selecting-machine 2024-03-18 12:31:41 +01:00
Saumya Jain
522310b48a
Merge branch '5.7' into CUR-11720-ucp-correct-ovverrides-ii 2024-03-18 12:17:16 +01:00
c.lamboo
4dd0113a78 Add dedicate functions for exportedSettingModelItems and exportedSettingModelRowCount 2024-03-18 12:14:58 +01:00
c.lamboo
a58cd69b39 use notify to update exportedSettingModel 2024-03-18 11:55:50 +01:00
Saumya Jain
59d395a121 Added learn more button while saving and opening UCP
CURA-11734
2024-03-15 12:20:56 +01:00
Saumya Jain
40bc08f482 Apparantly the first time override is written it is not overriden by next upload.
Now, it does

CURA-11720
2024-03-14 17:09:11 +01:00
Saumya Jain
b5940a54f4 fixing size of drop down
CURA-11700
2024-03-14 16:17:34 +01:00
Saumya Jain
b245cce4e6
Merge branch '5.7' into CURA-11700-trigger-area-for-selecting-machine 2024-03-14 13:40:07 +01:00