Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Ultimaker/Cura.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--cura/Machines/ContainerTree.py3
-rw-r--r--cura/Settings/CuraStackBuilder.py19
2 files changed, 2 insertions, 20 deletions
diff --git a/cura/Machines/ContainerTree.py b/cura/Machines/ContainerTree.py
index 208f7da3ca..904f66e96e 100644
--- a/cura/Machines/ContainerTree.py
+++ b/cura/Machines/ContainerTree.py
@@ -82,9 +82,6 @@ class ContainerTree:
currently_added = ContainerRegistry.getInstance().findContainerStacks() # Find all currently added global stacks.
JobQueue.getInstance().add(self._MachineNodeLoadJob(self, currently_added))
- from cura.Settings.CuraStackBuilder import CuraStackBuilder # Avoid circular import
- CuraStackBuilder.createAbstractMachines(currently_added)
-
class _MachineNodeMap:
"""Dictionary-like object that contains the machines.
diff --git a/cura/Settings/CuraStackBuilder.py b/cura/Settings/CuraStackBuilder.py
index 0136dd2cd1..813b3f7d2e 100644
--- a/cura/Settings/CuraStackBuilder.py
+++ b/cura/Settings/CuraStackBuilder.py
@@ -1,7 +1,7 @@
# Copyright (c) 2019 Ultimaker B.V.
# Cura is released under the terms of the LGPLv3 or higher.
-from typing import Optional, cast, List
+from typing import Optional, cast
from UM.ConfigurationErrorMessage import ConfigurationErrorMessage
from UM.Logger import Logger
@@ -11,7 +11,6 @@ from UM.Settings.InstanceContainer import InstanceContainer
from cura.Machines.ContainerTree import ContainerTree
from .GlobalStack import GlobalStack
from .ExtruderStack import ExtruderStack
-from ..PrinterOutput.PrinterOutputDevice import ConnectionType
class CuraStackBuilder:
@@ -268,26 +267,12 @@ class CuraStackBuilder:
return definition_changes_container
@classmethod
- def createAbstractMachines(cls, stacks: List[GlobalStack]) -> None:
- connection_types = ConnectionType.NetworkConnection, ConnectionType.CloudConnection
-
- for stack in stacks:
- try:
- if not any(connection_type in stack.configuredConnectionTypes for connection_type in connection_types):
- continue # This printer is not cloud or network connected. It doesn't need an abstract machine.
-
- cls.createAbstractMachine(stack.getDefinition().getId())
- except Exception as e:
- Logger.error(f"Failed to add abstract printer for container stack: {stack.getName()} with error: {e}")
-
-
- @classmethod
def createAbstractMachine(cls, definition_id: str) -> Optional[GlobalStack]:
"""Create a new instance of an abstract machine.
:param definition_id: The ID of the machine definition to use.
- :return: The existing or new Abstract Machine or None if an error occurred.
+ :return: The new Abstract Machine or None if an error occurred.
"""
abstract_machine_id = f"{definition_id}_abstract_machine"
from cura.CuraApplication import CuraApplication