Beispiel #1
0
 def unload(self):
     self.notify.info("unload()")
     if hasattr(self, 'loader'):
         self.loader.exit()
         self.loader.unload()
         del self.loader
     del self.parentFSM
     del self.fsm
     self.dnaStore.reset_nodes()
     self.dnaStore.reset_hood_nodes()
     self.dnaStore.reset_place_nodes()
     self.dnaStore.reset_hood()
     self.dnaStore.reset_fonts()
     self.dnaStore.reset_DNA_vis_groups()
     self.dnaStore.reset_textures()
     self.dnaStore.reset_block_numbers()
     self.dnaStore.reset_block_zones()
     self.dnaStore.reset_suit_points()
     del self.dnaStore
     self.deleteCurrentSky()
     self.stopSuitEffect(0)
     self.ignoreAll()
     ModelPool.garbageCollect()
     TexturePool.garbageCollect()
     StateData.unload(self)
    def removeEverything(self):
        for task in self.taskMgr.getTasks():
            if task.getName() not in ['dataLoop', 'igLoop']:
                task.remove()
        camera.reparentTo(render)
        for tex in render.findAllTextures():
            tex.releaseAll()
        for tex in aspect2d.findAllTextures():
            tex.releaseAll()
        for tex in render2d.findAllTextures():
            tex.releaseAll()
        for tex in hidden.findAllTextures():
            tex.releaseAll()
        for node in render.findAllMatches("**;+s"):
            node.removeNode()
        for node in aspect2d.findAllMatches("**;+s"):
            node.removeNode()
        for node in render2d.findAllMatches("**;+s"):
            node.removeNode()
        for node in hidden.findAllMatches("**;+s"):
            node.removeNode()
        TexturePool.garbageCollect()
        ModelPool.garbageCollect()
        RenderState.garbageCollect()
        RenderState.clearCache()
        RenderState.clearMungerCache()

        self.win.getGsg().getPreparedObjects().releaseAll()
        self.graphicsEngine.renderFrame()
Beispiel #3
0
 def unload(self):
     self.ignoreCollisions()
     self.removeCollisions()
     self.removeObject()
     self.removeNode()
     ModelPool.garbageCollect()
     TexturePool.garbageCollect()
 def enterAvChoose(self, newToonSlot=None):
     ModelPool.garbageCollect()
     TexturePool.garbageCollect()
     self.avChooser.load()
     self.avChooser.enter(newToonSlot)
     if newToonSlot is None:
         self.playTheme()
     self.accept("enterMakeAToon", self.__handleMakeAToonReq)
     self.accept("avChooseDone", self.__handleAvChooseDone)
Beispiel #5
0
 def enterAvChoose(self):
     ModelPool.garbageCollect()
     TexturePool.garbageCollect()
     self.avChooser.load()
     self.avChooser.enter()
     if not self.music:
         self.music = base.loadMusic(CIGlobals.getThemeSong())
         base.playMusic(self.music, volume=0.75, looping=1)
     self.accept('enterMakeAToon', self.__handleMakeAToonReq)
     self.accept('avChooseDone', self.__handleAvChooseDone)
Beispiel #6
0
 def unload(self):
     Place.Place.unload(self)
     self.parentFSM.getStateNamed('cogdoInterior').removeChild(self.fsm)
     del self.parentFSM
     del self.fsm
     self.ignoreAll()
     ModelPool.garbageCollect()
     TexturePool.garbageCollect()
     self.townBattle.unload()
     self.townBattle.cleanup()
     del self.townBattle
     for i in xrange(1, 3):
         Suit.unloadSuits(i)
Beispiel #7
0
 def unload(self):
     Place.Place.unload(self)
     self.parentFSM.getStateNamed('cogdoInterior').removeChild(self.fsm)
     del self.parentFSM
     del self.fsm
     self.ignoreAll()
     ModelPool.garbageCollect()
     TexturePool.garbageCollect()
     self.townBattle.unload()
     self.townBattle.cleanup()
     del self.townBattle
     for i in xrange(1, 3):
         Suit.unloadSuits(i)
Beispiel #8
0
def doSceneCleanup():
    from panda3d.core import ModelPool, TexturePool, RenderState, RenderAttrib, TransformState, GeomCacheManager

    ModelPool.garbageCollect()
    TexturePool.garbageCollect()
    RenderState.clearMungerCache()
    RenderState.clearCache()
    RenderState.garbageCollect()
    RenderAttrib.garbageCollect()
    TransformState.clearCache()
    TransformState.garbageCollect()
    GeomCacheManager.getGlobalPtr().flush()

    base.graphicsEngine.renderFrame()
Beispiel #9
0
 def unload(self):
     StateData.unload(self)
     if self.animatedFish:
         self.animatedFish.cleanup()
         self.animatedFish.removeNode()
         self.animatedFish = None
     self.parentFSMState.removeChild(self.fsm)
     del self.parentFSMState
     del self.animatedFish
     self.geom.removeNode()
     del self.geom
     del self.fsm
     del self.hood
     del self.playground
     del self.music
     del self.interiorMusic
     del self.battleMusic
     del self.bossBattleMusic
     del self.tournamentMusic
     self.ignoreAll()
     ModelPool.garbageCollect()
     TexturePool.garbageCollect()
     return
 def exit(self):
     self.fsm.requestFinalState()
     self.ignoreAll()
     ModelPool.garbageCollect()
     TexturePool.garbageCollect()
     StateData.exit(self)