mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 15:37:27 -06:00
Fix _getSettingProperty up
Seems to work again now. Contributes to issue CURA-2407.
This commit is contained in:
parent
edc6955162
commit
2721cde6f0
1 changed files with 10 additions and 7 deletions
|
@ -301,17 +301,20 @@ class ConvexHullDecorator(SceneNodeDecorator):
|
||||||
return per_mesh_stack.getProperty(setting_key, property)
|
return per_mesh_stack.getProperty(setting_key, property)
|
||||||
|
|
||||||
multi_extrusion = self._global_stack.getProperty("machine_extruder_count", "value") > 1
|
multi_extrusion = self._global_stack.getProperty("machine_extruder_count", "value") > 1
|
||||||
|
|
||||||
if not multi_extrusion:
|
if not multi_extrusion:
|
||||||
return self._global_stack.getProperty(setting_key, property)
|
return self._global_stack.getProperty(setting_key, property)
|
||||||
|
|
||||||
extruder_index = self._global_stack.getProperty(setting_key, "limit_to_extruder")
|
extruder_index = self._global_stack.getProperty(setting_key, "limit_to_extruder")
|
||||||
if extruder_index == "-1": # If extruder index is -1 use global instead
|
if extruder_index == "-1": # If extruder index is -1 use the object's extruder instead.
|
||||||
return self._global_stack.getProperty(setting_key, property)
|
extruder_stack_id = self._node.callDecoration("getActiveExtruder")
|
||||||
|
if not extruder_stack_id: #Decoration doesn't exist.
|
||||||
extruder_stack_id = ExtruderManager.getInstance().extruderIds[str(extruder_index)]
|
extruder_stack_id = ExtruderManager.getInstance().extruderIds["0"]
|
||||||
stack = UM.Settings.ContainerRegistry.getInstance().findContainerStacks(id=extruder_stack_id)[0]
|
extruder_stack = UM.Settings.ContainerRegistry.getInstance().findContainerStacks(id = extruder_stack_id)[0]
|
||||||
return stack.getProperty(setting_key, property)
|
return extruder_stack.getProperty(setting_key, property)
|
||||||
|
else: #Limit_to_extruder is set. Use that one.
|
||||||
|
extruder_stack_id = ExtruderManager.getInstance().extruderIds[str(extruder_index)]
|
||||||
|
stack = UM.Settings.ContainerRegistry.getInstance().findContainerStacks(id = extruder_stack_id)[0]
|
||||||
|
return stack.getProperty(setting_key, property)
|
||||||
|
|
||||||
## Returns true if node is a descendent or the same as the root node.
|
## Returns true if node is a descendent or the same as the root node.
|
||||||
def __isDescendant(self, root, node):
|
def __isDescendant(self, root, node):
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue