def onSaveScene(self, event):
        """
		Save a scene to file
		"""
        wc = "3D view scene (*.3xd)|*.3xd"
        filename = None
        dlg = wx.FileDialog(self, "Save 3D view scene as...", defaultFile="scene.3xd", wildcard=wc, style=wx.SAVE)
        if dlg.ShowModal() == wx.ID_OK:
            filename = dlg.GetPath()
        if filename:
            p = state_pickler.dump(self.mode, open(filename, "w"))
Esempio n. 2
0
    def onSaveScene(self, event):
        """
		Save a scene to file
		"""
        wc = "3D view scene (*.3xd)|*.3xd"
        filename = None
        dlg = wx.FileDialog(self, \
             "Save 3D view scene as...", \
             defaultFile = "scene.3xd", \
             wildcard = wc, \
             style = wx.SAVE)
        if dlg.ShowModal() == wx.ID_OK:
            filename = dlg.GetPath()
        if filename:
            p = state_pickler.dump(self.mode, open(filename, "w"))
Esempio n. 3
0
	def persist(self, filename):
		"""
		Write the given control object out to the given file
		"""
		state_pickler.dump(self.control, open(filename, "w"))