diff options
author | Juan Linietsky <reduzio@gmail.com> | 2015-12-05 14:18:22 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2015-12-05 14:18:22 -0300 |
commit | 200b7bb87c3d8d8b2011b08ed4bd7b034ceb452f (patch) | |
tree | d9dc837018c4c2c7680491889316eedb9fe6b36c /modules/gdscript/gd_script.cpp | |
parent | 35fa048af555e1f8411a2034706e9e452ce2f399 (diff) | |
download | redot-engine-200b7bb87c3d8d8b2011b08ed4bd7b034ceb452f.tar.gz |
-Display on animation editor which keys are invalid and which tracks are unresolved
-Added a tool to clean up unresolved tracks and unused keys
Diffstat (limited to 'modules/gdscript/gd_script.cpp')
-rw-r--r-- | modules/gdscript/gd_script.cpp | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index 8746f92c9e..c3cc779bce 100644 --- a/modules/gdscript/gd_script.cpp +++ b/modules/gdscript/gd_script.cpp @@ -2274,6 +2274,26 @@ bool GDInstance::get(const StringName& p_name, Variant &r_ret) const { return false; } + +Variant::Type GDInstance::get_property_type(const StringName& p_name,bool *r_is_valid) const { + + + const GDScript *sptr=script.ptr(); + while(sptr) { + + if (sptr->member_info.has(p_name)) { + if (r_is_valid) + *r_is_valid=true; + return sptr->member_info[p_name].type; + } + sptr = sptr->_base; + } + + if (r_is_valid) + *r_is_valid=false; + return Variant::NIL; +} + void GDInstance::get_property_list(List<PropertyInfo> *p_properties) const { // exported members, not doen yet! |