diff options
author | Juan Linietsky <reduzio@gmail.com> | 2016-06-11 18:31:22 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2016-06-11 18:34:49 -0300 |
commit | 9ddc13a5ccdfdb67950bb198a6e56868f64e8852 (patch) | |
tree | 7d23b1ed2a1d1c554c409255e825972ef0abd9bb /modules/gdscript/gd_parser.cpp | |
parent | 3b2c96139b39ddcfbadcd21b61e5c1ff608ad95e (diff) | |
download | redot-engine-9ddc13a5ccdfdb67950bb198a6e56868f64e8852.tar.gz |
-All variables from script are visible through get_property_list(), not just those with export()
-Added PROPERTY_USAGE_SCRIPT_VARIABLE to identify what comes from script
-closes #5146
Diffstat (limited to 'modules/gdscript/gd_parser.cpp')
-rw-r--r-- | modules/gdscript/gd_parser.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/modules/gdscript/gd_parser.cpp b/modules/gdscript/gd_parser.cpp index 9e90027a70..3aff134327 100644 --- a/modules/gdscript/gd_parser.cpp +++ b/modules/gdscript/gd_parser.cpp @@ -2408,6 +2408,7 @@ void GDParser::_parse_class(ClassNode *p_class) { return; } current_export.type=type; + current_export.usage|=PROPERTY_USAGE_SCRIPT_VARIABLE; tokenizer->advance(); if (tokenizer->get_token()==GDTokenizer::TK_COMMA) { // hint expected next! @@ -2782,6 +2783,8 @@ void GDParser::_parse_class(ClassNode *p_class) { current_export.type=Variant::OBJECT; current_export.hint=PROPERTY_HINT_RESOURCE_TYPE; + current_export.usage|=PROPERTY_USAGE_SCRIPT_VARIABLE; + current_export.hint_string=identifier; tokenizer->advance(); @@ -2901,6 +2904,7 @@ void GDParser::_parse_class(ClassNode *p_class) { return; } member._export.type=cn->value.get_type(); + member._export.usage|=PROPERTY_USAGE_SCRIPT_VARIABLE; } } #ifdef TOOLS_ENABLED |