Added more specific error message when trying to slice with incompatible material

CURA-2271
This commit is contained in:
Jaime van Kessel 2016-09-13 17:27:29 +02:00
parent b707c8d806
commit 76e57c940d
2 changed files with 12 additions and 1 deletions

View file

@ -24,6 +24,7 @@ class StartJobResult(IntEnum):
Error = 2
SettingError = 3
NothingToSlice = 4
MaterialIncompatible = 5
## Formatter class that handles token expansion in start/end gcod
@ -86,7 +87,7 @@ class StartSliceJob(Job):
material = extruder_stack.findContainer({"type": "material"})
if material:
if material.getMetaDataEntry("compatible") == False:
self.setResult(StartJobResult.SettingError)
self.setResult(StartJobResult.MaterialIncompatible)
return
# Don't slice if there is a per object setting with an error value.