Refactor some small bits of the setting override decorator

There was code duplication and a number of functions that should be private

contributes to #5603
This commit is contained in:
Jaime van Kessel 2019-04-15 17:36:55 +02:00
parent d5fa0b395e
commit 42b1a0e028
2 changed files with 7 additions and 10 deletions

View file

@ -196,10 +196,7 @@ class StartSliceJob(Job):
has_printing_mesh = False
for node in DepthFirstIterator(self._scene.getRoot()): #type: ignore #Ignore type error because iter() should get called automatically by Python syntax.
if node.callDecoration("isSliceable") and node.getMeshData() and node.getMeshData().getVertices() is not None:
per_object_stack = node.callDecoration("getStack")
is_non_printing_mesh = False
if per_object_stack:
is_non_printing_mesh = any(per_object_stack.getProperty(key, "value") for key in NON_PRINTING_MESH_SETTINGS)
is_non_printing_mesh = bool(node.callDecoration("isNonPrintingMesh"))
# Find a reason not to add the node
if node.callDecoration("getBuildPlateNumber") != self._build_plate_number: