Merge branch '2.7'

This commit is contained in:
Ghostkeeper 2017-08-11 11:18:15 +02:00
commit 76e0156076
No known key found for this signature in database
GPG Key ID: C5F96EE2BC0F7E75
14 changed files with 22 additions and 15 deletions

View File

@ -229,7 +229,10 @@ class XmlMaterialProfile(InstanceContainer):
product = definition_id product = definition_id
builder.start("machine") builder.start("machine")
builder.start("machine_identifier", { "manufacturer": definition.getMetaDataEntry("manufacturer", ""), "product": product}) builder.start("machine_identifier", {
"manufacturer": container.getMetaDataEntry("machine_manufacturer", definition.getMetaDataEntry("manufacturer", "Unknown")),
"product": product
})
builder.end("machine_identifier") builder.end("machine_identifier")
for instance in container.findInstances(): for instance in container.findInstances():
@ -540,6 +543,8 @@ class XmlMaterialProfile(InstanceContainer):
definition = definitions[0] definition = definitions[0]
machine_manufacturer = identifier.get("manufacturer", definition.getMetaDataEntry("manufacturer", "Unknown")) #If the XML material doesn't specify a manufacturer, use the one in the actual printer definition.
if machine_compatibility: if machine_compatibility:
new_material_id = self.id + "_" + machine_id new_material_id = self.id + "_" + machine_id
@ -551,6 +556,7 @@ class XmlMaterialProfile(InstanceContainer):
new_material.setDefinition(definition) new_material.setDefinition(definition)
# Don't use setMetadata, as that overrides it for all materials with same base file # Don't use setMetadata, as that overrides it for all materials with same base file
new_material.getMetaData()["compatible"] = machine_compatibility new_material.getMetaData()["compatible"] = machine_compatibility
new_material.getMetaData()["machine_manufacturer"] = machine_manufacturer
new_material.setCachedValues(cached_machine_setting_properties) new_material.setCachedValues(cached_machine_setting_properties)
@ -597,6 +603,7 @@ class XmlMaterialProfile(InstanceContainer):
new_hotend_material.addMetaDataEntry("variant", variant_containers[0].id) new_hotend_material.addMetaDataEntry("variant", variant_containers[0].id)
# Don't use setMetadata, as that overrides it for all materials with same base file # Don't use setMetadata, as that overrides it for all materials with same base file
new_hotend_material.getMetaData()["compatible"] = hotend_compatibility new_hotend_material.getMetaData()["compatible"] = hotend_compatibility
new_hotend_material.getMetaData()["machine_manufacturer"] = machine_manufacturer
cached_hotend_setting_properties = cached_machine_setting_properties.copy() cached_hotend_setting_properties = cached_machine_setting_properties.copy()
cached_hotend_setting_properties.update(hotend_setting_values) cached_hotend_setting_properties.update(hotend_setting_values)

View File

@ -5,8 +5,8 @@
"metadata": "metadata":
{ {
"type": "extruder", "type": "extruder",
"author": "Ultimaker B.V.", "author": "Ultimaker",
"manufacturer": "Ultimaker", "manufacturer": "Ultimaker B.V.",
"setting_version": 1, "setting_version": 1,
"visible": false "visible": false
}, },

View File

@ -7,7 +7,7 @@
"type": "machine", "type": "machine",
"author": "Ultimaker B.V.", "author": "Ultimaker B.V.",
"category": "Ultimaker", "category": "Ultimaker",
"manufacturer": "Ultimaker", "manufacturer": "Ultimaker B.V.",
"setting_version": 1, "setting_version": 1,
"file_formats": "text/x-gcode;application/x-stl-ascii;application/x-stl-binary;application/x-wavefront-obj;application/x3g", "file_formats": "text/x-gcode;application/x-stl-ascii;application/x-stl-binary;application/x-wavefront-obj;application/x3g",
"visible": false, "visible": false,

View File

