From: <Ap...@us...> - 2007-09-20 08:15:44
|
Revision: 181 http://roreditor.svn.sourceforge.net/roreditor/?rev=181&view=rev Author: Aperion Date: 2007-09-20 01:15:43 -0700 (Thu, 20 Sep 2007) Log Message: ----------- Added todo notes to remove platform dependence. These are denoted in comments as #TODO Modified Paths: -------------- trunk/doc/createdoc.py trunk/lib_common/ror/starter.py trunk/lib_common/roreditor/MainFrame_Tools.py trunk/lib_common/roreditor/RoRObjectPreviewOgreWindow.py trunk/lib_common/roreditor/RoROdefEditorOgreWindow.py trunk/lib_common/roreditor/RoRTerrainOgreWindow.py trunk/lib_common/roreditor/RoRTruckOgreWindow.py trunk/lib_common/roreditor/RoRTruckUVOgreWindow.py trunk/lib_common/wxogre/OgreManager.py Property Changed: ---------------- trunk/ Property changes on: trunk ___________________________________________________________________ Name: svn:ignore + editor.ini Modified: trunk/doc/createdoc.py =================================================================== --- trunk/doc/createdoc.py 2007-09-20 06:51:33 UTC (rev 180) +++ trunk/doc/createdoc.py 2007-09-20 08:15:43 UTC (rev 181) @@ -6,7 +6,7 @@ main method """ - sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..\lib")) + sys.path.append(os.path.join(os.path.dirname(os.path.abspath(__file__)), "..","lib")) # Import Psyco if available try: Modified: trunk/lib_common/ror/starter.py =================================================================== --- trunk/lib_common/ror/starter.py 2007-09-20 06:51:33 UTC (rev 180) +++ trunk/lib_common/ror/starter.py 2007-09-20 08:15:43 UTC (rev 181) @@ -220,6 +220,7 @@ # dlg.Destroy() # return False + #TODO check for actual binary name since RoR.exe is windows only if not checkRoRDirectory(): dlg = wx.MessageDialog(self, "RoR.exe not found in the selected directory!\nPlease select a new directory!", "Error", wx.OK | wx.ICON_INFORMATION) dlg.ShowModal() Modified: trunk/lib_common/roreditor/MainFrame_Tools.py =================================================================== --- trunk/lib_common/roreditor/MainFrame_Tools.py 2007-09-20 06:51:33 UTC (rev 180) +++ trunk/lib_common/roreditor/MainFrame_Tools.py 2007-09-20 08:15:43 UTC (rev 181) @@ -23,7 +23,7 @@ vert = wx.BoxSizer(wx.VERTICAL) self.htmlctrl = wx.html.HtmlWindow(self, wx.ID_ANY, wx.DefaultPosition, wx.Size(800, 600)) if "gtk2" in wx.PlatformInfo: - ctrl.SetStandardFonts() + self.htmlctrl.SetStandardFonts() readme = self.loadReadme() if readme is None: self.Hide() Modified: trunk/lib_common/roreditor/RoRObjectPreviewOgreWindow.py =================================================================== --- trunk/lib_common/roreditor/RoRObjectPreviewOgreWindow.py 2007-09-20 06:51:33 UTC (rev 180) +++ trunk/lib_common/roreditor/RoRObjectPreviewOgreWindow.py 2007-09-20 08:15:43 UTC (rev 181) @@ -52,6 +52,7 @@ def SceneInitialisation(self): + #TODO This section is not platform independent, needs to be fixed. addresources = [self.rordir+"\\data\\terrains",self.rordir+"\\data\\trucks",self.rordir+"\\data\\objects"] # only init things in the main window, not in shared ones! # setup resources @@ -142,8 +143,8 @@ def free(self): try: self.sceneManager.destroyAllManualObjects() - except: - pass + except Exception, e: + log().exception(str(e)) try: self.logotextnode.detachAllObjects() @@ -152,17 +153,21 @@ self.sceneManager.destroySceneNode(self.logowheelnode.getName()) self.sceneManager.destroyEntity(self.logotextentity) self.sceneManager.destroyEntity(self.logowheelentity) - except: - pass + except Exception, e: + log().exception(str(e)) try: + #BUG: next line fails and goes to except self.objnode.detachAllObjects() self.sceneManager.destroySceneNode(self.objnode.getName()) - except: - pass - try: - self.sceneManager.destroyEntity(self.objentity) - except: - pass + except Exception, e: + log().exception(str(e)) + + #try: + #BUG Entering this function alone seams to kill the application. + #self.sceneManager.destroyEntity(self.objentity) + #except Exception, e: + #log().exception(str(e)) + self.renderWindow.removeAllViewports() getOgreManager().destroySceneManager(self.sceneManager) Modified: trunk/lib_common/roreditor/RoROdefEditorOgreWindow.py =================================================================== --- trunk/lib_common/roreditor/RoROdefEditorOgreWindow.py 2007-09-20 06:51:33 UTC (rev 180) +++ trunk/lib_common/roreditor/RoROdefEditorOgreWindow.py 2007-09-20 08:15:43 UTC (rev 181) @@ -56,6 +56,7 @@ def SceneInitialisation(self): + #TODO This section is not platform independent, needs to be fixed. addresources = [self.rordir+"\\data\\terrains",self.rordir+"\\data\\trucks",self.rordir+"\\data\\objects"] # only init things in the main window, not in shared ones! # setup resources Modified: trunk/lib_common/roreditor/RoRTerrainOgreWindow.py =================================================================== --- trunk/lib_common/roreditor/RoRTerrainOgreWindow.py 2007-09-20 06:51:33 UTC (rev 180) +++ trunk/lib_common/roreditor/RoRTerrainOgreWindow.py 2007-09-20 08:15:43 UTC (rev 181) @@ -176,6 +176,7 @@ def SceneInitialisation(self): hasparent = (not self.sceneManager is None) if not hasparent: + #TODO This section is not platform independent, needs to be fixed. addresources = [self.rordir+"\\data\\terrains",self.rordir+"\\data\\trucks",self.rordir+"\\data\\objects"] # only init things in the main window, not in shared ones! # setup resources Modified: trunk/lib_common/roreditor/RoRTruckOgreWindow.py =================================================================== --- trunk/lib_common/roreditor/RoRTruckOgreWindow.py 2007-09-20 06:51:33 UTC (rev 180) +++ trunk/lib_common/roreditor/RoRTruckOgreWindow.py 2007-09-20 08:15:43 UTC (rev 181) @@ -84,6 +84,8 @@ pass def SceneInitialisation(self): + + #TODO This section is not platform independent, needs to be fixed. addresources = [self.rordir+"\\data\\trucks",self.rordir+"\\data\\objects"] # only init things in the main window, not in shared ones! # setup resources Modified: trunk/lib_common/roreditor/RoRTruckUVOgreWindow.py =================================================================== --- trunk/lib_common/roreditor/RoRTruckUVOgreWindow.py 2007-09-20 06:51:33 UTC (rev 180) +++ trunk/lib_common/roreditor/RoRTruckUVOgreWindow.py 2007-09-20 08:15:43 UTC (rev 181) @@ -70,6 +70,8 @@ pass def SceneInitialisation(self): + + #TODO This section is not platform independent, needs to be fixed. addresources = [self.rordir+"\\data\\trucks",self.rordir+"\\data\\objects"] # only init things in the main window, not in shared ones! # setup resources Modified: trunk/lib_common/wxogre/OgreManager.py =================================================================== --- trunk/lib_common/wxogre/OgreManager.py 2007-09-20 06:51:33 UTC (rev 180) +++ trunk/lib_common/wxogre/OgreManager.py 2007-09-20 08:15:43 UTC (rev 181) @@ -93,8 +93,11 @@ def createRenderWindow(self, wxOgrewin, name, width, height, fullscreen, handle): renderParameters = ogre.NameValuePairList() renderParameters['externalWindowHandle'] = str(handle) + #TODO: For some reason passing renderParameters causes the renderer not to start, passing Null is a work around + # use len to make the names unique! - renderWindow = self.ogreRoot.createRenderWindow(name + str(len(self.renderWindows)), width, height, fullscreen, renderParameters) + renderWindow = self.ogreRoot.createRenderWindow(name + str(len(self.renderWindows)), width, height, fullscreen, None) + #renderWindow = self.ogreRoot.createRenderWindow(name + str(len(self.renderWindows)), width, height, fullscreen, renderParameters) #renderWindow.active = True self.renderWindows[wxOgrewin] = renderWindow return renderWindow This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |