diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index cf6273e25b..70f2451a65 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -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. diff --git a/direct/src/showutil/packp3d.py b/direct/src/showutil/packp3d.py index aec2c764d9..b7ff3c67a6 100755 --- a/direct/src/showutil/packp3d.py +++ b/direct/src/showutil/packp3d.py @@ -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