diff --git a/dtool/src/prc/configVariable.I b/dtool/src/prc/configVariable.I index 6a98e3a2d5..0d8dd74185 100644 --- a/dtool/src/prc/configVariable.I +++ b/dtool/src/prc/configVariable.I @@ -102,6 +102,19 @@ set_string_value(const string &string_value) { _core->make_local_value()->set_string_value(string_value); } +//////////////////////////////////////////////////////////////////// +// Function: ConfigVariable::clear_value +// Access: Published +// Description: Removes the value assigned to this variable, and lets +// its original value (as read from the prc files) show +// through. +//////////////////////////////////////////////////////////////////// +INLINE void ConfigVariable:: +clear_value() { + nassertv(_core != (ConfigVariableCore *)NULL); + _core->clear_local_value(); +} + //////////////////////////////////////////////////////////////////// // Function: ConfigVariable::get_num_words // Access: Published diff --git a/dtool/src/prc/configVariable.h b/dtool/src/prc/configVariable.h index ed4d25aea5..e284c5f5fc 100644 --- a/dtool/src/prc/configVariable.h +++ b/dtool/src/prc/configVariable.h @@ -46,6 +46,7 @@ PUBLISHED: INLINE const string &get_string_value() const; INLINE void set_string_value(const string &value); + INLINE void clear_value(); INLINE int get_num_words() const;