Hi,
I am trying to write an Object3D to a file to be loaded later by another program. The serializing of the Object3D to a file works fine, but when I try to read the file and cast it into an Object3D it gives me this error
C:\ObjectEditor>java Viewer h
Exception in thread "main" java.io.WriteAbortedException: writing aborted; java.
io.NotSerializableException: com.threed.jpct.PolygonManager
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1333)
at java.io.ObjectInputStream.defaultReadFields(ObjectInputStream.java:19
45)
at java.io.ObjectInputStream.readSerialData(ObjectInputStream.java:1869)
at java.io.ObjectInputStream.readOrdinaryObject(ObjectInputStream.java:1
753)
at java.io.ObjectInputStream.readObject0(ObjectInputStream.java:1329)
at java.io.ObjectInputStream.readObject(ObjectInputStream.java:351)
at Viewer.main(Viewer.java:21)
There is more to the error output, but what it is saying is that the PolygonManger is not serializable. I know this, but how do you serialize an Object3D without its PolygonManger? The object that I am trying to serialize has gotten getPolygonManger() called on it. When the Object has not had getPolygonManager() called on it, the Object3D serializes fine.
I tried out creating another Object3D and setting this object's mesh to the object that am I trying to serialize. Then I serialize the new object3d, and it obviously works fine, but all my textures naturally disappear. I don't want that. So, how do I serialize an object to a file with all its texture information?
thanks
jman