Clearing Cached Models

Hey everyone, so I just had a quick question on how I can manually clear my cache. I am having the exact same issue as this fellow Panda3D user here:

He says he simply says “To correct this, I have to manually clear the model-cache.” However, unless I am mistaken, he never elaborates what this entails. Could someone please inform me? Thank you!

1 Like

On Linux, the model-cache is stored in ~/.cache/panda3d. On Windows, it is in C:\Users\You\AppData\Local\Panda3D-1.10\cache, I believe. You can simply delete the files in these folders.

You can also put model-cache-dir (without arguments) on a line on its own in your Config.prc file to disable the model-cache altogether.

1 Like

Perfect, I did this and it worked! My model is back to normal now. Thank you!

P.S. If anyone is reading this, since I am using osx, my path was

/Users/User/library/caches/Panda3D-1.10

If for some reason it is different for whoever may need this, your path can always be found in the Config.prc at the bottom on the line detailed “model-cache-dir”

2 Likes

What location would this be for Panda3D installed as a PyPip package on a Linux system?
Could not find the panda3d directory under ~/.cache/ with Panda installed via pip.

It should be ~/.cache/panda3d still even when installed via PyPI, or whichever other directory is specified as the model-cache-dir in your Config.prc file.

1 Like


hm, this is pretty weird. I don’t have an existing directory at ~/.cache/panda3d with latest Panda3D installed via pip.

I have also tried clearing the cache via the config.prc loaded in my panda program, but it didn’t work, might also not be the fix to my issue since its probably working.

Maybe you simply don’t have models in the cache? Try typing pview panda to force a model to be loaded in there.

You could also try this in the Python shell to find out the exact directory:

from panda3d.core import BamCache
print(BamCache.getGlobalPtr().getRoot())