# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
# along with Printrun. If not, see <http://www.gnu.org/licenses/>.
importtraceback
importtraceback
importlogging
importwx
importwx
...
@@ -53,9 +54,9 @@ class VizPane(wx.BoxSizer):
...
@@ -53,9 +54,9 @@ class VizPane(wx.BoxSizer):
root.gviz.clickcb=root.show_viz_window
root.gviz.clickcb=root.show_viz_window
except:
except:
use2dview=True
use2dview=True
print"3D view mode requested, but we failed to initialize it."
logging.error("3D view mode requested, but we failed to initialize it.\n"
print"Falling back to 2D view, and here is the backtrace:"
+"Falling back to 2D view, and here is the backtrace:\n"
traceback.print_exc()
+traceback.format_exc())
ifuse2dview:
ifuse2dview:
root.gviz=gviz.Gviz(parentpanel,(300,300),
root.gviz=gviz.Gviz(parentpanel,(300,300),
build_dimensions=root.build_dimensions_list,
build_dimensions=root.build_dimensions_list,
...
@@ -75,9 +76,9 @@ class VizPane(wx.BoxSizer):
...
@@ -75,9 +76,9 @@ class VizPane(wx.BoxSizer):
root.gwindow=printrun.gcview.GcodeViewFrame(None,wx.ID_ANY,'Gcode view, shift to move view, mousewheel to set layer',size=(600,600),build_dimensions=root.build_dimensions_list,objects=objects,root=root,circular=root.settings.circular_bed,antialias_samples=int(root.settings.antialias3dsamples))
root.gwindow=printrun.gcview.GcodeViewFrame(None,wx.ID_ANY,'Gcode view, shift to move view, mousewheel to set layer',size=(600,600),build_dimensions=root.build_dimensions_list,objects=objects,root=root,circular=root.settings.circular_bed,antialias_samples=int(root.settings.antialias3dsamples))
except:
except:
use3dview=False
use3dview=False
print"3D view mode requested, but we failed to initialize it."
logging.error("3D view mode requested, but we failed to initialize it.\n"
print"Falling back to 2D view, and here is the backtrace:"
+"Falling back to 2D view, and here is the backtrace:\n"