325 Commits

Author SHA1 Message Date
Diego Prado Gesto
94ef0b92fe Fix typo in the getCompatibleMaterialDiameter function.
Contributes to CURA-5834.
2018-10-23 10:25:13 +02:00
Lipu Fei
ea10d5e608 Rename to comptabileMaterialDiameter
CURA-5834

This property returns the material diameter an extruder is compatible
with, so this makes it more clear.
2018-10-19 11:36:12 +02:00
Ghostkeeper
4c6744b6fc
Code style: Space around binary operators
I just looked for lines with interpolation = None because I was looking for another possible bug, but fixing this in the meanwhile too.
2018-10-10 14:28:50 +02:00
Jaime van Kessel
e7d9f0ce45 Added typing for various setting classes 2018-09-10 15:24:11 +02:00
Mark
baef0350cd Cleaned up MIME types 2018-08-29 14:41:38 +02:00
Mark
c48a5474f0 remove .curaproject from the extensions and just use .3mf
CURA-5650
2018-08-29 13:42:26 +02:00
Lipu Fei
af64d91587 Fix stack handling in project loading
CURA-5663
2018-08-21 16:07:17 +02:00
Aleksei S
57f04d8940 Load 3mf projects
CURA-5570
2018-08-09 15:39:10 +02:00
Lipu Fei
a303f394c8 Move VariantType to VariantType.py
Less circular dependencies for imports.
2018-08-02 16:11:55 +02:00
Lipu Fei
af02dc2758 Only use setMetaDataEntry() 2018-07-11 11:14:57 +02:00
Diego Prado Gesto
762a1b1bfd Fix code-style 2018-07-03 12:06:06 +02:00
Diego Prado Gesto
eca23e5b5d CURA-5330 Fix typing in 3MFReader plugin 2018-06-13 16:48:08 +02:00
Lipu Fei
83fcc60bee Show message for unknown machines in project files
CURA-5337

Do not crash on loading project files with unkown machine types. Show a
message instead.
2018-06-11 07:52:34 +02:00
Lipu Fei
3a7a1dbc6d Fix inconsistent curaproject mimetype definition
CURA-5334

 - In project file writer, it says the mime type is "application/x-curaproject+xml",
   and we decided to use this as THE mime type.
 - Pass preferred_mimetype to save project file dialog so it
   automatically adds the file extension upon open.
2018-06-07 12:51:54 +02:00
Ghostkeeper
8202b62343
Merge branch '3.4' 2018-06-07 11:38:13 +02:00
Ghostkeeper
624bbbeb4a
Account for the fact that createMachine can return None
Contributes to issue CURA-5337.
See also #3787.
2018-06-07 11:37:48 +02:00
Lipu Fei
7f7a195627 Fix merge conflicts from 3.4 2018-06-05 09:02:52 +02:00
Lipu Fei
39b71add07 Reader classes are responsible for adding their mime types
CURA-5367
2018-06-05 08:35:24 +02:00
Diego Prado Gesto
43657010ba CURA-5164 The Preferences is not a singleton class anymore since in some point
several instances need to be created.

- In the ThreeMFWorkspaceReader we need to create some temporal
instances of Preferences that makes it not singleton anymore.

- The current preferences are kept in the Application class and so all
the calls to the preferences are changed to get the preferences from
Application.

- The method getInstance in Preferences is kept as deprecated since some
external plugins.
2018-05-11 08:50:42 +02:00
Lipu Fei
53495604f8 Merge remote-tracking branch 'origin/feature_show_config_errors' 2018-04-19 15:38:29 +02:00
Mark
f61efb8e20 resolve merge conflict 2018-04-17 10:39:35 +02:00
Lipu Fei
62521e93db Make sure that project writer runs on Qt thread
CURA-5229

 - Move @call_on_qt_thread to a separate module
 - Make sure that project writer runs on Qt thread because itself and the
   calls it makes can create new QObjects such as InstanceContainers, and
   this must happen on the Qt thread.
2018-04-16 15:32:12 +02:00
Ghostkeeper
1769a69792
Don't crash Cura when material file is wrongly formatted
That was the whole point of this change. Instead degrade gracefully. It won't load the material file but give an error message saying that the material is corrupt. Then it won't be able to load the stack as well because the material doesn't exist, and give an error about the stack as well.

Contributes to issue CURA-5045.
2018-04-12 16:56:05 +02:00
Ghostkeeper
e96c50a582
Fall back to FDMPrinter if definition can't be loaded
Some of the settings will be different. But at least it won't crash.

