ConfigVariableManager
from panda3d.core import ConfigVariableManager
- class ConfigVariableManager
Bases:
DTOOL_SUPER_BASE
A global object that maintains the set of ConfigVariables (actually, ConfigVariableCores) everywhere in the world, and keeps them in sorted order.
Inheritance diagram
- __init__(*args, **kwargs)
- getNumVariables()
C++ Interface: get_num_variables(ConfigVariableManager self)
- /**
Returns the current number of active ConfigVariableCores in the world.
*/
- getVariable()
C++ Interface: get_variable(ConfigVariableManager self, int n)
- /**
Returns the nth active ConfigVariableCore in the world.
*/
- getVariableName()
C++ Interface: get_variable_name(ConfigVariableManager self, int n)
- /**
Returns the name of the nth active ConfigVariable in the list.
*/
- getVariables()
- get_num_variables()
C++ Interface: get_num_variables(ConfigVariableManager self)
- /**
Returns the current number of active ConfigVariableCores in the world.
*/
- get_variable()
C++ Interface: get_variable(ConfigVariableManager self, int n)
- /**
Returns the nth active ConfigVariableCore in the world.
*/
- get_variable_name()
C++ Interface: get_variable_name(ConfigVariableManager self, int n)
- /**
Returns the name of the nth active ConfigVariable in the list.
*/
- get_variables()
- isVariableUsed()
C++ Interface: is_variable_used(ConfigVariableManager self, int n)
- /**
Returns true if the nth active ConfigVariable in the list has been used by
code, false otherwise.
*/
- is_variable_used()
C++ Interface: is_variable_used(ConfigVariableManager self, int n)
- /**
Returns true if the nth active ConfigVariable in the list has been used by
code, false otherwise.
*/
- listDynamicVariables()
C++ Interface: list_dynamic_variables(ConfigVariableManager self)
- /**
Writes a list of all the “dynamic” variables that have been declared
somewhere in code, along with a brief description. This is a (usually
large) list of config variables that are declared with a generated variable
name.
*/
- listUnusedVariables()
C++ Interface: list_unused_variables(ConfigVariableManager self)
- /**
Writes a list of all the variables that have been defined in a prc file
without having been declared somewhere in code.
*/
- listVariables()
C++ Interface: list_variables(ConfigVariableManager self)
- /**
Writes a list of all the variables that have been declared somewhere in
code, along with a brief description.
*/
- list_dynamic_variables()
C++ Interface: list_dynamic_variables(ConfigVariableManager self)
- /**
Writes a list of all the “dynamic” variables that have been declared
somewhere in code, along with a brief description. This is a (usually
large) list of config variables that are declared with a generated variable
name.
*/
- list_unused_variables()
C++ Interface: list_unused_variables(ConfigVariableManager self)
- /**
Writes a list of all the variables that have been defined in a prc file
without having been declared somewhere in code.
*/
- list_variables()
C++ Interface: list_variables(ConfigVariableManager self)
- /**
Writes a list of all the variables that have been declared somewhere in
code, along with a brief description.
*/
- makeVariable()
C++ Interface: make_variable(const ConfigVariableManager self, str name)
- /**
Creates and returns a new, undefined ConfigVariableCore with the indicated
name; or if a variable with this name has already been created, returns
that one instead.
*/
- makeVariableTemplate()
C++ Interface: make_variable_template(const ConfigVariableManager self, str pattern, int type, str default_value, str description, int flags)
- /**
Defines a variable “template” to match against dynamically-defined
variables that may or may not be created in the future.
The template consists of a glob pattern, e.g. notify-level-*, which will
be tested against any config variable passed to a future call to
make_variable(). If the pattern matches, the returned ConfigVariableCore
is copied to define the new variable, instead of creating a default, empty
one.
This is useful to pre-specify default values for a family of variables that
all have similar properties, and all may not be created at the same time.
It is especially useful to avoid cluttering up the list of available
variables with user-declared variables that have not been defined yet by
the application (e.g. egg-object-type-*).
This method basically pre-defines all variables that match the specified
glob pattern.
*/
- make_variable()
C++ Interface: make_variable(const ConfigVariableManager self, str name)
- /**
Creates and returns a new, undefined ConfigVariableCore with the indicated
name; or if a variable with this name has already been created, returns
that one instead.
*/
- make_variable_template()
C++ Interface: make_variable_template(const ConfigVariableManager self, str pattern, int type, str default_value, str description, int flags)
- /**
Defines a variable “template” to match against dynamically-defined
variables that may or may not be created in the future.
The template consists of a glob pattern, e.g. notify-level-*, which will
be tested against any config variable passed to a future call to
make_variable(). If the pattern matches, the returned ConfigVariableCore
is copied to define the new variable, instead of creating a default, empty
one.
This is useful to pre-specify default values for a family of variables that
all have similar properties, and all may not be created at the same time.
It is especially useful to avoid cluttering up the list of available
variables with user-declared variables that have not been defined yet by
the application (e.g. egg-object-type-*).
This method basically pre-defines all variables that match the specified
glob pattern.
*/
- variables
- writePrcVariables()
C++ Interface: write_prc_variables(ConfigVariableManager self, ostream out)
- /**
Writes all of the prc-set config variables, as they appear in a prc file
somewhere, one per line, very concisely. This lists the dominant value in
the prc file; it does not list shadowed values, and it does not list
locally-set values.
This is mainly intended for generating a hash of the input config file
state.
*/
- write_prc_variables()
C++ Interface: write_prc_variables(ConfigVariableManager self, ostream out)
- /**
Writes all of the prc-set config variables, as they appear in a prc file
somewhere, one per line, very concisely. This lists the dominant value in
the prc file; it does not list shadowed values, and it does not list
locally-set values.
This is mainly intended for generating a hash of the input config file
state.
*/