I'll try to describe this quirk as briefly as possible -- it's kicking my ass at the moment.
I have a 'maps' directory in my current project that contains level maps in .b3d format along with their textures. What I 'm finding is that, when I Molebox the project, the geometry will load fine but the textures won't UNLESS I store the maps and textures in the main directory instead (which is obviously a bit impractical).
I have narrowed things down a little in that, when employing a 'maps' directory, sticking the original (unpacked) directory in with the packed exe means the textures load again. So even though LoadAnimB3D is getting the geometry from the packed file it is deciding to search outside of the pack for the textures. What's really odd is that using Readdir() on the packaged 'maps' directory reveals that Max can find everything that should be there - not just the .b3d but the textures too!
I've been tracing back through the MiniB3D source and trying to work out why Readdir() can find things that LoadAnimB3D can't and I've got as far as FileFind and its by-reference arguments, which are new to me, so while I go and read up on that and try to work out what it's doing I thought I'd post. Any suggestions welcome* -- I'm fairly perplexed.
*I should point out that I've stripped out the hard-coded texture paths that Maplet puts in .b3d exports, so that's not the problem (in the unpackaged project the textures really do get loaded from whichever sub-directory the .b3d files are located in).
I have a 'maps' directory in my current project that contains level maps in .b3d format along with their textures. What I 'm finding is that, when I Molebox the project, the geometry will load fine but the textures won't UNLESS I store the maps and textures in the main directory instead (which is obviously a bit impractical).
I have narrowed things down a little in that, when employing a 'maps' directory, sticking the original (unpacked) directory in with the packed exe means the textures load again. So even though LoadAnimB3D is getting the geometry from the packed file it is deciding to search outside of the pack for the textures. What's really odd is that using Readdir() on the packaged 'maps' directory reveals that Max can find everything that should be there - not just the .b3d but the textures too!
I've been tracing back through the MiniB3D source and trying to work out why Readdir() can find things that LoadAnimB3D can't and I've got as far as FileFind and its by-reference arguments, which are new to me, so while I go and read up on that and try to work out what it's doing I thought I'd post. Any suggestions welcome* -- I'm fairly perplexed.
*I should point out that I've stripped out the hard-coded texture paths that Maplet puts in .b3d exports, so that's not the problem (in the unpackaged project the textures really do get loaded from whichever sub-directory the .b3d files are located in).