asset caching?

I have a .py script that I tried loading a model, and realised that I had the texture misplaced.

When I fixed the path for the texture I loaded the .py without changing it, and still ended up with an untextured model.

I renamed the model.egg, and changed the .py to match, and noticed that it took a lot longer to load, but it was textured.

I changed it back to the original name, and it was again untextured.

Any explanation?

argh… /modelcache
I hate it when I answer my own question SECONDS after posting.

The model cache is supposed to auto-detect when the .egg file or any of its referenced texture files are newer than the cache, and reload the original egg file in that case. If this failed, either there is a problem with this code, or there’s something more subtle going on (like your datestamps are wrong, or this file is referencing textures in a funny way, or something).

David

I don’t think its your code, it is probably undetectable really. Basically the egg and the .py didn’t change at all, but the texture that was supposed to be in one subdirectory was in the wrong one. When I moved the texture tot he correct directory, nothing else was changed, so I can see why the cache was used.

My only suggestion would be to not cache a model that failed the textures properly.