diff --git a/direct/src/showbase/PythonUtil.py b/direct/src/showbase/PythonUtil.py index b7edd5004e..acfcc992f8 100644 --- a/direct/src/showbase/PythonUtil.py +++ b/direct/src/showbase/PythonUtil.py @@ -3834,7 +3834,7 @@ class Default: pass superLogFile = None -def startSuperLog(): +def startSuperLog(customFunction = None): global superLogFile if(not superLogFile): @@ -3848,8 +3848,11 @@ def startSuperLog(): del vars['__builtins__'] for i in vars: vars[i] = safeReprTypeOnFail(vars[i]) + if(customFunction): + superLogFile.write( "before = %s"%customFunction()) superLogFile.write( "%s(%s):%s:%s\n"%(a.f_code.co_filename.split("\\")[-1],a.f_code.co_firstlineno, a.f_code.co_name, vars)) - + if(customFunction): + superLogFile.write( "after = %s"%customFunction()) return trace_dispatch sys.settrace(trace_dispatch) diff --git a/direct/src/showbase/ShowBase.py b/direct/src/showbase/ShowBase.py index d01714da6a..e628a62bcc 100644 --- a/direct/src/showbase/ShowBase.py +++ b/direct/src/showbase/ShowBase.py @@ -1540,6 +1540,9 @@ class ShowBase(DirectObject.DirectObject): self.cTrav.traverse(self.render) if self.appTrav: self.appTrav.traverse(self.render) + if self.shadowTrav: + self.shadowTrav.traverse(self.render) + messenger.send("collisionLoopFinished") return Task.cont def __audioLoop(self, state): @@ -1603,11 +1606,7 @@ class ShowBase(DirectObject.DirectObject): # but leave enough room for the app to insert tasks # between collisionLoop and igLoop self.taskMgr.add(self.__collisionLoop, 'collisionLoop', priority = 30) - # do the shadowCollisionLoop after the collisionLoop and - # before the igLoop and camera updates (this moves the avatar vertically, - # to his final position for the frame): - self.taskMgr.add( - self.__shadowCollisionLoop, 'shadowCollisionLoop', priority = 44) + # give the igLoop task a reasonably "late" priority, # so that it will get run after most tasks self.taskMgr.add(self.__igLoop, 'igLoop', priority = 50)