diff options
author | Ghostkeeper <rubend@tutanota.com> | 2020-05-15 17:18:05 +0300 |
---|---|---|
committer | Ghostkeeper <rubend@tutanota.com> | 2020-05-15 17:18:05 +0300 |
commit | 2125b7130fcfb336bda56ae65a85a4647b9f532f (patch) | |
tree | 211c4b5368def83584a394b871643eea708353bb /plugins/CuraEngineBackend | |
parent | 696d2ffa1dccc04db00133608e7cec4f1e22c9cf (diff) |
Use extruderList rather than extruders
Extruders has been deprecated.
This also allows us to use integers for a while longer (until it needs to be serialised to a message with the .join() function).
Done during Turbo Testing and Tooling to reduce the number of warnings in our log.
Diffstat (limited to 'plugins/CuraEngineBackend')
-rw-r--r-- | plugins/CuraEngineBackend/StartSliceJob.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/plugins/CuraEngineBackend/StartSliceJob.py b/plugins/CuraEngineBackend/StartSliceJob.py index 62b0bd16e7..51eea7beea 100644 --- a/plugins/CuraEngineBackend/StartSliceJob.py +++ b/plugins/CuraEngineBackend/StartSliceJob.py @@ -251,7 +251,7 @@ class StartSliceJob(Job): global_stack = CuraApplication.getInstance().getGlobalContainerStack() if not global_stack: return - extruders_enabled = {position: stack.isEnabled for position, stack in global_stack.extruders.items()} + extruders_enabled = [stack.isEnabled for stack in global_stack.extruderList] filtered_object_groups = [] has_model_with_disabled_extruders = False associated_disabled_extruders = set() @@ -261,7 +261,7 @@ class StartSliceJob(Job): for node in group: # Only check if the printing extruder is enabled for printing meshes is_non_printing_mesh = node.callDecoration("evaluateIsNonPrintingMesh") - extruder_position = node.callDecoration("getActiveExtruderPosition") + extruder_position = int(node.callDecoration("getActiveExtruderPosition")) if not is_non_printing_mesh and not extruders_enabled[extruder_position]: skip_group = True has_model_with_disabled_extruders = True @@ -271,8 +271,8 @@ class StartSliceJob(Job): if has_model_with_disabled_extruders: self.setResult(StartJobResult.ObjectsWithDisabledExtruder) - associated_disabled_extruders = {str(c) for c in sorted([int(p) + 1 for p in associated_disabled_extruders])} - self.setMessage(", ".join(associated_disabled_extruders)) + associated_disabled_extruders = {p + 1 for p in associated_disabled_extruders} + self.setMessage(", ".join(map(str, sorted(associated_disabled_extruders)))) return # There are cases when there is nothing to slice. This can happen due to one at a time slicing not being |