From 1138103c6374bee84680bfe85ff794191365e33a Mon Sep 17 00:00:00 2001 From: Franklin Sobrinho Date: Fri, 27 Nov 2015 21:11:20 -0300 Subject: Fix shader loading, making possible load .shd and .sgp from editor --- tools/editor/property_editor.cpp | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'tools') diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp index 0fe3dee2ea..4ed3f3cbe0 100644 --- a/tools/editor/property_editor.cpp +++ b/tools/editor/property_editor.cpp @@ -89,13 +89,23 @@ void CustomPropertyEditor::_menu_option(int p_which) { case OBJ_MENU_LOAD: { file->set_mode(EditorFileDialog::MODE_OPEN_FILE); - List extensions; String type=(hint==PROPERTY_HINT_RESOURCE_TYPE)?hint_text:String(); - ResourceLoader::get_recognized_extensions_for_type(type,&extensions); - file->clear_filters(); + List extensions; + for (int i=0;i valid_extensions; for (List::Element *E=extensions.front();E;E=E->next()) { + valid_extensions.insert(E->get()); + } + + file->clear_filters(); + for (Set::Element *E=valid_extensions.front();E;E=E->next()) { + file->add_filter("*."+E->get()+" ; "+E->get().to_upper() ); } -- cgit v1.2.3