2123 Commits

Author SHA1 Message Date
Lipu Fei
7089460861 Minor refactoring for XMLMaterial upgrade
CURA-3756
2017-05-19 11:05:16 +02:00
Jaime van Kessel
c43a71084c Merge branch 'master' of github.com:Ultimaker/Cura 2017-05-19 10:40:09 +02:00
Jaime van Kessel
475455d473 Definition changes are now also upgraded
CURA-3837
2017-05-19 10:39:37 +02:00
Lipu Fei
593697e0ed Fix XML material upgrade
CURA-3756
2017-05-19 10:18:13 +02:00
Jaime van Kessel
f2f83750c2 Type is now always added when deserializing profiles to g-code
CURA-3829
2017-05-18 16:42:11 +02:00
Lipu Fei
870d6fe76a Use position number to get extruders for overriding in project loading
CURA-3756
2017-05-18 14:34:37 +02:00
Lipu Fei
cbdddd0b16 Ignore "quality" and "variant" containers in project loading
CURA-3756
2017-05-18 10:28:02 +02:00
Lipu Fei
18dd8dc6cc Simplify ExtruderStack override code in project loading
CURA-3756
2017-05-17 17:10:55 +02:00
Lipu Fei
e1455a4551 Fix deserializing ExtruderStacks in project loading
CURA-3756
2017-05-17 15:57:13 +02:00
Ghostkeeper
937207a0eb
Merge branch 'fix_machinesettings_negative_offsets' of https://github.com/fieldOfView/Cura into fieldOfView-fix_machinesettings_negative_offsets 2017-05-17 15:42:43 +02:00
Lipu Fei
d02d004986 Correct profile_translations in VersionUpgrade21to22
CURA-3777
2017-05-17 13:44:34 +02:00
Lipu Fei
e2e208261e Fix renaming quality_changes and definition containers in project loading
CURA-3756
2017-05-17 11:53:13 +02:00
Lipu Fei
a9ec3f2712 Add docs to project loading code
CURA-3756
2017-05-17 11:25:48 +02:00
Lipu Fei
8c2fe0951d Refactor project loading
CURA-3756
2017-05-17 11:03:52 +02:00
Lipu Fei
ee831928ba Fix overriding extruder stacks for project loading
CURA-3756
2017-05-17 10:20:14 +02:00
Lipu Fei
191dfdcb33 Save Cura version to project files
CURA-3822
2017-05-17 09:23:43 +02:00
Lipu Fei
40d70b5f39 Fix version upgrade for project loading
CURA-3756
2017-05-16 14:38:27 +02:00
fieldOfView
910811810b Allow setting negative values on extruder offset x/y fields 2017-05-16 13:54:45 +02:00
Jaime van Kessel
e40f60a52b Changed profile names
CURA-3777
2017-05-15 16:52:25 +02:00
Ghostkeeper
ccda155882
Add setting_version every time we create InstanceContainer
Except when we fill the instancecontainer via deserialising. Because then we want to retain the original version number.

Contributes to issue CURA-3427.
2017-05-15 10:39:53 +02:00
Ghostkeeper
c48017e174
Convert all metadata fields to string
The XML builder expects string, strictly. Only None is handled separately.

Contributes to issue CURA-3808.
2017-05-15 09:37:53 +02:00
Ghostkeeper
2365267f35
Be robust against older specification version numbers
1.2 and lower didn't specify a version number. Assume that it was 1.2. We feed this through our translation function for form, mostly, because we know that the setting_version should be 0 then.

Contributes to issue CURA-3427.
2017-05-12 17:20:49 +02:00
Ghostkeeper
365f7cad4c
Read setting_version from version attribute on root
As per the new specification for v1.3 of the spec.

Contributes to issue CURA-3427.
2017-05-12 17:20:49 +02:00
Lipu Fei
598751817a Fix resolve strategy "new" for user instance container
CURA-3756
2017-05-12 16:52:37 +02:00
Ghostkeeper
0cc4f90920
Merge branch 'master' of github.com:Ultimaker/Cura 2017-05-12 16:34:19 +02:00
Lipu Fei
3996230ff9 Load GlobalStack before ExtruderStacks for project loading
CURA-3756
2017-05-12 15:52:16 +02:00
Ghostkeeper
adefbaf72e
Add more unhappy-path tests
One for the new setting_version. One for the misconception of version numbers being a major-minor version or something, because it's not stored that way.

Contributes to issue CURA-3427.
2017-05-12 15:01:27 +02:00
Ghostkeeper
04ef2bf1f0
Update setting_version tests
Included a bit of a more difficult case.

Contributes to issue CURA-3427.
2017-05-12 14:58:11 +02:00
Ghostkeeper
55b2392a1d
Load setting version from metadata
I'm not really awake today, am I? The functionality happened to still work because of how our real data is structured right now, but the tests still failed. Those are successful now.

