128 Commits

Author SHA1 Message Date
Simon Edwards
cf85831d87 Also check the upgrade plugins. 2017-01-17 20:56:28 +01:00
Simon Edwards
fb70eb6813 Merge branch 'master' into python_type_hinting 2017-01-17 08:42:55 +01:00
Simon Edwards
38a7ffa7da Some fixes regarding submodules and imports. 2017-01-16 21:35:28 +01:00
Simon Edwards
22012bdb1c Show the Z seam related settings after upgrade. CURA-2953 2016-12-14 13:52:07 +01:00
fieldOfView
9250520628 Fix variant before definition_changes 2016-12-14 13:08:18 +01:00
fieldOfView
dcae7575e4 Fix extraneous empty ("") container being added 2016-12-14 13:07:12 +01:00
fieldOfView
2c79efd8bd Fix [containers] items must be strings 2016-12-14 13:01:32 +01:00
Simon Edwards
d4619da358 Merge branch 'master' into python_type_hinting 2016-12-13 14:39:35 +01:00
fieldOfView
5718ca7852 Make sure definition_changes containers are not upgraded to stacks 2016-12-13 12:04:04 +01:00
Simon Edwards
81ffc3ae4b Import 'os' directly because we use it directly, even though it still works with out it.
CURA-2953
2016-12-08 15:10:52 +01:00
Arjen Hiemstra
d3f58a049b Add missing ":" 2016-12-08 13:22:24 +01:00
Arjen Hiemstra
c212014d88 Fix VersionUpgrade to handle both formats of ContainerStack files
Contributes to CURA-3098
2016-12-08 13:16:37 +01:00
Simon Edwards
e1d7a9faec Properly support the extrauder trains.
CURA-2953 Version upgrade 2.3 to 2.4
2016-12-06 17:03:35 +01:00
Simon Edwards
724cc99f59 Make things neater.
CURA-2953 Version upgrade 2.3 to 2.4
2016-12-05 13:31:24 +01:00
Simon Edwards
3d9c27a7f7 CURA-2953 Version upgrade 2.3 to 2.4 2016-12-05 11:00:33 +01:00
Simon Edwards
98a6568313 Merge branch 'master' into python_type_hinting 2016-11-22 11:15:04 +01:00
Simon Edwards
14afd9eab7 Heaps to changes to get the Cura code through the type checker (with minimal checking).
CURA-2917
2016-11-21 21:36:08 +01:00
Jaime van Kessel
1a2138de5a Moved warning to VersionUpgradeManager
CURA-2883
2016-11-21 11:21:20 +01:00
Jaime van Kessel
ac708d54b6 Importing invalid filetypes now gives proper error messages
CURA-2883
2016-11-18 16:46:54 +01:00
Arjen Hiemstra
bfec96f584 Set encoding to utf-8 when writing files
Since we assume utf-8 in a lot of places.

Contributes to CURA-2692
2016-10-24 14:28:20 +02:00
Ghostkeeper
2d41a992f1
Remove splitting profiles for each material
The material is no longer listed in the profiles and no longer filtered for, so we don't need to create a new profile for each material.

Contributes to issues CURA-844 and CURA-2320.
2016-10-06 11:41:39 +02:00
Ghostkeeper
7d57e90260
Remove debug statements
Oops.

Contributes to issue CURA-844.
2016-09-29 13:24:15 +02:00
Ghostkeeper
d29c817289
Actually apply translated settings
Don't know when this changed or why it hasn't propped up until then...

Contributes to issue CURA-844.
2016-09-29 11:56:46 +02:00
Ghostkeeper
4ec380ffd9
Quality-changes now have a quality_type instead of referring to quality
This field was just renamed, I think for CURA-2320. This updates the name for the upgrade process.

Contributes to issue CURA-844.
2016-09-27 15:12:29 +02:00
Ghostkeeper
3f85ac264c
Properly serialise the machine instance name
Otherwise we get spaces and unescaped plusses in the file name of the user profile.

Contributes to issue CURA-844.
2016-09-21 17:34:22 +02:00
Ghostkeeper
ebb9507083
Add extension to new file
The upgrade plug-in can do this because he know that he's upgrading to version 2.3.

Contributes to issue CURA-844.
2016-09-21 17:34:22 +02:00
Ghostkeeper
7d41c1dcb3
Give canonical name to user settings
All user profiles are named Current settings, so we should just give it the same name as well.

Contributes to issue CURA-844.
2016-09-21 17:34:22 +02:00
Ghostkeeper
d962cad347
Ensure directory exists to store user profile in
Create it if it doesn't exist. Also fix up the directory to be absolute instead of relative.

Contributes to issue CURA-844.
2016-09-21 17:34:22 +02:00
Ghostkeeper
c1a593c3d8
Create new user profile upon upgrading machine instance
This defines a new configuration type: 'user', for the user profile.

