diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-06-30 21:30:17 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-06-30 21:35:05 -0300 |
commit | 2a3e00c8c7e6f997b12864755a3df3b9bd3cca05 (patch) | |
tree | 807a72e686f76fcf44ecd5fb2e6834545d98b38f /modules/visual_script/visual_script.cpp | |
parent | e2e73ec906d0671c870ff64eefd15dfc86abaaec (diff) |
-Many fixes to VisualScript, fixed property names, etc.
-Added ability to set/get a field in GetSet, as well as assignment ops
-Added a Select node
-Fixed update bugs related to variable list and exported properties, closes #9458
Diffstat (limited to 'modules/visual_script/visual_script.cpp')
-rw-r--r-- | modules/visual_script/visual_script.cpp | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/modules/visual_script/visual_script.cpp b/modules/visual_script/visual_script.cpp index bb8111ce99..a922fdf354 100644 --- a/modules/visual_script/visual_script.cpp +++ b/modules/visual_script/visual_script.cpp @@ -140,7 +140,7 @@ VisualScriptNode::TypeGuess VisualScriptNode::guess_output_type(TypeGuess *p_inp tg.type = pinfo.type; if (pinfo.hint == PROPERTY_HINT_RESOURCE_TYPE) { - tg.GDCLASS = pinfo.hint_string; + tg.gdclass = pinfo.hint_string; } return tg; @@ -660,6 +660,9 @@ void VisualScript::set_variable_export(const StringName &p_name, bool p_export) ERR_FAIL_COND(!variables.has(p_name)); variables[p_name]._export = p_export; +#ifdef TOOLS_ENABLED + _update_placeholders(); +#endif } bool VisualScript::get_variable_export(const StringName &p_name) const { @@ -1067,9 +1070,11 @@ void VisualScript::get_script_property_list(List<PropertyInfo> *p_list) const { get_variable_list(&vars); for (List<StringName>::Element *E = vars.front(); E; E = E->next()) { - if (!variables[E->get()]._export) - continue; - p_list->push_back(variables[E->get()].info); + //if (!variables[E->get()]._export) + // continue; + PropertyInfo pi = variables[E->get()].info; + pi.usage |= PROPERTY_USAGE_SCRIPT_VARIABLE; + p_list->push_back(pi); } } @@ -1358,6 +1363,7 @@ void VisualScriptInstance::get_property_list(List<PropertyInfo> *p_properties) c continue; PropertyInfo p = E->get().info; p.name = String(E->key()); + p.usage |= PROPERTY_USAGE_SCRIPT_VARIABLE; p_properties->push_back(p); } } |