mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-09 07:56:22 -06:00
Use CuraStack.qualityChanges to get quality changes
CURA-3770
This commit is contained in:
parent
4cf2394488
commit
3a5a28cc38
1 changed files with 2 additions and 2 deletions
|
@ -100,7 +100,7 @@ class GCodeWriter(MeshWriter):
|
||||||
prefix = ";SETTING_" + str(GCodeWriter.version) + " " # The prefix to put before each line.
|
prefix = ";SETTING_" + str(GCodeWriter.version) + " " # The prefix to put before each line.
|
||||||
prefix_length = len(prefix)
|
prefix_length = len(prefix)
|
||||||
|
|
||||||
container_with_profile = stack.findContainer({"type": "quality_changes"})
|
container_with_profile = stack.qualityChanges
|
||||||
if not container_with_profile:
|
if not container_with_profile:
|
||||||
Logger.log("e", "No valid quality profile found, not writing settings to GCode!")
|
Logger.log("e", "No valid quality profile found, not writing settings to GCode!")
|
||||||
return ""
|
return ""
|
||||||
|
@ -115,7 +115,7 @@ class GCodeWriter(MeshWriter):
|
||||||
data = {"global_quality": serialized}
|
data = {"global_quality": serialized}
|
||||||
|
|
||||||
for extruder in sorted(ExtruderManager.getInstance().getMachineExtruders(stack.getId()), key = lambda k: k.getMetaDataEntry("position")):
|
for extruder in sorted(ExtruderManager.getInstance().getMachineExtruders(stack.getId()), key = lambda k: k.getMetaDataEntry("position")):
|
||||||
extruder_quality = extruder.findContainer({"type": "quality_changes"})
|
extruder_quality = extruder.qualityChanges
|
||||||
if not extruder_quality:
|
if not extruder_quality:
|
||||||
Logger.log("w", "No extruder quality profile found, not writing quality for extruder %s to file!", extruder.getId())
|
Logger.log("w", "No extruder quality profile found, not writing quality for extruder %s to file!", extruder.getId())
|
||||||
continue
|
continue
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue