The way I am organizing my current setup, I would like the ability to call a function in panda that does everything that would normally happen during run(). Basically I want my own framework in which I can call panda to update itself. If the only way is to write my own update function, what things does panda call every frame?
If you look in panda3d/direct/src/showbase/ShowBase.py, you will notice the following function:
def restart(self):
self.shutdown()
# __resetPrevTransform goes at the very beginning of the frame.
self.taskMgr.add(
self.__resetPrevTransform, 'resetPrevTransform', priority = -51)
# give the dataLoop task a reasonably "early" priority,
# so that it will get run before most tasks
self.taskMgr.add(self.__dataLoop, 'dataLoop', priority = -50)
# spawn the ivalLoop with a later priority, so that it will
# run after most tasks, but before igLoop.
self.taskMgr.add(self.__ivalLoop, 'ivalLoop', priority = 20)
# make the collisionLoop task run before igLoop,
# 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
# befor the igLoop:
self.taskMgr.add(
self.__shadowCollisionLoop, 'shadowCollisionLoop', priority = 45)
# 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)
# the audioLoop updates the positions of 3D sounds.
# as such, it needs to run after the cull traversal in the igLoop.
self.taskMgr.add(self.__audioLoop, 'audioLoop', priority = 60)
self.eventMgr.restart()
Look further in ShowBase.py for the actual __xxLoop functions.
The manual describes the main tasks as following:
I think the function you’re looking for is taskMgr.step()
Thanks, Josh and pro-soft.