diff options
author | fieldOfView <aldo@fieldofview.com> | 2021-08-24 10:57:30 +0300 |
---|---|---|
committer | fieldOfView <aldo@fieldofview.com> | 2021-08-24 10:57:30 +0300 |
commit | 2238234741769bcb8c967741e45d844ead1f70a4 (patch) | |
tree | a99b866919127b8201d5ea195848e177802156b0 /plugins/CuraEngineBackend | |
parent | f11869034b24f506093503e04429bc2848e962f4 (diff) |
Add id & brand and don't send material properties to CuraEngine
Diffstat (limited to 'plugins/CuraEngineBackend')
-rw-r--r-- | plugins/CuraEngineBackend/StartSliceJob.py | 17 |
1 files changed, 12 insertions, 5 deletions
diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 8729bdf7be..d186a1bfd9 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -353,10 +353,19 @@ class StartSliceJob(Job): result[key] = stack.getProperty(key, "value") Job.yieldThread() - result["print_bed_temperature"] = result["material_bed_temperature"] # Renamed settings. + # Material identification in addition to non-human-readable GUID + result["material_id"] = stack.material.getMetaDataEntry("base_file", "") + result["material_type"] = stack.material.getMetaDataEntry("material", "") + result["material_name"] = stack.material.getMetaDataEntry("name", "") + result["material_brand"] = stack.material.getMetaDataEntry("brand", "") + + # Renamed settings. + result["print_bed_temperature"] = result["material_bed_temperature"] result["print_temperature"] = result["material_print_temperature"] result["travel_speed"] = result["speed_travel"] - result["time"] = time.strftime("%H:%M:%S") #Some extra settings. + + #Some extra settings. + result["time"] = time.strftime("%H:%M:%S") result["date"] = time.strftime("%d-%m-%Y") result["day"] = ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"][int(time.strftime("%w"))] result["initial_extruder_nr"] = CuraApplication.getInstance().getExtruderManager().getInitialExtruderNr() @@ -411,10 +420,8 @@ class StartSliceJob(Job): extruder_nr = stack.getProperty("extruder_nr", "value") settings = self._all_extruders_settings[str(extruder_nr)].copy() - # Also send the material GUID, type and name. These are settings in fdmprinter, but we have no interface for it. + # Also send the material GUID. This is a setting 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") |