mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 15:53:55 -04:00
wxwidgets: Fix errors running Panda shell
This commit is contained in:
parent
37b5c9ad9e
commit
4f9092d568
@ -41,7 +41,7 @@ class LevelEditorBase(DirectObject):
|
||||
|
||||
self.fMoveCamera = False
|
||||
|
||||
self.NPParent = render
|
||||
self.NPParent = base.render
|
||||
|
||||
# define your own config file in inherited class
|
||||
self.settingsFile = None
|
||||
|
@ -1,6 +1,9 @@
|
||||
from direct.leveleditor import LevelEditor
|
||||
|
||||
if __name__ == '__main__':
|
||||
from direct.showbase.ShowBase import ShowBase
|
||||
base = ShowBase()
|
||||
|
||||
base.le = LevelEditor.LevelEditor()
|
||||
# You should define LevelEditor instance as
|
||||
# base.le so it can be reached in global scope
|
||||
|
@ -3237,7 +3237,7 @@ class ShowBase(DirectObject.DirectObject):
|
||||
# Set a timer to run the Panda frame 60 times per second.
|
||||
wxFrameRate = ConfigVariableDouble('wx-frame-rate', 60.0)
|
||||
self.wxTimer = wx.Timer(self.wxApp)
|
||||
self.wxTimer.Start(1000.0 / wxFrameRate.value)
|
||||
self.wxTimer.Start(int(round(1000.0 / wxFrameRate.value)))
|
||||
self.wxApp.Bind(wx.EVT_TIMER, self.__wxTimerCallback)
|
||||
|
||||
# wx is now the main loop, not us any more.
|
||||
|
@ -119,7 +119,7 @@ class WxPandaShell(WxAppShell):
|
||||
base.trackball.node().setHpr(0, 15, 0)
|
||||
|
||||
# to make persp view as default
|
||||
self.perspViewMenuItem.Toggle()
|
||||
self.perspViewMenuItem.Check()
|
||||
self.onViewChange(None, 3)
|
||||
|
||||
# initializing direct
|
||||
|
Loading…
x
Reference in New Issue
Block a user