Contributes to issue CURA-5045.
2018-04-12 16:54:21 +02:00
Lipu Fei
4615c756a7 More clear error handling for container deserialization
CURA-5045

 - If a container cannot be deserialized in project loading, it should fail
   right on the spot because even if it continues, it still won't work.
 - In other places, at least log deserialization errors if any of them show
   up.
2018-04-09 14:51:05 +02:00
Ghostkeeper
572721e20d
Catch ContainerFormatError when deserialising containers
Only the deserialize() functions themselves may pass the ContainerFormatError on, because their callers will have to handle those errors anyway.

Contributes to issue CURA-5045.
2018-04-06 13:26:16 +02:00
Jack Ha
c9dc429b2b CURA-5045 solve merge conflicts 2018-03-29 09:22:19 +02:00
Ghostkeeper
e174a015ce
Remove unused function
It's not used anywhere so please let us not maintain this code.

Contributes to issue CURA-5045.
2018-03-27 14:53:19 +02:00
Ghostkeeper
8b75a0e92b
Better error handling if there is no global stack
It reports that the workspace failed to load instead of crashing the entire application then.

Contributes to issue CURA-5045.
2018-03-27 14:51:34 +02:00
Ghostkeeper
d9e8d64e3f
Add typing for _determineGlobalAndExtruderStackFiles
Contributes to issue CURA-5045.
2018-03-27 14:46:21 +02:00
Diego Prado Gesto
3fb14691a9 CURA-5160 Skip empty quality when load project file 2018-03-27 14:09:17 +02:00
Ghostkeeper
6d3fed8f52
Allow getContainer() to return None
And in the rest of the locations we must then check if it's None and handle that gracefully.
Here we assume that the getContainer message shows a message to the user if necessary. For now we'll just log it.

Contributes to issue CURA-5045.
2018-03-26 15:48:03 +02:00
Lipu Fei
6d21a6bddb Show printer group and which machine to update in project loading
CURA-5125
2018-03-20 16:23:23 +01:00
Ian Paschal
d7b0f11ddf CURA-4400 Fixed project loading
"enabled" metadata is now read from saved projects (.3mf)
2018-03-20 11:17:39 +01:00
Lipu Fei
d78e2d56f7 Fix quality and variant processing in project loading
From version 22 to 24, there is an upgrade for "quality" that changes
it to "quality_changes", but for "quality", we don't have any upgrades.
2018-03-16 10:33:22 +01:00
Lipu Fei
22573a685d Fix quality definition comparison in quality importing
CURA-4946
2018-03-14 14:31:30 +01:00
Lipu Fei
984e6ddd08
Merge pull request #3274 from fieldOfView/feature_setting_visibility_profiles
Setting Visibility Presets sidebar menu
2018-03-14 13:25:59 +01:00
Lipu Fei
86afd6f5ff Do not overwrite existing metadata with in material deserializeMetadata()
CURA-5056
2018-03-14 10:32:57 +01:00
Lipu Fei
dc427488a2 Fix extruder position check in project loading
CURA-5056

The field is now "position" instead of "extruder"
2018-03-14 10:30:32 +01:00
Lipu Fei
7312ed8e3c Fix project loading for version upgrade
CURA-5054
2018-03-09 19:35:23 +01:00
Lipu Fei
e09325bf82 Fix project loading for version upgrade
CURA-5054
2018-03-09 17:16:27 +01:00
fieldOfView
4c66c935af Merge branch 'master' into feature_setting_visibility_profiles 2018-03-09 15:45:24 +01:00
Lipu Fei
8c7e413038 Remove unnecessary setGlobalContainerStack() in project loading
CURA-5073
2018-03-09 14:37:43 +01:00
Lipu Fei
15f017b404 Set dirty for containers created in project loading
CURA-5056
2018-03-09 10:18:51 +01:00
Lipu Fei
ef8cd304dc No keep/discard setting dialog in project loading
CURA-4966
2018-03-08 20:00:21 +01:00
Lipu Fei
b8d3cbfe16 Refactor project loading
CURA-4966
2018-03-08 19:50:45 +01:00
Lipu Fei
618bcebd82 Fix create new for conflicting materials in project loading
CURA-5056
2018-03-07 16:38:24 +01:00
Lipu Fei
c0d55ac2a8 Postpone signals in project loading to avoid incomplete data update
CURA-5056
2018-03-07 11:45:49 +01:00
fieldOfView
97d7354839 Merge branch 'master' into feature_setting_visibility_profiles 2018-03-05 23:09:51 +01:00
Lipu Fei
ca88e0df88 Add doc for calllater active machine in project loading 2018-03-03 16:12:33 +01:00