How to export a complete scene into a binary file?

I think that it might be better not to store the value of storeTexture at all, you can just put the image in if its true, or null if its false.

I found the problem. It seems that the write method in the binary output capsule does not write the value if its the default value. That only works if the default value is static, which is not the case here since the user can easily change Texture.DEFAULT_STORE_TEXTURE. An easy way to fix the problem is to just do what I said in my post above.

Noted…  So I plan to remove the write and in read change it to:


        image = (Image) capsule.readSavable("image", null);
        if (image == null) {
            key = (TextureKey) capsule.readSavable("textureKey", null);
            if (key != null && key.getLocation() != null) {
                TextureManager.loadTexture(this, key);
            }
        }


im kind lost what im supposed to do to fix this… :expressionless:

That was more a sanity check then a suggestion for a patch.

renanse said:

That was more a sanity check then a suggestion for a patch.


which means i still cant store my scene and images into one file..... :cry:

ill be waiting.

btw, i just checked ur blog, all the jme2.0 stuff looks very very very exciting~ when do u guys plan on releasing it? :D
neakor said:

ill be waiting.


Wait no more, it's in CVS.

neakor said:

btw, i just checked ur blog, all the jme2.0 stuff looks very very very exciting~ when do u guys plan on releasing it? :D


Not quite sure yet.  Hopefully soon!
renanse said:

neakor said:

ill be waiting.


Wait no more, it's in CVS.

neakor said:

btw, i just checked ur blog, all the jme2.0 stuff looks very very very exciting~ when do u guys plan on releasing it? :D


Not quite sure yet.  Hopefully soon!


awesome!

and yes indeed, hopefully very very very soon~ :D