diff options
Diffstat (limited to 'tools')
-rw-r--r-- | tools/collada/collada.cpp | 6 | ||||
-rw-r--r-- | tools/editor/editor_file_dialog.cpp | 9 | ||||
-rw-r--r-- | tools/editor/editor_import_export.cpp | 54 | ||||
-rw-r--r-- | tools/editor/editor_import_export.h | 12 | ||||
-rw-r--r-- | tools/editor/editor_node.cpp | 4 | ||||
-rw-r--r-- | tools/editor/plugins/script_editor_plugin.cpp | 29 | ||||
-rw-r--r-- | tools/editor/plugins/script_editor_plugin.h | 3 | ||||
-rw-r--r-- | tools/editor/project_export.cpp | 37 | ||||
-rw-r--r-- | tools/editor/property_editor.cpp | 92 | ||||
-rw-r--r-- | tools/editor/property_editor.h | 1 | ||||
-rw-r--r-- | tools/editor/script_editor_debugger.cpp | 15 | ||||
-rw-r--r-- | tools/editor/script_editor_debugger.h | 3 |
12 files changed, 203 insertions, 62 deletions
diff --git a/tools/collada/collada.cpp b/tools/collada/collada.cpp index deec5f60c7..107ffac626 100644 --- a/tools/collada/collada.cpp +++ b/tools/collada/collada.cpp @@ -1683,8 +1683,12 @@ Collada::Node* Collada::_parse_visual_scene_node(XMLParser& parser) { if ( parser.has_attribute("sid") ) { //bones may not have sid joint->sid=parser.get_attribute_value("sid"); // state.bone_map[joint->sid]=joint; - } else if (state.idref_joints.has(name)) + } else if (state.idref_joints.has(name)) { joint->sid=name; //kind of a cheat but.. + } else if (parser.has_attribute("name")) { + joint->sid=parser.get_attribute_value_safe("name"); + } + if (joint->sid!="") { state.sid_to_node_map[joint->sid]=id; diff --git a/tools/editor/editor_file_dialog.cpp b/tools/editor/editor_file_dialog.cpp index 104539c308..61ad7b6cbb 100644 --- a/tools/editor/editor_file_dialog.cpp +++ b/tools/editor/editor_file_dialog.cpp @@ -6,6 +6,8 @@ #include "editor_resource_preview.h" #include "editor_settings.h" #include "scene/gui/margin_container.h" +#include "os/file_access.h" + EditorFileDialog::GetIconFunc EditorFileDialog::get_icon_func=NULL; EditorFileDialog::GetIconFunc EditorFileDialog::get_large_icon_func=NULL; @@ -194,6 +196,9 @@ void EditorFileDialog::_thumbnail_done(const String& p_path,const Ref<Texture>& void EditorFileDialog::_request_single_thumbnail(const String& p_path) { + if (!FileAccess::exists(p_path)) + return; + EditorResourcePreview::get_singleton()->queue_resource_preview(p_path,this,"_thumbnail_done",p_path); //print_line("want file "+p_path); set_process(true); @@ -435,6 +440,8 @@ void EditorFileDialog::update_file_list() { } + String cdir = dir_access->get_current_dir(); + bool skip_pp = access==ACCESS_RESOURCES && cdir=="res://"; dir_access->list_dir_begin(); @@ -455,7 +462,7 @@ void EditorFileDialog::update_file_list() { if (show_hidden || !ishidden) { if (!isdir) files.push_back(item); - else + else if (item!=".." || !skip_pp) dirs.push_back(item); } } diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp index cd455406b7..64b104334f 100644 --- a/tools/editor/editor_import_export.cpp +++ b/tools/editor/editor_import_export.cpp @@ -41,6 +41,7 @@ #include "io/md5.h" #include "io_plugins/editor_texture_import_plugin.h" #include "tools/editor/plugins/script_editor_plugin.h" +#include "io/zip_io.h" String EditorImportPlugin::validate_source_path(const String& p_path) { @@ -1077,6 +1078,59 @@ Error EditorExportPlatform::save_pack_file(void *p_userdata,const String& p_path } +Error EditorExportPlatform::save_zip_file(void *p_userdata,const String& p_path, const Vector<uint8_t>& p_data,int p_file,int p_total) { + + + ZipData *zd = (ZipData*)p_userdata; + + zipFile zip=(zipFile)zd->zip; + + zipOpenNewFileInZip(zip, + p_path.utf8().get_data(), + NULL, + NULL, + 0, + NULL, + 0, + NULL, + Z_DEFLATED, + Z_DEFAULT_COMPRESSION); + + zipWriteInFileInZip(zip,p_data.ptr(),p_data.size()); + zipCloseFileInZip(zip); + + zd->ep->step("Storing File: "+p_path,2+p_file*100/p_total); + zd->count++; + return OK; + +} + +Error EditorExportPlatform::save_zip(const String& p_path, bool p_make_bundles) { + + EditorProgress ep("savezip","Packing",102); + + //FileAccess *tmp = FileAccess::open(tmppath,FileAccess::WRITE); + + FileAccess *src_f; + zlib_filefunc_def io = zipio_create_io_from_file(&src_f); + zipFile zip=zipOpen2(p_path.utf8().get_data(),APPEND_STATUS_CREATE,NULL,&io); + + ZipData zd; + zd.count=0; + zd.ep=&ep; + zd.zip=zip; + + + Error err = export_project_files(save_zip_file,&zd,p_make_bundles); + + zipClose(zip,NULL); + + if (err) + return err; + + +} + Error EditorExportPlatform::save_pack(FileAccess *dst,bool p_make_bundles, int p_alignment) { EditorProgress ep("savepack","Packing",102); diff --git a/tools/editor/editor_import_export.h b/tools/editor/editor_import_export.h index 93086f7ad4..940a41bafd 100644 --- a/tools/editor/editor_import_export.h +++ b/tools/editor/editor_import_export.h @@ -33,6 +33,7 @@ #include "scene/main/node.h" #include "scene/resources/texture.h" + class EditorExportPlatform; class FileAccess; class EditorProgress; @@ -107,8 +108,17 @@ protected: }; + struct ZipData { + + void* zip; + EditorProgress *ep; + int count; + + }; + void gen_export_flags(Vector<String> &r_flags, int p_flags); static Error save_pack_file(void *p_userdata,const String& p_path, const Vector<uint8_t>& p_data,int p_file,int p_total); + static Error save_zip_file(void *p_userdata,const String& p_path, const Vector<uint8_t>& p_data,int p_file,int p_total); public: @@ -134,6 +144,8 @@ public: Error export_project_files(EditorExportSaveFunction p_func, void* p_udata,bool p_make_bundles); Error save_pack(FileAccess *p_where, bool p_make_bundles=false, int p_alignment = 1); + Error save_zip(const String& p_path, bool p_make_bundles=false); + virtual String get_name() const =0; virtual ImageCompression get_image_compression() const=0; virtual Ref<Texture> get_logo() const =0; diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 35404b0bba..3dbca760f0 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -1816,7 +1816,7 @@ void EditorNode::_run(bool p_current,const String& p_custom) { } play_button->set_pressed(false); - play_button->set_icon(gui_base->get_icon("Play","EditorIcons")); + play_button->set_icon(gui_base->get_icon("MainPlay","EditorIcons")); //pause_button->set_pressed(false); play_scene_button->set_pressed(false); play_scene_button->set_icon(gui_base->get_icon("PlayScene","EditorIcons")); @@ -2688,7 +2688,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { editor_run.stop(); play_button->set_pressed(false); - play_button->set_icon(gui_base->get_icon("Play","EditorIcons")); + play_button->set_icon(gui_base->get_icon("MainPlay","EditorIcons")); play_scene_button->set_pressed(false); play_scene_button->set_icon(gui_base->get_icon("PlayScene","EditorIcons")); //pause_button->set_pressed(false); diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index 37f4076a0c..df6397ed1d 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -604,7 +604,6 @@ void ScriptEditor::_breaked(bool p_breaked,bool p_can_debug) { void ScriptEditor::_show_debugger(bool p_show) { debug_menu->get_popup()->set_item_checked( debug_menu->get_popup()->get_item_index(DEBUG_SHOW), p_show); - } void ScriptEditor::_script_created(Ref<Script> p_script) { @@ -981,7 +980,22 @@ void ScriptEditor::_menu_option(int p_option) { case WINDOW_PREV: { _history_back(); } break; - + case DEBUG_SHOW: { + if (debugger) { + bool visible = debug_menu->get_popup()->is_item_checked( debug_menu->get_popup()->get_item_index(DEBUG_SHOW) ); + debug_menu->get_popup()->set_item_checked( debug_menu->get_popup()->get_item_index(DEBUG_SHOW), !visible); + if (visible) + debugger->hide(); + else + debugger->show(); + } + } break; + case DEBUG_SHOW_KEEP_OPEN: { + bool visible = debug_menu->get_popup()->is_item_checked( debug_menu->get_popup()->get_item_index(DEBUG_SHOW_KEEP_OPEN) ); + if (debugger) + debugger->set_hide_on_stop(visible); + debug_menu->get_popup()->set_item_checked( debug_menu->get_popup()->get_item_index(DEBUG_SHOW_KEEP_OPEN), !visible); + } break; } @@ -1335,16 +1349,6 @@ void ScriptEditor::_menu_option(int p_option) { debugger->debug_continue(); } break; - case DEBUG_SHOW: { - if (debugger) { - bool visible = debug_menu->get_popup()->is_item_checked( debug_menu->get_popup()->get_item_index(DEBUG_SHOW) ); - debug_menu->get_popup()->set_item_checked( debug_menu->get_popup()->get_item_index(DEBUG_SHOW), !visible); - if (visible) - debugger->hide(); - else - debugger->show(); - } - } break; case HELP_CONTEXTUAL: { String text = current->get_text_edit()->get_selection_text(); if (text == "") @@ -2394,6 +2398,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { debug_menu->get_popup()->add_item("Continue",DEBUG_CONTINUE); debug_menu->get_popup()->add_separator(); debug_menu->get_popup()->add_check_item("Show Debugger",DEBUG_SHOW); + debug_menu->get_popup()->add_check_item("Keep Debuger Open",DEBUG_SHOW_KEEP_OPEN); debug_menu->get_popup()->connect("item_pressed", this,"_menu_option"); debug_menu->get_popup()->set_item_disabled( debug_menu->get_popup()->get_item_index(DEBUG_NEXT), true); diff --git a/tools/editor/plugins/script_editor_plugin.h b/tools/editor/plugins/script_editor_plugin.h index 7875b4d144..32c1e7e1c8 100644 --- a/tools/editor/plugins/script_editor_plugin.h +++ b/tools/editor/plugins/script_editor_plugin.h @@ -151,7 +151,8 @@ class ScriptEditor : public VBoxContainer { DEBUG_BREAK, DEBUG_CONTINUE, DEBUG_SHOW, - HELP_CONTEXTUAL, + DEBUG_SHOW_KEEP_OPEN, + HELP_CONTEXTUAL, WINDOW_MOVE_LEFT, WINDOW_MOVE_RIGHT, WINDOW_NEXT, diff --git a/tools/editor/project_export.cpp b/tools/editor/project_export.cpp index b288439b74..36976a9120 100644 --- a/tools/editor/project_export.cpp +++ b/tools/editor/project_export.cpp @@ -471,20 +471,32 @@ void ProjectExportDialog::_export_action_pck(const String& p_file) { ERR_PRINT("Invalid platform for export of PCK"); return; } - FileAccess *f = FileAccess::open(p_file,FileAccess::WRITE); - if (!f) { - error->set_text("Error exporting project PCK! Can't write"); - error->popup_centered_minsize(); - } - ERR_FAIL_COND(!f); - Error err = exporter->save_pack(f,false); - memdelete(f); + if (p_file.ends_with(".pck")) { + FileAccess *f = FileAccess::open(p_file,FileAccess::WRITE); + if (!f) { + error->set_text("Error exporting project PCK! Can't write"); + error->popup_centered_minsize(); + } + ERR_FAIL_COND(!f); - if (err!=OK) { - error->set_text("Error exporting project!"); - error->popup_centered_minsize(); - return; + Error err = exporter->save_pack(f,false); + memdelete(f); + + if (err!=OK) { + error->set_text("Error exporting project!"); + error->popup_centered_minsize(); + return; + } + } else if (p_file.ends_with(".zip")) { + + Error err = exporter->save_zip(p_file,false); + + if (err!=OK) { + error->set_text("Error exporting project!"); + error->popup_centered_minsize(); + return; + } } } @@ -1425,6 +1437,7 @@ ProjectExportDialog::ProjectExportDialog(EditorNode *p_editor) { pck_export->set_title("Export Project PCK"); pck_export->connect("file_selected", this,"_export_action_pck"); pck_export->add_filter("*.pck ; Data Pack"); + pck_export->add_filter("*.zip ; Zip"); add_child(pck_export); button_export = add_button("Export..",!OS::get_singleton()->get_swap_ok_cancel(),"export_pck"); diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp index 7ab09f0487..9fb623022b 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<String> extensions; String type=(hint==PROPERTY_HINT_RESOURCE_TYPE)?hint_text:String(); - ResourceLoader::get_recognized_extensions_for_type(type,&extensions); - file->clear_filters(); + List<String> extensions; + for (int i=0;i<type.get_slice_count(",");i++) { + + ResourceLoader::get_recognized_extensions_for_type(type.get_slice(",",i),&extensions); + } + + Set<String> valid_extensions; for (List<String>::Element *E=extensions.front();E;E=E->next()) { + valid_extensions.insert(E->get()); + } + + file->clear_filters(); + for (Set<String>::Element *E=valid_extensions.front();E;E=E->next()) { + file->add_filter("*."+E->get()+" ; "+E->get().to_upper() ); } @@ -2549,7 +2559,8 @@ void PropertyEditor::update_tree() { item->set_cell_mode( 1, TreeItem::CELL_MODE_CHECK ); item->set_text(1,"On"); item->set_checked( 1, obj->get( p.name ) ); - item->set_icon( 0, get_icon("Bool","EditorIcons") ); + if (show_type_icons) + item->set_icon( 0, get_icon("Bool","EditorIcons") ); item->set_editable(1,!read_only); } break; @@ -2561,7 +2572,8 @@ void PropertyEditor::update_tree() { item->set_cell_mode( 1, TreeItem::CELL_MODE_CUSTOM ); item->set_text(1, String::num(obj->get( p.name ),2) ); item->set_editable(1,!read_only); - item->set_icon( 0, get_icon("Curve","EditorIcons")); + if (show_type_icons) + item->set_icon( 0, get_icon("Curve","EditorIcons")); break; @@ -2631,7 +2643,8 @@ void PropertyEditor::update_tree() { // int c = p.hint_string.get_slice_count(","); item->set_text(1,p.hint_string); - item->set_icon( 0,get_icon("Enum","EditorIcons") ); + if (show_type_icons) + item->set_icon( 0,get_icon("Enum","EditorIcons") ); item->set_range(1, obj->get( p.name ) ); item->set_editable(1,!read_only); break; @@ -2647,11 +2660,13 @@ void PropertyEditor::update_tree() { }; if (p.type==Variant::REAL) { - item->set_icon( 0, get_icon("Real","EditorIcons")); + if (show_type_icons) + item->set_icon( 0, get_icon("Real","EditorIcons")); item->set_range(1, obj->get( p.name ) ); } else { - item->set_icon( 0,get_icon("Integer","EditorIcons") ); + if (show_type_icons) + item->set_icon( 0,get_icon("Integer","EditorIcons") ); item->set_range(1, obj->get( p.name ) ); } @@ -2671,7 +2686,8 @@ void PropertyEditor::update_tree() { item->set_cell_mode( 1, TreeItem::CELL_MODE_STRING ); item->set_editable(1,!read_only); - item->set_icon( 0, get_icon("File","EditorIcons") ); + if (show_type_icons) + item->set_icon( 0, get_icon("File","EditorIcons") ); item->set_text(1,obj->get(p.name)); item->add_button(1,get_icon("Folder","EditorIcons")); @@ -2691,7 +2707,8 @@ void PropertyEditor::update_tree() { item->set_text(1, p.hint_string); item->set_range(1,idx); item->set_editable( 1, !read_only ); - item->set_icon( 0,get_icon("Enum","EditorIcons") ); + if (show_type_icons) + item->set_icon( 0,get_icon("Enum","EditorIcons") ); } break; @@ -2699,7 +2716,8 @@ void PropertyEditor::update_tree() { item->set_cell_mode( 1, TreeItem::CELL_MODE_STRING ); item->set_editable(1,!read_only); - item->set_icon( 0, get_icon("String","EditorIcons") ); + if (show_type_icons) + item->set_icon( 0, get_icon("String","EditorIcons") ); item->set_text(1,obj->get(p.name)); if (p.hint==PROPERTY_HINT_MULTILINE_TEXT) item->add_button(1,get_icon("MultiLine","EditorIcons") ); @@ -2719,7 +2737,8 @@ void PropertyEditor::update_tree() { item->set_text(1,"Array["+itos(v.call("size"))+"]"); else item->set_text(1,"Array[]"); - item->set_icon( 0, get_icon("ArrayData","EditorIcons") ); + if (show_type_icons) + item->set_icon( 0, get_icon("ArrayData","EditorIcons") ); } break; @@ -2734,7 +2753,8 @@ void PropertyEditor::update_tree() { item->set_text(1,"IntArray["+itos(v.call("size"))+"]"); else item->set_text(1,"IntArray[]"); - item->set_icon( 0, get_icon("ArrayInt","EditorIcons") ); + if (show_type_icons) + item->set_icon( 0, get_icon("ArrayInt","EditorIcons") ); } break; @@ -2748,7 +2768,8 @@ void PropertyEditor::update_tree() { item->set_text(1,"FloatArray["+itos(v.call("size"))+"]"); else item->set_text(1,"FloatArray[]"); - item->set_icon( 0, get_icon("ArrayReal","EditorIcons") ); + if (show_type_icons) + item->set_icon( 0, get_icon("ArrayReal","EditorIcons") ); } break; @@ -2762,7 +2783,8 @@ void PropertyEditor::update_tree() { item->set_text(1,"String["+itos(v.call("size"))+"]"); else item->set_text(1,"String[]"); - item->set_icon( 0, get_icon("ArrayString","EditorIcons") ); + if (show_type_icons) + item->set_icon( 0, get_icon("ArrayString","EditorIcons") ); } break; @@ -2776,7 +2798,8 @@ void PropertyEditor::update_tree() { item->set_text(1,"Byte["+itos(v.call("size"))+"]"); else item->set_text(1,"Byte[]"); - item->set_icon( 0, get_icon("ArrayData","EditorIcons") ); + if (show_type_icons) + item->set_icon( 0, get_icon("ArrayData","EditorIcons") ); } break; @@ -2790,7 +2813,8 @@ void PropertyEditor::update_tree() { item->set_text(1,"Vector2["+itos(v.call("size"))+"]"); else item->set_text(1,"Vector2[]"); - item->set_icon( 0, get_icon("Vector2","EditorIcons") ); + if (show_type_icons) + item->set_icon( 0, get_icon("Vector2","EditorIcons") ); } break; @@ -2804,7 +2828,8 @@ void PropertyEditor::update_tree() { item->set_text(1,"Vector3["+itos(v.call("size"))+"]"); else item->set_text(1,"Vector3[]"); - item->set_icon( 0, get_icon("Vector","EditorIcons") ); + if (show_type_icons) + item->set_icon( 0, get_icon("Vector","EditorIcons") ); } break; @@ -2818,7 +2843,8 @@ void PropertyEditor::update_tree() { item->set_text(1,"Color["+itos(v.call("size"))+"]"); else item->set_text(1,"Color[]"); - item->set_icon( 0, get_icon("Color","EditorIcons") ); + if (show_type_icons) + item->set_icon( 0, get_icon("Color","EditorIcons") ); } break; @@ -2827,7 +2853,8 @@ void PropertyEditor::update_tree() { item->set_cell_mode( 1, TreeItem::CELL_MODE_CUSTOM ); item->set_editable( 1, true ); item->set_text(1,obj->get(p.name)); - item->set_icon( 0,get_icon("Vector2","EditorIcons") ); + if (show_type_icons) + item->set_icon( 0,get_icon("Vector2","EditorIcons") ); } break; case Variant::RECT2: { @@ -2835,7 +2862,8 @@ void PropertyEditor::update_tree() { item->set_cell_mode( 1, TreeItem::CELL_MODE_CUSTOM ); item->set_editable( 1, true ); item->set_text(1,obj->get(p.name)); - item->set_icon( 0,get_icon("Rect2","EditorIcons") ); + if (show_type_icons) + item->set_icon( 0,get_icon("Rect2","EditorIcons") ); } break; case Variant::VECTOR3: { @@ -2843,7 +2871,8 @@ void PropertyEditor::update_tree() { item->set_cell_mode( 1, TreeItem::CELL_MODE_CUSTOM ); item->set_editable( 1, true ); item->set_text(1,obj->get(p.name)); - item->set_icon( 0,get_icon("Vector","EditorIcons") ); + if (show_type_icons) + item->set_icon( 0,get_icon("Vector","EditorIcons") ); } break; case Variant::MATRIX32: @@ -2858,7 +2887,8 @@ void PropertyEditor::update_tree() { item->set_cell_mode( 1, TreeItem::CELL_MODE_CUSTOM ); item->set_editable( 1, true ); item->set_text(1,obj->get(p.name)); - item->set_icon( 0,get_icon("Matrix","EditorIcons") ); + if (show_type_icons) + item->set_icon( 0,get_icon("Matrix","EditorIcons") ); } break; case Variant::PLANE: { @@ -2866,7 +2896,8 @@ void PropertyEditor::update_tree() { item->set_cell_mode( 1, TreeItem::CELL_MODE_CUSTOM ); item->set_editable( 1, true ); item->set_text(1,obj->get(p.name)); - item->set_icon( 0,get_icon("Plane","EditorIcons") ); + if (show_type_icons) + item->set_icon( 0,get_icon("Plane","EditorIcons") ); } break; case Variant::_AABB: { @@ -2874,7 +2905,8 @@ void PropertyEditor::update_tree() { item->set_cell_mode( 1, TreeItem::CELL_MODE_CUSTOM ); item->set_editable( 1, true ); item->set_text(1,"AABB"); - item->set_icon( 0,get_icon("Rect3","EditorIcons") ); + if (show_type_icons) + item->set_icon( 0,get_icon("Rect3","EditorIcons") ); } break; case Variant::QUAT: { @@ -2882,7 +2914,8 @@ void PropertyEditor::update_tree() { item->set_cell_mode( 1, TreeItem::CELL_MODE_CUSTOM ); item->set_editable( 1, true ); item->set_text(1,obj->get(p.name)); - item->set_icon( 0,get_icon("Quat","EditorIcons") ); + if (show_type_icons) + item->set_icon( 0,get_icon("Quat","EditorIcons") ); } break; case Variant::COLOR: { @@ -2891,7 +2924,8 @@ void PropertyEditor::update_tree() { item->set_editable( 1, !read_only ); // item->set_text(1,obj->get(p.name)); item->set_custom_bg_color(1,obj->get(p.name)); - item->set_icon( 0,get_icon("Color","EditorIcons") ); + if (show_type_icons) + item->set_icon( 0,get_icon("Color","EditorIcons") ); } break; case Variant::IMAGE: { @@ -2903,7 +2937,8 @@ void PropertyEditor::update_tree() { item->set_text(1,"[Image (empty)]"); else item->set_text(1,"[Image "+itos(img.get_width())+"x"+itos(img.get_height())+"]"); - item->set_icon( 0,get_icon("Image","EditorIcons") ); + if (show_type_icons) + item->set_icon( 0,get_icon("Image","EditorIcons") ); } break; case Variant::NODE_PATH: { @@ -3583,6 +3618,7 @@ PropertyEditor::PropertyEditor() { use_doc_hints=false; use_filter=false; subsection_selectable=false; + show_type_icons=EDITOR_DEF("inspector/show_type_icons",false); } diff --git a/tools/editor/property_editor.h b/tools/editor/property_editor.h index f004616c08..e933d7ab3b 100644 --- a/tools/editor/property_editor.h +++ b/tools/editor/property_editor.h @@ -161,6 +161,7 @@ class PropertyEditor : public Control { bool keying; bool read_only; bool show_categories; + bool show_type_icons; float refresh_countdown; bool use_doc_hints; bool use_filter; diff --git a/tools/editor/script_editor_debugger.cpp b/tools/editor/script_editor_debugger.cpp index 60f2afa2c2..d0bf4faf02 100644 --- a/tools/editor/script_editor_debugger.cpp +++ b/tools/editor/script_editor_debugger.cpp @@ -571,10 +571,10 @@ void ScriptEditorDebugger::_notification(int p_what) { show(); + dobreak->set_disabled(false); tabs->set_current_tab(0); - emit_signal("show_debugger",true); reason->set_text("Child Process Connected"); reason->set_tooltip("Child Process Connected"); scene_tree->clear(); @@ -737,8 +737,10 @@ void ScriptEditorDebugger::stop(){ le_set->set_disabled(true); - hide(); - emit_signal("show_debugger",false); + if (hide_on_stop) { + hide(); + emit_signal("show_debugger",false); + } } @@ -768,9 +770,7 @@ void ScriptEditorDebugger::_stack_dump_frame_selected() { void ScriptEditorDebugger::_hide_request() { - hide(); emit_signal("show_debugger",false); - } void ScriptEditorDebugger::_output_clear() { @@ -1160,6 +1160,10 @@ void ScriptEditorDebugger:: _error_stack_selected(int p_idx){ } +void ScriptEditorDebugger::set_hide_on_stop(bool p_hide) { + + hide_on_stop=p_hide; +} void ScriptEditorDebugger::_bind_methods() { @@ -1462,6 +1466,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){ live_debug=false; last_path_id=false; error_count=0; + hide_on_stop=true; last_error_count=0; diff --git a/tools/editor/script_editor_debugger.h b/tools/editor/script_editor_debugger.h index 6b66a62dd5..43666b37d5 100644 --- a/tools/editor/script_editor_debugger.h +++ b/tools/editor/script_editor_debugger.h @@ -71,6 +71,8 @@ class ScriptEditorDebugger : public Control { int error_count; int last_error_count; + bool hide_on_stop; + TextureButton *tb; @@ -182,6 +184,7 @@ public: void update_live_edit_root(); + void set_hide_on_stop(bool p_hide); virtual Size2 get_minimum_size() const; ScriptEditorDebugger(EditorNode *p_editor=NULL); |