Virtual File for ZIP archives

Is there any way to use Panda’s VirtualFileSystem / MultiFile architecture to load textures directly out of a .ZIP archive? This is from C++.

It seems like we could write a class derived from VirtualFile to support this, but this must already exists???

-Sam

I’m not sure about that, but it’s possible to load a texture from a zip with Python’s zipfile without storing it on disk. Would that work for you?

In order to do this, you would need to create a class that inherits from VirtualFileMount. Take a look at the files in panda/src/express/virtualFileMountMultifile.* to see how it is done for .mf files.

This sure sounds like a great addition to Panda3D, though, so if you’re willing to write it (assuming it doesn’t pull in a heavy or non-permissively licensed library), it would be very welcome in the Panda3D source code repository. :slight_smile: