There is a serialization system built into panda — in fact, BAM files are serialized scene graph trees. But the serialization system is for more than just storing nodes - you’re also supposed to be able to send them back and forth via socket and the like.
I haven’t studied the serialization APIs much, but you’ll find that almost every panda object contains these methods:
I believe that these are all related to the serialization (and unserialization) process. Also, the classes “BamReader,” “BamWriter,” and “BamFile” are all potentially useful.
If i Bamify an object with Panda 1.0 and something change in bam in Panda 1.5.
can i Bam=>Egg in panda 1.0 then egg=>Bam in panda 1.5 to be able to reuse my objects (here a scenegraph)?
ie is there backward compatibility for egg file? for bam file?
Very good question indeed! Though I guess it’s difficult to forsee what v1.5 will bring - that’s approx. 16 months off, after all!
Also interesting to note that there’s also bam2egg, for no particular reason I always imagined BAM to be a dead end - maybe I just mixed it up with “BAM, you’re dead!”
Ok so i’ve tried Bam to save my scenegraph via this function:
render.writeBamFile(‘robots1.bam’)
I manage to save and view in pview scenegraph with Models & Actors.
However i still no manage to save scenegraph with lights in.
I got a deprecated LigthAttrib warnings at saving time
and Pview does some memory read errors before crashing at loading time.
So i will still work to fix the SceneEditor. … Very Usefull but you need a relaxin pill when you use because of the so many cases where a click oout of the focused windows simply crash the Editor!!!