mirror of
https://git.mirrors.martin98.com/https://github.com/Ultimaker/Cura
synced 2025-04-22 21:59:37 +08:00
21 lines
621 B
Python
21 lines
621 B
Python
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
|