blob: 1f1f5a9b1f59da8f40f7a0d26315756211b83a38 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
|
from UM.Scene.SceneNodeDecorator import SceneNodeDecorator
class ZOffsetDecorator(SceneNodeDecorator):
"""A decorator that stores the amount an object has been moved below the platform."""
def __init__(self) -> None:
super().__init__()
self._z_offset = 0.
def setZOffset(self, offset: float) -> None:
self._z_offset = offset
def getZOffset(self) -> float:
return self._z_offset
def __deepcopy__(self, memo) -> "ZOffsetDecorator":
copied_decorator = ZOffsetDecorator()
copied_decorator.setZOffset(self.getZOffset())
return copied_decorator
|