egg texture read-mipmaps bug

I have created some hand-made mipmaps for a texture. Loading up the EGG file the first time works just fine and I can see the different mipmap levels, but loading again (where the EGG is being read from BAM cache) results in an error and the texture is not loaded:

:gobj(error): Texture::read() - couldn't read: /c/work/sp1/assets/textures/global_props_mip#.png
:gobj(error): Texture "/c/work/sp1/assets/textures/global_props_mip#.png" cannot be read.

Clearing out Panda’s cache results in the next run working again, but same error in subsequent runs.
Looks like it is actually trying to find a file with the # symbol in it instead of swapping it for the mipmap level?
This is the texture entry in the EGG file for reference:

<Texture> world {
  <Scalar> uv-name { diffuse }
  <Scalar> read-mipmaps { 1 }

I’ve made a patch which fixes this issue.

Would be great if another patch could also be added, it adds a per-camera scale for lodNodes.

I guess the BAM version should also be incremented since the format is changed.

Hmm, I sort of remember fixing this a month or two ago; have you checked to see whether the same bug is present in the buildbot version?


Yes, I am working off of very recent code from the cvs respository.

Is there anything I can do to make these patches more acceptable? Should I put them into Launchpad?

I think submitting patches to Launchpad is probably a good idea; it will do a better job of keeping track of them for us. :slight_smile: