From: daid303 Date: Mon, 14 Jan 2013 11:00:13 +0000 (+0100) Subject: Keep working when the platform stl is missing. X-Git-Tag: 13.03~107 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=e861e80b780d17247f7123f77dd0eba4b5381e90;p=cura.git Keep working when the platform stl is missing. --- diff --git a/Cura/gui/util/opengl.py b/Cura/gui/util/opengl.py index 41ff00cd..f8fc985b 100644 --- a/Cura/gui/util/opengl.py +++ b/Cura/gui/util/opengl.py @@ -67,10 +67,14 @@ def DrawMachine(machineSize): global platformMesh if platformMesh is None: - platformMesh = meshLoader.loadMesh(getPathForMesh('ultimaker_platform.stl')) - platformMesh.setRotateMirror(0, False, False, False, False, False) - - DrawMesh(platformMesh) + try: + platformMesh = meshLoader.loadMesh(getPathForMesh('ultimaker_platform.stl')) + platformMesh.setRotateMirror(0, False, False, False, False, False) + except: + platformMesh = False + + if platformMesh: + DrawMesh(platformMesh) glPopMatrix() glDisable(GL_LIGHTING)