1

i've been really frustrated with Panda3d so far with the importation of models. Panda3d will only import a model once and will never update ever again (even after changing the name of the .egg file)

I first imported a model (let's call it version 1), into VS2010 panda3d. Then i revised the model in 3dsMax and exported it into egg again (version 2). However, no matter how many times i import, panda3d will stubbornly use version 1. Renaming the .egg doesn't help either. Im suspecting that panda3d caching system is caching my previous model and there's something important linking all the versions together, defaulting the panda3d engine to go back to version 1.

The main question is, how do i solve this problem of panda3d not taking in the latest model? Thank you.

kassarin
  • 27
  • 5

1 Answers1

3

I think you will get answers to your questions about Panda3D more quickly if you ask them over on the Panda3D forums.

But to answer your specific question, Panda does indeed incorporate a model cache, which by default reads a particular filename once (during a session) but does not read the disk again during the same session, even if the file changes (but you can explicitly ask it to read the disk again if you need this). Panda also has a persistent disk cache, which by default caches the loading of a model between sessions as well, though in this case it does always check the timestamp of the file before blindly returning the previous model, and if the file is updated, it will always re-read it and return the new version instead.

In neither case will it return a cached version if you completely rename the file, so something else must be going on in that case.

The precise way you disable caching depends on the particular calls you are using to load the model. You reference VS2010, so I infer that you are writing in C++ (but using VS2010 instead of VS2008 isn't officially supported, so you might have other problems as well unless you have far out of your way to use VS2010 correctly).

To avoid the cache for a particular model, try passing a LoaderOptions object with the LF_no_cache bits set in the flags to ModelPool::load_model() (or whichever interface you are using to load models).

David Rose
  • 31
  • 1
  • Hi there, im using Python on VS2010 for Panda3D. Would you mind retyping that for Python? Thanks a lot! – kassarin Dec 01 '12 at 16:01
  • And thanks a billion for reading my question. I have a practical exam coming on soon and if this happens during the test, im probably screwed. – kassarin Dec 01 '12 at 16:02