@ -5,7 +5,7 @@
"inherits": "fdmprinter", "inherits": "fdmprinter",
"metadata": { "metadata": {
"author": "Ultimaker", "author": "Ultimaker",
"manufacturer": "Ultimaker", "manufacturer": "Ultimaker B.V.",
"visible": false "visible": false
}, },
"overrides": { "overrides": {

View File

@ -6,7 +6,7 @@
"metadata": { "metadata": {
"visible": true, "visible": true,
"author": "Ultimaker", "author": "Ultimaker",
"manufacturer": "Ultimaker", "manufacturer": "Ultimaker B.V.",
"category": "Ultimaker", "category": "Ultimaker",
"weight": 3, "weight": 3,
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",

View File

@ -5,7 +5,7 @@
"inherits": "ultimaker2", "inherits": "ultimaker2",
"metadata": { "metadata": {
"author": "Ultimaker", "author": "Ultimaker",
"manufacturer": "Ultimaker", "manufacturer": "Ultimaker B.V.",
"category": "Ultimaker", "category": "Ultimaker",
"weight": 3, "weight": 3,
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",

View File

@ -5,7 +5,7 @@
"inherits": "ultimaker2_plus", "inherits": "ultimaker2_plus",
"metadata": { "metadata": {
"author": "Ultimaker", "author": "Ultimaker",
"manufacturer": "Ultimaker", "manufacturer": "Ultimaker B.V.",
"category": "Ultimaker", "category": "Ultimaker",
"quality_definition": "ultimaker2_plus", "quality_definition": "ultimaker2_plus",
"weight": 2, "weight": 2,

View File

@ -5,7 +5,7 @@
"inherits": "ultimaker2", "inherits": "ultimaker2",
"metadata": { "metadata": {
"author": "Ultimaker", "author": "Ultimaker",
"manufacturer": "Ultimaker", "manufacturer": "Ultimaker B.V.",
"category": "Ultimaker", "category": "Ultimaker",
"weight": 3, "weight": 3,
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",

View File

@ -5,7 +5,7 @@
"inherits": "ultimaker2", "inherits": "ultimaker2",
"metadata": { "metadata": {
"author": "Ultimaker", "author": "Ultimaker",
"manufacturer": "Ultimaker", "manufacturer": "Ultimaker B.V.",
"category": "Ultimaker", "category": "Ultimaker",
"weight": 1, "weight": 1,
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",

View File

@ -5,7 +5,7 @@
"inherits": "ultimaker", "inherits": "ultimaker",
"metadata": { "metadata": {
"author": "Ultimaker", "author": "Ultimaker",
"manufacturer": "Ultimaker", "manufacturer": "Ultimaker B.V.",
"category": "Ultimaker", "category": "Ultimaker",
"visible": true, "visible": true,
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",

View File

@ -5,7 +5,7 @@
"inherits": "ultimaker3", "inherits": "ultimaker3",
"metadata": { "metadata": {
"author": "Ultimaker", "author": "Ultimaker",
"manufacturer": "Ultimaker", "manufacturer": "Ultimaker B.V.",
"category": "Ultimaker", "category": "Ultimaker",
"quality_definition": "ultimaker3", "quality_definition": "ultimaker3",
"visible": true, "visible": true,

View File

@ -6,7 +6,7 @@
"metadata": { "metadata": {
"visible": true, "visible": true,
"author": "Ultimaker", "author": "Ultimaker",
"manufacturer": "Ultimaker", "manufacturer": "Ultimaker B.V.",
"category": "Ultimaker", "category": "Ultimaker",
"weight": 4, "weight": 4,
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",

View File

@ -6,7 +6,7 @@
"metadata": { "metadata": {
"visible": true, "visible": true,
"author": "Ultimaker", "author": "Ultimaker",
"manufacturer": "Ultimaker", "manufacturer": "Ultimaker B.V.",
"category": "Ultimaker", "category": "Ultimaker",
"weight": 4, "weight": 4,
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",

View File

@ -5,7 +5,7 @@
"inherits": "ultimaker_original", "inherits": "ultimaker_original",
"metadata": { "metadata": {
"author": "Ultimaker", "author": "Ultimaker",
"manufacturer": "Ultimaker", "manufacturer": "Ultimaker B.V.",
"category": "Ultimaker", "category": "Ultimaker",
"weight": 4, "weight": 4,
"file_formats": "text/x-gcode", "file_formats": "text/x-gcode",