From 948fd83cdded7fed77ae5213101c1a2ece580434 Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Sun, 12 Oct 2014 02:13:22 -0300 Subject: Little Bits -=-=-=-=-=- -fix duplicate function bug when creating script callback in editor -fix bug where hiding lights does not work -fix 2D audio listener bug (romulox_x reported) -fix exported properties with inheritance bug -fix timer autostart (make it not work on editor) -reactivate first camara found if viewport runs out of active camera -option to hide gizmos in viewport -changed skeleton gizmo because it sucks -Make convex shapes using CollisionShape visible (use quickhull class) -fix up menu when editing a mesh, to export collision, navmesh, convex, etc. from it. -make a menu option to show SRGB in 3D editor views by default -make option to edit default light direction in viewport settings -make option to edit default ambient light in viewport settings -make software conversion of linear->RGB if hardware support not found --- modules/gdscript/gd_script.cpp | 27 +++++++++++++++++++++++++-- 1 file changed, 25 insertions(+), 2 deletions(-) (limited to 'modules/gdscript/gd_script.cpp') diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index 196e32876..f0ef69df5 100644 --- a/modules/gdscript/gd_script.cpp +++ b/modules/gdscript/gd_script.cpp @@ -1626,9 +1626,11 @@ void GDScript::set_source_code(const String& p_code) { source=p_code; } -void GDScript::update_exports() { + +void GDScript::_update_exports(Set *p_instances) { #ifdef TOOLS_ENABLED + String basedir=path; if (basedir=="") @@ -1645,8 +1647,20 @@ void GDScript::update_exports() { const GDParser::Node* root = parser.get_parse_tree(); ERR_FAIL_COND(root->type!=GDParser::Node::TYPE_CLASS); + + const GDParser::ClassNode *c = static_cast(root); + if (c->extends_used && String(c->extends_file)!="") { + + Ref bf = ResourceLoader::load(c->extends_file); + if (bf.is_valid()) { + + bf->_update_exports(p_instances); + + } + } + List plist; Map default_values; @@ -1660,10 +1674,19 @@ void GDScript::update_exports() { } - for (Set::Element *E=placeholders.front();E;E=E->next()) { + for (Set::Element *E=p_instances->front();E;E=E->next()) { E->get()->update(plist,default_values); } +#endif +} + +void GDScript::update_exports() { + +#ifdef TOOLS_ENABLED + + _update_exports(&placeholders); + #endif } -- cgit v1.2.3-70-g09d2