Contributes to issue CURA-844.
2016-09-21 17:34:22 +02:00
Ghostkeeper
d391639b48
Translate Fan Speed Full At Layer to one-based counting
All layer counts should increment by 1.

Contributes to issue CURA-2314.
2016-09-16 16:50:27 +02:00
Ghostkeeper
ef3b6905b7
Translate skin overlap properly
From this dict it also gets updated in other places, such as the preferences.

Contributes to issue CURA-844.
2016-09-15 12:47:39 +02:00
Ghostkeeper
c223044541
Don't modify original dict while iterating over it
Just store the results in a new dict and return that one.
2016-09-15 12:47:39 +02:00
Ghostkeeper
5c5d188889
Remove support_area_smoothing setting
Contributes to issue CURA-2296.
2016-09-14 15:41:32 +02:00
Ghostkeeper
5c49adc52e
Also return tuple if upgrading failed
It is checked if the file data is None or empty (the upgrade is then considered 'failed'). But to unpack the file data, it needs to be a tuple.

Contributes to issue CURA-844.
2016-09-14 15:41:32 +02:00
Ghostkeeper
89fb92edbd
Disable upgrading current settings altogether
The current settings in 2.1 specified a machine instance. In 2.2 they specify a machine definition. There is not enough information in one file to be able to translate that.

Contributes to issue CURA-844.
2016-09-13 14:58:13 +02:00
Ghostkeeper
03c3b2ac2f
Make empty profile for current settings when upgrading from UM2+
This change causes the stack to make a new profile at the top to store current settings in.

Contributes to issue CURA-844.
2016-09-09 17:23:13 +02:00
Ghostkeeper
1e23141b18 Fall back to different quality depending on stack
Falling back to normal.inst.cfg isn't enough. That profile may be filtered out by the machine, variant and material. We need to fall back to a different quality profile depending on the machine, variant and material.

Contributes to issue CURA-844.
2016-09-09 16:20:06 +02:00
Ghostkeeper
ba6ce52d29 Use translation of built-in profiles instead of constructing it
Makes the code much simpler, though some repetition is hard-coded now.

Contributes to issue CURA-844.
2016-09-09 16:20:06 +02:00
Ghostkeeper
e77ab83084 Set quality to normal, not quality type
Even though this key says it's quality, it's not a quality profile, it's a quality type.

Contributes to issue CURA-844.
2016-09-09 16:20:06 +02:00
Ghostkeeper
318b6cf87b Always set type to quality_changes
Custom profiles are always quality changes. They should always say quality in the original anyway; that was an assumption we've made thousands of times.

Contributes to issue CURA-844.
2016-09-09 16:20:06 +02:00
Ghostkeeper
a4c47f26d6 Always set quality type to normal
We don't know the actual quality type, the quality profile that this profile is based on. Maybe there isn't one, even. As a solution we always base imported custom quality profiles on normal.

Contributes to issue CURA-844.
2016-09-09 16:20:06 +02:00
Ghostkeeper
84e91e2bf2 Add missing built-in profiles to _profile_translations
These profiles were not thought of as built-in. Instead, they were sorta constructed from pieces. That complex piece of code won't be necessary any more after I add this and after Cura 2.3 has proper profile inheritance again.

Contributes to issue CURA-844.
2016-09-09 16:20:06 +02:00
Simon Edwards
cce94c8043 Added skin_overlap <= infill_overlap mapping.
Contributes to CURA-844 Profile converter 2.1 ==> 2.2
2016-09-07 11:32:25 +02:00
Ghostkeeper
d046cd764a
Update version upgrade system for new quality-changes profiles
The quality profile now sometimes gets updated to a quality profile, and sometimes to a quality-changes profile, depending on whether the profile is built-in or not.

Contributes to issue CURA-2006.
2016-08-24 14:35:40 +02:00
Ghostkeeper
368a836ff2
Move material translations to separate dictionary
This prevents a mix-up of how material names should be translated for quality profiles and how material names should be translated for material profiles.

Contributes to issue CURA-844.
2016-08-24 14:35:40 +02:00
Ghostkeeper
b836311d67
Remove double type-metadata
One was in metadata. That is the correct one. The other is unnecessary and was being ignored, but we don't need to write it.

Contributes to issue CURA-844.
2016-08-24 14:35:40 +02:00
fieldOfView
f1ee6b2b15 Update VersionUpgrade21to22 for new materials 2016-08-23 13:56:20 +02:00
fieldOfView
86ad1777af Fix setting weight of upgraded profile
self._weight sometimes becomes an int, and ConfigParser does not like ints.
2016-08-23 13:54:03 +02:00
Ghostkeeper
a0df0c76de
Use correct material profile in extruder stack
The material profile is more specific inside a material profile if the machine has material quality profiles.

Contributes to issue CURA-844.
2016-08-09 18:06:23 +02:00
Ghostkeeper
4d13622a6e
Split profiles also per variant
But of course the variant names are strange in the new material profiles.

Contributes to issue CURA-844.
2016-08-09 18:06:23 +02:00