mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-07 06:57:28 -06:00
In SliceInfo, use the global stack if it is a single-extrusion machine
CURA-4167 Single extrusion machines don't have extruder stacks in the current architecture.
This commit is contained in:
parent
e67286c0d8
commit
3a46a337ff
2 changed files with 5 additions and 4 deletions
|
@ -2,11 +2,9 @@ from UM.Workspace.WorkspaceWriter import WorkspaceWriter
|
|||
from UM.Application import Application
|
||||
from UM.Preferences import Preferences
|
||||
from UM.Settings.ContainerRegistry import ContainerRegistry
|
||||
from UM.Settings.ContainerStack import ContainerStack
|
||||
from cura.Settings.ExtruderManager import ExtruderManager
|
||||
import zipfile
|
||||
from io import StringIO
|
||||
import copy
|
||||
import configparser
|
||||
|
||||
|
||||
|
|
|
@ -76,6 +76,9 @@ class SliceInfo(Extension):
|
|||
data["active_machine"] = {"definition_id": global_container_stack.definition.getId(), "manufacturer": global_container_stack.definition.getMetaData().get("manufacturer","")}
|
||||
|
||||
data["extruders"] = []
|
||||
extruder_count = len(global_container_stack.extruders)
|
||||
extruders = []
|
||||
if extruder_count > 1:
|
||||
extruders = list(ExtruderManager.getInstance().getMachineExtruders(global_container_stack.getId()))
|
||||
extruders = sorted(extruders, key = lambda extruder: extruder.getMetaDataEntry("position"))
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue