Head size & settings for one at a time & all at once printing

This commit is contained in:
Jaime van Kessel 2015-07-21 11:13:38 +02:00
parent 5abb6c1635
commit a18f133e29
3 changed files with 264 additions and 190 deletions

View file

@ -1,4 +1,5 @@
from UM.Scene.SceneNodeDecorator import SceneNodeDecorator
from UM.Application import Application
class ConvexHullDecorator(SceneNodeDecorator):
def __init__(self):
@ -6,7 +7,19 @@ class ConvexHullDecorator(SceneNodeDecorator):
self._convex_hull = None
self._convex_hull_node = None
self._convex_hull_job = None
settings = Application.getInstance().getActiveMachine()
print_sequence_setting = settings.getSettingByKey("print_sequence")
if print_sequence_setting:
print_sequence_setting.valueChanged.connect(self._onPrintSequenceSettingChanged)
def _onPrintSequenceSettingChanged(self, setting):
if self._convex_hull_job:
self._convex_hull_job.cancel()
self.setConvexHull(None)
if self._convex_hull_node:
self._convex_hull_node.setParent(None)
self._convex_hull_node = None
def getConvexHull(self):
return self._convex_hull