def loadMultifilePrcFiles(self, mf, root): """ Loads any prc files in the root of the indicated Multifile, which is presumed to have been mounted already under root. """ # We have to load these prc files explicitly, since the # ConfigPageManager can't directly look inside the vfs. Use # the Multifile interface to find the prc files, rather than # vfs.scanDirectory(), so we only pick up the files in this # particular multifile. cpMgr = ConfigPageManager.getGlobalPtr() for f in mf.getSubfileNames(): fn = Filename(f) if fn.getDirname() == '' and fn.getExtension() == 'prc': pathname = '%s/%s' % (root, f) alreadyLoaded = False for cpi in range(cpMgr.getNumImplicitPages()): if cpMgr.getImplicitPage(cpi).getName() == pathname: # No need to load this file twice. alreadyLoaded = True break if not alreadyLoaded: data = file.open(Filename(pathname), 'r').read() cp = loadPrcFileData(pathname, data) # Set it to sort value 20, behind the implicit pages. cp.setSort(20)
def __init__(self): if DEBUG: from pandac.PandaModules import ConfigPageManager print ConfigPageManager.getGlobalPtr() #Set application properties wp = WindowProperties.getDefault() wp.setTitle(APPNAME) wp.setSize(APPX, APPY) WindowProperties.setDefault(wp) ShowBase.__init__(self) self.initScene() #InitialSettings #~ self.scene.simul_time = datetime(2024,12,31, 8, 44)#sun rise #~ self.scene.simul_time = datetime(9999,12,31, 8, 44) self.Camera.hm.look(self.sun) self.Camera.hm.follow(self.home)