Add type metadata to Extruder/Global stack

For backward compatibility with old code that still checks for "type".
This commit is contained in:
Arjen Hiemstra 2017-04-06 17:49:22 +02:00
parent 608e62e081
commit 433537a2f0
2 changed files with 4 additions and 0 deletions

View file

@ -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)

View file

@ -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