mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
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.
This commit is contained in:
parent
696d2ffa1d
commit
2125b7130f
1 changed files with 4 additions and 4 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue