From 200b7bb87c3d8d8b2011b08ed4bd7b034ceb452f Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sat, 5 Dec 2015 14:18:22 -0300 Subject: -Display on animation editor which keys are invalid and which tracks are unresolved -Added a tool to clean up unresolved tracks and unused keys --- modules/gdscript/gd_script.cpp | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'modules/gdscript/gd_script.cpp') diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index 8746f92c9..c3cc779bc 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 *p_properties) const { // exported members, not doen yet! -- cgit v1.2.3-70-g09d2