mirror of
https://github.com/Ultimaker/Cura.git
synced 2025-07-08 07:27:29 -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.Application import Application
|
||||||
from UM.Preferences import Preferences
|
from UM.Preferences import Preferences
|
||||||
from UM.Settings.ContainerRegistry import ContainerRegistry
|
from UM.Settings.ContainerRegistry import ContainerRegistry
|
||||||
from UM.Settings.ContainerStack import ContainerStack
|
|
||||||
from cura.Settings.ExtruderManager import ExtruderManager
|
from cura.Settings.ExtruderManager import ExtruderManager
|
||||||
import zipfile
|
import zipfile
|
||||||
from io import StringIO
|
from io import StringIO
|
||||||
import copy
|
|
||||||
import configparser
|
import configparser
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -76,8 +76,11 @@ class SliceInfo(Extension):
|
||||||
data["active_machine"] = {"definition_id": global_container_stack.definition.getId(), "manufacturer": global_container_stack.definition.getMetaData().get("manufacturer","")}
|
data["active_machine"] = {"definition_id": global_container_stack.definition.getId(), "manufacturer": global_container_stack.definition.getMetaData().get("manufacturer","")}
|
||||||
|
|
||||||
data["extruders"] = []
|
data["extruders"] = []
|
||||||
extruders = list(ExtruderManager.getInstance().getMachineExtruders(global_container_stack.getId()))
|
extruder_count = len(global_container_stack.extruders)
|
||||||
extruders = sorted(extruders, key = lambda extruder: extruder.getMetaDataEntry("position"))
|
extruders = []
|
||||||
|
if extruder_count > 1:
|
||||||
|
extruders = list(ExtruderManager.getInstance().getMachineExtruders(global_container_stack.getId()))
|
||||||
|
extruders = sorted(extruders, key = lambda extruder: extruder.getMetaDataEntry("position"))
|
||||||
|
|
||||||
if not extruders:
|
if not extruders:
|
||||||
extruders = [global_container_stack]
|
extruders = [global_container_stack]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue