ConfigPageManager
from panda3d.core import ConfigPageManager
- class ConfigPageManager
Bases:
Bases:
ConfigFlags
A global object that maintains the set of
ConfigPages
everywhere in the world, and keeps them in sorted order.Inheritance diagram
- deleteExplicitPage(page: ConfigPage) bool
Removes a previously-constructed
ConfigPage
from the set of active pages, and deletes it. TheConfigPage
object is no longer valid after this call. Returns true if the page is successfully deleted, or false if it was unknown (which should never happen if the page was legitimately constructed).
- property explicit_pages Sequence[ConfigPage]
Returns the nth explicit
ConfigPage
in the world. SeegetNumExplicitPages()
.
- getExplicitPage(n: int) ConfigPage
Returns the nth explicit
ConfigPage
in the world. SeegetNumExplicitPages()
.
- static getGlobalPtr() ConfigPageManager
- getImplicitPage(n: int) ConfigPage
Returns the nth implicit
ConfigPage
in the world. SeegetNumImplicitPages()
.
- getNumExplicitPages() int
Returns the current number of explicitly-loaded
ConfigPages
in the world. These represent pages that were loaded dynamically at runtime by explicit calls toConfigPageManager.makeExplicitPage()
.
- getNumImplicitPages() int
Returns the current number of implicitly-loaded
ConfigPages
in the world. These represent files that were automatically discovered on the disk as .prc files.
- getNumPrcEncryptedPatterns() int
Returns the number of patterns, like
*.pre
, that are compiled in that will be searched for as special config files that are understood to be encrypted.
- getNumPrcExecutablePatterns() int
Returns the number of patterns, like
*.exe
, that are compiled in that will be searched for as special config files that are to be executed as a program, and their output taken to be input. This is normally empty.
- getNumPrcPatterns() int
Returns the number of patterns, like
*.prc
, that are compiled in that will be searched for as default config filenames. Normally there is only one pattern, and it is*.prc
, but others may be specified with the PRC_FILENAME variable in Config.pp.
- getPrcEncryptedPattern(n: int) str
Returns the nth filename pattern that will be considered a match as a valid encrypted config file. See
getNumPrcEncryptedPatterns()
.
- getPrcExecutablePattern(n: int) str
Returns the nth filename pattern that will be considered a match as a valid executable-style config file. See
getNumPrcExecutablePatterns()
.
- getPrcPattern(n: int) str
Returns the nth filename pattern that will be considered a match as a valid config file. See
getNumPrcPatterns()
.
- getSearchPath() DSearchPath
Returns the search path used to locate implicit .prc files. This is determined by the PRC_DIR and PRC_PATH environment variables. The object returned by this method may be modified to change the path at runtime, and then
reloadImplicitPages()
called.
- property implicit_pages Sequence[ConfigPage]
Returns the nth implicit
ConfigPage
in the world. SeegetNumImplicitPages()
.
- loadImplicitPages()
Searches the PRC_DIR and/or PRC_PATH directories for
*.prc
files and loads them in as pages. This is normally called automatically at startup time, when the first variable’s value is referenced. See alsoreloadImplicitPages()
.
- loadedImplicitPages() bool
Returns true if the implicit
*.prc
files have already been loaded, false otherwise. Normally this will only be false briefly before startup.
- makeExplicitPage(name: str) ConfigPage
Creates and returns a new, empty
ConfigPage
. This page will be stacked on top of any pages that were created before; it may shadow variable declarations that are defined in previous pages.
- property prc_encrypted_patterns Sequence[string]
Returns the nth filename pattern that will be considered a match as a valid encrypted config file. See
getNumPrcEncryptedPatterns()
.
- property prc_executable_patterns Sequence[string]
Returns the nth filename pattern that will be considered a match as a valid executable-style config file. See
getNumPrcExecutablePatterns()
.
- property prc_patterns Sequence[string]
Returns the nth filename pattern that will be considered a match as a valid config file. See
getNumPrcPatterns()
.
- reloadImplicitPages()
Searches the PRC_DIR and/or PRC_PATH directories for *.prc files and loads them in as pages.
This may be called after startup, to force the system to re-read all of the implicit prc files.
- property search_path DSearchPath
Returns the search path used to locate implicit .prc files. This is determined by the PRC_DIR and PRC_PATH environment variables. The object returned by this method may be modified to change the path at runtime, and then
reloadImplicitPages()
called.