Multiple Scene Graphs [SOLVED]


I was wondering if there was a way to create multiple scenes, as treeform mentioned in his post in this thread [url]Very large variety of scale]

Thanks for any help regarding this.


So i figured out what he was referring to. If you want to have multiple scenes, you can add a node to render, and then attach everything that you want to be in that scene to that node, this creates a make-shift scene.

You can then create a script class attached to the scene that can handle calls, such as hiding the scene objects, clearing the scene, blah blah blah.

class sceneObj(object):

     def __init__(self, node):

         self.node = node
     def hide(self):

         for i in range(self.node.getNumChildren()):
     def remove(self):
         for i in range(self.node.getNumChildren()):

scene0 = NodePath("scene0")
scene1 = NodePath("scene1")
scene0.setPythonTag('class', sceneObj(scene0))
scene1.setPythonTag('class', sceneObj(scene1))