132 Commits

Author SHA1 Message Date
Ghostkeeper
74bd527b03
Load product_id_map from file
For now this file is hard-coded. We should eventually try to generate this in the build system.

Contributes to issue CURA-4243.
2017-11-01 14:52:03 +01:00
Ghostkeeper
a08875c5eb
Remove redundant setting of name
It's just copied along with the rest of the metadata now.

Contributes to issue CURA-4243.
2017-10-31 11:11:56 +01:00
Ghostkeeper
d24fa3bc3b
Set name directly in metadata when clearing
Because the setName function checks if the name is equal to the previous name, but at that point the previous name doesn't exist.

Contributes to issue CURA-4243.
2017-10-31 08:23:57 +01:00
Ghostkeeper
8eaec149fa
Make sure the ID stays in the metadata when clearing it
Previously the ID was also exempted from the clear.

Contributes to issue CURA-4243.
2017-10-30 15:54:26 +01:00
Ghostkeeper
8bbb6c1af5
Load and serialize container ID and name properly: not in metadata
We shouldn't write the name or ID, who are now in the metadata.
Also we should load the name and ID properly from the file.

Contributes to issue CURA-4243.
2017-10-27 16:50:13 +02:00
Ghostkeeper
a31c39b225
Use setters and getters for name and ID
Because their implementation changed, these would have been implemented in some other way. Instead I use the getters and setters which are inherited from the parent class and therefore are already updated.

Contributes to issue CURA-4243.
2017-10-27 16:35:58 +02:00
Ghostkeeper
7ac3c1446b
Make ignored metadata keys a set
It needs to be a set now for Uranium.

Contributes to issue CURA-4243.
2017-10-27 16:25:52 +02:00
Ghostkeeper
6c4c7fff4d
Use findContainersMetadata whenever possible
This ensures that we only load those containers that we actually need the data of.

Contributes to issue CURA-4243.
2017-10-20 15:09:45 +02:00
ChrisTerBeke
78ba3c3aa0 Move BAM equations to BAM quality profiles as they are very specific - CURA-4248 2017-10-18 13:51:06 +02:00
ChrisTerBeke
91589ed29d Add surface energy property to get correct behaviour - CURA-4248 2017-10-17 13:03:29 +02:00
ChrisTerBeke
a444e5c883 update material xml parser to support psp values - CURA-4253 2017-10-16 15:55:46 +02:00
Lipu Fei
7e0014eadd Create machine name-to-id map at runtime instead of using a hard-coded map
CURA-4223
2017-10-16 10:28:06 +02:00
Jaime van Kessel
38a2245d74 XML materials are now added in one batch 2017-09-28 16:07:03 +02:00
Mark
9a193ad5c5 Changing AGPLv3 to LGPLv3 2017-09-28 13:00:43 +02:00
Lipu Fei
51547bf37a Update setting_version to 3 for XMLMaterial
CURA-4270

Technically, this is not right. This is just to postpone a time bomb...
The XML material profile needs a setting number instead of getting it
derived from the schema version.
2017-09-04 15:51:31 +02:00
Lipu Fei
812e262f39 When deserialising a material, also update the material derived from it
CURA-4204
2017-08-22 11:29:35 +02:00
Ghostkeeper
b03847447f
Take manufacturer from XML profile if available
Otherwise we fall back to the manufacturer in the machine definition. If that fails too, we fall back to Unknown (rather than an empty string).

Contributes to issue CURA-4157.
2017-08-11 11:13:23 +02:00
Lipu Fei
024f2384e0 Fix mutable arg problem and rename arg
CURA-4049
2017-07-18 08:32:22 +02:00
Lipu Fei
3c663d576c Do not save setting_version when serializing an XML material
CURA-4053

