diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 453907ffc0..8729bdf7be 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -411,8 +411,10 @@ class StartSliceJob(Job): extruder_nr = stack.getProperty("extruder_nr", "value") settings = self._all_extruders_settings[str(extruder_nr)].copy() - # Also send the material GUID. This is a setting in fdmprinter, but we have no interface for it. + # Also send the material GUID, type and name. These are settings in fdmprinter, but we have no interface for it. settings["material_guid"] = stack.material.getMetaDataEntry("GUID", "") + settings["material_type"] = stack.material.getMetaDataEntry("material", "") + settings["material_name"] = stack.material.getMetaDataEntry("name", "") # Replace the setting tokens in start and end g-code. extruder_nr = stack.getProperty("extruder_nr", "value") diff --git a/resources/definitions/fdmprinter.def.json b/resources/definitions/fdmprinter.def.json index a38cfc8852..dab3260388 100644 --- a/resources/definitions/fdmprinter.def.json +++ b/resources/definitions/fdmprinter.def.json @@ -79,6 +79,22 @@ "type": "str", "enabled": false }, + "material_type": + { + "label": "Material Type", + "description": "Type of material. This is set automatically.", + "default_value": "", + "type": "str", + "enabled": false + }, + "material_name": + { + "label": "Material Name", + "description": "Name of the material. This is set automatically.", + "default_value": "", + "type": "str", + "enabled": false + }, "material_diameter": { "label": "Diameter",