My IDE shows the str(inst) representation of an object when indicating what value is in there. This makes it easier to find stuff. It'll also make debug prints more clear than the default <XmlMaterialProfile.XmlMaterialProfile.XmlMaterialProfile object at 0x12345678> stuff of Python.
Contributes to issue CURA-4243.
We only need the metadata of these machines (now that the ID is in the metadata). We won't need all of those machines because some of them are not added.
Contributes to issue CURA-4243.
Since we now return all metadata at once from every file, we don't need this any more. We need to side-load the metadata anyway.
Contributes to issue CURA-4243.
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.
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.
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.
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.
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.
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.
Because of this wrong MIME type, the material profile would get saved using the preferred extension of the instance container, .inst.cfg. This would then get interpreted as having the MIME type of instance containers, and then it would fail to load because it is not an INI file.
Now it stores it as .xml.fdm_material and so the MIME type database interprets it as an XML file.
Contributes to issue CURA-3937.
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.