ZOffsetDecorator.py 531 B

1234567891011121314151617
  1. from UM.Scene.SceneNodeDecorator import SceneNodeDecorator
  2. ## A decorator that stores the amount an object has been moved below the platform.
  3. class ZOffsetDecorator(SceneNodeDecorator):
  4. def __init__(self):
  5. self._z_offset = 0
  6. def setZOffset(self, offset):
  7. self._z_offset = offset
  8. def getZOffset(self):
  9. return self._z_offset
  10. def __deepcopy__(self, memo):
  11. copied_decorator = ZOffsetDecorator()
  12. copied_decorator.setZOffset(self.getZOffset())
  13. return copied_decorator