diff options
Diffstat (limited to 'tools/editor')
71 files changed, 545 insertions, 458 deletions
diff --git a/tools/editor/animation_editor.cpp b/tools/editor/animation_editor.cpp index bdf4e83236..cb95f5fb7d 100644 --- a/tools/editor/animation_editor.cpp +++ b/tools/editor/animation_editor.cpp @@ -198,7 +198,7 @@ public: static void _bind_methods() { - // ClassDB::bind_method("_update_obj",&AnimationKeyEdit::_update_obj); + //ClassDB::bind_method("_update_obj",&AnimationKeyEdit::_update_obj); ClassDB::bind_method("_gui_input",&AnimationCurveEdit::_gui_input); ADD_SIGNAL(MethodInfo("transition_changed")); } @@ -647,8 +647,10 @@ public: } break; } - //if (animation->track_get_type(track)!=Animation::TYPE_METHOD) - // p_list->push_back( PropertyInfo( Variant::REAL, "easing", PROPERTY_HINT_EXP_EASING)); + /* + if (animation->track_get_type(track)!=Animation::TYPE_METHOD) + p_list->push_back( PropertyInfo( Variant::REAL, "easing", PROPERTY_HINT_EXP_EASING)); + */ } UndoRedo *undo_redo; @@ -2641,8 +2643,10 @@ void AnimationKeyEditor::_track_editor_gui_input(const InputEvent& p_input) { for(Map<SelectedKey,KeyInfo>::Element *E=selection.back();E;E=E->prev()) { float newpos=E->get().pos-from_t+motion; - //if (newpos<0) - // continue; //no add at the begining + /* + if (newpos<0) + continue; //no add at the begining + */ undo_redo->add_do_method(animation.ptr(),"track_insert_key",E->key().track,newpos,animation->track_get_key_value(E->key().track,E->key().key),animation->track_get_key_transition(E->key().track,E->key().key)); } @@ -2651,8 +2655,10 @@ void AnimationKeyEditor::_track_editor_gui_input(const InputEvent& p_input) { for(Map<SelectedKey,KeyInfo>::Element *E=selection.back();E;E=E->prev()) { float newpos=E->get().pos+-from_t+motion; - //if (newpos<0) - // continue; //no remove what no inserted + /* + if (newpos<0) + continue; //no remove what no inserted + */ undo_redo->add_undo_method(animation.ptr(),"track_remove_key_at_pos",E->key().track,newpos); } @@ -2690,7 +2696,7 @@ void AnimationKeyEditor::_track_editor_gui_input(const InputEvent& p_input) { float oldpos=E->get().pos; float newpos=oldpos-from_t+motion; //if (newpos>=0) - undo_redo->add_do_method(this,"_select_at_anim",animation,E->key().track,newpos); + undo_redo->add_do_method(this,"_select_at_anim",animation,E->key().track,newpos); undo_redo->add_undo_method(this,"_select_at_anim",animation,E->key().track,oldpos); } @@ -3148,7 +3154,7 @@ void AnimationKeyEditor::_notification(int p_what) { } call_select->connect("selected",this,"_add_call_track"); -// rename_anim->set_icon( get_icon("Rename","EditorIcons") ); + //rename_anim->set_icon( get_icon("Rename","EditorIcons") ); /* edit_anim->set_icon( get_icon("Edit","EditorIcons") ); blend_anim->set_icon( get_icon("Blend","EditorIcons") ); @@ -3156,8 +3162,8 @@ void AnimationKeyEditor::_notification(int p_what) { stop->set_icon( get_icon("Stop","EditorIcons") ); pause->set_icon( get_icon("Pause","EditorIcons") ); */ -// menu->set_icon(get_icon("Animation","EditorIcons")); -// play->set_icon(get_icon("AnimationPlay","EditorIcons")); + //menu->set_icon(get_icon("Animation","EditorIcons")); + //play->set_icon(get_icon("AnimationPlay","EditorIcons")); //menu->set_icon(get_icon("Animation","EditorIcons")); _update_menu(); @@ -3920,7 +3926,7 @@ void AnimationKeyEditor::_bind_methods() { ClassDB::bind_method(_MD("set_root"),&AnimationKeyEditor::set_root); -// ClassDB::bind_method(_MD("_confirm_insert"),&AnimationKeyEditor::_confirm_insert); + //ClassDB::bind_method(_MD("_confirm_insert"),&AnimationKeyEditor::_confirm_insert); ClassDB::bind_method(_MD("_confirm_insert_list"),&AnimationKeyEditor::_confirm_insert_list); @@ -4143,9 +4149,9 @@ AnimationKeyEditor::AnimationKeyEditor() { /* l = memnew( Label ); l->set_text("Base: "); l->set_pos(Point2(0,3)); -// dr_panel->add_child(l);*/ + //dr_panel->add_child(l);*/ -// menu->get_popup()->connect("id_pressed",this,"_menu_callback"); + //menu->get_popup()->connect("id_pressed",this,"_menu_callback"); hb = memnew( HBoxContainer); diff --git a/tools/editor/asset_library_editor_plugin.cpp b/tools/editor/asset_library_editor_plugin.cpp index 12489ada0d..ad17364685 100644 --- a/tools/editor/asset_library_editor_plugin.cpp +++ b/tools/editor/asset_library_editor_plugin.cpp @@ -1462,7 +1462,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) { library_vb->set_h_size_flags(SIZE_EXPAND_FILL); library_vb_border->add_child(library_vb); -// margin_panel->set_stop_mouse(false); + //margin_panel->set_stop_mouse(false); asset_top_page = memnew( HBoxContainer ); library_vb->add_child(asset_top_page); diff --git a/tools/editor/call_dialog.cpp b/tools/editor/call_dialog.cpp index 054a5098f0..f8966093f6 100644 --- a/tools/editor/call_dialog.cpp +++ b/tools/editor/call_dialog.cpp @@ -283,7 +283,7 @@ CallDialog::CallDialog() { property_editor->set_anchor_and_margin( MARGIN_RIGHT, ANCHOR_END, 15 ); property_editor->set_anchor_and_margin( MARGIN_TOP, ANCHOR_BEGIN, 50 ); -// property_editor->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.55 ); + //property_editor->set_anchor_and_margin( MARGIN_LEFT, ANCHOR_RATIO, 0.55 ); property_editor->set_anchor_and_margin( MARGIN_BOTTOM, ANCHOR_END, 90 ); property_editor->get_scene_tree()->set_hide_root( true ); property_editor->hide_top_label(); diff --git a/tools/editor/code_editor.cpp b/tools/editor/code_editor.cpp index 343070375d..00767fd297 100644 --- a/tools/editor/code_editor.cpp +++ b/tools/editor/code_editor.cpp @@ -714,7 +714,7 @@ void FindReplaceDialog::_replace() { } text_edit->set_v_scroll(vsval); -// text_edit->set_h_scroll(hsval); + //text_edit->set_h_scroll(hsval); error_label->set_text(vformat(TTR("Replaced %d ocurrence(s)."),rc)); @@ -951,7 +951,7 @@ FindReplaceDialog::FindReplaceDialog() { VBoxContainer *rvb = memnew( VBoxContainer); opt_mg->add_child(rvb); replace_vb=rvb; -// rvb ->add_child(memnew(HSeparator)); + //rvb ->add_child(memnew(HSeparator)); rvb ->add_child(memnew(Label)); prompt = memnew( CheckButton ); diff --git a/tools/editor/connections_dialog.cpp b/tools/editor/connections_dialog.cpp index 6e53c32080..92dd206030 100644 --- a/tools/editor/connections_dialog.cpp +++ b/tools/editor/connections_dialog.cpp @@ -421,7 +421,7 @@ ConnectDialog::ConnectDialog() { -// dst_method_list->get_popup()->connect("id_pressed", this,"_dst_method_list_selected"); + //dst_method_list->get_popup()->connect("id_pressed", this,"_dst_method_list_selected"); tree->connect("node_selected", this,"_tree_node_selected"); set_as_toplevel(true); @@ -432,7 +432,7 @@ ConnectDialog::ConnectDialog() { add_child(error); error->get_ok()->set_text(TTR("Close")); get_ok()->set_text(TTR("Connect")); -// error->get_cancel()->set_text("Close"); + //error->get_cancel()->set_text("Close"); @@ -857,7 +857,7 @@ ConnectionsDock::ConnectionsDock(EditorNode *p_editor) { hb->add_spacer(); hb->add_child(connect_button); connect_button->connect("pressed",this,"_connect_pressed"); -// add_child(tree); + //add_child(tree); connect_dialog = memnew( ConnectDialog ); connect_dialog->set_as_toplevel(true); diff --git a/tools/editor/connections_dialog.h b/tools/editor/connections_dialog.h index 6f35cf3db0..64b292bc34 100644 --- a/tools/editor/connections_dialog.h +++ b/tools/editor/connections_dialog.h @@ -86,8 +86,8 @@ public: void set_dst_method(const StringName& p_method); void set_dst_node(Node* p_node); -// Button *get_ok() { return ok; } -// Button *get_cancel() { return cancel; } + //Button *get_ok() { return ok; } + //Button *get_cancel() { return cancel; } void edit(Node *p_node); ConnectDialog(); diff --git a/tools/editor/create_dialog.cpp b/tools/editor/create_dialog.cpp index 5a76439a5a..b69234e704 100644 --- a/tools/editor/create_dialog.cpp +++ b/tools/editor/create_dialog.cpp @@ -694,7 +694,7 @@ CreateDialog::CreateDialog() { set_hide_on_ok(false); search_options->connect("item_activated",this,"_confirmed"); search_options->connect("cell_selected",this,"_item_selected"); -// search_options->set_hide_root(true); + //search_options->set_hide_root(true); base_type="Object"; help_bit = memnew( EditorHelpBit ); diff --git a/tools/editor/editor_data.cpp b/tools/editor/editor_data.cpp index 710d955326..08b03ae65f 100644 --- a/tools/editor/editor_data.cpp +++ b/tools/editor/editor_data.cpp @@ -524,8 +524,10 @@ void EditorData::remove_scene(int p_idx){ bool EditorData::_find_updated_instances(Node* p_root,Node *p_node,Set<String> &checked_paths) { -// if (p_root!=p_node && p_node->get_owner()!=p_root && !p_root->is_editable_instance(p_node->get_owner())) -// return false; + /* + if (p_root!=p_node && p_node->get_owner()!=p_root && !p_root->is_editable_instance(p_node->get_owner())) + return false; + */ Ref<SceneState> ss; @@ -814,7 +816,7 @@ EditorData::EditorData() { current_edited_scene=-1; -// load_imported_scenes_from_globals(); + //load_imported_scenes_from_globals(); } /////////// diff --git a/tools/editor/editor_dir_dialog.cpp b/tools/editor/editor_dir_dialog.cpp index 352aba08bb..e2b7d475b0 100644 --- a/tools/editor/editor_dir_dialog.cpp +++ b/tools/editor/editor_dir_dialog.cpp @@ -255,7 +255,7 @@ EditorDirDialog::EditorDirDialog() { VBoxContainer *makevb= memnew( VBoxContainer ); makedialog->add_child(makevb); -// makedialog->set_child_rect(makevb); + //makedialog->set_child_rect(makevb); makedirname = memnew( LineEdit ); makevb->add_margin_child(TTR("Name:"),makedirname); diff --git a/tools/editor/editor_file_dialog.cpp b/tools/editor/editor_file_dialog.cpp index 5efbb17ee4..d4ca515493 100644 --- a/tools/editor/editor_file_dialog.cpp +++ b/tools/editor/editor_file_dialog.cpp @@ -713,8 +713,10 @@ void EditorFileDialog::update_file_list() { } // ?? - //if (tree->get_root() && tree->get_root()->get_children()) - // tree->get_root()->get_children()->select(0); + /* + if (tree->get_root() && tree->get_root()->get_children()) + tree->get_root()->get_children()->select(0); + */ files.clear(); diff --git a/tools/editor/editor_file_system.cpp b/tools/editor/editor_file_system.cpp index 03c7b7f74c..4a79a208e2 100644 --- a/tools/editor/editor_file_system.cpp +++ b/tools/editor/editor_file_system.cpp @@ -378,7 +378,7 @@ void EditorFileSystem::_scan_filesystem() { //save back the findings -// String fscache = EditorSettings::get_singleton()->get_project_settings_path().plus_file("file_cache"); + //String fscache = EditorSettings::get_singleton()->get_project_settings_path().plus_file("file_cache"); f=FileAccess::open(fscache,FileAccess::WRITE); _save_filesystem_cache(new_filesystem,f); @@ -502,7 +502,7 @@ void EditorFileSystem::scan() { _scan_filesystem(); if (filesystem) memdelete(filesystem); -// file_type_cache.clear(); + //file_type_cache.clear(); filesystem=new_filesystem; new_filesystem=NULL; _update_scan_actions(); diff --git a/tools/editor/editor_fonts.cpp b/tools/editor/editor_fonts.cpp index 3e128e7759..3c846fc538 100644 --- a/tools/editor/editor_fonts.cpp +++ b/tools/editor/editor_fonts.cpp @@ -127,9 +127,9 @@ void editor_register_fonts(Ref<Theme> p_theme) { p_theme->set_default_theme_font(df); -// Ref<BitmapFont> doc_font = make_font(_bi_font_doc_font_height,_bi_font_doc_font_ascent,0,_bi_font_doc_font_charcount,_bi_font_doc_font_characters,p_theme->get_icon("DocFont","EditorIcons")); -// Ref<BitmapFont> doc_title_font = make_font(_bi_font_doc_title_font_height,_bi_font_doc_title_font_ascent,0,_bi_font_doc_title_font_charcount,_bi_font_doc_title_font_characters,p_theme->get_icon("DocTitleFont","EditorIcons")); -// Ref<BitmapFont> doc_code_font = make_font(_bi_font_doc_code_font_height,_bi_font_doc_code_font_ascent,0,_bi_font_doc_code_font_charcount,_bi_font_doc_code_font_characters,p_theme->get_icon("DocCodeFont","EditorIcons")); + //Ref<BitmapFont> doc_font = make_font(_bi_font_doc_font_height,_bi_font_doc_font_ascent,0,_bi_font_doc_font_charcount,_bi_font_doc_font_characters,p_theme->get_icon("DocFont","EditorIcons")); + //Ref<BitmapFont> doc_title_font = make_font(_bi_font_doc_title_font_height,_bi_font_doc_title_font_ascent,0,_bi_font_doc_title_font_charcount,_bi_font_doc_title_font_characters,p_theme->get_icon("DocTitleFont","EditorIcons")); + //Ref<BitmapFont> doc_code_font = make_font(_bi_font_doc_code_font_height,_bi_font_doc_code_font_ascent,0,_bi_font_doc_code_font_charcount,_bi_font_doc_code_font_characters,p_theme->get_icon("DocCodeFont","EditorIcons")); MAKE_DROID_SANS(df_title,int(EDITOR_DEF("text_editor/help/help_title_font_size",18))*EDSCALE); diff --git a/tools/editor/editor_help.cpp b/tools/editor/editor_help.cpp index 7a2a53c929..f96a02bc52 100644 --- a/tools/editor/editor_help.cpp +++ b/tools/editor/editor_help.cpp @@ -334,7 +334,7 @@ EditorHelpSearch::EditorHelpSearch() { search_options->connect("item_activated",this,"_confirmed"); set_title(TTR("Search Help")); -// search_options->set_hide_root(true); + //search_options->set_hide_root(true); } @@ -349,8 +349,10 @@ void EditorHelpIndex::add_type(const String& p_type,HashMap<String,TreeItem*>& p if (p_types.has(p_type)) return; -// if (!ClassDB::is_type(p_type,base) || p_type==base) -// return; + /* + if (!ClassDB::is_type(p_type,base) || p_type==base) + return; + */ String inherits=EditorHelp::get_doc_data()->class_list[p_type].inherits; @@ -571,15 +573,15 @@ void EditorHelp::_button_pressed(int p_idx) { if (p_idx==PAGE_CLASS_LIST) { - // edited_class->set_pressed(false); - // class_list_button->set_pressed(true); - // tabs->set_current_tab(PAGE_CLASS_LIST); + //edited_class->set_pressed(false); + //class_list_button->set_pressed(true); + //tabs->set_current_tab(PAGE_CLASS_LIST); } else if (p_idx==PAGE_CLASS_DESC) { - // edited_class->set_pressed(true); - // class_list_button->set_pressed(false); - // tabs->set_current_tab(PAGE_CLASS_DESC); + //edited_class->set_pressed(true); + //class_list_button->set_pressed(false); + //tabs->set_current_tab(PAGE_CLASS_DESC); } else if (p_idx==PAGE_CLASS_PREV) { @@ -619,7 +621,7 @@ void EditorHelp::_class_desc_select(const String& p_select) { -// print_line("LINK: "+p_select); + //print_line("LINK: "+p_select); if (p_select.begins_with("#")) { //_goto_desc(p_select.substr(1,p_select.length())); emit_signal("go_to_help","class_name:"+p_select.substr(1,p_select.length())); @@ -824,7 +826,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { class_desc->add_text(TTR("Members:")); class_desc->pop(); class_desc->pop(); -// class_desc->add_newline(); + //class_desc->add_newline(); class_desc->push_indent(1); class_desc->push_table(2); @@ -924,7 +926,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { class_desc->pop(); //class_desc->add_newline(); -// class_desc->add_newline(); + //class_desc->add_newline(); class_desc->push_indent(1); class_desc->push_table(2); @@ -997,7 +999,7 @@ Error EditorHelp::_goto_desc(const String& p_class,int p_vscr) { } class_desc->pop();//monofont -// class_desc->add_newline(); + //class_desc->add_newline(); class_desc->pop(); //cell } @@ -1734,8 +1736,8 @@ void EditorHelp::_notification(int p_what) { case NOTIFICATION_READY: { -// forward->set_icon(get_icon("Forward","EditorIcons")); -// back->set_icon(get_icon("Back","EditorIcons")); + //forward->set_icon(get_icon("Forward","EditorIcons")); + //back->set_icon(get_icon("Back","EditorIcons")); _update_doc(); } break; @@ -1789,7 +1791,7 @@ void EditorHelp::_bind_methods() { ClassDB::bind_method("_class_list_select",&EditorHelp::_class_list_select); ClassDB::bind_method("_class_desc_select",&EditorHelp::_class_desc_select); ClassDB::bind_method("_class_desc_input",&EditorHelp::_class_desc_input); -// ClassDB::bind_method("_button_pressed",&EditorHelp::_button_pressed); + //ClassDB::bind_method("_button_pressed",&EditorHelp::_button_pressed); ClassDB::bind_method("_scroll_changed",&EditorHelp::_scroll_changed); ClassDB::bind_method("_request_help",&EditorHelp::_request_help); ClassDB::bind_method("_unhandled_key_input",&EditorHelp::_unhandled_key_input); @@ -1852,7 +1854,7 @@ EditorHelp::EditorHelp() { editor->get_gui_base()->add_child(class_search); class_search->connect("go_to_help",this,"_help_callback");*/ -// prev_search_page=-1; + //prev_search_page=-1; } EditorHelp::~EditorHelp() { @@ -1872,8 +1874,7 @@ void EditorHelpBit::_go_to_help(String p_what) { void EditorHelpBit::_meta_clicked(String p_select) { - - // print_line("LINK: "+p_select); + //print_line("LINK: "+p_select); if (p_select.begins_with("#")) { //_goto_desc(p_select.substr(1,p_select.length())); _go_to_help("class_name:"+p_select.substr(1,p_select.length())); @@ -1887,10 +1888,11 @@ void EditorHelpBit::_meta_clicked(String p_select) { _go_to_help("class_method:"+m.get_slice(".",0)+":"+m.get_slice(".",0)); } else { -// - // if (!method_line.has(m)) - // return; - //class_desc->scroll_to_line(method_line[m]); + /* + if (!method_line.has(m)) + return; + class_desc->scroll_to_line(method_line[m]); + */ } } diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp index cc64ffb103..cf83052ee0 100644 --- a/tools/editor/editor_import_export.cpp +++ b/tools/editor/editor_import_export.cpp @@ -89,7 +89,7 @@ void EditorImportPlugin::_bind_methods() { ClassDB::add_virtual_method(get_class_static(),MethodInfo("reimport_multiple_files",PropertyInfo(Variant::POOL_STRING_ARRAY,"files"))); ClassDB::add_virtual_method(get_class_static(),MethodInfo(Variant::BOOL,"can_reimport_multiple_files")); -// BIND_VMETHOD( mi ); + //BIND_VMETHOD( mi ); } String EditorImportPlugin::get_name() const { @@ -420,11 +420,12 @@ Vector<StringName> EditorExportPlatform::get_dependencies(bool p_bundles) const { List<String> l; - // SceneLoader::get_recognized_extensions(&l); - // for(List<String>::Element *E=l.front();E;E=E->next()) { - // - // scene_extensions.insert(E->get()); - // } + /* + SceneLoader::get_recognized_extensions(&l); + for(List<String>::Element *E=l.front();E;E=E->next()) { + scene_extensions.insert(E->get()); + } + */ ResourceLoader::get_recognized_extensions_for_type("",&l); for(List<String>::Element *E=l.front();E;E=E->next()) { @@ -921,7 +922,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func options["lossy_quality"]=group_lossy_quality; options["shrink"]=EditorImportExport::get_singleton()->image_export_group_get_shrink(E->get()); options["image_format"]=group_format; -// f->store_line(options.to_json()); + //f->store_line(options.to_json()); f->store_line(image_list_md5); } @@ -958,7 +959,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func if (f) { //recreating deps.. String depline; -// depline=String(F->get())+"::"+itos(FileAccess::get_modified_time(F->get()))+"::"+FileAccess::get_md5(F->get()); name unneccesary by top md5 + //depline=String(F->get())+"::"+itos(FileAccess::get_modified_time(F->get()))+"::"+FileAccess::get_md5(F->get()); name unneccesary by top md5 depline=itos(FileAccess::get_modified_time(F->get()))+"::"+FileAccess::get_md5(F->get()); depline+="::"+itos(region.pos.x)+"::"+itos(region.pos.y)+"::"+itos(region.size.x)+"::"+itos(region.size.y); depline+="::"+itos(margin.pos.x)+"::"+itos(margin.pos.y)+"::"+itos(margin.size.x)+"::"+itos(margin.size.y); diff --git a/tools/editor/editor_log.cpp b/tools/editor/editor_log.cpp index 01068e78fc..fd2da2e4c0 100644 --- a/tools/editor/editor_log.cpp +++ b/tools/editor/editor_log.cpp @@ -44,8 +44,10 @@ void EditorLog::_error_handler(void *p_self, const char*p_func, const char*p_fil err_str=String(p_file)+":"+itos(p_line)+" - "+String(p_error); } -// if (!self->is_visible_in_tree()) -// self->emit_signal("show_request"); + /* + if (!self->is_visible_in_tree()) + self->emit_signal("show_request"); + */ err_str=" "+err_str; self->log->add_newline(); @@ -129,7 +131,7 @@ void EditorLog::add_message(const String& p_msg,bool p_error) { log->add_newline(); log->add_text(p_msg); -// button->set_text(p_msg); + //button->set_text(p_msg); if (p_error) log->pop(); diff --git a/tools/editor/editor_log.h b/tools/editor/editor_log.h index 914b5d0c57..965d8d6420 100644 --- a/tools/editor/editor_log.h +++ b/tools/editor/editor_log.h @@ -48,7 +48,7 @@ class EditorLog : public VBoxContainer { Label *title; RichTextLabel *log; HBoxContainer *title_hb; -// PaneDrag *pd; + //PaneDrag *pd; Control *ec; PanelContainer *pc; @@ -58,7 +58,7 @@ class EditorLog : public VBoxContainer { Thread::ID current; -// void _dragged(const Point2& p_ofs); + //void _dragged(const Point2& p_ofs); void _clear_request(); static void _undo_redo_cbk(void *p_self,const String& p_name); protected: diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp index 57f9c46381..e3c7cc40dc 100644 --- a/tools/editor/editor_node.cpp +++ b/tools/editor/editor_node.cpp @@ -557,8 +557,10 @@ void EditorNode::save_resource_in_path(const Ref<Resource>& p_resource,const Str int flg=0; if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) flg|=ResourceSaver::FLAG_COMPRESS; - //if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative")) - // flg|=ResourceSaver::FLAG_RELATIVE_PATHS; + /* + if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative")) + flg|=ResourceSaver::FLAG_RELATIVE_PATHS; + */ String path = GlobalConfig::get_singleton()->localize_path(p_path); Error err = ResourceSaver::save(path,p_resource,flg|ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS); @@ -568,7 +570,7 @@ void EditorNode::save_resource_in_path(const Ref<Resource>& p_resource,const Str accept->popup_centered_minsize(); return; } -// EditorFileSystem::get_singleton()->update_file(path,p_resource->get_type()); + //EditorFileSystem::get_singleton()->update_file(path,p_resource->get_type()); ((Resource*)p_resource.ptr())->set_path(path); emit_signal("resource_saved",p_resource); @@ -770,7 +772,7 @@ bool EditorNode::_find_and_save_resource(RES res,Map<RES,bool>& processed,int32_ bool subchanged = _find_and_save_edited_subresources(res.ptr(),processed,flags); -// print_line("checking if edited: "+res->get_type()+" :: "+res->get_name()+" :: "+res->get_path()+" :: "+itos(changed)+" :: SR "+itos(subchanged)); + //print_line("checking if edited: "+res->get_type()+" :: "+res->get_name()+" :: "+res->get_path()+" :: "+itos(changed)+" :: SR "+itos(subchanged)); if (res->get_path().is_resource_file()) { if (changed || subchanged) { @@ -1005,8 +1007,10 @@ void EditorNode::_save_scene(String p_file, int idx) { int flg=0; if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) flg|=ResourceSaver::FLAG_COMPRESS; - //if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative")) - // flg|=ResourceSaver::FLAG_RELATIVE_PATHS; + /* + if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative")) + flg|=ResourceSaver::FLAG_RELATIVE_PATHS; + */ flg|=ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS; @@ -1245,7 +1249,7 @@ void EditorNode::_dialog_action(String p_file) { ml = Ref<MeshLibrary>( memnew( MeshLibrary )); } -// MeshLibraryEditor::update_library_file(editor_data.get_edited_scene_root(),ml,true); + //MeshLibraryEditor::update_library_file(editor_data.get_edited_scene_root(),ml,true); Error err = ResourceSaver::save(p_file,ml); if (err) { @@ -1344,9 +1348,11 @@ void EditorNode::_dialog_action(String p_file) { unzCloseCurrentFile(pkg); print_line(fname); - //for(int i=0;i<512;i++) { - // print_line(itos(data[i])); - //} + /* + for(int i=0;i<512;i++) { + print_line(itos(data[i])); + } + */ file=file.get_file(); @@ -2506,8 +2512,8 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) { editor_data.get_undo_redo().add_undo_method(parent,"remove_child",instanced_scene); editor_data.get_undo_redo().commit_action(); -// parent->add_child(instanced_scene); -// instanced_scene->set_owner(edited_scene); + //parent->add_child(instanced_scene); + //instanced_scene->set_owner(edited_scene); _last_instanced_scene=instanced_scene; } break; @@ -3176,15 +3182,17 @@ void EditorNode::_remove_edited_scene() { _update_title(); _update_scene_tabs(); -// if (editor_data.get_edited_scene_count()==1) { -// //make new scene appear saved -// set_current_version(editor_data.get_undo_redo().get_version()); -// unsaved_cache=false; -// } + /* + if (editor_data.get_edited_scene_count()==1) { + //make new scene appear saved + set_current_version(editor_data.get_undo_redo().get_version()); + unsaved_cache=false; + } + */ } void EditorNode::_remove_scene(int index) { -// printf("Attempting to remove scene %d (current is %d)\n", index, editor_data.get_edited_scene()); + //printf("Attempting to remove scene %d (current is %d)\n", index, editor_data.get_edited_scene()); if (editor_data.get_edited_scene() == index) { //Scene to remove is current scene @@ -3278,8 +3286,8 @@ Error EditorNode::save_translatable_strings(const String& p_to_file) { f->store_line("msgstr \"\""); f->store_line("\"Report-Msgid-Bugs-To: <define>\\n\""); f->store_line("\"POT-Creation-Date: "+itos(date.year)+"-"+itos(date.month)+"-"+itos(date.day)+" "+itos(time.hour)+":"+itos(time.min)+"0000\\n\""); -// f->store_line("\"PO-Revision-Date: 2006-08-30 13:56-0700\\n\""); -// f->store_line("\"Last-Translator: Rubén C. DÃaz Alonso <outime@gmail.com>\\n\""); + //f->store_line("\"PO-Revision-Date: 2006-08-30 13:56-0700\\n\""); + //f->store_line("\"Last-Translator: Rubén C. DÃaz Alonso <outime@gmail.com>\\n\""); f->store_line("\"Language-Team: <define>\\n\""); f->store_line("\"MIME-Version: 1.0\\n\""); f->store_line("\"Content-Type: text/plain; charset=UTF-8\\n\""); @@ -3400,8 +3408,10 @@ Error EditorNode::save_optimized_copy(const String& p_scene,const String& p_pres uint32_t flags=0; -// if (saver->is_bundle_scenes_enabled()) -// flags|=ResourceSaver::FLAG_BUNDLE_INSTANCED_SCENES; + /* + if (saver->is_bundle_scenes_enabled()) + flags|=ResourceSaver::FLAG_BUNDLE_INSTANCED_SCENES; + */ if (saver->is_bundle_resources_enabled()) flags|=ResourceSaver::FLAG_BUNDLE_RESOURCES; if (saver->is_remove_editor_data_enabled()) @@ -3784,8 +3794,10 @@ Error EditorNode::load_scene(const String& p_scene, bool p_ignore_broken_deps,bo state->set_path(lpath); new_scene->set_scene_inherited_state(state); new_scene->set_filename(String()); - //if (new_scene->get_scene_instance_state().is_valid()) - // new_scene->get_scene_instance_state()->set_path(String()); + /* + if (new_scene->get_scene_instance_state().is_valid()) + new_scene->get_scene_instance_state()->set_path(String()); + */ } new_scene->set_scene_instance_state(Ref<SceneState>()); @@ -3801,7 +3813,7 @@ Error EditorNode::load_scene(const String& p_scene, bool p_ignore_broken_deps,bo */ editor_data.set_edited_scene_import_metadata( sdata->get_import_metadata() ); -// editor_data.get_undo_redo().clear_history(); + //editor_data.get_undo_redo().clear_history(); saved_version=editor_data.get_undo_redo().get_version(); _update_title(); _update_scene_tabs(); @@ -3893,17 +3905,17 @@ void EditorNode::update_keying() { void EditorNode::_close_messages() { -// left_split->set_dragger_visible(false); + //left_split->set_dragger_visible(false); old_split_ofs = center_split->get_split_offset(); center_split->set_split_offset(0); -// scene_root_parent->set_anchor_and_margin(MARGIN_BOTTOM,Control::ANCHOR_END,0); + //scene_root_parent->set_anchor_and_margin(MARGIN_BOTTOM,Control::ANCHOR_END,0); } void EditorNode::_show_messages() { -// left_split->set_dragger_visible(true); + //left_split->set_dragger_visible(true); center_split->set_split_offset(old_split_ofs); -// scene_root_parent->set_anchor_and_margin(MARGIN_BOTTOM,Control::ANCHOR_END,log->get_margin(MARGIN_TOP)); + //scene_root_parent->set_anchor_and_margin(MARGIN_BOTTOM,Control::ANCHOR_END,log->get_margin(MARGIN_TOP)); } @@ -3934,7 +3946,7 @@ void EditorNode::animation_editor_make_visible(bool p_visible) { } else { //pd_anim->hide(); animation_editor->hide(); -// scene_root_parent->set_margin(MARGIN_TOP,0); + //scene_root_parent->set_margin(MARGIN_TOP,0); if (!animation_vb->get_parent_control()) return; animation_vb->get_parent_control()->minimum_size_changed(); @@ -3989,7 +4001,7 @@ void EditorNode::_open_recent_scene(int p_idx) { void EditorNode::_save_optimized() { -// save_optimized_copy(optimized_save->get_optimized_scene(),optimized_save->get_preset()); + //save_optimized_copy(optimized_save->get_optimized_scene(),optimized_save->get_preset()); #if 0 String path = optimized_save->get_optimized_scene(); @@ -4159,7 +4171,7 @@ void EditorNode::register_editor_types() { //ClassDB::register_type<EditorImporter>(); -// ClassDB::register_type<EditorPostImport>(); + //ClassDB::register_type<EditorPostImport>(); } void EditorNode::unregister_editor_types() { @@ -5308,9 +5320,9 @@ void EditorNode::_bind_methods() { ClassDB::bind_method("_import_action",&EditorNode::_import_action); //ClassDB::bind_method("_import",&EditorNode::_import); -// ClassDB::bind_method("_import_conflicts_solved",&EditorNode::_import_conflicts_solved); + //ClassDB::bind_method("_import_conflicts_solved",&EditorNode::_import_conflicts_solved); ClassDB::bind_method("_open_recent_scene",&EditorNode::_open_recent_scene); -// ClassDB::bind_method("_open_recent_scene_confirm",&EditorNode::_open_recent_scene_confirm); + //ClassDB::bind_method("_open_recent_scene_confirm",&EditorNode::_open_recent_scene_confirm); ClassDB::bind_method("_save_optimized",&EditorNode::_save_optimized); @@ -5517,7 +5529,7 @@ EditorNode::EditorNode() { menu_hb = memnew( HBoxContainer ); main_vbox->add_child(menu_hb); -// top_dark_vb->add_child(scene_tabs); + //top_dark_vb->add_child(scene_tabs); //left left_l_hsplit = memnew( HSplitContainer ); main_vbox->add_child(left_l_hsplit); @@ -5701,7 +5713,7 @@ EditorNode::EditorNode() { scene_root->set_as_audio_listener_2d(true); //scene_root->set_size_override(true,Size2(GlobalConfig::get_singleton()->get("display/width"),GlobalConfig::get_singleton()->get("display/height"))); -// scene_root->set_world_2d( Ref<World2D>( memnew( World2D )) ); + //scene_root->set_world_2d( Ref<World2D>( memnew( World2D )) ); viewport = memnew( VBoxContainer ); @@ -5934,8 +5946,8 @@ EditorNode::EditorNode() { native_play_button->get_popup()->connect("id_pressed",this,"_run_in_device"); run_native->connect("native_run",this,"_menu_option",varray(RUN_PLAY_NATIVE)); -// VSeparator *s1 = memnew( VSeparator ); -// play_hb->add_child(s1); + //VSeparator *s1 = memnew( VSeparator ); + //play_hb->add_child(s1); play_scene_button = memnew( ToolButton ); play_hb->add_child(play_scene_button); @@ -6322,8 +6334,8 @@ EditorNode::EditorNode() { bottom_pc->add_child(bottom_hb);*/ -// center_vb->add_child( log->get_button() ); -// log->get_button()->set_h_size_flags(Control::SIZE_EXPAND_FILL); + //center_vb->add_child( log->get_button() ); + //log->get_button()->set_h_size_flags(Control::SIZE_EXPAND_FILL); //progress_hb->set_h_size_flags(Control::SIZE_EXPAND_FILL); @@ -6371,7 +6383,7 @@ EditorNode::EditorNode() { -// optimized_save = memnew( OptimizedSaveDialog(&editor_data) ); + //optimized_save = memnew( OptimizedSaveDialog(&editor_data) ); //gui_base->add_child(optimized_save); //optimized_save->connect("confirmed",this,"_save_optimized"); @@ -6524,8 +6536,8 @@ EditorNode::EditorNode() { Ref<EditorSceneImportPlugin> _scene_import = memnew(EditorSceneImportPlugin(this) ); Ref<EditorSceneImporterCollada> _collada_import = memnew( EditorSceneImporterCollada); _scene_import->add_importer(_collada_import); -// Ref<EditorSceneImporterFBXConv> _fbxconv_import = memnew( EditorSceneImporterFBXConv); -// _scene_import->add_importer(_fbxconv_import); + //Ref<EditorSceneImporterFBXConv> _fbxconv_import = memnew( EditorSceneImporterFBXConv); + //_scene_import->add_importer(_fbxconv_import); editor_import_export->add_import_plugin( _scene_import); // TODO: This plugin has no code, it should be either implemented or dropped (GH-3667) // editor_import_export->add_import_plugin( Ref<EditorSceneAnimationImportPlugin>( memnew(EditorSceneAnimationImportPlugin(this)))); @@ -6569,14 +6581,14 @@ EditorNode::EditorNode() { add_editor_plugin( memnew( MeshInstanceEditorPlugin(this) ) ); add_editor_plugin( memnew( AnimationTreeEditorPlugin(this) ) ); //add_editor_plugin( memnew( SamplePlayerEditorPlugin(this) ) ); - this is kind of useless at this point -// add_editor_plugin( memnew( MeshLibraryEditorPlugin(this) ) ); + //add_editor_plugin( memnew( MeshLibraryEditorPlugin(this) ) ); //add_editor_plugin( memnew( StreamEditorPlugin(this) ) ); add_editor_plugin( memnew( StyleBoxEditorPlugin(this) ) ); //add_editor_plugin( memnew( ParticlesEditorPlugin(this) ) ); add_editor_plugin( memnew( ResourcePreloaderEditorPlugin(this) ) ); add_editor_plugin( memnew( ItemListEditorPlugin(this) ) ); //add_editor_plugin( memnew( RichTextEditorPlugin(this) ) ); -// add_editor_plugin( memnew( CollisionPolygonEditorPlugin(this) ) ); + //add_editor_plugin( memnew( CollisionPolygonEditorPlugin(this) ) ); add_editor_plugin( memnew( CollisionPolygon2DEditorPlugin(this) ) ); add_editor_plugin( memnew( TileSetEditorPlugin(this) ) ); add_editor_plugin( memnew( TileMapEditorPlugin(this) ) ); @@ -6585,7 +6597,7 @@ EditorNode::EditorNode() { add_editor_plugin( memnew( Particles2DEditorPlugin(this) ) ); add_editor_plugin( memnew( GIProbeEditorPlugin(this) ) ); add_editor_plugin( memnew( Path2DEditorPlugin(this) ) ); -// add_editor_plugin( memnew( PathEditorPlugin(this) ) ); + //add_editor_plugin( memnew( PathEditorPlugin(this) ) ); //add_editor_plugin( memnew( BakedLightEditorPlugin(this) ) ); add_editor_plugin( memnew( Polygon2DEditorPlugin(this) ) ); add_editor_plugin( memnew( LightOccluder2DEditorPlugin(this) ) ); @@ -6593,8 +6605,8 @@ EditorNode::EditorNode() { add_editor_plugin( memnew( ColorRampEditorPlugin(this) ) ); add_editor_plugin( memnew( CollisionShape2DEditorPlugin(this) ) ); add_editor_plugin( memnew( TextureEditorPlugin(this) ) ); -// add_editor_plugin( memnew( MaterialEditorPlugin(this) ) ); -// add_editor_plugin( memnew( MeshEditorPlugin(this) ) ); + //add_editor_plugin( memnew( MaterialEditorPlugin(this) ) ); + //add_editor_plugin( memnew( MeshEditorPlugin(this) ) ); for(int i=0;i<EditorPlugins::get_plugin_count();i++) add_editor_plugin( EditorPlugins::create(i,this) ); @@ -6622,7 +6634,7 @@ EditorNode::EditorNode() { editor_plugin_screen=NULL; editor_plugins_over = memnew(EditorPluginList); -// force_top_viewport(true); + //force_top_viewport(true); _edit_current(); current=NULL; @@ -6631,7 +6643,7 @@ EditorNode::EditorNode() { ScriptServer::set_scripting_enabled(false); // no scripting by default if editor -// GlobalConfig::get_singleton()->set("render/room_cull_enabled",false); + //GlobalConfig::get_singleton()->set("render/room_cull_enabled",false); reference_resource_mem=true; save_external_resources_mem=true; @@ -6684,9 +6696,9 @@ EditorNode::EditorNode() { set_process_unhandled_input(true); _playing_edited=false; -// Panel *errors = memnew( Panel ); + //Panel *errors = memnew( Panel ); load_errors = memnew( RichTextLabel ); -// load_errors->set_readonly(true); + //load_errors->set_readonly(true); load_error_dialog = memnew( AcceptDialog ); load_error_dialog->add_child(load_errors); load_error_dialog->set_title(TTR("Load Errors")); @@ -6722,8 +6734,8 @@ EditorNode::EditorNode() { pick_main_scene->get_ok()->set_text("Select"); pick_main_scene->connect("confirmed",this,"_menu_option",varray(SETTINGS_PICK_MAIN_SCENE)); -// Ref<ImageTexture> it = gui_base->get_icon("logo","Icons"); -// OS::get_singleton()->set_icon( it->get_data() ); + //Ref<ImageTexture> it = gui_base->get_icon("logo","Icons"); + //OS::get_singleton()->set_icon( it->get_data() ); for(int i=0;i<_init_callbacks.size();i++) _init_callbacks[i](); diff --git a/tools/editor/editor_node.h b/tools/editor/editor_node.h index 2cb1cd00ab..dd5ff1e175 100644 --- a/tools/editor/editor_node.h +++ b/tools/editor/editor_node.h @@ -286,7 +286,7 @@ private: CreateDialog *create_dialog; -// CallDialog *call_dialog; + //CallDialog *call_dialog; ConfirmationDialog *confirmation; ConfirmationDialog *import_confirmation; ConfirmationDialog *open_recent_confirmation; diff --git a/tools/editor/editor_profiler.cpp b/tools/editor/editor_profiler.cpp index 8522012113..5279711b0f 100644 --- a/tools/editor/editor_profiler.cpp +++ b/tools/editor/editor_profiler.cpp @@ -724,7 +724,7 @@ EditorProfiler::EditorProfiler() int metric_size=CLAMP(int(EDITOR_DEF("debugger/profiler_frame_history_size",600)),60,1024); frame_metrics.resize(metric_size); last_metric=-1; -// cursor_metric=-1; + //cursor_metric=-1; hover_metric=-1; @@ -750,6 +750,6 @@ EditorProfiler::EditorProfiler() seeking=false; graph_height=1; -// activate->set_disabled(true); + //activate->set_disabled(true); } diff --git a/tools/editor/editor_run_script.cpp b/tools/editor/editor_run_script.cpp index c8f3f9fc5d..4a3cbfbccb 100644 --- a/tools/editor/editor_run_script.cpp +++ b/tools/editor/editor_run_script.cpp @@ -46,7 +46,7 @@ void EditorScript::add_root_node(Node *p_node) { return; } -// editor->set_edited_scene(p_node); + //editor->set_edited_scene(p_node); } Node *EditorScript::get_scene() { diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp index 2d6618f449..807183ae46 100644 --- a/tools/editor/editor_settings.cpp +++ b/tools/editor/editor_settings.cpp @@ -1105,7 +1105,7 @@ EditorSettings::EditorSettings() { EditorSettings::~EditorSettings() { -// singleton=NULL; + //singleton=NULL; } Ref<ShortCut> ED_GET_SHORTCUT(const String& p_path) { diff --git a/tools/editor/editor_sub_scene.cpp b/tools/editor/editor_sub_scene.cpp index 5c40108f93..34c3d47006 100644 --- a/tools/editor/editor_sub_scene.cpp +++ b/tools/editor/editor_sub_scene.cpp @@ -203,7 +203,7 @@ EditorSubScene::EditorSubScene() { VBoxContainer *vb = memnew( VBoxContainer ); add_child(vb); -// set_child_rect(vb); + //set_child_rect(vb); HBoxContainer *hb = memnew( HBoxContainer ); path = memnew( LineEdit ); diff --git a/tools/editor/filesystem_dock.cpp b/tools/editor/filesystem_dock.cpp index cd13d93cf5..2df5a00e9d 100644 --- a/tools/editor/filesystem_dock.cpp +++ b/tools/editor/filesystem_dock.cpp @@ -1149,7 +1149,7 @@ void FileSystemDock::_open_pressed(){ current_path->set_text(path); _push_to_history(); -// emit_signal("open",path); + //emit_signal("open",path); } @@ -1242,8 +1242,10 @@ Variant FileSystemDock::get_drag_data_fw(const Point2& p_point,Control* p_from) if (seldirs.empty() && selfiles.empty()) return Variant(); - //if (seldirs.size() && selfiles.size()) - // return Variant(); //can't really mix files and dirs (i think?) - yes you can, commenting + /* + if (seldirs.size() && selfiles.size()) + return Variant(); //can't really mix files and dirs (i think?) - yes you can, commenting + */ /*if (selfiles.size()==1) { Ref<Resource> resource = ResourceLoader::load(files->get_item_metadata(selfiles.front()->get())); @@ -1622,7 +1624,7 @@ void FileSystemDock::_bind_methods() { ClassDB::bind_method(_MD("_update_tree"),&FileSystemDock::_update_tree); ClassDB::bind_method(_MD("_rescan"),&FileSystemDock::_rescan); ClassDB::bind_method(_MD("_favorites_pressed"),&FileSystemDock::_favorites_pressed); -// ClassDB::bind_method(_MD("_instance_pressed"),&ScenesDock::_instance_pressed); + //ClassDB::bind_method(_MD("_instance_pressed"),&ScenesDock::_instance_pressed); ClassDB::bind_method(_MD("_open_pressed"),&FileSystemDock::_open_pressed); ClassDB::bind_method(_MD("_dir_rmb_pressed"),&FileSystemDock::_dir_rmb_pressed); @@ -1700,7 +1702,7 @@ FileSystemDock::FileSystemDock(EditorNode *p_editor) { button_favorite->set_focus_mode(FOCUS_NONE); -// Control *spacer = memnew( Control); + //Control *spacer = memnew( Control); diff --git a/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp b/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp index bad6261d4e..722b02f77b 100644 --- a/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp @@ -167,7 +167,7 @@ public: ClassDB::bind_method("_import", &EditorBitMaskImportDialog::_import); ClassDB::bind_method("_browse", &EditorBitMaskImportDialog::_browse); ClassDB::bind_method("_browse_target", &EditorBitMaskImportDialog::_browse_target); - // ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) ); + //ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) ); } EditorBitMaskImportDialog(EditorBitMaskImportPlugin *p_plugin) { @@ -225,7 +225,7 @@ public: save_select = memnew(EditorDirDialog); add_child(save_select); - // save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR); + //save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR); save_select->connect("dir_selected", this, "_choose_save_dir"); get_ok()->connect("pressed", this, "_import"); @@ -235,7 +235,7 @@ public: error_dialog = memnew(ConfirmationDialog); add_child(error_dialog); error_dialog->get_ok()->set_text(TTR("Accept")); - // error_dialog->get_cancel()->hide(); + //error_dialog->get_cancel()->hide(); set_hide_on_ok(false); } diff --git a/tools/editor/io_plugins/editor_font_import_plugin.cpp b/tools/editor/io_plugins/editor_font_import_plugin.cpp index 3f4e454cac..c4619458ce 100644 --- a/tools/editor/io_plugins/editor_font_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_font_import_plugin.cpp @@ -665,10 +665,12 @@ public: List<String> fl; Ref<BitmapFont> font= memnew(BitmapFont); dest->get_file_dialog()->add_filter("*.fnt ; Font" ); - //ResourceSaver::get_recognized_extensions(font,&fl); - //for(List<String>::Element *E=fl.front();E;E=E->next()) { - // dest->get_file_dialog()->add_filter("*."+E->get()); - //} + /* + ResourceSaver::get_recognized_extensions(font,&fl); + for(List<String>::Element *E=fl.front();E;E=E->next()) { + dest->get_file_dialog()->add_filter("*."+E->get()); + } + */ vbl->add_margin_child(TTR("Dest Resource:"),dest); HBoxContainer *testhb = memnew( HBoxContainer ); @@ -689,7 +691,7 @@ public: vbl->add_margin_child(TTR("Test:")+" ",testhb); /* HBoxContainer *upd_hb = memnew( HBoxContainer ); -// vbl->add_child(upd_hb); + //vbl->add_child(upd_hb); upd_hb->add_spacer(); Button *update = memnew( Button); upd_hb->add_child(update); @@ -754,7 +756,7 @@ struct _EditorFontData { int texture; Image blit; Point2i blit_ofs; -// bool printable; + //bool printable; }; @@ -780,13 +782,13 @@ static unsigned char get_SDF_radial( int x, int y, int max_radius ) { - // hideous brute force method + //hideous brute force method float d2 = max_radius*max_radius+1.0; unsigned char v = fontmap[x+y*w]; for( int radius = 1; (radius <= max_radius) && (radius*radius < d2); ++radius ) { int line, lo, hi; - // north + //north line = y - radius; if( (line >= 0) && (line < h) ) { @@ -797,7 +799,7 @@ static unsigned char get_SDF_radial( int idx = line * w + lo; for( int i = lo; i <= hi; ++i ) { - // check this pixel + //check this pixel if( fontmap[idx] != v ) { float nx = i - x; @@ -808,11 +810,11 @@ static unsigned char get_SDF_radial( d2 = nd2; } } - // move on + //move on ++idx; } } - // south + //south line = y + radius; if( (line >= 0) && (line < h) ) { @@ -823,7 +825,7 @@ static unsigned char get_SDF_radial( int idx = line * w + lo; for( int i = lo; i <= hi; ++i ) { - // check this pixel + //check this pixel if( fontmap[idx] != v ) { float nx = i - x; @@ -834,11 +836,11 @@ static unsigned char get_SDF_radial( d2 = nd2; } } - // move on + //move on ++idx; } } - // west + //west line = x - radius; if( (line >= 0) && (line < w) ) { @@ -849,7 +851,7 @@ static unsigned char get_SDF_radial( int idx = lo * w + line; for( int i = lo; i <= hi; ++i ) { - // check this pixel + //check this pixel if( fontmap[idx] != v ) { float nx = line - x; @@ -860,11 +862,11 @@ static unsigned char get_SDF_radial( d2 = nd2; } } - // move on + //move on idx += w; } } - // east + //east line = x + radius; if( (line >= 0) && (line < w) ) { @@ -875,7 +877,7 @@ static unsigned char get_SDF_radial( int idx = lo * w + line; for( int i = lo; i <= hi; ++i ) { - // check this pixel + //check this pixel if( fontmap[idx] != v ) { float nx = line - x; @@ -886,7 +888,7 @@ static unsigned char get_SDF_radial( d2 = nd2; } } - // move on + //move on idx += w; } } @@ -981,14 +983,14 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe FT_GlyphSlot slot = face->glyph; -// error = FT_Set_Charmap(face,ft_encoding_unicode ); /* encoding.. */ + //error = FT_Set_Charmap(face,ft_encoding_unicode ); /* encoding.. */ /* PRINT CHARACTERS TO INDIVIDUAL BITMAPS */ -// int space_size=5; //size for space, if none found.. 5! -// int min_valign=500; //some ridiculous number + //int space_size=5; //size for space, if none found.. 5! + //int min_valign=500; //some ridiculous number FT_ULong charcode; FT_UInt gindex; @@ -1080,10 +1082,10 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe if (font_mode==_EditorFontImportOptions::FONT_DISTANCE_FIELD) { - // oversize the holding buffer so I can smooth it! + //oversize the holding buffer so I can smooth it! int sw = w + scaler * 4; int sh = h + scaler * 4; - // do the SDF + //do the SDF int sdfw = sw / scaler; int sdfh = sh / scaler; @@ -1139,7 +1141,7 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe if (font_mode==_EditorFontImportOptions::FONT_DISTANCE_FIELD) { - // oversize the holding buffer so I can smooth it! + //oversize the holding buffer so I can smooth it! int sw = w + scaler * 4; int sh = h + scaler * 4; @@ -1578,7 +1580,7 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe //debug the texture Ref<ImageTexture> atlast = memnew( ImageTexture ); atlast->create_from_image(atlas); -// atlast->create_from_image(font_data_list[5]->blit); + //atlast->create_from_image(font_data_list[5]->blit); TextureRect *tf = memnew( TextureRect ); tf->set_texture(atlast); dialog->add_child(tf); diff --git a/tools/editor/io_plugins/editor_import_collada.cpp b/tools/editor/io_plugins/editor_import_collada.cpp index d17ca1d7f1..1cbb594a51 100644 --- a/tools/editor/io_plugins/editor_import_collada.cpp +++ b/tools/editor/io_plugins/editor_import_collada.cpp @@ -236,20 +236,22 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Spatial *p_parent) { return OK; //well, it's an ambient light.. Light *l = memnew( DirectionalLight ); -// l->set_color(Light::COLOR_AMBIENT,ld.color); -// l->set_color(Light::COLOR_DIFFUSE,Color(0,0,0)); -// l->set_color(Light::COLOR_SPECULAR,Color(0,0,0)); + //l->set_color(Light::COLOR_AMBIENT,ld.color); + //l->set_color(Light::COLOR_DIFFUSE,Color(0,0,0)); + //l->set_color(Light::COLOR_SPECULAR,Color(0,0,0)); node = l; } else if (ld.mode==Collada::LightData::MODE_DIRECTIONAL) { //well, it's an ambient light.. Light *l = memnew( DirectionalLight ); - //if (found_ambient) //use it here - // l->set_color(Light::COLOR_AMBIENT,ambient); + /* + if (found_ambient) //use it here + l->set_color(Light::COLOR_AMBIENT,ambient); -// l->set_color(Light::COLOR_DIFFUSE,ld.color); -// l->set_color(Light::COLOR_SPECULAR,Color(1,1,1)); + l->set_color(Light::COLOR_DIFFUSE,ld.color); + l->set_color(Light::COLOR_SPECULAR,Color(1,1,1)); + */ node = l; } else { @@ -259,14 +261,14 @@ Error ColladaImport::_create_scene(Collada::Node *p_node, Spatial *p_parent) { l=memnew( OmniLight ); else { l=memnew( SpotLight ); -// l->set_parameter(Light::PARAM_SPOT_ANGLE,ld.spot_angle); -// l->set_parameter(Light::PARAM_SPOT_ATTENUATION,ld.spot_exp); + //l->set_parameter(Light::PARAM_SPOT_ANGLE,ld.spot_angle); + //l->set_parameter(Light::PARAM_SPOT_ATTENUATION,ld.spot_exp); } // -// l->set_color(Light::COLOR_DIFFUSE,ld.color); -// l->set_color(Light::COLOR_SPECULAR,Color(1,1,1)); -// l->approximate_opengl_attenuation(ld.constant_att,ld.linear_att,ld.quad_att); + //l->set_color(Light::COLOR_DIFFUSE,ld.color); + //l->set_color(Light::COLOR_SPECULAR,Color(1,1,1)); + //l->approximate_opengl_attenuation(ld.constant_att,ld.linear_att,ld.quad_att); node=l; } @@ -396,13 +398,13 @@ Error ColladaImport::_create_material(const String& p_target) { material->set_texture(FixedSpatialMaterial::TEXTURE_ALBEDO,texture); material->set_albedo(Color(1,1,1,1)); -// material->set_parameter(FixedSpatialMaterial::PARAM_DIFFUSE,Color(1,1,1,1)); + //material->set_parameter(FixedSpatialMaterial::PARAM_DIFFUSE,Color(1,1,1,1)); } else { missing_textures.push_back(texfile.get_file()); } } } else { -// material->set_parameter(FixedSpatialMaterial::PARAM_DIFFUSE,effect.diffuse.color); + //material->set_parameter(FixedSpatialMaterial::PARAM_DIFFUSE,effect.diffuse.color); } // SPECULAR @@ -417,15 +419,15 @@ Error ColladaImport::_create_material(const String& p_target) { material->set_texture(FixedSpatialMaterial::TEXTURE_SPECULAR,texture); material->set_specular(Color(1,1,1,1)); -// material->set_texture(FixedSpatialMaterial::PARAM_SPECULAR,texture); -// material->set_parameter(FixedSpatialMaterial::PARAM_SPECULAR,Color(1,1,1,1)); + //material->set_texture(FixedSpatialMaterial::PARAM_SPECULAR,texture); + //material->set_parameter(FixedSpatialMaterial::PARAM_SPECULAR,Color(1,1,1,1)); } else { missing_textures.push_back(texfile.get_file()); } } } else { -// material->set_parameter(FixedSpatialMaterial::PARAM_SPECULAR,effect.specular.color); + //material->set_parameter(FixedSpatialMaterial::PARAM_SPECULAR,effect.specular.color); } // EMISSION @@ -441,14 +443,14 @@ Error ColladaImport::_create_material(const String& p_target) { material->set_texture(FixedSpatialMaterial::TEXTURE_EMISSION,texture); material->set_emission(Color(1,1,1,1)); -// material->set_parameter(FixedSpatialMaterial::PARAM_EMISSION,Color(1,1,1,1)); + //material->set_parameter(FixedSpatialMaterial::PARAM_EMISSION,Color(1,1,1,1)); }else { -// missing_textures.push_back(texfile.get_file()); + //missing_textures.push_back(texfile.get_file()); } } } else { -// material->set_parameter(FixedSpatialMaterial::PARAM_EMISSION,effect.emission.color); + //material->set_parameter(FixedSpatialMaterial::PARAM_EMISSION,effect.emission.color); } // NORMAL @@ -461,18 +463,18 @@ Error ColladaImport::_create_material(const String& p_target) { Ref<Texture> texture = ResourceLoader::load(texfile,"Texture"); if (texture.is_valid()) { material->set_texture(FixedSpatialMaterial::TEXTURE_NORMAL,texture); -// material->set_emission(Color(1,1,1,1)); + //material->set_emission(Color(1,1,1,1)); - // material->set_texture(FixedSpatialMaterial::PARAM_NORMAL,texture); + //material->set_texture(FixedSpatialMaterial::PARAM_NORMAL,texture); }else { -// missing_textures.push_back(texfile.get_file()); + //missing_textures.push_back(texfile.get_file()); } } } -// material->set_parameter(FixedSpatialMaterial::PARAM_SPECULAR_EXP,effect.shininess); + //material->set_parameter(FixedSpatialMaterial::PARAM_SPECULAR_EXP,effect.shininess); if (effect.double_sided) { material->set_cull_mode(FixedSpatialMaterial::CULL_DISABLED); } @@ -1171,11 +1173,13 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con narrayw = PoolVector<Vector3>::Write(); final_normal_array=narray; - //PoolVector<Vector3> altnaray; - //_generate_normals(index_array,final_vertex_array,altnaray); + /* + PoolVector<Vector3> altnaray; + _generate_normals(index_array,final_vertex_array,altnaray); - //for(int i=0;i<altnaray.size();i++) - // print_line(rtos(altnaray[i].dot(final_normal_array[i]))); + for(int i=0;i<altnaray.size();i++) + print_line(rtos(altnaray[i].dot(final_normal_array[i]))); + */ } else if (primitive==Mesh::PRIMITIVE_TRIANGLES) { //generate normals (even if unused later) @@ -1257,8 +1261,10 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con } -// if (sum<0.8) -// COLLADA_PRINT("ERROR SUMMING INDEX "+itos(k)+" had weights: "+itos(vertex_array[k].weights.size())); + /* + if (sum<0.8) + COLLADA_PRINT("ERROR SUMMING INDEX "+itos(k)+" had weights: "+itos(vertex_array[k].weights.size())); + */ } @@ -1468,7 +1474,7 @@ Error ColladaImport::_create_mesh_surfaces(bool p_optimize,Ref<Mesh>& p_mesh,con #endif for(int mi=0;mi<p_morph_meshes.size();mi++) { - // print_line("want surface "+itos(mi)+" has "+itos(p_morph_meshes[mi]->get_surface_count())); + //print_line("want surface "+itos(mi)+" has "+itos(p_morph_meshes[mi]->get_surface_count())); Array a = p_morph_meshes[mi]->surface_get_arrays(surface); //add valid weight and bone arrays if they exist, TODO check if they are unique to shape (generally not) @@ -2375,9 +2381,11 @@ Node* EditorSceneImporterCollada::import_scene(const String& p_path, uint32_t p_ if (state.missing_textures.size()) { - //for(int i=0;i<state.missing_textures.size();i++) { -// EditorNode::add_io_error("Texture Not Found: "+state.missing_textures[i]); -// } + /* + for(int i=0;i<state.missing_textures.size();i++) { + EditorNode::add_io_error("Texture Not Found: "+state.missing_textures[i]); + } + */ if (r_missing_deps) { diff --git a/tools/editor/io_plugins/editor_sample_import_plugin.cpp b/tools/editor/io_plugins/editor_sample_import_plugin.cpp index d45f3839f8..eeb61fc443 100644 --- a/tools/editor/io_plugins/editor_sample_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_sample_import_plugin.cpp @@ -323,7 +323,7 @@ public: ClassDB::bind_method("_import",&EditorSampleImportDialog::_import); ClassDB::bind_method("_browse",&EditorSampleImportDialog::_browse); ClassDB::bind_method("_browse_target",&EditorSampleImportDialog::_browse_target); - // ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) ); + //ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) ); } EditorSampleImportDialog(EditorSampleImportPlugin *p_plugin) { @@ -373,7 +373,7 @@ public: save_select = memnew( EditorDirDialog ); add_child(save_select); - // save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR); + //save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR); save_select->connect("dir_selected", this,"_choose_save_dir"); get_ok()->connect("pressed", this,"_import"); @@ -383,7 +383,7 @@ public: error_dialog = memnew ( ConfirmationDialog ); add_child(error_dialog); error_dialog->get_ok()->set_text(TTR("Accept")); - // error_dialog->get_cancel()->hide(); + //error_dialog->get_cancel()->hide(); set_hide_on_ok(false); options = memnew( _EditorSampleImportOptions ); @@ -648,7 +648,7 @@ Error EditorSampleImportPlugin::import(const String& p_path, const Ref<ResourceI } } -// print_line("compressing ima-adpcm, resulting buffersize is "+itos(dst_data.size())+" from "+itos(data.size())); + //print_line("compressing ima-adpcm, resulting buffersize is "+itos(dst_data.size())+" from "+itos(data.size())); } else { @@ -758,12 +758,14 @@ void EditorSampleImportPlugin::_compress_ima_adpcm(const Vector<float>& p_data,P xm_sample=CLAMP(in[i]*32767.0,-32768,32767); - //if (xm_sample==32767 || xm_sample==-32768) - // printf("clippy!\n",xm_sample); + /* + if (xm_sample==32767 || xm_sample==-32768) + printf("clippy!\n",xm_sample); + */ } - // xm_sample=xm_sample+xm_prev; - // xm_prev=xm_sample; + //xm_sample=xm_sample+xm_prev; + //xm_prev=xm_sample; diff = (int)xm_sample - prev ; diff --git a/tools/editor/io_plugins/editor_scene_import_plugin.cpp b/tools/editor/io_plugins/editor_scene_import_plugin.cpp index ae0559636b..79c88e7407 100644 --- a/tools/editor/io_plugins/editor_scene_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_scene_import_plugin.cpp @@ -377,7 +377,7 @@ void EditorImportAnimationOptions::_bind_methods() { ClassDB::bind_method("_changed",&EditorImportAnimationOptions::_changed); ClassDB::bind_method("_item_edited",&EditorImportAnimationOptions::_item_edited); ClassDB::bind_method("_button_action",&EditorImportAnimationOptions::_button_action); -// ClassDB::bind_method("_changedp",&EditorImportAnimationOptions::_changedp); + //ClassDB::bind_method("_changedp",&EditorImportAnimationOptions::_changedp); ADD_SIGNAL(MethodInfo("changed")); } @@ -390,7 +390,7 @@ void EditorImportAnimationOptions::_notification(int p_what) { flags->connect("item_edited",this,"_changed"); clips_tree->connect("item_edited",this,"_item_edited"); clips_tree->connect("button_pressed",this,"_button_action",varray(),CONNECT_DEFERRED); -// format->connect("item_selected",this,"_changedp"); + //format->connect("item_selected",this,"_changedp"); } } @@ -1237,7 +1237,7 @@ EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSce error_dialog = memnew ( ConfirmationDialog ); add_child(error_dialog); error_dialog->get_ok()->set_text(TTR("Accept")); -// error_dialog->get_cancel()->hide(); + //error_dialog->get_cancel()->hide(); HBoxContainer *custom_root_hb = memnew( HBoxContainer ); @@ -1302,7 +1302,7 @@ EditorSceneImportDialog::EditorSceneImportDialog(EditorNode *p_editor, EditorSce add_child(confirm_import); VBoxContainer *cvb = memnew( VBoxContainer ); confirm_import->add_child(cvb); -// confirm_import->set_child_rect(cvb); + //confirm_import->set_child_rect(cvb); PanelContainer *pc = memnew( PanelContainer ); pc->add_style_override("panel",get_stylebox("normal","TextEdit")); @@ -1421,9 +1421,11 @@ void EditorSceneImportPlugin::_find_resources(const Variant& p_var, Map<Ref<Imag if (tex.is_valid()) { image_map.insert(tex,TEXTURE_ROLE_NORMALMAP); - //if (p_flags&SCENE_FLAG_CONVERT_NORMALMAPS_TO_XY) - // res->cast_to<FixedSpatialMaterial>()->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_XY_NORMALMAP,true); - }// + /* + if (p_flags&SCENE_FLAG_CONVERT_NORMALMAPS_TO_XY) + res->cast_to<FixedSpatialMaterial>()->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_XY_NORMALMAP,true); + */ + } } else { @@ -1531,10 +1533,10 @@ Node* EditorSceneImportPlugin::_fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh> Ref<FixedSpatialMaterial> fm = m->surface_get_material(i); if (fm.is_valid()) { - // fm->set_flag(Material::FLAG_UNSHADED,true); - // fm->set_flag(Material::FLAG_DOUBLE_SIDED,true); - // fm->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER); - // fm->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_ALPHA,true); + //fm->set_flag(Material::FLAG_UNSHADED,true); + //fm->set_flag(Material::FLAG_DOUBLE_SIDED,true); + //fm->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER); + //fm->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_ALPHA,true); } } } @@ -1558,8 +1560,8 @@ Node* EditorSceneImportPlugin::_fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh> if (p_flags&SCENE_FLAG_DETECT_ALPHA && _teststr(mat->get_name(),"alpha")) { - // mat->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_ALPHA,true); - // mat->set_name(_fixstr(mat->get_name(),"alpha")); + //mat->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_ALPHA,true); + //mat->set_name(_fixstr(mat->get_name(),"alpha")); } if (p_flags&SCENE_FLAG_DETECT_VCOLOR && _teststr(mat->get_name(),"vcol")) { @@ -1640,10 +1642,10 @@ Node* EditorSceneImportPlugin::_fix_node(Node *p_node,Node *p_root,Map<Ref<Mesh> Ref<FixedSpatialMaterial> fm = m->surface_get_material(i); if (fm.is_valid()) { - // fm->set_flag(Material::FLAG_UNSHADED,true); - // fm->set_flag(Material::FLAG_DOUBLE_SIDED,true); - // fm->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER); - // fm->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_ALPHA,true); + //fm->set_flag(Material::FLAG_UNSHADED,true); + //fm->set_flag(Material::FLAG_DOUBLE_SIDED,true); + //fm->set_depth_draw_mode(Material::DEPTH_DRAW_NEVER); + //fm->set_fixed_flag(FixedSpatialMaterial::FLAG_USE_ALPHA,true); } } } @@ -2172,8 +2174,10 @@ Error EditorSceneImportPlugin::import1(const Ref<ResourceImportMetadata>& p_from import_flags|=EditorSceneImporter::IMPORT_ANIMATION_FORCE_ALL_TRACKS_IN_ALL_CLIPS; if (scene_flags&SCENE_FLAG_IMPORT_ANIMATIONS) import_flags|=EditorSceneImporter::IMPORT_ANIMATION; - //if (scene_flags&SCENE_FLAG_FAIL_ON_MISSING_IMAGES) - // import_flags|=EditorSceneImporter::IMPORT_FAIL_ON_MISSING_DEPENDENCIES; + /* + if (scene_flags&SCENE_FLAG_FAIL_ON_MISSING_IMAGES) + import_flags|=EditorSceneImporter::IMPORT_FAIL_ON_MISSING_DEPENDENCIES; + */ if (scene_flags&SCENE_FLAG_GENERATE_TANGENT_ARRAYS) import_flags|=EditorSceneImporter::IMPORT_GENERATE_TANGENT_ARRAYS; diff --git a/tools/editor/io_plugins/editor_texture_import_plugin.cpp b/tools/editor/io_plugins/editor_texture_import_plugin.cpp index 564753ca7b..5ba7d0c417 100644 --- a/tools/editor/io_plugins/editor_texture_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_texture_import_plugin.cpp @@ -344,7 +344,7 @@ void EditorTextureImportDialog::_choose_save_dir(const String& p_path) { void EditorTextureImportDialog::_import() { -// ImportMonitorBlock imb; + //ImportMonitorBlock imb; Vector<String> files=import_path->get_text().split(","); @@ -539,7 +539,7 @@ void EditorTextureImportDialog::_notification(int p_what) { List<String> extensions; ImageLoader::get_recognized_extensions(&extensions); - // ResourceLoader::get_recognized_extensions_for_type("PackedTexture",&extensions); + //ResourceLoader::get_recognized_extensions_for_type("PackedTexture",&extensions); file_select->clear_filters(); for(int i=0;i<extensions.size();i++) { @@ -643,7 +643,7 @@ void EditorTextureImportDialog::_bind_methods() { ClassDB::bind_method("_browse",&EditorTextureImportDialog::_browse); ClassDB::bind_method("_browse_target",&EditorTextureImportDialog::_browse_target); ClassDB::bind_method("_mode_changed",&EditorTextureImportDialog::_mode_changed); -// ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) ); + //ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) ); } EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin* p_plugin) { @@ -760,20 +760,22 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin* save_select = memnew( EditorDirDialog ); add_child(save_select); -// save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR); + //save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR); save_select->connect("dir_selected", this,"_choose_save_dir"); get_ok()->connect("pressed", this,"_import"); get_ok()->set_text(TTR("Import")); //move stuff up - //for(int i=0;i<4;i++) - // vbc->move_child( vbc->get_child( vbc->get_child_count() -1), 0); + /* + for(int i=0;i<4;i++) + vbc->move_child( vbc->get_child( vbc->get_child_count() -1), 0); + */ error_dialog = memnew ( ConfirmationDialog ); add_child(error_dialog); error_dialog->get_ok()->set_text(TTR("Accept")); -// error_dialog->get_cancel()->hide(); + //error_dialog->get_cancel()->hide(); set_hide_on_ok(false); @@ -784,8 +786,8 @@ EditorTextureImportDialog::EditorTextureImportDialog(EditorTextureImportPlugin* _mode_changed(EditorTextureImportPlugin::MODE_TEXTURE_3D); -// GLOBAL_DEF("import/shared_textures","res://"); -// Globals::get_singleton()->set_custom_property_info("import/shared_textures",PropertyInfo(Variant::STRING,"import/shared_textures",PROPERTY_HINT_DIR)); + //GLOBAL_DEF("import/shared_textures","res://"); + //Globals::get_singleton()->set_custom_property_info("import/shared_textures",PropertyInfo(Variant::STRING,"import/shared_textures",PROPERTY_HINT_DIR)); } @@ -944,10 +946,12 @@ Error EditorTextureImportPlugin::_process_texture_data(Ref<ImageTexture> &textur image.normalmap_to_xy(); } - //if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) { + /* + if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) { - // image.srgb_to_linear(); - //} + image.srgb_to_linear(); + } + */ if (shrink>1) { @@ -1003,11 +1007,13 @@ Error EditorTextureImportPlugin::_process_texture_data(Ref<ImageTexture> &textur image.normalmap_to_xy(); } - //if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) { -// - // print_line("CONVERT BECAUSE: "+itos(flags)); - // image.srgb_to_linear(); - //} + /* + if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) { + + print_line("CONVERT BECAUSE: "+itos(flags)); + image.srgb_to_linear(); + } + */ int orig_w=image.get_width(); int orig_h=image.get_height(); @@ -1425,10 +1431,12 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc image.normalmap_to_xy(); } - //if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) { + /* + if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) { - // image.srgb_to_linear(); - //} + image.srgb_to_linear(); + } + */ if (shrink>1) { @@ -1484,11 +1492,13 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc image.normalmap_to_xy(); } - //if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) { -// - // print_line("CONVERT BECAUSE: "+itos(flags)); - // image.srgb_to_linear(); - //} + /* + if ((image.get_format()==Image::FORMAT_RGB8 || image.get_format()==Image::FORMAT_RGBA8) && flags&IMAGE_FLAG_CONVERT_TO_LINEAR) { + + print_line("CONVERT BECAUSE: "+itos(flags)); + image.srgb_to_linear(); + } + */ int orig_w=image.get_width(); int orig_h=image.get_height(); diff --git a/tools/editor/io_plugins/editor_translation_import_plugin.cpp b/tools/editor/io_plugins/editor_translation_import_plugin.cpp index 90c8e35f6a..d9288f5990 100644 --- a/tools/editor/io_plugins/editor_translation_import_plugin.cpp +++ b/tools/editor/io_plugins/editor_translation_import_plugin.cpp @@ -287,7 +287,7 @@ public: ClassDB::bind_method("_import",&EditorTranslationImportDialog::_import); ClassDB::bind_method("_browse",&EditorTranslationImportDialog::_browse); ClassDB::bind_method("_browse_target",&EditorTranslationImportDialog::_browse_target); - // ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) ); + //ADD_SIGNAL( MethodInfo("imported",PropertyInfo(Variant::OBJECT,"scene")) ); } EditorTranslationImportDialog(EditorTranslationImportPlugin *p_plugin) { @@ -356,7 +356,7 @@ public: save_select = memnew( EditorDirDialog ); add_child(save_select); - // save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR); + //save_select->set_mode(EditorFileDialog::MODE_OPEN_DIR); save_select->connect("dir_selected", this,"_choose_save_dir"); get_ok()->connect("pressed", this,"_import"); @@ -366,7 +366,7 @@ public: error_dialog = memnew ( ConfirmationDialog ); add_child(error_dialog); error_dialog->get_ok()->set_text(TTR("Accept")); - // error_dialog->get_cancel()->hide(); + //error_dialog->get_cancel()->hide(); set_hide_on_ok(false); diff --git a/tools/editor/output_strings.cpp b/tools/editor/output_strings.cpp index 9ba97451c0..cb43bb9230 100644 --- a/tools/editor/output_strings.cpp +++ b/tools/editor/output_strings.cpp @@ -82,7 +82,7 @@ void OutputStrings::_notification(int p_what) { Ref<Texture> icon_error = get_icon("Error","EditorIcons"); Ref<Texture> icon_warning = get_icon("Warning","EditorIcons"); - // int lines = (size_height-(int)margin.y) / font_height; + //int lines = (size_height-(int)margin.y) / font_height; Point2 ofs=tree_st->get_offset(); LineMap::Element *E = line_map.find(v_scroll->get_value()); diff --git a/tools/editor/plugins/animation_player_editor_plugin.cpp b/tools/editor/plugins/animation_player_editor_plugin.cpp index b511bc30d0..59ab3bc467 100644 --- a/tools/editor/plugins/animation_player_editor_plugin.cpp +++ b/tools/editor/plugins/animation_player_editor_plugin.cpp @@ -94,7 +94,7 @@ void AnimationPlayerEditor::_notification(int p_what) { if (p_what==NOTIFICATION_ENTER_TREE) { -// editor->connect("hide_animation_player_editors",this,"_hide_anim_editors"); + //editor->connect("hide_animation_player_editors",this,"_hide_anim_editors"); add_anim->set_icon( get_icon("New","EditorIcons") ); rename_anim->set_icon( get_icon("Rename","EditorIcons") ); duplicate_anim->set_icon( get_icon("Duplicate","EditorIcons") ); @@ -377,8 +377,10 @@ void AnimationPlayerEditor::_animation_save_in_path(const Ref<Resource>& p_resou int flg = 0; if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) flg |= ResourceSaver::FLAG_COMPRESS; - //if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative")) - // flg |= ResourceSaver::FLAG_RELATIVE_PATHS; + /* + if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative")) + flg |= ResourceSaver::FLAG_RELATIVE_PATHS; + */ String path = GlobalConfig::get_singleton()->localize_path(p_path); Error err = ResourceSaver::save(path, p_resource, flg | ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS); @@ -388,7 +390,7 @@ void AnimationPlayerEditor::_animation_save_in_path(const Ref<Resource>& p_resou accept->popup_centered_minsize(); return; } - // EditorFileSystem::get_singleton()->update_file(path,p_resource->get_type()); + //EditorFileSystem::get_singleton()->update_file(path,p_resource->get_type()); ((Resource*)p_resource.ptr())->set_path(path); editor->emit_signal("resource_saved", p_resource); @@ -672,7 +674,7 @@ void AnimationPlayerEditor::set_state(const Dictionary& p_state) { show(); set_process(true); ensure_visibility(); -// EditorNode::get_singleton()->animation_panel_make_visible(true); + //EditorNode::get_singleton()->animation_panel_make_visible(true); if (p_state.has("animation")) { String anim = p_state["animation"]; @@ -897,7 +899,7 @@ void AnimationPlayerEditor::edit(AnimationPlayer *p_player) { } else { key_editor->show_select_node_warning(true); -// hide(); + //hide(); } @@ -1128,7 +1130,7 @@ void AnimationPlayerEditor::_hide_anim_editors() { key_editor->set_animation(Ref<Animation>()); key_editor->set_root(NULL); key_editor->show_select_node_warning(true); -// editor->animation_editor_make_visible(false); + //editor->animation_editor_make_visible(false); } @@ -1267,7 +1269,7 @@ void AnimationPlayerEditor::_bind_methods() { ClassDB::bind_method(_MD("_seek_value_changed"),&AnimationPlayerEditor::_seek_value_changed,DEFVAL(true)); ClassDB::bind_method(_MD("_animation_player_changed"),&AnimationPlayerEditor::_animation_player_changed); ClassDB::bind_method(_MD("_blend_edited"),&AnimationPlayerEditor::_blend_edited); -// ClassDB::bind_method(_MD("_seek_frame_changed"),&AnimationPlayerEditor::_seek_frame_changed); + //ClassDB::bind_method(_MD("_seek_frame_changed"),&AnimationPlayerEditor::_seek_frame_changed); ClassDB::bind_method(_MD("_scale_changed"),&AnimationPlayerEditor::_scale_changed); //ClassDB::bind_method(_MD("_editor_store_all"),&AnimationPlayerEditor::_editor_store_all); ///jectTypeDB::bind_method(_MD("_editor_load_all"),&AnimationPlayerEditor::_editor_load_all); @@ -1552,11 +1554,11 @@ void AnimationPlayerEditorPlugin::make_visible(bool p_visible) { editor->make_bottom_panel_item_visible(anim_editor); anim_editor->set_process(true); anim_editor->ensure_visibility(); -// editor->animation_panel_make_visible(true); + //editor->animation_panel_make_visible(true); } else { -// anim_editor->hide(); -// anim_editor->set_idle_process(false); + //anim_editor->hide(); + //anim_editor->set_idle_process(false); } } diff --git a/tools/editor/plugins/animation_player_editor_plugin.h b/tools/editor/plugins/animation_player_editor_plugin.h index 9074eb127b..840c39ba49 100644 --- a/tools/editor/plugins/animation_player_editor_plugin.h +++ b/tools/editor/plugins/animation_player_editor_plugin.h @@ -73,7 +73,7 @@ class AnimationPlayerEditor : public VBoxContainer { Button *play_bw; Button *play_bw_from; -// Button *pause; + //Button *pause; Button *add_anim; Button *autoplay; Button *rename_anim; diff --git a/tools/editor/plugins/animation_tree_editor_plugin.cpp b/tools/editor/plugins/animation_tree_editor_plugin.cpp index 5a5660ae50..ea63a0e858 100644 --- a/tools/editor/plugins/animation_tree_editor_plugin.cpp +++ b/tools/editor/plugins/animation_tree_editor_plugin.cpp @@ -621,9 +621,9 @@ void AnimationTreeEditor::_draw_node(const StringName& p_node) { #if 0 void AnimationTreeEditor::_node_param_changed() { -// anim_tree->node_set_param( click_node,property_editor->get_variant() ); -// update(); -// _write_anim_tree_graph(); + //anim_tree->node_set_param( click_node,property_editor->get_variant() ); + //update(); + //_write_anim_tree_graph(); } #endif @@ -792,7 +792,7 @@ void AnimationTreeEditor::_gui_input(InputEvent p_event) { renaming_edit=false; _popup_edit_dialog(); //open editor - // _node_edit_property(click_node); + //_node_edit_property(click_node); } break; default:{} } @@ -1325,7 +1325,7 @@ void AnimationTreeEditor::_bind_methods() { ClassDB::bind_method( "_add_menu_item", &AnimationTreeEditor::_add_menu_item ); ClassDB::bind_method( "_node_menu_item", &AnimationTreeEditor::_node_menu_item ); ClassDB::bind_method( "_gui_input", &AnimationTreeEditor::_gui_input ); -// ClassDB::bind_method( "_node_param_changed", &AnimationTreeEditor::_node_param_changed ); + //ClassDB::bind_method( "_node_param_changed", &AnimationTreeEditor::_node_param_changed ); ClassDB::bind_method( "_scroll_moved", &AnimationTreeEditor::_scroll_moved ); ClassDB::bind_method( "_edit_dialog_changeds", &AnimationTreeEditor::_edit_dialog_changeds ); ClassDB::bind_method( "_edit_dialog_changede", &AnimationTreeEditor::_edit_dialog_changede ); @@ -1414,8 +1414,8 @@ AnimationTreeEditor::AnimationTreeEditor() { updating_edit=false; edit_dialog = memnew( PopupPanel ); -// edit_dialog->get_ok()->hide(); -// edit_dialog->get_cancel()->hide(); + //edit_dialog->get_ok()->hide(); + //edit_dialog->get_cancel()->hide(); add_child(edit_dialog); edit_option = memnew( OptionButton ); @@ -1502,8 +1502,8 @@ bool AnimationTreeEditorPlugin::handles(Object *p_object) const { void AnimationTreeEditorPlugin::make_visible(bool p_visible) { if (p_visible) { -// editor->hide_animation_player_editors(); -// editor->animation_panel_make_visible(true); + //editor->hide_animation_player_editors(); + //editor->animation_panel_make_visible(true); button->show(); editor->make_bottom_panel_item_visible(anim_tree_editor); anim_tree_editor->set_fixed_process(true); diff --git a/tools/editor/plugins/baked_light_baker.cpp b/tools/editor/plugins/baked_light_baker.cpp index 2d91524ef9..0b12d080e4 100644 --- a/tools/editor/plugins/baked_light_baker.cpp +++ b/tools/editor/plugins/baked_light_baker.cpp @@ -1006,8 +1006,10 @@ float BakedLightBaker::_throw_ray(ThreadStack& thread_stack,bool p_bake_direct,c Triangle *triangle=NULL; - //for(int i=0;i<max_depth;i++) - // stack[i]=0; + /* + for(int i=0;i<max_depth;i++) + stack[i]=0; + */ int level=0; //AABB ray_aabb; @@ -1059,7 +1061,7 @@ float BakedLightBaker::_throw_ray(ThreadStack& thread_stack,bool p_bake_direct,c bool valid = b.aabb.smits_intersect_ray(p_begin,n,0,len); //bool valid = b.aabb.intersects_segment(p_begin,p_end); - // bool valid = b.aabb.intersects(ray_aabb); + //bool valid = b.aabb.intersects(ray_aabb); if (!valid) { @@ -1234,7 +1236,7 @@ float BakedLightBaker::_throw_ray(ThreadStack& thread_stack,bool p_bake_direct,c } //specular later -// _plot_light_point(r_point,octree,octree_aabb,p_light); + //_plot_light_point(r_point,octree,octree_aabb,p_light); Color plot_light=res_light.linear_interpolate(diffuse_at_point,tint); @@ -1678,7 +1680,7 @@ void BakedLightBaker::throw_rays(ThreadStack& thread_stack,int p_amount) { dl.rays_thrown++; baked_light_baker_add_64i(&total_rays,1); _throw_ray(thread_stack,dl.bake_direct,from,to,dl.radius,col,dl.attenuation_table.ptr(),0,dl.radius,max_bounces,true); -// _throw_ray(i,from,to,dl.radius,col,NULL,0,dl.radius,max_bounces,true); + //_throw_ray(i,from,to,dl.radius,col,NULL,0,dl.radius,max_bounces,true); } } break; @@ -1710,7 +1712,7 @@ void BakedLightBaker::throw_rays(ThreadStack& thread_stack,int p_amount) { dl.rays_thrown++; baked_light_baker_add_64i(&total_rays,1); _throw_ray(thread_stack,dl.bake_direct,from,to,dl.radius,col,dl.attenuation_table.ptr(),0,dl.radius,max_bounces,true); - // _throw_ray(i,from,to,dl.radius,col,NULL,0,dl.radius,max_bounces,true); + //_throw_ray(i,from,to,dl.radius,col,NULL,0,dl.radius,max_bounces,true); } } break; @@ -2010,8 +2012,10 @@ void BakedLightBaker::update_octree_images(PoolVector<uint8_t> &p_octree,PoolVec //write colors for(int j=0;j<8;j++) { - //if (!oct.children[j]) - // continue; + /* + if (!oct.children[j]) + continue; + */ uint8_t *iptr=&lptr[ofs+lchild_offsets[j]]; float r=oct.light_accum[j][0]*norm; @@ -2291,7 +2295,7 @@ void BakedLightBaker::_plot_pixel_to_lightmap(int x, int y, int width, int heigh bool valid = b.aabb.smits_intersect_ray(from,n,0,len); //bool valid = b.aabb.intersects_segment(p_begin,p_end); - // bool valid = b.aabb.intersects(ray_aabb); + //bool valid = b.aabb.intersects(ray_aabb); if (!valid) { @@ -2649,10 +2653,13 @@ void BakedLightBaker::clear() { /* * ??? for(int i=0;i<octant_pool.size();i++) { - //if (octant_pool[i].leaf) { - // memdelete_arr( octant_pool[i].light ); - //} Vector<double> norm_arr; - //norm_arr.resize(lights.size()); + /* + if (octant_pool[i].leaf) { + memdelete_arr( octant_pool[i].light ); + } + Vector<double> norm_arr; + norm_arr.resize(lights.size()); + */ for(int i=0;i<lights.size();i++) { norm_arr[i] = 1.0/get_normalization(i); diff --git a/tools/editor/plugins/baked_light_baker.h b/tools/editor/plugins/baked_light_baker.h index 6fcf78dd0a..89788338d9 100644 --- a/tools/editor/plugins/baked_light_baker.h +++ b/tools/editor/plugins/baked_light_baker.h @@ -45,10 +45,11 @@ public: OCTANT_POOL_CHUNK=1000000 }; - //struct OctantLight { - - // double accum[8][3]; - //}; + /* + struct OctantLight { + double accum[8][3]; + }; + */ struct Octant { bool leaf; diff --git a/tools/editor/plugins/baked_light_editor_plugin.cpp b/tools/editor/plugins/baked_light_editor_plugin.cpp index 8f564a3247..26c3144188 100644 --- a/tools/editor/plugins/baked_light_editor_plugin.cpp +++ b/tools/editor/plugins/baked_light_editor_plugin.cpp @@ -105,8 +105,10 @@ void BakedLightEditor::_notification(int p_option) { colors[i].b=oct->light_accum[i][2]/norm; float lum = colors[i].get_v(); - //if (lum<0.05) - // color.a=0; + /* + if (lum<0.05) + color.a=0; + */ if (lum>max_lum) max_lum=lum; @@ -141,7 +143,7 @@ void BakedLightEditor::_notification(int p_option) { baker->update_octree_images(octree_texture,light_texture); baker->update_octree_sampler(octree_sampler); - // print_line("sampler size: "+itos(octree_sampler.size()*4)); + //print_line("sampler size: "+itos(octree_sampler.size()*4)); #if 1 //debug diff --git a/tools/editor/plugins/camera_editor_plugin.cpp b/tools/editor/plugins/camera_editor_plugin.cpp index 67f776ba0b..1c8c392d65 100644 --- a/tools/editor/plugins/camera_editor_plugin.cpp +++ b/tools/editor/plugins/camera_editor_plugin.cpp @@ -114,10 +114,8 @@ bool CameraEditorPlugin::handles(Object *p_object) const { void CameraEditorPlugin::make_visible(bool p_visible) { if (p_visible) { -// SpatialEditor::get_singleton()->set_can_preview(p_object->cast_to<Camera>()); - + //SpatialEditor::get_singleton()->set_can_preview(p_object->cast_to<Camera>()); } else { - SpatialEditor::get_singleton()->set_can_preview(NULL); } diff --git a/tools/editor/plugins/camera_editor_plugin.h b/tools/editor/plugins/camera_editor_plugin.h index 56702f174b..7e79d0ec74 100644 --- a/tools/editor/plugins/camera_editor_plugin.h +++ b/tools/editor/plugins/camera_editor_plugin.h @@ -60,7 +60,7 @@ class CameraEditorPlugin : public EditorPlugin { GDCLASS( CameraEditorPlugin, EditorPlugin ); -// CameraEditor *camera_editor; + //CameraEditor *camera_editor; EditorNode *editor; public: diff --git a/tools/editor/plugins/canvas_item_editor_plugin.cpp b/tools/editor/plugins/canvas_item_editor_plugin.cpp index 65fdababbd..514e44e809 100644 --- a/tools/editor/plugins/canvas_item_editor_plugin.cpp +++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp @@ -79,7 +79,7 @@ public: container = memnew( VBoxContainer ); add_child(container); - // set_child_rect(container); + //set_child_rect(container); child_container = memnew( GridContainer ); child_container->set_columns(3); @@ -287,7 +287,7 @@ Dictionary CanvasItemEditor::get_state() const { Dictionary state; state["zoom"]=zoom; state["ofs"]=Point2(h_scroll->get_value(),v_scroll->get_value()); -// state["ofs"]=-transform.get_origin(); + //state["ofs"]=-transform.get_origin(); state["snap_offset"]=snap_offset; state["snap_step"]=snap_step; state["snap_rotation_offset"]=snap_rotation_offset; @@ -1187,8 +1187,10 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent& p_event) { } return; } - //if (!canvas_items.size()) - // return; + /* + if (!canvas_items.size()) + return; + */ if (b.button_index==BUTTON_LEFT && tool==TOOL_LIST_SELECT) { if (b.pressed) @@ -1417,7 +1419,7 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent& p_event) { Transform2D xform = transform * canvas_item->get_global_transform_with_canvas(); Rect2 rect=canvas_item->get_item_rect(); - // float handle_radius = handle_len * 1.4144; //magic number, guess what it means! + //float handle_radius = handle_len * 1.4144; //magic number, guess what it means! if (tool==TOOL_SELECT) { drag = _find_drag_type(xform,rect,click,drag_point_from); @@ -2342,7 +2344,7 @@ void CanvasItemEditor::_find_canvas_items_span(Node *p_node, Rect2& r_rect, cons for (int i=p_node->get_child_count()-1;i>=0;i--) { -// CanvasItem *r=NULL; + //CanvasItem *r=NULL; if (c && !c->is_set_as_toplevel()) _find_canvas_items_span(p_node->get_child(i),r_rect,p_xform * c->get_transform()); @@ -2473,14 +2475,14 @@ void CanvasItemEditor::_update_scrollbars() { ofs.x=h_scroll->get_value(); } -// transform=Matrix32(); + //transform=Matrix32(); transform.elements[2]=-ofs*zoom; editor->get_scene_root()->set_global_canvas_transform(transform); updating_scroll=false; -// transform.scale_basis(Vector2(zoom,zoom)); + //transform.scale_basis(Vector2(zoom,zoom)); } @@ -2495,7 +2497,7 @@ void CanvasItemEditor::_update_scroll(float) { ofs.x=h_scroll->get_value(); ofs.y=v_scroll->get_value(); -// current_window->set_scroll(-ofs); + //current_window->set_scroll(-ofs); transform=Transform2D(); @@ -3004,8 +3006,10 @@ void CanvasItemEditor::_popup_callback(int p_op) { if (key_pos) ctrl->set_pos(Point2()); - //if (key_scale) - // AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(ctrl,"rect/size",ctrl->get_size()); + /* + if (key_scale) + AnimationPlayerEditor::singleton->get_key_editor()->insert_node_value_key(ctrl,"rect/size",ctrl->get_size()); + */ } } diff --git a/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp b/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp index da5c07221e..563b8298eb 100644 --- a/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp +++ b/tools/editor/plugins/cube_grid_theme_editor_plugin.cpp @@ -203,7 +203,7 @@ void MeshLibraryEditor::_import_scene(Node *p_scene, Ref<MeshLibrary> p_library, it->create_from_image(img); p_library->set_item_preview(id,it); -// print_line("loaded image, size: "+rtos(m)+" dist: "+rtos(dist)+" empty?"+itos(img.empty())+" w: "+itos(it->get_width())+" h: "+itos(it->get_height())); + //print_line("loaded image, size: "+rtos(m)+" dist: "+rtos(dist)+" empty?"+itos(img.empty())+" w: "+itos(it->get_width())+" h: "+itos(it->get_height())); VS::get_singleton()->free(inst); } diff --git a/tools/editor/plugins/editor_preview_plugins.cpp b/tools/editor/plugins/editor_preview_plugins.cpp index 9dcfc2fa94..478fa2308d 100644 --- a/tools/editor/plugins/editor_preview_plugins.cpp +++ b/tools/editor/plugins/editor_preview_plugins.cpp @@ -248,7 +248,7 @@ Ref<Texture> EditorMaterialPreviewPlugin::generate(const RES& p_from) { VS::get_singleton()->viewport_queue_screen_capture(viewport); VS::get_singleton()->viewport_set_render_target_update_mode(viewport,VS::RENDER_TARGET_UPDATE_ONCE); //once used for capture -// print_line("queue capture!"); + //print_line("queue capture!"); Image img; int timeout=1000; @@ -825,7 +825,7 @@ Ref<Texture> EditorMeshPreviewPlugin::generate(const RES& p_from) { VS::get_singleton()->viewport_queue_screen_capture(viewport); VS::get_singleton()->viewport_set_render_target_update_mode(viewport,VS::RENDER_TARGET_UPDATE_ONCE); //once used for capture -// print_line("queue capture!"); + //print_line("queue capture!"); Image img; int timeout=1000; @@ -867,7 +867,7 @@ EditorMeshPreviewPlugin::EditorMeshPreviewPlugin() { camera = VS::get_singleton()->camera_create(); VS::get_singleton()->viewport_attach_camera(viewport,camera); VS::get_singleton()->camera_set_transform(camera,Transform(Matrix3(),Vector3(0,0,3))); -// VS::get_singleton()->camera_set_perspective(camera,45,0.1,10); + //VS::get_singleton()->camera_set_perspective(camera,45,0.1,10); VS::get_singleton()->camera_set_orthogonal(camera,1.0,0.01,1000.0); light = VS::get_singleton()->light_create(VS::LIGHT_DIRECTIONAL); @@ -881,7 +881,7 @@ EditorMeshPreviewPlugin::EditorMeshPreviewPlugin() { VS::get_singleton()->instance_set_transform(light_instance2,Transform().looking_at(Vector3(0,1,0),Vector3(0,0,1))); -// sphere = VS::get_singleton()->mesh_create(); + //sphere = VS::get_singleton()->mesh_create(); mesh_instance = VS::get_singleton()->instance_create(); VS::get_singleton()->instance_set_scenario(mesh_instance,scenario); diff --git a/tools/editor/plugins/material_editor_plugin.cpp b/tools/editor/plugins/material_editor_plugin.cpp index d5ddd3804b..e9bcf063fd 100644 --- a/tools/editor/plugins/material_editor_plugin.cpp +++ b/tools/editor/plugins/material_editor_plugin.cpp @@ -355,11 +355,11 @@ void MaterialEditorPlugin::make_visible(bool p_visible) { if (p_visible) { material_editor->show(); -// material_editor->set_process(true); + //material_editor->set_process(true); } else { material_editor->hide(); -// material_editor->set_process(false); + //material_editor->set_process(false); } } diff --git a/tools/editor/plugins/mesh_editor_plugin.cpp b/tools/editor/plugins/mesh_editor_plugin.cpp index db96a60808..49cb02c9d8 100644 --- a/tools/editor/plugins/mesh_editor_plugin.cpp +++ b/tools/editor/plugins/mesh_editor_plugin.cpp @@ -218,11 +218,11 @@ void MeshEditorPlugin::make_visible(bool p_visible) { if (p_visible) { mesh_editor->show(); -// mesh_editor->set_process(true); + //mesh_editor->set_process(true); } else { mesh_editor->hide(); -// mesh_editor->set_process(false); + //mesh_editor->set_process(false); } } diff --git a/tools/editor/plugins/path_2d_editor_plugin.cpp b/tools/editor/plugins/path_2d_editor_plugin.cpp index 4a3ea91ff6..8e475e56f7 100644 --- a/tools/editor/plugins/path_2d_editor_plugin.cpp +++ b/tools/editor/plugins/path_2d_editor_plugin.cpp @@ -38,7 +38,7 @@ void Path2DEditor::_notification(int p_what) { case NOTIFICATION_READY: { -// button_create->set_icon( get_icon("Edit","EditorIcons")); + //button_create->set_icon( get_icon("Edit","EditorIcons")); //button_edit->set_icon( get_icon("MovePoint","EditorIcons")); //set_pressed_button(button_edit); //button_edit->set_pressed(true); diff --git a/tools/editor/plugins/path_editor_plugin.cpp b/tools/editor/plugins/path_editor_plugin.cpp index a69de2e78d..4f0afe9e94 100644 --- a/tools/editor/plugins/path_editor_plugin.cpp +++ b/tools/editor/plugins/path_editor_plugin.cpp @@ -449,7 +449,7 @@ void PathEditorPlugin::edit(Object *p_object) { pre->get_curve()->emit_signal("changed"); } } -// collision_polygon_editor->edit(p_object->cast_to<Node>()); + //collision_polygon_editor->edit(p_object->cast_to<Node>()); } bool PathEditorPlugin::handles(Object *p_object) const { @@ -543,7 +543,7 @@ PathEditorPlugin::PathEditorPlugin(EditorNode *p_node) { path_thin_material->set_flag(Material::FLAG_DOUBLE_SIDED,true); path_thin_material->set_flag(Material::FLAG_UNSHADED,true); -// SpatialEditor::get_singleton()->add_gizmo_plugin(this); + //SpatialEditor::get_singleton()->add_gizmo_plugin(this); sep = memnew( VSeparator); sep->hide(); diff --git a/tools/editor/plugins/path_editor_plugin.h b/tools/editor/plugins/path_editor_plugin.h index e446dfa7c7..79e978dc1d 100644 --- a/tools/editor/plugins/path_editor_plugin.h +++ b/tools/editor/plugins/path_editor_plugin.h @@ -83,7 +83,7 @@ public: Ref<FixedSpatialMaterial> path_thin_material; virtual bool forward_spatial_gui_input(Camera* p_camera,const InputEvent& p_event); -// virtual bool forward_gui_input(const InputEvent& p_event) { return collision_polygon_editor->forward_gui_input(p_event); } + //virtual bool forward_gui_input(const InputEvent& p_event) { return collision_polygon_editor->forward_gui_input(p_event); } virtual Ref<SpatialEditorGizmo> create_spatial_gizmo(Spatial* p_spatial); virtual String get_name() const { return "Path"; } bool has_main_screen() const { return false; } diff --git a/tools/editor/plugins/resource_preloader_editor_plugin.cpp b/tools/editor/plugins/resource_preloader_editor_plugin.cpp index 689cd6a353..0799732e02 100644 --- a/tools/editor/plugins/resource_preloader_editor_plugin.cpp +++ b/tools/editor/plugins/resource_preloader_editor_plugin.cpp @@ -52,7 +52,7 @@ void ResourcePreloaderEditor::_notification(int p_what) { if (p_what==NOTIFICATION_READY) { -// NodePath("/root")->connect("node_removed", this,"_node_removed",Vector<Variant>(),true); + //NodePath("/root")->connect("node_removed", this,"_node_removed",Vector<Variant>(),true); } if (p_what==NOTIFICATION_DRAW) { @@ -471,14 +471,14 @@ void ResourcePreloaderEditorPlugin::make_visible(bool p_visible) { //preloader_editor->show(); button->show(); editor->make_bottom_panel_item_visible(preloader_editor); -// preloader_editor->set_process(true); + //preloader_editor->set_process(true); } else { if (preloader_editor->is_visible_in_tree()) editor->hide_bottom_panel(); button->hide(); //preloader_editor->hide(); -// preloader_editor->set_process(false); + //preloader_editor->set_process(false); } } @@ -492,8 +492,8 @@ ResourcePreloaderEditorPlugin::ResourcePreloaderEditorPlugin(EditorNode *p_node) button=editor->add_bottom_panel_item("ResourcePreloader",preloader_editor); button->hide(); -// preloader_editor->set_anchor( MARGIN_TOP, Control::ANCHOR_END); -// preloader_editor->set_margin( MARGIN_TOP, 120 ); + //preloader_editor->set_anchor( MARGIN_TOP, Control::ANCHOR_END); + //preloader_editor->set_margin( MARGIN_TOP, 120 ); diff --git a/tools/editor/plugins/sample_editor_plugin.cpp b/tools/editor/plugins/sample_editor_plugin.cpp index afc151b900..cbeaeb7d60 100644 --- a/tools/editor/plugins/sample_editor_plugin.cpp +++ b/tools/editor/plugins/sample_editor_plugin.cpp @@ -422,11 +422,11 @@ void SampleEditorPlugin::make_visible(bool p_visible) { if (p_visible) { sample_editor->show(); -// sample_editor->set_process(true); + //sample_editor->set_process(true); } else { sample_editor->hide(); -// sample_editor->set_process(false); + //sample_editor->set_process(false); } } diff --git a/tools/editor/plugins/sample_library_editor_plugin.cpp b/tools/editor/plugins/sample_library_editor_plugin.cpp index 28a44d99f1..c3e2481b5a 100644 --- a/tools/editor/plugins/sample_library_editor_plugin.cpp +++ b/tools/editor/plugins/sample_library_editor_plugin.cpp @@ -58,7 +58,7 @@ void SampleLibraryEditor::_notification(int p_what) { if (p_what==NOTIFICATION_READY) { -// NodePath("/root")->connect("node_removed", this,"_node_removed",Vector<Variant>(),true); + //NodePath("/root")->connect("node_removed", this,"_node_removed",Vector<Variant>(),true); } if (p_what==NOTIFICATION_DRAW) { @@ -506,14 +506,14 @@ void SampleLibraryEditorPlugin::make_visible(bool p_visible) { //sample_library_editor->show(); button->show(); editor->make_bottom_panel_item_visible(sample_library_editor); -// sample_library_editor->set_process(true); + //sample_library_editor->set_process(true); } else { if (sample_library_editor->is_visible_in_tree()) editor->hide_bottom_panel(); button->hide(); -// sample_library_editor->set_process(false); + //sample_library_editor->set_process(false); } } @@ -529,8 +529,8 @@ SampleLibraryEditorPlugin::SampleLibraryEditorPlugin(EditorNode *p_node) { button->hide(); //sample_library_editor->set_area_as_parent_rect(); -// sample_library_editor->set_anchor( MARGIN_TOP, Control::ANCHOR_END); -// sample_library_editor->set_margin( MARGIN_TOP, 120 ); + //sample_library_editor->set_anchor( MARGIN_TOP, Control::ANCHOR_END); + //sample_library_editor->set_margin( MARGIN_TOP, 120 ); //sample_library_editor->hide(); diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp index 45340f9366..fa53e87fad 100644 --- a/tools/editor/plugins/script_editor_plugin.cpp +++ b/tools/editor/plugins/script_editor_plugin.cpp @@ -278,7 +278,7 @@ ScriptEditor *ScriptEditor::script_editor=NULL; String ScriptEditor::_get_debug_tooltip(const String&p_text,Node *_se) { -// ScriptEditorBase *se=_se->cast_to<ScriptEditorBase>(); + //ScriptEditorBase *se=_se->cast_to<ScriptEditorBase>(); String val = debugger->get_var_value(p_text); if (val!=String()) { @@ -311,7 +311,7 @@ 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); + //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) { @@ -1104,7 +1104,7 @@ static const Node * _find_node_with_script(const Node* p_node, const RefPtr & p_ Dictionary ScriptEditor::get_state() const { -// apply_scripts(); + //apply_scripts(); Dictionary state; #if 0 @@ -2247,7 +2247,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { { VBoxContainer *vbc = memnew( VBoxContainer ); disk_changed->add_child(vbc); - // disk_changed->set_child_rect(vbc); + //disk_changed->set_child_rect(vbc); Label *dl = memnew( Label ); dl->set_text(TTR("The following files are newer on disk.\nWhat action should be taken?:")); @@ -2293,7 +2293,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) { help_index->connect("open_class",this,"_help_class_open"); history_pos=-1; -// debugger_gui->hide(); + //debugger_gui->hide(); edit_pass=0; trim_trailing_whitespace_on_save = false; diff --git a/tools/editor/plugins/script_text_editor.cpp b/tools/editor/plugins/script_text_editor.cpp index a7cc1d4326..3de8812902 100644 --- a/tools/editor/plugins/script_text_editor.cpp +++ b/tools/editor/plugins/script_text_editor.cpp @@ -60,7 +60,7 @@ void ScriptTextEditor::apply_code() { if (script.is_null()) return; -// print_line("applying code"); + //print_line("applying code"); script->set_source_code(code_editor->get_text_edit()->get_text()); script->update_exports(); } diff --git a/tools/editor/plugins/shader_editor_plugin.cpp b/tools/editor/plugins/shader_editor_plugin.cpp index a42158c7b0..90d0f7fc93 100644 --- a/tools/editor/plugins/shader_editor_plugin.cpp +++ b/tools/editor/plugins/shader_editor_plugin.cpp @@ -127,7 +127,7 @@ void ShaderTextEditor::_load_theme_settings() { } //colorize core types -// Color basetype_color= EDITOR_DEF("text_editor/base_type_color",Color(0.3,0.3,0.0)); + //Color basetype_color= EDITOR_DEF("text_editor/base_type_color",Color(0.3,0.3,0.0)); //colorize comments @@ -253,9 +253,9 @@ void ShaderEditor::_menu_option(int p_option) { current->get_find_replace_bar()->popup_replace(); } break; -// case SEARCH_LOCATE_SYMBOL: { + //case SEARCH_LOCATE_SYMBOL: { -// } break; + //} break; case SEARCH_GOTO_LINE: { goto_line_dialog->popup_find_line(current->get_text_edit()); @@ -396,7 +396,7 @@ void ShaderEditor::_bind_methods() { ClassDB::bind_method("_menu_option",&ShaderEditor::_menu_option); ClassDB::bind_method("_params_changed",&ShaderEditor::_params_changed); ClassDB::bind_method("apply_shaders",&ShaderEditor::apply_shaders); -// ClassDB::bind_method("_close_current_tab",&ShaderEditor::_close_current_tab); + //ClassDB::bind_method("_close_current_tab",&ShaderEditor::_close_current_tab); } void ShaderEditor::ensure_select_current() { @@ -481,7 +481,7 @@ ShaderEditor::ShaderEditor() { search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/find_previous", TTR("Find Previous"), KEY_MASK_SHIFT|KEY_F3), SEARCH_FIND_PREV); search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/replace", TTR("Replace.."), KEY_MASK_CMD|KEY_R), SEARCH_REPLACE); search_menu->get_popup()->add_separator(); -// search_menu->get_popup()->add_item("Locate Symbol..",SEARCH_LOCATE_SYMBOL,KEY_MASK_CMD|KEY_K); + //search_menu->get_popup()->add_item("Locate Symbol..",SEARCH_LOCATE_SYMBOL,KEY_MASK_CMD|KEY_K); search_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/goto_line", TTR("Goto Line.."), KEY_MASK_CMD|KEY_L), SEARCH_GOTO_LINE); search_menu->get_popup()->connect("id_pressed", this,"_menu_option"); @@ -512,8 +512,10 @@ bool ShaderEditorPlugin::handles(Object *p_object) const { bool handles = true; Shader *shader=p_object->cast_to<Shader>(); - //if (!shader || shader->cast_to<ShaderGraph>()) // Dont handle ShaderGraph's - // handles = false; + /* + if (!shader || shader->cast_to<ShaderGraph>()) // Dont handle ShaderGraph's + handles = false; + */ return shader!=NULL; } diff --git a/tools/editor/plugins/shader_graph_editor_plugin.cpp b/tools/editor/plugins/shader_graph_editor_plugin.cpp index fa28129b6d..d989c5b30d 100644 --- a/tools/editor/plugins/shader_graph_editor_plugin.cpp +++ b/tools/editor/plugins/shader_graph_editor_plugin.cpp @@ -2933,9 +2933,9 @@ ShaderGraphEditorPlugin::ShaderGraphEditorPlugin(EditorNode *p_node, bool p_2d) SpatialEditor::get_singleton()->get_shader_split()->add_child(shader_editor); - // editor->get_viewport()->add_child(shader_editor); - // shader_editor->set_area_as_parent_rect(); - // shader_editor->hide(); + //editor->get_viewport()->add_child(shader_editor); + //shader_editor->set_area_as_parent_rect(); + //shader_editor->hide(); } diff --git a/tools/editor/plugins/spatial_editor_plugin.cpp b/tools/editor/plugins/spatial_editor_plugin.cpp index 27200a5d5d..e159df86ab 100644 --- a/tools/editor/plugins/spatial_editor_plugin.cpp +++ b/tools/editor/plugins/spatial_editor_plugin.cpp @@ -278,7 +278,7 @@ ObjectID SpatialEditorViewport::_select_ray(const Point2& p_pos, bool p_append,b Set<Ref<SpatialEditorGizmo> > found_gizmos; //uint32_t closest=0; -// float closest_dist=0; + //float closest_dist=0; r_includes_current=false; @@ -580,8 +580,8 @@ void SpatialEditorViewport::_compute_edit(const Point2& p_point) { List<Node*> &selection = editor_selection->get_selected_node_list(); -// Vector3 center; -// int nc=0; + //Vector3 center; + //int nc=0; for(List<Node*>::Element *E=selection.front();E;E=E->next()) { Spatial *sp = E->get()->cast_to<Spatial>(); @@ -593,16 +593,14 @@ void SpatialEditorViewport::_compute_edit(const Point2& p_point) { continue; se->original=se->sp->get_global_transform(); -// center+=se->original.origin; -// nc++; + //center+=se->original.origin; + //nc++; } - -// if (nc) -// _edit.center=center/float(nc); - - - + /* + if (nc) + _edit.center=center/float(nc); + */ } static int _get_key_modifier(const String& p_property) { @@ -2498,7 +2496,7 @@ void SpatialEditor::update_transform_gizmo() { center.expand_to(xf.origin); gizmo_basis=Basis(); } -// count++; + //count++; } Vector3 pcenter = center.pos+center.size*0.5; @@ -2761,16 +2759,16 @@ void SpatialEditor::edit(Spatial *p_spatial) { } } + /* if (p_spatial) { - //_validate_selection(); - //if (selected.has(p_spatial->get_instance_ID()) && selected.size()==1) - // return; - //_select(p_spatial->get_instance_ID(),false,true); + _validate_selection(); + if (selected.has(p_spatial->get_instance_ID()) && selected.size()==1) + return; + _select(p_spatial->get_instance_ID(),false,true); // should become the selection } - - + */ } void SpatialEditor::_xform_dialog_action() { @@ -2837,8 +2835,8 @@ void SpatialEditor::_menu_item_pressed(int p_option) { tool_button[i]->set_pressed(i==p_option); tool_mode=(ToolMode)p_option; - // static const char *_mode[]={"Selection Mode.","Translation Mode.","Rotation Mode.","Scale Mode.","List Selection Mode."}; -// set_message(_mode[p_option],3); + //static const char *_mode[]={"Selection Mode.","Translation Mode.","Rotation Mode.","Scale Mode.","List Selection Mode."}; + //set_message(_mode[p_option],3); update_transform_gizmo(); } break; @@ -3214,9 +3212,9 @@ void SpatialEditor::_init_indicators() { VisualServer::get_singleton()->mesh_surface_set_material(origin,0,indicator_mat->get_rid()); -// origin = VisualServer::get_singleton()->poly_create(); -// VisualServer::get_singleton()->poly_add_primitive(origin,origin_points,Vector<Vector3>(),origin_colors,Vector<Vector3>()); -// VisualServer::get_singleton()->poly_set_material(origin,indicator_mat,true); + //origin = VisualServer::get_singleton()->poly_create(); + //VisualServer::get_singleton()->poly_add_primitive(origin,origin_points,Vector<Vector3>(),origin_colors,Vector<Vector3>()); + //VisualServer::get_singleton()->poly_set_material(origin,indicator_mat,true); origin_instance = VisualServer::get_singleton()->instance_create2(origin,get_tree()->get_root()->get_world()->get_scenario()); VS::get_singleton()->instance_set_layer_mask(origin_instance,1<<SpatialEditorViewport::GIZMO_GRID_LAYER); @@ -3674,7 +3672,7 @@ void SpatialEditor::_node_removed(Node* p_node) { void SpatialEditor::_bind_methods() { -// ClassDB::bind_method("_gui_input",&SpatialEditor::_gui_input); + //ClassDB::bind_method("_gui_input",&SpatialEditor::_gui_input); ClassDB::bind_method("_unhandled_key_input",&SpatialEditor::_unhandled_key_input); ClassDB::bind_method("_node_removed",&SpatialEditor::_node_removed); ClassDB::bind_method("_menu_item_pressed",&SpatialEditor::_menu_item_pressed); @@ -3738,7 +3736,7 @@ void SpatialEditor::clear() { void SpatialEditor::_update_ambient_light_color(const Color& p_color) { -// viewport_environment->fx_set_param(Environment::FX_PARAM_AMBIENT_LIGHT_COLOR,settings_ambient_color->get_color()); + //viewport_environment->fx_set_param(Environment::FX_PARAM_AMBIENT_LIGHT_COLOR,settings_ambient_color->get_color()); } @@ -4008,8 +4006,8 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) { settings_vbc->add_margin_child(TTR("Ambient Light Color:"),settings_ambient_color); settings_ambient_color->connect("color_changed",this,"_update_ambient_light_color"); -// viewport_environment->set_enable_fx(Environment::FX_AMBIENT_LIGHT,true); -// viewport_environment->fx_set_param(Environment::FX_PARAM_AMBIENT_LIGHT_COLOR,Color(0.15,0.15,0.15)); + //viewport_environment->set_enable_fx(Environment::FX_AMBIENT_LIGHT,true); + //viewport_environment->fx_set_param(Environment::FX_PARAM_AMBIENT_LIGHT_COLOR,Color(0.15,0.15,0.15)); settings_ambient_color->set_color(Color(0.15,0.15,0.15)); @@ -4154,7 +4152,7 @@ void SpatialEditorPlugin::set_state(const Dictionary& p_state) { void SpatialEditor::snap_cursor_to_plane(const Plane& p_plane) { -// cursor.pos=p_plane.project(cursor.pos); + //cursor.pos=p_plane.project(cursor.pos); } void SpatialEditorPlugin::_bind_methods() { diff --git a/tools/editor/plugins/sprite_frames_editor_plugin.cpp b/tools/editor/plugins/sprite_frames_editor_plugin.cpp index 7706b063a9..095b059836 100644 --- a/tools/editor/plugins/sprite_frames_editor_plugin.cpp +++ b/tools/editor/plugins/sprite_frames_editor_plugin.cpp @@ -56,7 +56,7 @@ void SpriteFramesEditor::_notification(int p_what) { if (p_what==NOTIFICATION_READY) { -// NodePath("/root")->connect("node_removed", this,"_node_removed",Vector<Variant>(),true); + //NodePath("/root")->connect("node_removed", this,"_node_removed",Vector<Variant>(),true); } if (p_what==NOTIFICATION_DRAW) { @@ -937,14 +937,14 @@ void SpriteFramesEditorPlugin::make_visible(bool p_visible) { if (p_visible) { button->show(); editor->make_bottom_panel_item_visible(frames_editor); -// frames_editor->set_process(true); + //frames_editor->set_process(true); } else { button->hide(); if (frames_editor->is_visible_in_tree()) editor->hide_bottom_panel(); -// frames_editor->set_process(false); + //frames_editor->set_process(false); } } diff --git a/tools/editor/plugins/style_box_editor_plugin.cpp b/tools/editor/plugins/style_box_editor_plugin.cpp index 171eac57d9..396ebd0052 100644 --- a/tools/editor/plugins/style_box_editor_plugin.cpp +++ b/tools/editor/plugins/style_box_editor_plugin.cpp @@ -49,9 +49,9 @@ void StyleBoxEditor::_sb_changed() { void StyleBoxEditor::_bind_methods() { ClassDB::bind_method("_sb_changed",&StyleBoxEditor::_sb_changed); -// ClassDB::bind_method("_import",&StyleBoxEditor::_import); -// ClassDB::bind_method("_import_accept",&StyleBoxEditor::_import_accept); -// ClassDB::bind_method("_preview_text_changed",&StyleBoxEditor::_preview_text_changed); + //ClassDB::bind_method("_import",&StyleBoxEditor::_import); + //ClassDB::bind_method("_import_accept",&StyleBoxEditor::_import_accept); + //ClassDB::bind_method("_preview_text_changed",&StyleBoxEditor::_preview_text_changed); } StyleBoxEditor::StyleBoxEditor() { diff --git a/tools/editor/plugins/texture_editor_plugin.cpp b/tools/editor/plugins/texture_editor_plugin.cpp index 7ff7d0f2f7..a846a908d2 100644 --- a/tools/editor/plugins/texture_editor_plugin.cpp +++ b/tools/editor/plugins/texture_editor_plugin.cpp @@ -113,11 +113,11 @@ void TextureEditorPlugin::make_visible(bool p_visible) { if (p_visible) { texture_editor->show(); -// texture_editor->set_process(true); + //texture_editor->set_process(true); } else { texture_editor->hide(); -// texture_editor->set_process(false); + //texture_editor->set_process(false); } } diff --git a/tools/editor/plugins/theme_editor_plugin.cpp b/tools/editor/plugins/theme_editor_plugin.cpp index 84f711675b..027e91ade8 100644 --- a/tools/editor/plugins/theme_editor_plugin.cpp +++ b/tools/editor/plugins/theme_editor_plugin.cpp @@ -693,9 +693,9 @@ ThemeEditor::ThemeEditor() { -// main_panel->add_child(panel); -// panel->set_area_as_parent_rect(); -// panel->set_margin( MARGIN_TOP,20 ); + //main_panel->add_child(panel); + //panel->set_area_as_parent_rect(); + //panel->set_margin( MARGIN_TOP,20 ); first_vb->add_child(memnew( Label("Label") )); @@ -987,7 +987,7 @@ ThemeEditorPlugin::ThemeEditorPlugin(EditorNode *p_node) { theme_editor = memnew( ThemeEditor ); theme_editor->set_custom_minimum_size(Size2(0,200)); -// p_node->get_viewport()->add_child(theme_editor); + //p_node->get_viewport()->add_child(theme_editor); button=editor->add_bottom_panel_item("Theme",theme_editor); button->hide(); diff --git a/tools/editor/project_export.cpp b/tools/editor/project_export.cpp index dd3a9c3d38..10005b6850 100644 --- a/tools/editor/project_export.cpp +++ b/tools/editor/project_export.cpp @@ -67,14 +67,14 @@ bool ProjectExportDialog::_create_tree(TreeItem *p_parent,EditorFileSystemDirect has_items=true; } -// int cc = p_options.get_slice_count(","); + //int cc = p_options.get_slice_count(","); for (int i=0;i<p_dir->get_file_count();i++) { TreeItem *fitem = tree->create_item(item); //fitem->set_cell_mode(0,TreeItem::CELL_MODE_CHECK); //fitem->set_editable(0,true); - // fitem->set_checked(0,isfave); + //fitem->set_checked(0,isfave); fitem->set_text(0,p_dir->get_file(i)); String path = p_dir->get_file_path(i); fitem->set_tooltip(0,path); @@ -164,8 +164,8 @@ void ProjectExportDialog::_platform_selected() { String p =platforms->get_selected()->get_metadata(0); _update_platform(); -// editor->save_import_export(); -// EditorFileSystem::get_singleton()->scan(); + //editor->save_import_export(); + //EditorFileSystem::get_singleton()->scan(); } @@ -313,7 +313,7 @@ void ProjectExportDialog::_notification(int p_what) { } EditorFileSystem::get_singleton()->connect("filesystem_changed",this,"_scan_finished"); -// _rescan(); + //_rescan(); _update_platform(); export_mode->select( EditorImportExport::get_singleton()->get_export_filter() ); convert_text_scenes->set_pressed( EditorImportExport::get_singleton()->get_convert_text_scenes() ); @@ -343,7 +343,7 @@ void ProjectExportDialog::_notification(int p_what) { } image_formats->connect("item_edited",this,"_format_toggled"); group_add->set_icon(get_icon("Add","EditorIcons")); -// group_del->set_icon(get_icon("Del","EditorIcons")); + //group_del->set_icon(get_icon("Del","EditorIcons")); _update_group_list(); _update_group(); @@ -1332,8 +1332,8 @@ void ProjectExportDialog::_bind_methods() { ClassDB::bind_method(_MD("_keystore_created"),&ProjectExportDialog::_keystore_created); -// ADD_SIGNAL(MethodInfo("instance")); -// ADD_SIGNAL(MethodInfo("open")); + //ADD_SIGNAL(MethodInfo("instance")); + //ADD_SIGNAL(MethodInfo("open")); } @@ -1775,11 +1775,13 @@ Error ProjectExport::export_project(const String& p_preset) { { List<String> l; -// SceneLoader::get_recognized_extensions(&l); -// for(List<String>::Element *E=l.front();E;E=E->next()) { -// -// scene_extensions.insert(E->get()); -// } + /* + SceneLoader::get_recognized_extensions(&l); + for(List<String>::Element *E=l.front();E;E=E->next()) { + + scene_extensions.insert(E->get()); + } + */ ResourceLoader::get_recognized_extensions_for_type("",&l); for(List<String>::Element *E=l.front();E;E=E->next()) { @@ -1994,8 +1996,10 @@ Error ProjectExport::export_project(const String& p_preset) { uint32_t flags=0; -// if (saver->is_bundle_scenes_enabled()) -// flags|=Reso::FLAG_BUNDLE_INSTANCED_SCENES; + /* + if (saver->is_bundle_scenes_enabled()) + flags|=Reso::FLAG_BUNDLE_INSTANCED_SCENES; + */ saver->set_bundle_exceptions(NULL); if (E->get().depaction>=ProjectExportSettings::DA_BUNDLE) { flags|=ResourceSaver::FLAG_BUNDLE_RESOURCES; @@ -2041,7 +2045,7 @@ Error ProjectExport::export_project(const String& p_preset) { ERR_FAIL_COND_V(err,ERR_CANT_OPEN); } source_file=write_file; - // project_settings->add_remapped_path(src_scene,path,platform); + //project_settings->add_remapped_path(src_scene,path,platform); } @@ -2093,7 +2097,7 @@ Error ProjectExport::export_project(const String& p_preset) { -// added_settings["remap/"+platform]=remaps;` + //added_settings["remap/"+platform]=remaps;` added_settings["remap/"+platform]=Variant(remaps).operator Array(); } diff --git a/tools/editor/project_export.h b/tools/editor/project_export.h index 433f4502a1..06992a7e34 100644 --- a/tools/editor/project_export.h +++ b/tools/editor/project_export.h @@ -99,7 +99,7 @@ private: bool _create_tree(TreeItem *p_parent,EditorFileSystemDirectory *p_dir); void _rescan(); -// void _confirmed(); + //void _confirmed(); void _scan_finished(); void _validate_platform(); diff --git a/tools/editor/project_manager.cpp b/tools/editor/project_manager.cpp index 01dca396c8..2cf940a29a 100644 --- a/tools/editor/project_manager.cpp +++ b/tools/editor/project_manager.cpp @@ -404,7 +404,7 @@ public: VBoxContainer *vb = memnew( VBoxContainer ); add_child(vb); - // set_child_rect(vb); + //set_child_rect(vb); Label* l = memnew(Label); l->set_text(TTR("Project Path:")); @@ -1003,7 +1003,7 @@ void ProjectManager::_run_project_confirm() { Error err = OS::get_singleton()->execute(exec,args,false,&pid); ERR_FAIL_COND(err); } - // get_scene()->quit(); do not quit + //get_scene()->quit(); do not quit } void ProjectManager::_run_project() { diff --git a/tools/editor/project_settings.cpp b/tools/editor/project_settings.cpp index 968333d466..0396456c49 100644 --- a/tools/editor/project_settings.cpp +++ b/tools/editor/project_settings.cpp @@ -1357,7 +1357,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) { message = memnew( ConfirmationDialog ); add_child(message); -// message->get_cancel()->hide(); + //message->get_cancel()->hide(); message->set_hide_on_ok(true); Control *input_base = memnew( Control ); @@ -1424,7 +1424,7 @@ ProjectSettings::ProjectSettings(EditorData *p_data) { hbc = memnew( HBoxContainer ); device_input->add_child(hbc); -// device_input->set_child_rect(hbc); + //device_input->set_child_rect(hbc); VBoxContainer *vbc_left = memnew( VBoxContainer ); hbc->add_child(vbc_left); diff --git a/tools/editor/property_editor.cpp b/tools/editor/property_editor.cpp index c1a01e0fd0..f602c3ee72 100644 --- a/tools/editor/property_editor.cpp +++ b/tools/editor/property_editor.cpp @@ -2161,7 +2161,7 @@ bool PropertyEditor::_get_instanced_node_original_property(const StringName& p_p bool found=false; -// print_line("for prop - "+String(p_prop)); + //print_line("for prop - "+String(p_prop)); while(node) { @@ -2174,13 +2174,13 @@ bool PropertyEditor::_get_instanced_node_original_property(const StringName& p_p } else { ss=node->get_scene_instance_state(); } - // print_line("at - "+String(edited_scene->get_path_to(node))); + //print_line("at - "+String(edited_scene->get_path_to(node))); if (ss.is_valid()) { NodePath np = node->get_path_to(orig); int node_idx = ss->find_node_by_path(np); - // print_line("\t valid, nodeidx "+itos(node_idx)); + //print_line("\t valid, nodeidx "+itos(node_idx)); if (node_idx>=0) { bool lfound=false; Variant lvar; @@ -2189,7 +2189,7 @@ bool PropertyEditor::_get_instanced_node_original_property(const StringName& p_p found=true; value=lvar; - // print_line("\t found value "+String(value)); + //print_line("\t found value "+String(value)); } } } @@ -2215,7 +2215,7 @@ bool PropertyEditor::_is_property_different(const Variant& p_current, const Vari Node* edited_scene =EditorNode::get_singleton()->get_edited_scene(); bool found_state=false; - // print_line("for prop - "+String(p_prop)); + //print_line("for prop - "+String(p_prop)); while(node) { @@ -2867,7 +2867,7 @@ TreeItem *PropertyEditor::get_parent_node(String p_path,HashMap<String,TreeItem* item = item_paths.get(p_path); } else { -// printf("path %s parent path %s - item name %s\n",p_path.ascii().get_data(),p_path.left( p_path.find_last("/") ).ascii().get_data(),p_path.right( p_path.find_last("/") ).ascii().get_data() ); + //printf("path %s parent path %s - item name %s\n",p_path.ascii().get_data(),p_path.left( p_path.find_last("/") ).ascii().get_data(),p_path.right( p_path.find_last("/") ).ascii().get_data() ); TreeItem *parent = get_parent_node( p_path.left( p_path.find_last("/") ),item_paths,root ); item = tree->create_item( parent ); @@ -3174,8 +3174,10 @@ void PropertyEditor::update_tree() { //printf("property %s\n",basename.ascii().get_data()); TreeItem * parent = get_parent_node(path,item_path,current_category?current_category:root ); - //if (parent->get_parent()==root) - // parent=root; + /* + if (parent->get_parent()==root) + parent=root; + */ int level = 0; if (parent!=root) { level++; @@ -3359,7 +3361,7 @@ void PropertyEditor::update_tree() { item->set_range_config(1,min,max,step,p.hint==PROPERTY_HINT_EXP_RANGE); } else if (p.hint==PROPERTY_HINT_ENUM) { -// int c = p.hint_string.get_slice_count(","); + //int c = p.hint_string.get_slice_count(","); item->set_text(1,p.hint_string); if (show_type_icons) item->set_icon( 0,get_icon("Enum","EditorIcons") ); @@ -3368,7 +3370,7 @@ void PropertyEditor::update_tree() { break; } else if (p.hint==PROPERTY_HINT_OBJECT_ID) { -// int c = p.hint_string.get_slice_count(","); + //int c = p.hint_string.get_slice_count(","); item->set_cell_mode(1,TreeItem::CELL_MODE_CUSTOM); String type=p.hint_string; @@ -3704,7 +3706,7 @@ void PropertyEditor::update_tree() { item->set_cell_mode( 1, TreeItem::CELL_MODE_CUSTOM ); item->set_editable( 1, !read_only ); -// item->set_text(1,obj->get(p.name)); + //item->set_text(1,obj->get(p.name)); item->set_custom_bg_color(1,obj->get(p.name)); if (show_type_icons) item->set_icon( 0,get_icon("Color","EditorIcons") ); @@ -3790,7 +3792,7 @@ void PropertyEditor::update_tree() { item->set_icon( 0, get_icon("Object","EditorIcons") ); } -// item->double_click_signal.connect( Method1<int>( Method2<int,String>( this, &Editoritem_obj_edited ), p.name ) ); + //item->double_click_signal.connect( Method1<int>( Method2<int,String>( this, &Editoritem_obj_edited ), p.name ) ); } break; default: {}; diff --git a/tools/editor/reparent_dialog.cpp b/tools/editor/reparent_dialog.cpp index a8909b0772..4b6a032b64 100644 --- a/tools/editor/reparent_dialog.cpp +++ b/tools/editor/reparent_dialog.cpp @@ -88,7 +88,7 @@ ReparentDialog::ReparentDialog() { VBoxContainer *vbc = memnew( VBoxContainer ); add_child(vbc); -// set_child_rect(vbc); + //set_child_rect(vbc); tree = memnew( SceneTreeEditor(false) ); tree->set_show_enabled_subscene(true); diff --git a/tools/editor/resources_dock.cpp b/tools/editor/resources_dock.cpp index c8fa1eda77..ddd4a782e4 100644 --- a/tools/editor/resources_dock.cpp +++ b/tools/editor/resources_dock.cpp @@ -126,8 +126,10 @@ void ResourcesDock::save_resource(const String& p_path,const Ref<Resource>& p_re int flg=0; if (EditorSettings::get_singleton()->get("on_save/compress_binary_resources")) flg|=ResourceSaver::FLAG_COMPRESS; - //if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative")) - // flg|=ResourceSaver::FLAG_RELATIVE_PATHS; + /* + if (EditorSettings::get_singleton()->get("on_save/save_paths_as_relative")) + flg|=ResourceSaver::FLAG_RELATIVE_PATHS; + */ String path = GlobalConfig::get_singleton()->localize_path(p_path); Error err = ResourceSaver::save(path,p_resource,flg|ResourceSaver::FLAG_REPLACE_SUBRESOURCE_PATHS); @@ -137,7 +139,7 @@ void ResourcesDock::save_resource(const String& p_path,const Ref<Resource>& p_re accept->popup_centered_minsize(); return; } -// EditorFileSystem::get_singleton()->update_file(path,p_resource->get_type()); + //EditorFileSystem::get_singleton()->update_file(path,p_resource->get_type()); ((Resource*)p_resource.ptr())->set_path(path); editor->emit_signal("resource_saved",p_resource); diff --git a/tools/editor/scene_tree_dock.cpp b/tools/editor/scene_tree_dock.cpp index 762213787c..6a1d1ed3b2 100644 --- a/tools/editor/scene_tree_dock.cpp +++ b/tools/editor/scene_tree_dock.cpp @@ -295,10 +295,10 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { switch(p_tool) { case TOOL_NEW: { - - - //if (!_validate_no_foreign()) - // break; + /* + if (!_validate_no_foreign()) + break; + */ create_dialog->popup(true); } break; case TOOL_INSTANCE: { @@ -319,8 +319,10 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { break; } - //if (!_validate_no_foreign()) - // break; + /* + if (!_validate_no_foreign()) + break; + */ file->set_mode(EditorFileDialog::MODE_OPEN_FILE); List<String> extensions; @@ -345,10 +347,12 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { if (!current) break; - //if (!_validate_no_foreign()) - // break; - //connect_dialog->popup_centered_ratio(); - //connect_dialog->set_node(current); + /* + if (!_validate_no_foreign()) + break; + connect_dialog->popup_centered_ratio(); + connect_dialog->set_node(current); + */ } break; case TOOL_GROUP: { @@ -356,10 +360,12 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { Node *current = scene_tree->get_selected(); if (!current) break; - //if (!_validate_no_foreign()) - // break; - //groups_editor->set_current(current); - //groups_editor->popup_centered_ratio(); + /* + if (!_validate_no_foreign()) + break; + groups_editor->set_current(current); + groups_editor->popup_centered_ratio(); + */ } break; case TOOL_ATTACH_SCRIPT: { @@ -367,8 +373,10 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) { if (!selected) break; - //if (!_validate_no_foreign()) - // break; + /* + if (!_validate_no_foreign()) + break; + */ Ref<Script> existing = selected->get_script(); if (existing.is_valid()) @@ -1556,8 +1564,10 @@ void SceneTreeDock::_new_scene_from(String p_file) { int flg=0; if (EditorSettings::get_singleton()->get("filesystem/on_save/compress_binary_resources")) flg|=ResourceSaver::FLAG_COMPRESS; - //if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative")) - // flg|=ResourceSaver::FLAG_RELATIVE_PATHS; + /* + if (EditorSettings::get_singleton()->get("filesystem/on_save/save_paths_as_relative")) + flg|=ResourceSaver::FLAG_RELATIVE_PATHS; + */ err = ResourceSaver::save(p_file,sdata,flg); diff --git a/tools/editor/scene_tree_editor.cpp b/tools/editor/scene_tree_editor.cpp index a1a8803b04..7b6a03e20e 100644 --- a/tools/editor/scene_tree_editor.cpp +++ b/tools/editor/scene_tree_editor.cpp @@ -671,8 +671,8 @@ void SceneTreeEditor::_notification(int p_what) { EditorSettings::get_singleton()->connect("settings_changed",this,"_editor_settings_changed"); -// get_scene()->connect("tree_changed",this,"_tree_changed",Vector<Variant>(),CONNECT_DEFERRED); -// get_scene()->connect("node_removed",this,"_node_removed",Vector<Variant>(),CONNECT_DEFERRED); + //get_scene()->connect("tree_changed",this,"_tree_changed",Vector<Variant>(),CONNECT_DEFERRED); + //get_scene()->connect("node_removed",this,"_node_removed",Vector<Variant>(),CONNECT_DEFERRED); _update_tree(); } if (p_what==NOTIFICATION_EXIT_TREE) { @@ -1081,7 +1081,7 @@ void SceneTreeEditor::_warning_changed(Node* p_for_node) { //should use a timer update_timer->start(); -// print_line("WARNING CHANGED "+String(p_for_node->get_name())); + //print_line("WARNING CHANGED "+String(p_for_node->get_name())); } @@ -1186,7 +1186,7 @@ SceneTreeEditor::SceneTreeEditor(bool p_label,bool p_can_rename, bool p_can_open tree->connect("item_edited", this,"_renamed",varray(),CONNECT_DEFERRED); tree->connect("multi_selected",this,"_cell_multi_selected"); tree->connect("button_pressed",this,"_cell_button_pressed"); -// tree->connect("item_edited", this,"_renamed",Vector<Variant>(),true); + //tree->connect("item_edited", this,"_renamed",Vector<Variant>(),true); error = memnew( AcceptDialog ); add_child(error); diff --git a/tools/editor/scene_tree_editor.h b/tools/editor/scene_tree_editor.h index 3cc1bd2388..5586f02c00 100644 --- a/tools/editor/scene_tree_editor.h +++ b/tools/editor/scene_tree_editor.h @@ -175,8 +175,8 @@ class SceneTreeDialog : public ConfirmationDialog { GDCLASS( SceneTreeDialog, ConfirmationDialog ); SceneTreeEditor *tree; -// Button *select; -// Button *cancel; + //Button *select; + //Button *cancel; void update_tree(); void _select(); diff --git a/tools/editor/script_editor_debugger.cpp b/tools/editor/script_editor_debugger.cpp index 47725896e6..c8755b0473 100644 --- a/tools/editor/script_editor_debugger.cpp +++ b/tools/editor/script_editor_debugger.cpp @@ -520,7 +520,7 @@ void ScriptEditorDebugger::_parse_message(const String& p_msg,const Array& p_dat d["frame"]=i; s->set_metadata(0,d); -// String line = itos(i)+" - "+String(d["file"])+":"+itos(d["line"])+" - at func: "+d["function"]; + //String line = itos(i)+" - "+String(d["file"])+":"+itos(d["line"])+" - at func: "+d["function"]; String line = itos(i)+" - "+String(d["file"])+":"+itos(d["line"]); s->set_text(0,line); @@ -1986,7 +1986,7 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor){ ScriptEditorDebugger::~ScriptEditorDebugger() { -// inspector->edit(NULL); + //inspector->edit(NULL); memdelete(variables); ppeer->set_stream_peer(Ref<StreamPeer>()); diff --git a/tools/editor/spatial_editor_gizmos.cpp b/tools/editor/spatial_editor_gizmos.cpp index 62de22a4b3..82dfa94c06 100644 --- a/tools/editor/spatial_editor_gizmos.cpp +++ b/tools/editor/spatial_editor_gizmos.cpp @@ -3117,8 +3117,8 @@ void Generic6DOFJointSpatialGizmo::redraw() { float s = ll+i*(Math_PI*2.0)/points; float n = ll+(i+1)*(Math_PI*2.0)/points; -// Vector3 from=Vector3(0,Math::cos(s),-Math::sin(s) )*cs; -// Vector3 to=Vector3( 0,Math::cos(n),-Math::sin(n) )*cs; + //Vector3 from=Vector3(0,Math::cos(s),-Math::sin(s) )*cs; + //Vector3 to=Vector3( 0,Math::cos(n),-Math::sin(n) )*cs; Vector3 from; SET_VTX(from,0, Math::cos(s), -Math::sin(s) ); |