mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-08-14 21:45:59 +08:00
Simplify getting material's GUID
This commit is contained in:
parent
0a2a7dda23
commit
e55bb1e25c
@ -250,9 +250,7 @@ class StartSliceJob(Job):
|
|||||||
settings = self._buildReplacementTokens(stack)
|
settings = self._buildReplacementTokens(stack)
|
||||||
|
|
||||||
#Also send the material GUID. This is a setting 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.
|
||||||
material_instance_container = stack.findContainer({"type": "material"})
|
settings["material_guid"] = stack.material.getMetaDataEntry("GUID", "")
|
||||||
if material_instance_container:
|
|
||||||
settings["material_guid"] = material_instance_container.getMetaDataEntry("GUID", "")
|
|
||||||
|
|
||||||
#Replace the setting tokens in start and end g-code.
|
#Replace the setting tokens in start and end g-code.
|
||||||
settings["machine_extruder_start_code"] = self._expandGcodeTokens(settings["machine_extruder_start_code"], settings)
|
settings["machine_extruder_start_code"] = self._expandGcodeTokens(settings["machine_extruder_start_code"], settings)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user