Contributes to issue CURA-3427.
2017-05-12 14:55:19 +02:00
Ghostkeeper
9820dac4a6
Actually use setting_version to get the setting version number
This was sort of hidden because we've always incremented the normal version number up until now.

Contributes to issue CURA-3427.
2017-05-12 14:51:44 +02:00
Ghostkeeper
20e9d19587
Update tests to account for new way of getting version numbers
The normal version number is multiplied by a million. Currently these tests fail, so nice to have them.

Contributes to issue CURA-3427.
2017-05-12 14:50:43 +02:00
Lipu Fei
fe11819ce9 Handle "new" resolve strategy for definition&quality changes
CURA-3756
2017-05-12 14:34:41 +02:00
Lipu Fei
9ea0f48341 Check definition changes conflicts in preRead()
CURA-3756
2017-05-12 14:34:41 +02:00
Ghostkeeper
a472fd8163
Remove debug print
Oops again.

Contributes to issue CURA-3427.
2017-05-12 14:33:44 +02:00
Ghostkeeper
1e4c394b71
Remove getting superfluous material density
The density is already put in the 'properties' metadata entry. Don't need to put it in there doubly. Turns out that this density line was originally just superfluous.

Contributes to issue CURA-3427 or something.
2017-05-12 14:12:36 +02:00
Ghostkeeper
98662bc6f6
Also update import to renamed package
Oops.

Contributes to issue CURA-3427.
2017-05-12 14:07:21 +02:00
Ghostkeeper
c8295434f3
Load setting_version from XML material profile
The setting_version is translated from the version number. The setting_version number currently happens to be the same as the version number of XML but that won't always be the case so we introduce a translation-step as well.

Contributes to issue CURA-3427.
2017-05-12 14:04:56 +02:00
Ghostkeeper
38f081539a
Fix deserialising density
That density variable was never used. Hope this fixes some unaccounted-for bug.

Doesn't contribute to CURA-3427 but I'm listing it as if it does anyway.
2017-05-12 14:01:06 +02:00
Ghostkeeper
6e01c6ba60
Initialise config_name
Just a mistake that I saw because my IDE warned me about this. If a variant in Cura 2.3 has no general/name keyword, then it would break here. Now it doesn't break any more and gives a nonsensical name.

Contributes to issue CURA-3427.
2017-05-11 17:33:46 +02:00
Ghostkeeper
0a84a181c4
Track cfg version numbers with major-minor, sorta
We now have a (format) version and a setting version. Ideally we'd like major-minor version numbers in our profiles. However, introducing major-minor version numbers requires substantial changes to the version upgrade manager to compare version numbers, find a path towards the current version, or even keeping track of the current version. Therefore we just collapse the two version numbers into one: Multiply the major version number by a million and you'll never exceed it in the minor versioning. The only problem is that we now have to update the versioning for all of our three upgrade plug-ins, because they all need to know locally how to find the version number of their file types (because the upgrade manager has no knowledge of the file types) and they have no access to each other because a plug-in may be disabled.

Contributes to issue CURA-3427.
2017-05-11 17:31:37 +02:00
Ghostkeeper
639e86ca59
Set setting_version in 2.6's profiles
Contributes to issue CURA-3427.
2017-05-11 16:53:59 +02:00
Ghostkeeper
30321607d0
Remove Cubic Subdivision Radius from users' configuration
The setting no longer exists. This removes it from all instance containers and preference files.

Contributes to issue CURA-3427.
2017-05-11 15:30:24 +02:00
Lipu Fei
8a94f94258 WIP: use .userChanges property to replace user containers in project loading
CURA-3756
2017-05-11 14:54:00 +02:00
Lipu Fei
3baec9b742 WIP: set dirty after overriding a user container with deserialize()
CURA-3756
2017-05-11 14:53:04 +02:00
Ghostkeeper
22cfaddba5
Fix import
Oops.

The test passes again now.

Contributes to issue CURA-3427.
2017-05-11 14:35:54 +02:00
Ghostkeeper
833ad65507
Also rename test
Forgot that, sorry.

Contributes to issue CURA-3427.
2017-05-11 14:34:11 +02:00
Ghostkeeper
b57cb16f6d
Rename 24to25 to 25to26
The upgrade now upgrades profiles from the 2.5 format to 2.6, since we delayed the update for the 2.5 release.

Contributes to issue CURA-3427.
2017-05-11 14:32:45 +02:00
Ghostkeeper
99cb8bc169
Re-enable Version 2.4 to 2.5 upgrade
So that we can remove settings again, among which the Cubic Subdivision Radius setting.

Contributes to issue CURA-3427.
2017-05-11 14:29:25 +02:00
Lipu Fei
bb0e711577 WIP: fix material container renaming in project loading
CURA-3756
2017-05-11 14:20:11 +02:00
Lipu Fei
f436da8674 WIP: fix project loading and container renaming
CURA-3756
2017-05-11 14:20:11 +02:00