diff options
author | Juan Linietsky <reduzio@gmail.com> | 2014-10-12 02:13:22 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2014-10-12 02:13:22 -0300 |
commit | 948fd83cdded7fed77ae5213101c1a2ece580434 (patch) | |
tree | a6953095dc4feaac1485c04b35039b85f1a95534 /modules/gdscript | |
parent | 37354da5b0dc1dc8dcfd9d844e593935311f4f8f (diff) |
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
Diffstat (limited to 'modules/gdscript')
-rw-r--r-- | modules/gdscript/gd_editor.cpp | 3 | ||||
-rw-r--r-- | modules/gdscript/gd_script.cpp | 27 | ||||
-rw-r--r-- | modules/gdscript/gd_script.h | 3 |
3 files changed, 31 insertions, 2 deletions
diff --git a/modules/gdscript/gd_editor.cpp b/modules/gdscript/gd_editor.cpp index a98b07ab92..9610f9827f 100644 --- a/modules/gdscript/gd_editor.cpp +++ b/modules/gdscript/gd_editor.cpp @@ -114,6 +114,7 @@ int GDScriptLanguage::find_function(const String& p_function,const String& p_cod if (tokenizer.get_token()==GDTokenizer::TK_NEWLINE) { indent=tokenizer.get_token_line_indent(); } + //print_line("TOKEN: "+String(GDTokenizer::get_token_name(tokenizer.get_token()))); if (indent==0 && tokenizer.get_token()==GDTokenizer::TK_PR_FUNCTION && tokenizer.get_token(1)==GDTokenizer::TK_IDENTIFIER) { String identifier = tokenizer.get_token_identifier(1); @@ -122,6 +123,8 @@ int GDScriptLanguage::find_function(const String& p_function,const String& p_cod } } tokenizer.advance(); + //print_line("NEXT: "+String(GDTokenizer::get_token_name(tokenizer.get_token()))); + } return -1; } diff --git a/modules/gdscript/gd_script.cpp b/modules/gdscript/gd_script.cpp index 196e328769..f0ef69df5b 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<PlaceHolderScriptInstance*> *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<const GDParser::ClassNode*>(root); + if (c->extends_used && String(c->extends_file)!="") { + + Ref<GDScript> bf = ResourceLoader::load(c->extends_file); + if (bf.is_valid()) { + + bf->_update_exports(p_instances); + + } + } + List<PropertyInfo> plist; Map<StringName,Variant> default_values; @@ -1660,10 +1674,19 @@ void GDScript::update_exports() { } - for (Set<PlaceHolderScriptInstance*>::Element *E=placeholders.front();E;E=E->next()) { + for (Set<PlaceHolderScriptInstance*>::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 } diff --git a/modules/gdscript/gd_script.h b/modules/gdscript/gd_script.h index 2088606271..6f0c156d2a 100644 --- a/modules/gdscript/gd_script.h +++ b/modules/gdscript/gd_script.h @@ -263,6 +263,9 @@ friend class GDFunctions; #endif + + void _update_exports(Set<PlaceHolderScriptInstance *> *p_instances); + protected: bool _get(const StringName& p_name,Variant &r_ret) const; bool _set(const StringName& p_name, const Variant& p_value); |