Panda3D Auto Reload

Hi. I was wondering if Panda3D has some sort of in-app reloading system of some sort. If not, can someone guide me in the right direction as to how to possibly make one?

The entire reload of the application comes down to clearing the scene from the nodes and building them.

Are you looking to auto-reload assets (e.g., EGG/BAM files) or do you want to reload the whole application (e.g., edit logic while the app is running)? Or, are you just looking to “restart” the application without exiting and re-running?

I’m looking to reload the whole application and have changes appear in-app without restarting.

As far as I know, there is nothing built into Panda to handle this. The best course of action is to minimize the amount of stuff you do in a ShowBase subclass and instead put it into a separate class (e.g., a game state class). Then, you can recreate an instance of that separate class. The class would need to handle startup and cleanup (e.g., removing nodes). One thing that helps here is to have the class create a NodePath that it parents to base.render and parent everything the class uses to the new NodePath instance. This way you can just drop the one NodePath (and it’s children) rather than trying to figure out what children of base.render you need to clean up.