mirror of
https://github.com/panda3d/panda3d.git
synced 2025-10-03 10:22:45 -04:00
filter out run() in p3d file
This commit is contained in:
parent
197a3bb210
commit
e7a5487ea1
@ -2477,7 +2477,14 @@ class ShowBase(DirectObject.DirectObject):
|
||||
self.startDirect(fWantDirect = fDirect, fWantTk = fTk, fWantWx = fWx)
|
||||
|
||||
def run(self):
|
||||
self.taskMgr.run()
|
||||
# This method only does anything when self.appRunner is None,
|
||||
# which is to say, when we are not running from within a p3d
|
||||
# file. When we *are* within a p3d file, the Panda runtime
|
||||
# has to be responsible for running the main loop, so we can't
|
||||
# allow the application to do it. This is a minor hack, but
|
||||
# should work for 99% of the cases.
|
||||
if self.appRunner is None:
|
||||
self.taskMgr.run()
|
||||
|
||||
|
||||
# A class to encapsulate information necessary for multiwindow support.
|
||||
|
@ -29,10 +29,6 @@ Options:
|
||||
(this is preferable to having the module start itself immediately
|
||||
upon importing).
|
||||
|
||||
Note that your main.py must *not* call run(). This call should
|
||||
not be part of the p3d file--the Panda3D runtime must be free to
|
||||
call it, not your code!
|
||||
|
||||
-c [py,pyc,pyo]
|
||||
|
||||
Specifies the compilation mode of python files. 'py' means to
|
||||
|
Loading…
x
Reference in New Issue
Block a user