mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-12 09:17:50 -06:00
Keep per object extruder when switching machines. CURA-2533
This commit is contained in:
parent
80a5978d54
commit
3f6877d2ec
2 changed files with 20 additions and 2 deletions
|
@ -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()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue