I need your help:
self.render.write_bam_file("...")
When writing this, you save the self.render Node, aswell everything parented to it as .bam file. But when loading it in again, you have 2 render-Nodes (The one of the current Panda3D Instance and the one saved inside the .bam file).
In my case, the nodes parented to the render node, aren’t visible. I think that 2 render Nodes can’t work, even when one is parented to the other.
My target is, to create a level Editor, that can export a scene as .bam file, and also load it in again
Here you can see the self.render.ls() function:
Works (Cube visible):
PandaNode render S:(CullFaceAttrib RescaleNormalAttrib)
ModelRoot cube.egg
GeomNode Cube (1 geoms: S:(MaterialAttrib))
Doesn’t work (Cube invisible):
PandaNode render S:(CullFaceAttrib RescaleNormalAttrib)
PandaNode render S:(CullFaceAttrib RescaleNormalAttrib)
ModelRoot cube.egg
GeomNode Cube (1 geoms: S:(MaterialAttrib))
My question:
To avoid this, I need to save only the children of the render node, but not the render node itself.
Also I tried to create a empty Node called “ROOT” and parent everything to it, and then save it from there:
self.root.write_bam_file(...)
But that also doesn’t work, and the other nodes (models & actors) aren’t visible, when loaded in.
So I just want to export the children of the render node, but not the render node itself…
Does someone know how to do this, or has a better solution?
Ps: Somehow the Cube appears in Pview