Keep per object extruder when switching machines. CURA-2533

This commit is contained in:
Jack Ha 2016-10-12 13:58:09 +02:00
parent 80a5978d54
commit 3f6877d2ec
2 changed files with 20 additions and 2 deletions

View file

@ -61,6 +61,15 @@ class SettingOverrideDecorator(SceneNodeDecorator):
def getActiveExtruder(self):
return self._extruder_stack
## Gets the currently active extruders position
#
# \return An extruder's position, or None if no position info is available.
def getActiveExtruderPosition(self):
containers = ContainerRegistry.getInstance().findContainers(id = self.getActiveExtruder())
if containers:
container_stack = containers[0]
return container_stack.getMetaDataEntry("position", default=None)
def _onSettingChanged(self, instance, property_name): # Reminder: 'property' is a built-in function
if property_name == "value": # Only reslice if the value has changed.
Application.getInstance().getBackend().forceSlice()