mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-06 22:47:29 -06:00
Fix broken slicing
This commit is contained in:
parent
b8a670a15a
commit
c6b290e1e5
1 changed files with 7 additions and 4 deletions
|
@ -5,7 +5,7 @@ import numpy
|
|||
from string import Formatter
|
||||
from enum import IntEnum
|
||||
import time
|
||||
from typing import Any, Dict, List, Optional, Set
|
||||
from typing import Any, cast, Dict, List, Optional, Set
|
||||
import re
|
||||
import Arcus #For typing.
|
||||
|
||||
|
@ -216,12 +216,15 @@ class StartSliceJob(Job):
|
|||
if temp_list:
|
||||
object_groups.append(temp_list)
|
||||
|
||||
extruders_enabled = {position: stack.isEnabled for position, stack in CuraApplication.getInstance().getGlobalContainerStack().extruders.items()}
|
||||
global_stack = CuraApplication.getInstance().getGlobalContainerStack()
|
||||
if not global_stack:
|
||||
return
|
||||
extruders_enabled = {position: stack.isEnabled for position, stack in global_stack.extruders.items()}
|
||||
filtered_object_groups = []
|
||||
has_model_with_disabled_extruders = False
|
||||
associated_disabled_extruders = set()
|
||||
for group in object_groups:
|
||||
stack = CuraApplication.getInstance().getGlobalContainerStack()
|
||||
stack = global_stack
|
||||
skip_group = False
|
||||
for node in group:
|
||||
extruder_position = node.callDecoration("getActiveExtruderPosition")
|
||||
|
@ -325,7 +328,7 @@ class StartSliceJob(Job):
|
|||
# \param default_extruder_nr Stack nr to use when no stack nr is specified, defaults to the global stack
|
||||
def _expandGcodeTokens(self, value: str, default_extruder_nr: int = -1) -> str:
|
||||
if not self._all_extruders_settings:
|
||||
global_stack = CuraApplication.getInstance().getGlobalContainerStack()
|
||||
global_stack = cast(ContainerStack, CuraApplication.getInstance().getGlobalContainerStack())
|
||||
|
||||
# NB: keys must be strings for the string formatter
|
||||
self._all_extruders_settings = {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue