Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGhostkeeper <rubend@tutanota.com>2016-09-27 18:30:26 +0300
committerGhostkeeper <rubend@tutanota.com>2016-09-27 18:41:37 +0300
commit2721cde6f0e90329b0ac65ed3db836a30c8cfad8 (patch)
treee1ac1399ca706162bebd0b9dd32d97bba4fb4f5b /cura/ConvexHullDecorator.py
parentedc6955162f85c555a0a8ea936c803e33cf3bc16 (diff)
Fix _getSettingProperty up
Seems to work again now. Contributes to issue CURA-2407.
Diffstat (limited to 'cura/ConvexHullDecorator.py')
-rw-r--r--cura/ConvexHullDecorator.py17
1 files changed, 10 insertions, 7 deletions
diff --git a/cura/ConvexHullDecorator.py b/cura/ConvexHullDecorator.py
index 97cd24d04d..3995c35941 100644
--- a/cura/ConvexHullDecorator.py
+++ b/cura/ConvexHullDecorator.py
@@ -301,17 +301,20 @@ class ConvexHullDecorator(SceneNodeDecorator):
return per_mesh_stack.getProperty(setting_key, property)
multi_extrusion = self._global_stack.getProperty("machine_extruder_count", "value") > 1
-
if not multi_extrusion:
return self._global_stack.getProperty(setting_key, property)
extruder_index = self._global_stack.getProperty(setting_key, "limit_to_extruder")
- if extruder_index == "-1": # If extruder index is -1 use global instead
- return self._global_stack.getProperty(setting_key, property)
-
- 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)
+ if extruder_index == "-1": # If extruder index is -1 use the object's extruder instead.
+ extruder_stack_id = self._node.callDecoration("getActiveExtruder")
+ if not extruder_stack_id: #Decoration doesn't exist.
+ extruder_stack_id = ExtruderManager.getInstance().extruderIds["0"]
+ extruder_stack = UM.Settings.ContainerRegistry.getInstance().findContainerStacks(id = extruder_stack_id)[0]
+ 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.
def __isDescendant(self, root, node):