setting_version is derived from the "version" tag in the XML material
schema.
2017-07-17 13:54:22 +02:00
Lipu Fei
ecdf0bbe33 Fix setting_version in metadata for XMLMaterial
CURA-4053
2017-07-17 13:40:12 +02:00
Lipu Fei
63b71b8661 Fix typo in comments 2017-07-17 13:39:03 +02:00
Lipu Fei
68989f2871 Use optional arg in serialize() to exclude network auth keys
CURA-4049
2017-07-17 11:04:08 +02:00
Ghostkeeper
d6941fef2f
Interpret material compatible 'unknown' as 'yes'
We decide whether it is unknown (or unsupported) based on the availability of profiles for it.

Contributes to issue EM-1662.
2017-07-11 13:23:51 +02:00
Lipu Fei
071005541c Use XMLMaterialProfile version tag to determine its version
CURA-2724
2017-07-06 14:47:59 +02:00
Lipu Fei
b4949a164c WIP: Add temporary fix to make materials work with 2.7 version upgrade
CURA-3975

This is a temporary fix to make materials work with 2.7 version upgrade
because of the setting_version change from 1 to 2. This MUST be fixed
after we have decided on how to determine the versions of an
XMLMaterialProfile.
2017-07-06 14:19:30 +02:00
fieldOfView
49f2fb2cea
Fix filtering maerials after editing materials
NB: previously the "approximate_diameter" metadata was stored as a number. This caused some issues passing arguments from QML to Python. Now "approximate_diameter" is stored as a string.
2017-06-14 10:42:04 +02:00
fieldOfView
a7cdf49018
Fix setting metadata on fdmmaterial containers 2017-06-14 10:41:12 +02:00
fieldOfView
5550fe0da8
Fix confusion around the use of the word "global" 2017-06-14 10:40:52 +02:00
fieldOfView
944318d44a
Fix loading material diameter and GUID from XML file 2017-06-14 10:40:43 +02:00
Lipu Fei
8ede981a2c Set version in <fdmmaterial> when saving XML material files
CURA-3884
2017-05-29 14:19:52 +02:00
Lipu Fei
9a08e0cc27 Only use <fdmmaterial version> for detecting material file version
CURA-3540
2017-05-23 11:51:31 +02:00
Jaime van Kessel
4b826b747b Added exception handling to XML parsing
CURA-3843
2017-05-19 13:54:31 +02:00
Jaime van Kessel
75b3f08318 Removed unneeded logging
THis caused a massive logging spam
2017-05-19 13:09:41 +02:00
Lipu Fei
593697e0ed Fix XML material upgrade
CURA-3756
2017-05-19 10:18:13 +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
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
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
Jaime van Kessel
c20542b7b8 Merge branch 'feature_CURA-3540_upgrade_for_project' of github.com:Ultimaker/Cura 2017-04-18 15:33:53 +02:00
Ghostkeeper
f1ac1bd876
Add JellyBox to XML material printer name translations
Because the automatic translation removes the underscore, and then the definition can't be found any more.

Contributes to issue CURA-3695.
2017-04-18 15:11:24 +02:00
Lipu Fei
b3f60c461b Fix type hinting and function name for upgrade profile
CURA-3540
2017-04-14 15:40:18 +02:00
Lipu Fei
4f2c76e462 Update a profile when deserializing it
CURA-3540
2017-04-14 10:50:42 +02:00
fieldOfView
e92aaca7b6 Filter materials by the (approximate) material diameter of the printer
If a machine defines material diameter of 2.85mm, there is no use to show the 1.75mm materials and vice-versa
2017-04-12 23:03:58 +02:00
Lipu Fei
18cf9e3172 CURA-3500 Make sure that material XMLs have utf-8 encoding 2017-03-15 11:47:33 +01:00
Ghostkeeper
b488441d81
Fix link to ContainerRegistry
This one was forgotten because it is in a comment.

Contributes to issue CURA-2917.
2017-02-14 17:00:33 +01:00
Simon Edwards
92cee4a9d7 Merge branch 'master' into python_type_hinting 2017-02-13 16:31:31 +01:00
Jaime van Kessel
c18fb02f82 Removed unneeded (and somewhat expensive) checks
CURA-3311
2017-02-13 11:06:21 +01:00