mirror of
https://github.com/panda3d/panda3d.git
synced 2025-09-28 15:53:55 -04:00
wxwidgets: don't create ShowBase instance upon importing WxPandaShell
This commit is contained in:
parent
46b29a136e
commit
98c82ddb9c
@ -3,13 +3,9 @@ from wx.lib.agw import fourwaysplitter as FWS
|
||||
|
||||
from panda3d.core import *
|
||||
from direct.showbase.ShowBase import *
|
||||
from direct.showbase import ShowBaseGlobal
|
||||
from direct.directtools.DirectGlobals import *
|
||||
|
||||
try:
|
||||
base
|
||||
except NameError:
|
||||
base = ShowBase(False, windowType = 'none')
|
||||
|
||||
from .WxAppShell import *
|
||||
from .ViewPort import *
|
||||
|
||||
@ -19,6 +15,7 @@ ID_FRONT_VIEW = 403
|
||||
ID_LEFT_VIEW = 404
|
||||
ID_PERSP_VIEW = 405
|
||||
|
||||
|
||||
class WxPandaShell(WxAppShell):
|
||||
""" Class for Panda3D LevelEditor """
|
||||
frameWidth = 800
|
||||
@ -37,6 +34,10 @@ class WxPandaShell(WxAppShell):
|
||||
}
|
||||
|
||||
def __init__(self, fStartDirect = False):
|
||||
base = getattr(ShowBaseGlobal, 'base', None)
|
||||
if not base:
|
||||
base = ShowBase(False, windowType='none')
|
||||
|
||||
fDirect = (base.config.GetBool('want-directtools', 0) or
|
||||
(base.config.GetString("cluster-mode", '') != ''))
|
||||
|
||||
@ -237,5 +238,3 @@ class WxPandaShell(WxAppShell):
|
||||
self.currentView = self.perspView
|
||||
|
||||
return self.currentView
|
||||
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user