I’m back with new VirtualFileSystem issue. I’ve upgraded to panda1.8 and a new problem appear with http and vfs.
Http can be mounted with a vfs as well and vfs.exists(“path/to/file”) return True but Filename() and Texture() doesn’t seems to locate files properly…
What have been the changes between 1.7.2 and 1.8 version of panda3d on http/vfs ?
Can you give a simple example of a program that worked in 1.7.2 but doesn’t work in 1.8.0?
Mmm ok I think, I understand a little bit more what’s going on.
It sounds like my previous issue mentionned in this post
panda3d.org/forums/viewtopic … 3270#83270
It’s about PNMImage… again. So Texture and egg works well, but for PNMImage files can’t be found into a vfs without passing the exact path to the package. But in 1.7.2 it works for http mounted vfs… data are mounted into the start/ forlder (the actual root when panda3d is launched from the browser). So normally path should be good… but not in 1.8.0 for some reason ?!
Ok, it seems it’s not linked to that actually…
Here is a piece of code that worked before and doesn’t now :
from panda3d.core import Filename, VirtualFileSystem
from panda3d.core import PNMImage
vfs = VirtualFileSystem.getGlobalPtr()
vfs.mount(VirtualFileMountHTTP(myWebAdress), '/tmp', 0)
print "testing /tmp/world.png: " + str(vfs.exists("/tmp/world.png"))
print "testing /tmp/*/world.png: " + str(vfs.resolveFilename("world.png", "/tmp/"))
print "finding /tmp/*/world.png: " + str(vfs.findFile("world.png", "/tmp/"))
img = PNMImage()
and the output is :
testing /tmp/world.png: True
testing /tmp/ /world.png: True/world.png: /tmp/world.png
(image: 0 by 0 pixels, 0 channels, 255 maxval., )
Ok I’m back with new tests :
So on http mounted files I’ve got :
print _vfs.getMounts() # -> [/, http://mydomain.com/tmp/], OK
print _vfs->getFile(filename) # -> /path/to/the/file.txt, OK
print _vfs->getFile(filename).openReadFile(autoUnwrap) # -> None
print _vfs->getFile(filename).getMount() # doesn't print anything !
I’ve looked at the source code of panda without finding nothing that should failed…