mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-09-14 00:53:14 +08:00
Add type metadata to Extruder/Global stack
For backward compatibility with old code that still checks for "type".
This commit is contained in:
parent
608e62e081
commit
433537a2f0
@ -18,6 +18,8 @@ class ExtruderStack(CuraContainerStack):
|
|||||||
def __init__(self, container_id, *args, **kwargs):
|
def __init__(self, container_id, *args, **kwargs):
|
||||||
super().__init__(container_id, *args, **kwargs)
|
super().__init__(container_id, *args, **kwargs)
|
||||||
|
|
||||||
|
self.addMetaDataEntry("type", "extruder_train") # For backward compatibility
|
||||||
|
|
||||||
@override(ContainerStack)
|
@override(ContainerStack)
|
||||||
def setNextStack(self, stack):
|
def setNextStack(self, stack):
|
||||||
super().setNextStack(stack)
|
super().setNextStack(stack)
|
||||||
|
@ -21,6 +21,8 @@ class GlobalStack(CuraContainerStack):
|
|||||||
def __init__(self, container_id: str, *args, **kwargs):
|
def __init__(self, container_id: str, *args, **kwargs):
|
||||||
super().__init__(container_id, *args, **kwargs)
|
super().__init__(container_id, *args, **kwargs)
|
||||||
|
|
||||||
|
self.addMetaDataEntry("type", "machine") # For backward compatibility
|
||||||
|
|
||||||
self._extruders = []
|
self._extruders = []
|
||||||
|
|
||||||
self._resolving_property = None
|
self._resolving_property = None
|
||||||
|
Loading…
x
Reference in New Issue
Block a user