Panda3D Manual: Loading resources from nonstandard sourcesIf you have want to load a resource from a different spot then a hard drive or inside a multifile, say for instance database or network packet you can using a StringStream. Here is an example that reads and image into data and then uses StringStream to feed that data into the image. data = open('my-image-file.png').read() But, you can go one step further. Instead of just loading textures, models, sounds or other data one at a time this way, you can load an entire multifile, which as we learned in the previous section can contain any number of models, textures, sounds and other data. data = open('my-multifile.mf').read() © Carnegie Mellon University 2010 |