CURA-5164 Make the mesh readers compliant with the new signature of the mesh reader. Also adapt the tests.

This commit is contained in:
Diego Prado Gesto 2018-05-23 17:17:41 +02:00
parent 39768e29cc
commit ddd7b056f3
10 changed files with 20 additions and 20 deletions

View file

@ -17,8 +17,8 @@ from cura.Scene.CuraSceneNode import CuraSceneNode as SceneNode
class ImageReader(MeshReader):
def __init__(self):
super(ImageReader, self).__init__()
def __init__(self, application):
super(ImageReader, self).__init__(application)
self._supported_extensions = [".jpg", ".jpeg", ".bmp", ".gif", ".png"]
self._ui = ImageReaderUI(self)
@ -44,7 +44,7 @@ class ImageReader(MeshReader):
return MeshReader.PreReadResult.cancelled
return MeshReader.PreReadResult.accepted
def read(self, file_name):
def _read(self, file_name):
size = max(self._ui.getWidth(), self._ui.getDepth())
return self._generateSceneNode(file_name, size, self._ui.peak_height, self._ui.base_height, self._ui.smoothing, 512, self._ui.image_color_invert)