summaryrefslogtreecommitdiff
path: root/tools/editor
diff options
context:
space:
mode:
Diffstat (limited to 'tools/editor')
-rw-r--r--tools/editor/animation_editor.cpp34
-rw-r--r--tools/editor/animation_editor.h2
-rw-r--r--tools/editor/asset_library_editor_plugin.cpp2
-rw-r--r--tools/editor/call_dialog.cpp2
-rw-r--r--tools/editor/code_editor.cpp4
-rw-r--r--tools/editor/connections_dialog.cpp6
-rw-r--r--tools/editor/connections_dialog.h4
-rw-r--r--tools/editor/create_dialog.cpp2
-rw-r--r--tools/editor/editor_asset_installer.cpp2
-rw-r--r--tools/editor/editor_autoload_settings.cpp2
-rw-r--r--tools/editor/editor_data.cpp8
-rw-r--r--tools/editor/editor_dir_dialog.cpp2
-rw-r--r--tools/editor/editor_file_dialog.cpp6
-rw-r--r--tools/editor/editor_file_dialog.h2
-rw-r--r--tools/editor/editor_file_system.cpp12
-rw-r--r--tools/editor/editor_file_system.h2
-rw-r--r--tools/editor/editor_fonts.cpp6
-rw-r--r--tools/editor/editor_help.cpp48
-rw-r--r--tools/editor/editor_import_export.cpp19
-rw-r--r--tools/editor/editor_log.cpp8
-rw-r--r--tools/editor/editor_log.h6
-rw-r--r--tools/editor/editor_node.cpp144
-rw-r--r--tools/editor/editor_node.h2
-rw-r--r--tools/editor/editor_profiler.cpp4
-rw-r--r--tools/editor/editor_profiler.h2
-rw-r--r--tools/editor/editor_run_script.cpp2
-rw-r--r--tools/editor/editor_settings.cpp6
-rw-r--r--tools/editor/editor_sub_scene.cpp2
-rw-r--r--tools/editor/fileserver/editor_file_server.cpp2
-rw-r--r--tools/editor/filesystem_dock.cpp18
-rw-r--r--tools/editor/icons/2x/icon_patch_9_rect.png (renamed from tools/editor/icons/2x/icon_patch_9_frame.png)bin162 -> 162 bytes
-rw-r--r--tools/editor/icons/2x/icon_reference_rect.png (renamed from tools/editor/icons/2x/icon_reference_frame.png)bin160 -> 160 bytes
-rw-r--r--tools/editor/icons/2x/icon_texture_rect.png (renamed from tools/editor/icons/2x/icon_texture_frame.png)bin201 -> 201 bytes
-rw-r--r--tools/editor/icons/icon_patch_9_rect.png (renamed from tools/editor/icons/icon_patch_9_frame.png)bin128 -> 128 bytes
-rw-r--r--tools/editor/icons/icon_reference_rect.png (renamed from tools/editor/icons/icon_reference_frame.png)bin128 -> 128 bytes
-rw-r--r--tools/editor/icons/icon_texture_rect.png (renamed from tools/editor/icons/icon_texture_frame.png)bin158 -> 158 bytes
-rw-r--r--tools/editor/icons/source/icon_patch_9_rect.svg (renamed from tools/editor/icons/source/icon_patch_9_frame.svg)2
-rw-r--r--tools/editor/icons/source/icon_reference_rect.svg (renamed from tools/editor/icons/source/icon_reference_frame.svg)2
-rw-r--r--tools/editor/icons/source/icon_texture_rect.svg (renamed from tools/editor/icons/source/icon_texture_frame.svg)2
-rw-r--r--tools/editor/io_plugins/editor_bitmask_import_plugin.cpp10
-rw-r--r--tools/editor/io_plugins/editor_export_scene.cpp2
-rw-r--r--tools/editor/io_plugins/editor_font_import_plugin.cpp74
-rw-r--r--tools/editor/io_plugins/editor_import_collada.cpp78
-rw-r--r--tools/editor/io_plugins/editor_mesh_import_plugin.cpp4
-rw-r--r--tools/editor/io_plugins/editor_sample_import_plugin.cpp26
-rw-r--r--tools/editor/io_plugins/editor_scene_import_plugin.cpp54
-rw-r--r--tools/editor/io_plugins/editor_texture_import_plugin.cpp76
-rw-r--r--tools/editor/io_plugins/editor_translation_import_plugin.cpp10
-rw-r--r--tools/editor/output_strings.cpp2
-rw-r--r--tools/editor/plugins/animation_player_editor_plugin.cpp30
-rw-r--r--tools/editor/plugins/animation_player_editor_plugin.h2
-rw-r--r--tools/editor/plugins/animation_tree_editor_plugin.cpp26
-rw-r--r--tools/editor/plugins/baked_light_baker.cpp33
-rw-r--r--tools/editor/plugins/baked_light_baker.h9
-rw-r--r--tools/editor/plugins/baked_light_editor_plugin.cpp8
-rw-r--r--tools/editor/plugins/camera_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/camera_editor_plugin.h2
-rw-r--r--tools/editor/plugins/canvas_item_editor_plugin.cpp48
-rw-r--r--tools/editor/plugins/cube_grid_theme_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/editor_preview_plugins.cpp8
-rw-r--r--tools/editor/plugins/material_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/mesh_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/path_2d_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/path_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/path_editor_plugin.h2
-rw-r--r--tools/editor/plugins/resource_preloader_editor_plugin.cpp14
-rw-r--r--tools/editor/plugins/sample_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/sample_library_editor_plugin.cpp14
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp10
-rw-r--r--tools/editor/plugins/script_text_editor.cpp4
-rw-r--r--tools/editor/plugins/shader_editor_plugin.cpp16
-rw-r--r--tools/editor/plugins/shader_graph_editor_plugin.cpp6
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.cpp98
-rw-r--r--tools/editor/plugins/spatial_editor_plugin.h2
-rw-r--r--tools/editor/plugins/sprite_frames_editor_plugin.cpp6
-rw-r--r--tools/editor/plugins/style_box_editor_plugin.cpp6
-rw-r--r--tools/editor/plugins/style_box_editor_plugin.h2
-rw-r--r--tools/editor/plugins/texture_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/texture_region_editor_plugin.cpp2
-rw-r--r--tools/editor/plugins/texture_region_editor_plugin.h2
-rw-r--r--tools/editor/plugins/theme_editor_plugin.cpp8
-rw-r--r--tools/editor/plugins/theme_editor_plugin.h2
-rw-r--r--tools/editor/project_export.cpp40
-rw-r--r--tools/editor/project_export.h2
-rw-r--r--tools/editor/project_manager.cpp6
-rw-r--r--tools/editor/project_settings.cpp4
-rw-r--r--tools/editor/property_editor.cpp28
-rw-r--r--tools/editor/property_editor.h2
-rw-r--r--tools/editor/reparent_dialog.cpp2
-rw-r--r--tools/editor/resources_dock.cpp8
-rw-r--r--tools/editor/scene_tree_dock.cpp46
-rw-r--r--tools/editor/scene_tree_editor.cpp8
-rw-r--r--tools/editor/scene_tree_editor.h4
-rw-r--r--tools/editor/script_create_dialog.cpp8
-rw-r--r--tools/editor/script_editor_debugger.cpp24
-rw-r--r--tools/editor/spatial_editor_gizmos.cpp4
96 files changed, 671 insertions, 606 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/animation_editor.h b/tools/editor/animation_editor.h
index 8ae706dfa8..c4539cd763 100644
--- a/tools/editor/animation_editor.h
+++ b/tools/editor/animation_editor.h
@@ -33,7 +33,7 @@
#include "scene/gui/slider.h"
#include "scene/gui/menu_button.h"
#include "scene/gui/spin_box.h"
-#include "scene/gui/texture_frame.h"
+#include "scene/gui/texture_rect.h"
#include "scene/gui/scroll_bar.h"
#include "scene/gui/tool_button.h"
#include "scene/gui/file_dialog.h"
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_asset_installer.cpp b/tools/editor/editor_asset_installer.cpp
index 54099ddce5..9992100ff8 100644
--- a/tools/editor/editor_asset_installer.cpp
+++ b/tools/editor/editor_asset_installer.cpp
@@ -196,7 +196,7 @@ void EditorAssetInstaller::open(const String& p_path,int p_depth) {
ti->set_icon(0,get_icon("folder","FileDialog"));
} else {
String file = path.get_file();
- String extension = file.extension().to_lower();
+ String extension = file.get_extension().to_lower();
if (extension_guess.has(extension)) {
ti->set_icon(0,extension_guess[extension]);
} else {
diff --git a/tools/editor/editor_autoload_settings.cpp b/tools/editor/editor_autoload_settings.cpp
index 071a237ea8..087bf1a3b7 100644
--- a/tools/editor/editor_autoload_settings.cpp
+++ b/tools/editor/editor_autoload_settings.cpp
@@ -307,7 +307,7 @@ void EditorAutoloadSettings::_autoload_button_pressed(Object *p_item, int p_colu
void EditorAutoloadSettings::_autoload_file_callback(const String& p_path) {
- autoload_add_name->set_text(p_path.get_file().basename());
+ autoload_add_name->set_text(p_path.get_file().get_basename());
}
void EditorAutoloadSettings::update_autoload() {
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_dialog.h b/tools/editor/editor_file_dialog.h
index 04ee0cc55f..193cbc513c 100644
--- a/tools/editor/editor_file_dialog.h
+++ b/tools/editor/editor_file_dialog.h
@@ -35,7 +35,7 @@
#include "scene/gui/option_button.h"
#include "os/dir_access.h"
#include "scene/gui/box_container.h"
-#include "scene/gui/texture_frame.h"
+#include "scene/gui/texture_rect.h"
#include "scene/gui/tool_button.h"
/**
@author Juan Linietsky <reduzio@gmail.com>
diff --git a/tools/editor/editor_file_system.cpp b/tools/editor/editor_file_system.cpp
index 5fb274f38f..1d32415be9 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();
@@ -670,7 +670,7 @@ void EditorFileSystem::_scan_new_dir(EditorFileSystemDirectory *p_dir,DirAccess
for (List<String>::Element*E=files.front();E;E=E->next(),idx++) {
- String ext = E->get().extension().to_lower();
+ String ext = E->get().get_extension().to_lower();
if (!valid_extensions.has(ext))
continue; //invalid
@@ -789,7 +789,7 @@ void EditorFileSystem::_scan_fs_changes(EditorFileSystemDirectory *p_dir,const S
} else {
- String ext = f.extension().to_lower();
+ String ext = f.get_extension().to_lower();
if (!valid_extensions.has(ext))
continue; //invalid
@@ -1198,7 +1198,7 @@ EditorFileSystemDirectory* EditorFileSystem::find_file(const String& p_file,int*
}
-EditorFileSystemDirectory *EditorFileSystem::get_path(const String& p_path) {
+EditorFileSystemDirectory *EditorFileSystem::get_filesystem_path(const String& p_path) {
if (!filesystem || scanning)
return NULL;
@@ -1352,7 +1352,7 @@ void EditorFileSystem::_bind_methods() {
ClassDB::bind_method(_MD("scan"),&EditorFileSystem::scan);
ClassDB::bind_method(_MD("scan_sources"),&EditorFileSystem::scan_sources);
ClassDB::bind_method(_MD("update_file","path"),&EditorFileSystem::update_file);
- ClassDB::bind_method(_MD("get_path:EditorFileSystemDirectory","path"),&EditorFileSystem::get_path);
+ ClassDB::bind_method(_MD("get_filesystem_path:EditorFileSystemDirectory","path"),&EditorFileSystem::get_filesystem_path);
ClassDB::bind_method(_MD("get_file_type","path"),&EditorFileSystem::get_file_type);
ADD_SIGNAL( MethodInfo("filesystem_changed") );
diff --git a/tools/editor/editor_file_system.h b/tools/editor/editor_file_system.h
index 97c253c70b..3a26f46aa9 100644
--- a/tools/editor/editor_file_system.h
+++ b/tools/editor/editor_file_system.h
@@ -233,7 +233,7 @@ public:
void get_changed_sources(List<String> *r_changed);
void update_file(const String& p_file);
String find_resource_from_source(const String& p_path) const;
- EditorFileSystemDirectory *get_path(const String& p_path);
+ EditorFileSystemDirectory *get_filesystem_path(const String& p_path);
String get_file_type(const String& p_file) const;
EditorFileSystemDirectory* find_file(const String& p_file,int* r_index) const;
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 0003e232c8..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);
}
@@ -949,7 +950,7 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func
return ERR_CANT_CREATE;
}
Vector<uint8_t> data = FileAccess::get_file_as_array(path);
- String dst_path = F->get().operator String().basename()+".atex";
+ String dst_path = F->get().operator String().get_basename()+".atex";
err = p_func(p_udata,dst_path,data,counter++,files.size());
saved.insert(dst_path);
if (err)
@@ -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 e59b877ea0..965d8d6420 100644
--- a/tools/editor/editor_log.h
+++ b/tools/editor/editor_log.h
@@ -36,7 +36,7 @@
//#include "scene/gui/empty_control.h"
#include "scene/gui/box_container.h"
#include "scene/gui/panel_container.h"
-#include "scene/gui/texture_frame.h"
+#include "scene/gui/texture_rect.h"
#include "scene/gui/tool_button.h"
#include "pane_drag.h"
#include "os/thread.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 b4a2da4833..bb33f19a2b 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -322,8 +322,8 @@ void EditorNode::_notification(int p_what) {
}
if (p_what==NOTIFICATION_READY) {
- VisualServer::get_singleton()->viewport_set_hide_scenario(get_scene_root()->get_viewport(),true);
- VisualServer::get_singleton()->viewport_set_hide_canvas(get_scene_root()->get_viewport(),true);
+ VisualServer::get_singleton()->viewport_set_hide_scenario(get_scene_root()->get_viewport_rid(),true);
+ VisualServer::get_singleton()->viewport_set_hide_canvas(get_scene_root()->get_viewport_rid(),true);
VisualServer::get_singleton()->viewport_set_disable_environment(get_viewport()->get_viewport_rid(),true);
_editor_select(EDITOR_3D);
@@ -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);
@@ -623,7 +625,7 @@ void EditorNode::save_resource_as(const Ref<Resource>& p_resource,const String&
file->set_current_path(p_resource->get_path());
if (extensions.size()) {
- String ext=p_resource->get_path().extension().to_lower();
+ String ext=p_resource->get_path().get_extension().to_lower();
if (extensions.find(ext)==NULL) {
file->set_current_path(p_resource->get_path().replacen("."+ext,"."+extensions.front()->get()));
}
@@ -666,11 +668,11 @@ void EditorNode::_dialog_display_file_error(String p_file,Error p_error) {
case ERR_FILE_CANT_WRITE: {
- accept->set_text(TTR("Can't open file for writing:")+" "+p_file.extension());
+ accept->set_text(TTR("Can't open file for writing:")+" "+p_file.get_extension());
} break;
case ERR_FILE_UNRECOGNIZED: {
- accept->set_text(TTR("Requested file format unknown:")+" "+p_file.extension());
+ accept->set_text(TTR("Requested file format unknown:")+" "+p_file.get_extension());
} break;
default: {
@@ -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) {
@@ -890,10 +892,10 @@ void EditorNode::_save_scene_with_preview(String p_file) {
RID viewport;
bool is2d;
if (c3d<c2d) {
- viewport=scene_root->get_viewport();
+ viewport=scene_root->get_viewport_rid();
is2d=true;
} else {
- viewport=SpatialEditor::get_singleton()->get_editor_viewport(0)->get_viewport_node()->get_viewport();
+ viewport=SpatialEditor::get_singleton()->get_editor_viewport(0)->get_viewport_node()->get_viewport_rid();
is2d=false;
}
@@ -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();
@@ -2154,7 +2160,7 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
if (scene->get_filename()!="") {
file->set_current_path(scene->get_filename());
if (extensions.size()) {
- String ext=scene->get_filename().extension().to_lower();
+ String ext=scene->get_filename().get_extension().to_lower();
if (extensions.find(ext)==NULL) {
file->set_current_path(scene->get_filename().replacen("."+ext,"."+extensions.front()->get()));
}
@@ -2217,8 +2223,8 @@ void EditorNode::_menu_option_confirm(int p_option,bool p_confirmed) {
if (scene->get_filename()!="") {
cpath = scene->get_filename();
- String fn = cpath.substr(0,cpath.length() - cpath.extension().size());
- String ext=cpath.extension();
+ String fn = cpath.substr(0,cpath.length() - cpath.get_extension().size());
+ String ext=cpath.get_extension();
cpath=fn+".pot";
@@ -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() {
@@ -4217,7 +4229,7 @@ void EditorNode::progress_end_task_bg(const String& p_task) {
Ref<Texture> EditorNode::_file_dialog_get_icon(const String& p_path) {
- EditorFileSystemDirectory *efsd = EditorFileSystem::get_singleton()->get_path(p_path.get_base_dir());
+ EditorFileSystemDirectory *efsd = EditorFileSystem::get_singleton()->get_filesystem_path(p_path.get_base_dir());
if (efsd) {
String file = p_path.get_file();
@@ -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);
@@ -5696,12 +5708,12 @@ EditorNode::EditorNode() {
//scene_root_base->add_child(scene_root);
//scene_root->set_meta("_editor_disable_input",true);
- VisualServer::get_singleton()->viewport_set_hide_scenario(scene_root->get_viewport(),true);
+ VisualServer::get_singleton()->viewport_set_hide_scenario(scene_root->get_viewport_rid(),true);
scene_root->set_disable_input(true);
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_profiler.h b/tools/editor/editor_profiler.h
index ec1cd9fb5b..52b38cdae8 100644
--- a/tools/editor/editor_profiler.h
+++ b/tools/editor/editor_profiler.h
@@ -3,7 +3,7 @@
#include "scene/gui/box_container.h"
-#include "scene/gui/texture_frame.h"
+#include "scene/gui/texture_rect.h"
#include "scene/gui/button.h"
#include "scene/gui/label.h"
#include "scene/gui/tree.h"
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 50bd629b67..807183ae46 100644
--- a/tools/editor/editor_settings.cpp
+++ b/tools/editor/editor_settings.cpp
@@ -846,8 +846,8 @@ void EditorSettings::list_text_editor_themes() {
d->list_dir_begin();
String file = d->get_next();
while(file != String()) {
- if (file.extension() == "tet" && file.basename().to_lower() != "default") {
- themes += "," + file.basename();
+ if (file.get_extension() == "tet" && file.get_basename().to_lower() != "default") {
+ themes += "," + file.get_basename();
}
file = d->get_next();
}
@@ -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/fileserver/editor_file_server.cpp b/tools/editor/fileserver/editor_file_server.cpp
index d640b0ad1d..6330b06d3e 100644
--- a/tools/editor/fileserver/editor_file_server.cpp
+++ b/tools/editor/fileserver/editor_file_server.cpp
@@ -38,7 +38,7 @@
void EditorFileServer::_close_client(ClientData *cd) {
- cd->connection->disconnect();
+ cd->connection->disconnect_from_host();
cd->efs->wait_mutex->lock();
cd->efs->to_wait.insert(cd->thread);
cd->efs->wait_mutex->unlock();
diff --git a/tools/editor/filesystem_dock.cpp b/tools/editor/filesystem_dock.cpp
index 8a21b94eea..792eb54dd4 100644
--- a/tools/editor/filesystem_dock.cpp
+++ b/tools/editor/filesystem_dock.cpp
@@ -396,7 +396,7 @@ void FileSystemDock::_update_files(bool p_keep_selection) {
current_path->set_text(path);
- EditorFileSystemDirectory *efd = EditorFileSystem::get_singleton()->get_path(path);
+ EditorFileSystemDirectory *efd = EditorFileSystem::get_singleton()->get_filesystem_path(path);
if (!efd)
return;
@@ -832,7 +832,7 @@ void FileSystemDock::_move_operation(const String& p_to_path) {
return;
}
- EditorFileSystemDirectory *efsd=EditorFileSystem::get_singleton()->get_path(move_dirs[i]);
+ EditorFileSystemDirectory *efsd=EditorFileSystem::get_singleton()->get_filesystem_path(move_dirs[i]);
if (!efsd)
continue;
_find_inside_move_files(efsd,inside_files);
@@ -1015,7 +1015,7 @@ void FileSystemDock::_file_option(int p_option) {
if (move_dirs.empty() && move_files.size()==1) {
rename_dialog->clear_filters();
- rename_dialog->add_filter("*."+move_files[0].extension());
+ rename_dialog->add_filter("*."+move_files[0].get_extension());
rename_dialog->set_mode(EditorFileDialog::MODE_SAVE_FILE);
rename_dialog->set_current_path(move_files[0]);
rename_dialog->popup_centered_ratio();
@@ -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/icons/2x/icon_patch_9_frame.png b/tools/editor/icons/2x/icon_patch_9_rect.png
index 5762a0392e..5762a0392e 100644
--- a/tools/editor/icons/2x/icon_patch_9_frame.png
+++ b/tools/editor/icons/2x/icon_patch_9_rect.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_reference_frame.png b/tools/editor/icons/2x/icon_reference_rect.png
index 63fe559fa7..63fe559fa7 100644
--- a/tools/editor/icons/2x/icon_reference_frame.png
+++ b/tools/editor/icons/2x/icon_reference_rect.png
Binary files differ
diff --git a/tools/editor/icons/2x/icon_texture_frame.png b/tools/editor/icons/2x/icon_texture_rect.png
index 50d715dd09..50d715dd09 100644
--- a/tools/editor/icons/2x/icon_texture_frame.png
+++ b/tools/editor/icons/2x/icon_texture_rect.png
Binary files differ
diff --git a/tools/editor/icons/icon_patch_9_frame.png b/tools/editor/icons/icon_patch_9_rect.png
index bdd1467144..bdd1467144 100644
--- a/tools/editor/icons/icon_patch_9_frame.png
+++ b/tools/editor/icons/icon_patch_9_rect.png
Binary files differ
diff --git a/tools/editor/icons/icon_reference_frame.png b/tools/editor/icons/icon_reference_rect.png
index b253af477f..b253af477f 100644
--- a/tools/editor/icons/icon_reference_frame.png
+++ b/tools/editor/icons/icon_reference_rect.png
Binary files differ
diff --git a/tools/editor/icons/icon_texture_frame.png b/tools/editor/icons/icon_texture_rect.png
index 84e4a90bfb..84e4a90bfb 100644
--- a/tools/editor/icons/icon_texture_frame.png
+++ b/tools/editor/icons/icon_texture_rect.png
Binary files differ
diff --git a/tools/editor/icons/source/icon_patch_9_frame.svg b/tools/editor/icons/source/icon_patch_9_rect.svg
index f12789c19e..c5a09603a6 100644
--- a/tools/editor/icons/source/icon_patch_9_frame.svg
+++ b/tools/editor/icons/source/icon_patch_9_rect.svg
@@ -18,7 +18,7 @@
inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_center_container.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
- sodipodi:docname="icon_patch_9_frame.svg">
+ sodipodi:docname="icon_patch_9_rect.svg">
<defs
id="defs4" />
<sodipodi:namedview
diff --git a/tools/editor/icons/source/icon_reference_frame.svg b/tools/editor/icons/source/icon_reference_rect.svg
index 76c3247f1b..cee814360d 100644
--- a/tools/editor/icons/source/icon_reference_frame.svg
+++ b/tools/editor/icons/source/icon_reference_rect.svg
@@ -18,7 +18,7 @@
inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_center_container.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
- sodipodi:docname="icon_reference_frame.svg">
+ sodipodi:docname="icon_reference_rect.svg">
<defs
id="defs4" />
<sodipodi:namedview
diff --git a/tools/editor/icons/source/icon_texture_frame.svg b/tools/editor/icons/source/icon_texture_rect.svg
index afab41de41..88d9b4081f 100644
--- a/tools/editor/icons/source/icon_texture_frame.svg
+++ b/tools/editor/icons/source/icon_texture_rect.svg
@@ -18,7 +18,7 @@
inkscape:export-filename="/home/djrm/Projects/godot/tools/editor/icons/icon_center_container.png"
inkscape:export-xdpi="90"
inkscape:export-ydpi="90"
- sodipodi:docname="icon_texture_frame.svg">
+ sodipodi:docname="icon_texture_rect.svg">
<defs
id="defs4" />
<sodipodi:namedview
diff --git a/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp b/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp
index b4e0c4b82a..722b02f77b 100644
--- a/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_bitmask_import_plugin.cpp
@@ -145,7 +145,7 @@ public:
error_dialog->popup_centered(Size2(200, 100)*EDSCALE);
}
- dst = dst.plus_file(bitmasks[i].get_file().basename() + ".pbm");
+ dst = dst.plus_file(bitmasks[i].get_file().get_basename() + ".pbm");
plugin->import(dst, imd);
}
@@ -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);
}
@@ -294,7 +294,7 @@ void EditorBitMaskImportPlugin::import_from_drop(const Vector<String>& p_drop, c
ImageLoader::get_recognized_extensions(&valid_extensions);
for(int i=0;i<p_drop.size();i++) {
- String extension=p_drop[i].extension().to_lower();
+ String extension=p_drop[i].get_extension().to_lower();
for (List<String>::Element *E=valid_extensions.front();E;E=E->next()) {
diff --git a/tools/editor/io_plugins/editor_export_scene.cpp b/tools/editor/io_plugins/editor_export_scene.cpp
index c2e037cfd7..ea67128f3c 100644
--- a/tools/editor/io_plugins/editor_export_scene.cpp
+++ b/tools/editor/io_plugins/editor_export_scene.cpp
@@ -42,7 +42,7 @@ Vector<uint8_t> EditorSceneExportPlugin::custom_export(String& p_path,const Ref<
}
- String extension = p_path.extension();
+ String extension = p_path.get_extension();
//step 1 check if scene
diff --git a/tools/editor/io_plugins/editor_font_import_plugin.cpp b/tools/editor/io_plugins/editor_font_import_plugin.cpp
index bf9c9835f6..099535b1ef 100644
--- a/tools/editor/io_plugins/editor_font_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_font_import_plugin.cpp
@@ -439,7 +439,7 @@ class EditorFontImportDialog : public ConfirmationDialog {
test_label->set_text("");
test_label->set_text(test_string->get_text());
- test_label->add_color_override("font_color",test_color->get_color());
+ test_label->add_color_override("font_color",test_color->get_pick_color());
}
void _update() {
@@ -468,7 +468,7 @@ class EditorFontImportDialog : public ConfirmationDialog {
Ref<ImageTexture> tex = font->get_texture(0);
if (tex.is_null())
return;
- FileAccessRef f=FileAccess::open(p_font.basename()+".inc",FileAccess::WRITE);
+ FileAccessRef f=FileAccess::open(p_font.get_basename()+".inc",FileAccess::WRITE);
Vector<CharType> ck = font->get_char_keys();
f->store_line("static const int _builtin_font_height="+itos(font->get_height())+";");
@@ -499,7 +499,7 @@ class EditorFontImportDialog : public ConfirmationDialog {
f->store_line("static const int _builtin_font_img_width="+itos(img.get_width())+";");
f->store_line("static const int _builtin_font_img_height="+itos(img.get_height())+";");
- String fname = p_font.basename()+".sv.png";
+ String fname = p_font.get_basename()+".sv.png";
ResourceSaver::save(fname,tex);
Vector<uint8_t> data=FileAccess::get_file_as_array(fname);
@@ -533,14 +533,14 @@ class EditorFontImportDialog : public ConfirmationDialog {
}
if (dest->get_line_edit()->get_text().get_file()==".fnt") {
- dest->get_line_edit()->set_text(dest->get_line_edit()->get_text().get_base_dir() + "/" + source->get_line_edit()->get_text().get_file().basename() + ".fnt" );
+ dest->get_line_edit()->set_text(dest->get_line_edit()->get_text().get_base_dir() + "/" + source->get_line_edit()->get_text().get_file().get_basename() + ".fnt" );
}
- if (dest->get_line_edit()->get_text().extension() == dest->get_line_edit()->get_text()) {
+ if (dest->get_line_edit()->get_text().get_extension() == dest->get_line_edit()->get_text()) {
dest->get_line_edit()->set_text(dest->get_line_edit()->get_text() + ".fnt");
}
- if (dest->get_line_edit()->get_text().extension().to_lower() != "fnt") {
+ if (dest->get_line_edit()->get_text().get_extension().to_lower() != "fnt") {
error_dialog->set_text(TTR("Invalid file extension.\nPlease use .fnt."));
error_dialog->popup_centered(Size2(200,100));
return;
@@ -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 );
@@ -679,7 +681,7 @@ public:
testhb->add_child(test_string);
test_color = memnew( ColorPickerButton );
- test_color->set_color(get_color("font_color","Label"));
+ test_color->set_pick_color(get_color("font_color","Label"));
test_color->set_h_size_flags(SIZE_EXPAND_FILL);
test_color->set_stretch_ratio(1);
test_color->connect("color_changed",this,"_update_text3");
@@ -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;
}
}
@@ -913,7 +915,7 @@ Ref<BitmapFont> EditorFontImportPlugin::generate_font(const Ref<ResourceImportMe
String src_path = EditorImportPlugin::expand_source_path(from->get_source_path(0));
- if (src_path.extension().to_lower()=="fnt") {
+ if (src_path.get_extension().to_lower()=="fnt") {
if (ResourceLoader::load(src_path).is_valid()) {
EditorNode::get_singleton()->show_warning(TTR("Path:")+" "+src_path+"\n"+TTR("This file is already a Godot font file, please supply a BMFont type file instead."));
@@ -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);
@@ -1682,12 +1684,12 @@ Error EditorFontImportPlugin::import(const String& p_path, const Ref<ResourceImp
void EditorFontImportPlugin::import_from_drop(const Vector<String>& p_drop, const String &p_dest_path) {
for(int i=0;i<p_drop.size();i++) {
- String ext = p_drop[i].extension().to_lower();
+ String ext = p_drop[i].get_extension().to_lower();
String file = p_drop[i].get_file();
if (ext=="ttf" || ext=="otf" || ext=="fnt") {
import_dialog();
- dialog->set_source_and_dest(p_drop[i],p_dest_path.plus_file(file.basename()+".fnt"));
+ dialog->set_source_and_dest(p_drop[i],p_dest_path.plus_file(file.get_basename()+".fnt"));
break;
}
}
diff --git a/tools/editor/io_plugins/editor_import_collada.cpp b/tools/editor/io_plugins/editor_import_collada.cpp
index 846a551121..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) {
@@ -2438,7 +2446,7 @@ Ref<Animation> EditorSceneImporterCollada::import_animation(const String& p_path
Ref<Animation> anim=state.animations[0];
anim=state.animations[0];
print_line("Anim Load OK");
- String base = p_path.basename().to_lower();
+ String base = p_path.get_basename().to_lower();
if (p_flags&IMPORT_ANIMATION_DETECT_LOOP) {
if (base.begins_with("loop") || base.ends_with("loop") || base.begins_with("cycle") || base.ends_with("cycle")) {
diff --git a/tools/editor/io_plugins/editor_mesh_import_plugin.cpp b/tools/editor/io_plugins/editor_mesh_import_plugin.cpp
index f33693c304..fa0c36be98 100644
--- a/tools/editor/io_plugins/editor_mesh_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_mesh_import_plugin.cpp
@@ -259,7 +259,7 @@ public:
imd->add_source(EditorImportPlugin::validate_source_path(meshes[i]));
- String file_path = dst.plus_file(meshes[i].get_file().basename()+".msh");
+ String file_path = dst.plus_file(meshes[i].get_file().get_basename()+".msh");
plugin->import(file_path,imd);
}
@@ -568,7 +568,7 @@ void EditorMeshImportPlugin::import_from_drop(const Vector<String>& p_drop, cons
Vector<String> files;
for(int i=0;i<p_drop.size();i++) {
- String ext = p_drop[i].extension().to_lower();
+ String ext = p_drop[i].get_extension().to_lower();
String file = p_drop[i].get_file();
if (ext=="obj") {
diff --git a/tools/editor/io_plugins/editor_sample_import_plugin.cpp b/tools/editor/io_plugins/editor_sample_import_plugin.cpp
index da4e24dc84..eeb61fc443 100644
--- a/tools/editor/io_plugins/editor_sample_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_sample_import_plugin.cpp
@@ -296,7 +296,7 @@ public:
error_dialog->popup_centered(Size2(200,100)*EDSCALE);
}
- dst = dst.plus_file(samples[i].get_file().basename()+".smp");
+ dst = dst.plus_file(samples[i].get_file().get_basename()+".smp");
plugin->import(dst,imd);
}
@@ -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 ;
@@ -828,7 +830,7 @@ void EditorSampleImportPlugin::import_from_drop(const Vector<String>& p_drop, co
Vector<String> files;
for(int i=0;i<p_drop.size();i++) {
- String ext = p_drop[i].extension().to_lower();
+ String ext = p_drop[i].get_extension().to_lower();
if (ext=="wav") {
@@ -887,7 +889,7 @@ Vector<uint8_t> EditorSampleExportPlugin::custom_export(String& p_path,const Ref
- if (EditorImportExport::get_singleton()->sample_get_action()==EditorImportExport::SAMPLE_ACTION_NONE || p_path.extension().to_lower()!="wav") {
+ if (EditorImportExport::get_singleton()->sample_get_action()==EditorImportExport::SAMPLE_ACTION_NONE || p_path.get_extension().to_lower()!="wav") {
return Vector<uint8_t>();
}
@@ -911,7 +913,7 @@ Vector<uint8_t> EditorSampleExportPlugin::custom_export(String& p_path,const Ref
ERR_FAIL_COND_V(err!=OK,Vector<uint8_t>());
- p_path=p_path.basename()+".converted.smp";
+ p_path=p_path.get_basename()+".converted.smp";
return FileAccess::get_file_as_array(savepath);
}
diff --git a/tools/editor/io_plugins/editor_scene_import_plugin.cpp b/tools/editor/io_plugins/editor_scene_import_plugin.cpp
index 8fd78f11f3..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");
}
}
@@ -659,7 +659,7 @@ void EditorSceneImportDialog::_choose_file(const String& p_path) {
import_path->set_text(p_path);
if (root_node_name->get_text().size()==0){
- root_node_name->set_text(import_path->get_text().get_file().basename());
+ root_node_name->set_text(import_path->get_text().get_file().get_basename());
}
}
@@ -763,7 +763,7 @@ void EditorSceneImportDialog::_import(bool p_and_open) {
// Scenes should always be imported as binary format since vertex data is large and would take
// up a lot of space and time to load if imported as text format (GH-5778)
- String save_file = save_path->get_text().plus_file(import_path->get_text().get_file().basename()+".scn");
+ String save_file = save_path->get_text().plus_file(import_path->get_text().get_file().get_basename()+".scn");
print_line("Saving to: "+save_file);
@@ -794,7 +794,7 @@ void EditorSceneImportDialog::_import(bool p_and_open) {
rim->set_option("root_type",root_type->get_text());
}
if (root_node_name->get_text().size()==0) {
- root_node_name->set_text(import_path->get_text().get_file().basename());
+ root_node_name->set_text(import_path->get_text().get_file().get_basename());
}
rim->set_option("root_name",root_node_name->get_text());
@@ -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);
}
}
}
@@ -2124,7 +2126,7 @@ Error EditorSceneImportPlugin::import1(const Ref<ResourceImportMetadata>& p_from
String src_path=EditorImportPlugin::expand_source_path(from->get_source_path(0));
Ref<EditorSceneImporter> importer;
- String ext=src_path.extension().to_lower();
+ String ext=src_path.get_extension().to_lower();
EditorProgress progress("import",TTR("Import Scene"),104);
@@ -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;
@@ -2821,7 +2825,7 @@ Error EditorSceneImportPlugin::import2(Node *scene, const String& p_dest_path, c
{
- target_path=target_path.basename()+".tex";
+ target_path=target_path.get_basename()+".tex";
Ref<ResourceImportMetadata> imd = memnew( ResourceImportMetadata );
@@ -2936,7 +2940,7 @@ void EditorSceneImportPlugin::import_from_drop(const Vector<String>& p_drop,cons
//bool warn_compatible=false;
for(int i=0;i<p_drop.size();i++) {
- String extension = p_drop[i].extension().to_lower();
+ String extension = p_drop[i].get_extension().to_lower();
for(List<String>::Element *E=extensions.front();E;E=E->next()) {
diff --git a/tools/editor/io_plugins/editor_texture_import_plugin.cpp b/tools/editor/io_plugins/editor_texture_import_plugin.cpp
index 3bf2551778..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(",");
@@ -448,7 +448,7 @@ void EditorTextureImportDialog::_import() {
for(int i=0;i<files.size();i++) {
String dst_file = dst_path.plus_file(files[i].get_file());
- dst_file=dst_file.basename()+".tex";
+ dst_file=dst_file.get_basename()+".tex";
Ref<ResourceImportMetadata> imd = memnew( ResourceImportMetadata );
//imd->set_editor();
imd->add_source(EditorImportPlugin::validate_source_path(files[i]));
@@ -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();
@@ -1307,9 +1313,9 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
String spath = from->get_source_path(E->get()).get_file();
if (p_external) {
- apath = p_path.get_base_dir().plus_file(spath.basename()+"."+from->get_source_path(E->get()).md5_text()+".atex");
+ apath = p_path.get_base_dir().plus_file(spath.get_basename()+"."+from->get_source_path(E->get()).md5_text()+".atex");
} else {
- apath = p_path.get_base_dir().plus_file(spath.basename()+".atex");
+ apath = p_path.get_base_dir().plus_file(spath.get_basename()+".atex");
}
Ref<AtlasTexture> at;
@@ -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();
@@ -1597,7 +1607,7 @@ Vector<uint8_t> EditorTextureImportPlugin::custom_export(const String& p_path, c
rimd->set_option("shrink",group_shrink);
rimd->add_source(validated_path,FileAccess::get_md5(p_path));
- } else if (EditorImportExport::get_singleton()->get_image_formats().has(p_path.extension().to_lower()) && EditorImportExport::get_singleton()->get_export_image_action()!=EditorImportExport::IMAGE_ACTION_NONE) {
+ } else if (EditorImportExport::get_singleton()->get_image_formats().has(p_path.get_extension().to_lower()) && EditorImportExport::get_singleton()->get_export_image_action()!=EditorImportExport::IMAGE_ACTION_NONE) {
//handled by general image export settings
rimd = Ref<ResourceImportMetadata>( memnew( ResourceImportMetadata ) );
@@ -1743,7 +1753,7 @@ void EditorTextureImportPlugin::import_from_drop(const Vector<String>& p_drop,co
ImageLoader::get_recognized_extensions(&valid_extensions);
for(int i=0;i<p_drop.size();i++) {
- String extension=p_drop[i].extension().to_lower();
+ String extension=p_drop[i].get_extension().to_lower();
for (List<String>::Element *E=valid_extensions.front();E;E=E->next()) {
@@ -1851,21 +1861,21 @@ EditorTextureImportPlugin::EditorTextureImportPlugin(EditorNode *p_editor) {
if (pl.is_valid()) {
Vector<uint8_t> ce = pl->custom_export(p_path,p_platform);
if (ce.size()) {
- p_path=p_path.basename()+".converted.tex";
+ p_path=p_path.get_basename()+".converted.tex";
return ce;
}
}
} else if (EditorImportExport::get_singleton()->get_export_image_action()!=EditorImportExport::IMAGE_ACTION_NONE){
- String xt = p_path.extension().to_lower();
+ String xt = p_path.get_extension().to_lower();
if (EditorImportExport::get_singleton()->get_image_formats().has(xt)) { //should check for more I guess?
Ref<EditorImportPlugin> pl = EditorImportExport::get_singleton()->get_import_plugin_by_name("texture");
if (pl.is_valid()) {
Vector<uint8_t> ce = pl->custom_export(p_path,p_platform);
if (ce.size()) {
- p_path=p_path.basename()+".converted.tex";
+ p_path=p_path.get_basename()+".converted.tex";
return ce;
}
}
diff --git a/tools/editor/io_plugins/editor_translation_import_plugin.cpp b/tools/editor/io_plugins/editor_translation_import_plugin.cpp
index 73d9e989ac..d9288f5990 100644
--- a/tools/editor/io_plugins/editor_translation_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_translation_import_plugin.cpp
@@ -255,7 +255,7 @@ public:
imd->set_option("skip_first",ignore_first->is_pressed());
imd->set_option("compress",compress->is_pressed());
- String savefile = save_path->get_text().plus_file(import_path->get_text().get_file().basename()+"."+locale+".xl");
+ String savefile = save_path->get_text().plus_file(import_path->get_text().get_file().get_basename()+"."+locale+".xl");
Error err = plugin->import(savefile,imd);
if (err!=OK) {
error_dialog->set_text(TTR("Couldn't import!"));
@@ -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);
@@ -400,7 +400,7 @@ void EditorTranslationImportPlugin::import_from_drop(const Vector<String>& p_dro
for(int i=0;i<p_drop.size();i++) {
- String ext = p_drop[i].extension().to_lower();
+ String ext = p_drop[i].get_extension().to_lower();
if (ext=="csv") {
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 9850298c67..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);
@@ -421,7 +423,7 @@ void AnimationPlayerEditor::_animation_save_as(const Ref<Resource>& p_resource)
if (p_resource->get_path() != "") {
file->set_current_path(p_resource->get_path());
if (extensions.size()) {
- String ext = p_resource->get_path().extension().to_lower();
+ String ext = p_resource->get_path().get_extension().to_lower();
if (extensions.find(ext) == NULL) {
file->set_current_path(p_resource->get_path().replacen("." + ext, "." + extensions.front()->get()));
}
@@ -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"];
@@ -768,7 +770,7 @@ void AnimationPlayerEditor::_dialog_action(String p_file) {
void AnimationPlayerEditor::_scale_changed(const String& p_scale) {
- player->set_speed(p_scale.to_double());
+ player->set_speed_scale(p_scale.to_double());
}
void AnimationPlayerEditor::_update_animation() {
@@ -790,7 +792,7 @@ void AnimationPlayerEditor::_update_animation() {
stop->set_pressed(true);
}
- scale->set_text( String::num(player->get_speed(),2) );
+ scale->set_text( String::num(player->get_speed_scale(),2) );
String current=player->get_current_animation();
for (int i=0;i<animation->get_item_count();i++) {
@@ -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..eedebab1c9 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:{}
}
@@ -856,12 +856,12 @@ void AnimationTreeEditor::_gui_input(InputEvent p_event) {
if (dst_click_type==CLICK_INPUT_SLOT && click_type==CLICK_OUTPUT_SLOT) {
- anim_tree->connect(click_node,id,slot);
+ anim_tree->connect_nodes(click_node,id,slot);
}
if (click_type==CLICK_INPUT_SLOT && dst_click_type==CLICK_OUTPUT_SLOT) {
- anim_tree->connect(id,click_node,click_slot);
+ anim_tree->connect_nodes(id,click_node,click_slot);
}
} break;
@@ -1057,7 +1057,7 @@ void AnimationTreeEditor::_node_menu_item(int p_item) {
if (rclick_type==CLICK_INPUT_SLOT) {
- anim_tree->disconnect(rclick_node,rclick_slot);
+ anim_tree->disconnect_nodes(rclick_node,rclick_slot);
update();
}
@@ -1072,7 +1072,7 @@ void AnimationTreeEditor::_node_menu_item(int p_item) {
const AnimationTreePlayer::Connection &c=E->get();
if( c.dst_node==rclick_node) {
- anim_tree->disconnect(c.dst_node,c.dst_input);
+ anim_tree->disconnect_nodes(c.dst_node,c.dst_input);
}
}
update();
@@ -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 c161e3cfa1..66dd98590d 100644
--- a/tools/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/tools/editor/plugins/canvas_item_editor_plugin.cpp
@@ -41,7 +41,7 @@
#include "os/input.h"
#include "tools/editor/editor_settings.h"
#include "scene/gui/grid_container.h"
-#include "scene/gui/patch_9_frame.h"
+#include "scene/gui/patch_9_rect.h"
#include "tools/editor/animation_editor.h"
#include "tools/editor/plugins/animation_player_editor_plugin.h"
#include "tools/editor/script_editor_debugger.h"
@@ -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);
@@ -1652,7 +1654,7 @@ void CanvasItemEditor::_viewport_gui_input(const InputEvent& p_event) {
Vector2 minsize = canvas_item->edit_get_minimum_size();
if (uniform) {
- float aspect = local_rect.size.get_aspect();
+ float aspect = local_rect.size.aspect();
switch(drag) {
case DRAG_BOTTOM_LEFT:
case DRAG_TOP_RIGHT: {
@@ -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());
+ */
}
}
@@ -3615,14 +3619,14 @@ void CanvasItemEditorPlugin::make_visible(bool p_visible) {
if (p_visible) {
canvas_item_editor->show();
canvas_item_editor->set_fixed_process(true);
- VisualServer::get_singleton()->viewport_set_hide_canvas(editor->get_scene_root()->get_viewport(),false);
+ VisualServer::get_singleton()->viewport_set_hide_canvas(editor->get_scene_root()->get_viewport_rid(),false);
canvas_item_editor->viewport->grab_focus();
} else {
canvas_item_editor->hide();
canvas_item_editor->set_fixed_process(false);
- VisualServer::get_singleton()->viewport_set_hide_canvas(editor->get_scene_root()->get_viewport(),true);
+ VisualServer::get_singleton()->viewport_set_hide_canvas(editor->get_scene_root()->get_viewport_rid(),true);
}
}
@@ -3734,7 +3738,7 @@ bool CanvasItemEditorViewport::_cyclical_dependency_exists(const String& p_targe
}
void CanvasItemEditorViewport::_create_nodes(Node* parent, Node* child, String& path, const Point2& p_point) {
- child->set_name(path.get_file().basename());
+ child->set_name(path.get_file().get_basename());
Ref<ImageTexture> texture=Ref<ImageTexture> ( ResourceCache::get(path)->cast_to<ImageTexture>() );
Size2 texture_size = texture->get_size();
@@ -3767,7 +3771,7 @@ void CanvasItemEditorViewport::_create_nodes(Node* parent, Node* child, String&
editor_data->get_undo_redo().add_do_property(child,property,texture);
// make visible for certain node type
- if (default_type=="Patch9Frame") {
+ if (default_type=="Patch9Rect") {
editor_data->get_undo_redo().add_do_property(child,"rect/size",texture_size);
} else if (default_type=="Polygon2D") {
PoolVector<Vector2> list;
@@ -3785,7 +3789,7 @@ void CanvasItemEditorViewport::_create_nodes(Node* parent, Node* child, String&
}
Transform2D trans=canvas->get_canvas_transform();
Point2 target_pos = (p_point-trans.get_origin())/trans.get_scale().x-pos;
- if (default_type=="Polygon2D" || default_type=="TouchScreenButton" || default_type=="TextureRect" || default_type=="Patch9Frame") {
+ if (default_type=="Polygon2D" || default_type=="TouchScreenButton" || default_type=="TextureRect" || default_type=="Patch9Rect") {
target_pos -= texture_size/2;
}
editor_data->get_undo_redo().add_do_method(child,"set_pos",target_pos);
@@ -3857,8 +3861,8 @@ void CanvasItemEditorViewport::_perform_drop_data(){
else if (default_type=="Particles2D") child=memnew(Particles2D);
else if (default_type=="Polygon2D") child=memnew(Polygon2D);
else if (default_type=="TouchScreenButton") child=memnew(TouchScreenButton);
- else if (default_type=="TextureRect") child=memnew(TextureRect);
- else if (default_type=="Patch9Frame") child=memnew(NinePatchRect);
+ else if (default_type=="TextureRect") child=memnew(TextureRect);
+ else if (default_type=="Patch9Rect") child=memnew(NinePatchRect);
else child=memnew(Sprite); // default
_create_nodes(target_node, child, path, drop_pos);
@@ -3875,7 +3879,7 @@ void CanvasItemEditorViewport::_perform_drop_data(){
if (error_files.size()>0) {
String files_str;
for (int i=0;i<error_files.size();i++) {
- files_str += error_files[i].get_file().basename() + ",";
+ files_str += error_files[i].get_file().get_basename() + ",";
}
files_str=files_str.substr(0,files_str.length()-1);
accept->get_ok()->set_text(TTR("Ugh"));
@@ -3993,7 +3997,7 @@ CanvasItemEditorViewport::CanvasItemEditorViewport(EditorNode *p_node, CanvasIte
types.push_back("TouchScreenButton");
// Control
types.push_back("TextureRect");
- types.push_back("Patch9Frame");
+ types.push_back("Patch9Rect");
target_node=NULL;
editor=p_node;
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 92d9c070af..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) {
@@ -79,7 +79,7 @@ void ResourcePreloaderEditor::_files_load_request(const Vector<String>& p_paths)
}
- String basename = path.get_file().basename();
+ String basename = path.get_file().get_basename();
String name=basename;
int counter=1;
while(preloader->has_resource(name)) {
@@ -347,7 +347,7 @@ void ResourcePreloaderEditor::drop_data_fw(const Point2& p_point,const Variant&
if (r->get_name()!="") {
basename=r->get_name();
} else if (r->get_path().is_resource_file()) {
- basename = r->get_path().basename();
+ basename = r->get_path().get_basename();
} else {
basename="Resource";
}
@@ -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 e470d0d2c2..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) {
@@ -81,7 +81,7 @@ void SampleLibraryEditor::_file_load_request(const PoolVector<String>& p_path) {
dialog->popup_centered_minsize();
return; ///beh should show an error i guess
}
- String basename = path.get_file().basename();
+ String basename = path.get_file().get_basename();
String name=basename;
int counter=0;
while(sample_library->has_sample(name)) {
@@ -376,7 +376,7 @@ void SampleLibraryEditor::drop_data_fw(const Point2& p_point,const Variant& p_da
if (sample->get_name()!="") {
basename=sample->get_name();
} else if (sample->get_path().is_resource_file()) {
- basename = sample->get_path().basename();
+ basename = sample->get_path().get_basename();
} else {
basename="Sample";
}
@@ -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..95e7afa04c 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();
}
@@ -1194,7 +1194,7 @@ void ScriptTextEditor::_text_edit_gui_input(const InputEvent& ev) {
Vector<float> color = stripped.split_floats(",");
if (color.size() > 2) {
float alpha = color.size() > 3 ? color[3] : 1.0f;
- color_picker->set_color(Color(color[0], color[1], color[2], alpha));
+ color_picker->set_pick_color(Color(color[0], color[1], color[2], alpha));
}
color_panel->set_pos(get_global_transform().xform(get_local_mouse_pos()));
Size2 ms = Size2(300, color_picker->get_combined_minimum_size().height+10);
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 400627ca60..0f01f71294 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;
@@ -468,7 +468,7 @@ Vector3 SpatialEditorViewport::_get_screen_to_space(const Vector3& p_pos) {
CameraMatrix cm;
- cm.set_perspective(get_fov(),get_size().get_aspect(),get_znear(),get_zfar());
+ cm.set_perspective(get_fov(),get_size().aspect(),get_znear(),get_zfar());
float screen_w,screen_h;
cm.get_viewport_size(screen_w,screen_h);
@@ -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) {
@@ -618,23 +616,6 @@ static int _get_key_modifier(const String& p_property) {
return 0;
}
-SpatialEditorViewport::NavigationScheme SpatialEditorViewport::_get_navigation_schema(const String& p_property) {
- switch(EditorSettings::get_singleton()->get(p_property).operator int()) {
- case 0: return NAVIGATION_GODOT;
- case 1: return NAVIGATION_MAYA;
- case 2: return NAVIGATION_MODO;
- }
- return NAVIGATION_GODOT;
-}
-
-SpatialEditorViewport::NavigationZoomStyle SpatialEditorViewport::_get_navigation_zoom_style(const String& p_property) {
- switch(EditorSettings::get_singleton()->get(p_property).operator int()) {
- case 0: return NAVIGATION_ZOOM_VERTICAL;
- case 1: return NAVIGATION_ZOOM_HORIZONTAL;
- }
- return NAVIGATION_ZOOM_VERTICAL;
-}
-
bool SpatialEditorViewport::_gizmo_select(const Vector2& p_screenpos,bool p_hilite_only) {
if (!spatial_editor->is_gizmo_visible())
@@ -854,7 +835,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
} break;
case BUTTON_RIGHT: {
- NavigationScheme nav_scheme = _get_navigation_schema("editors/3d/navigation_scheme");
+ NavigationScheme nav_scheme = (NavigationScheme)EditorSettings::get_singleton()->get("editors/3d/navigation_scheme").operator int();
if (b.pressed && _edit.gizmo.is_valid()) {
//restore
@@ -1014,7 +995,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
if (b.pressed) {
- NavigationScheme nav_scheme = _get_navigation_schema("editors/3d/navigation_scheme");
+ NavigationScheme nav_scheme = (NavigationScheme)EditorSettings::get_singleton()->get("editors/3d/navigation_scheme").operator int();
if ( (nav_scheme==NAVIGATION_MAYA || nav_scheme==NAVIGATION_MODO) && b.mod.alt) {
break;
}
@@ -1251,7 +1232,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
}
- NavigationScheme nav_scheme = _get_navigation_schema("editors/3d/navigation_scheme");
+ NavigationScheme nav_scheme = (NavigationScheme)EditorSettings::get_singleton()->get("editors/3d/navigation_scheme").operator int();
NavigationMode nav_mode = NAVIGATION_NONE;
if (_edit.gizmo.is_valid()) {
@@ -1558,7 +1539,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
nav_mode = NAVIGATION_PAN;
}
- } else if (EditorSettings::get_singleton()->get("editors/3d/emulate_3_button_mouse")) {
+ } else if (EditorSettings::get_singleton()->get("editors/3d/emulate_3_button_mouse")) {
// Handle trackpad (no external mouse) use case
int mod = 0;
if (m.mod.shift)
@@ -1606,7 +1587,7 @@ void SpatialEditorViewport::_sinput(const InputEvent &p_event) {
if (nav_scheme==NAVIGATION_MAYA && m.mod.shift)
zoom_speed *= zoom_speed_modifier;
- NavigationZoomStyle zoom_style = _get_navigation_zoom_style("3d_editor/zoom_style");
+ NavigationZoomStyle zoom_style = (NavigationZoomStyle)EditorSettings::get_singleton()->get("3d_editor/zoom_style").operator int();
if (zoom_style == NAVIGATION_ZOOM_HORIZONTAL) {
if ( m.relative_x > 0)
cursor.distance*=1-m.relative_x*zoom_speed;
@@ -1915,7 +1896,7 @@ void SpatialEditorViewport::_draw() {
Size2 ss = Size2( GlobalConfig::get_singleton()->get("display/width"), GlobalConfig::get_singleton()->get("display/height") );
- float aspect = ss.get_aspect();
+ float aspect = ss.aspect();
Size2 s = get_size();
Rect2 draw_rect;
@@ -2152,7 +2133,7 @@ void SpatialEditorViewport::_toggle_camera_preview(bool p_activate) {
previewing->disconnect("tree_exited",this,"_preview_exited_scene");
previewing=NULL;
- VS::get_singleton()->viewport_attach_camera( viewport->get_viewport(), camera->get_camera() ); //restore
+ VS::get_singleton()->viewport_attach_camera( viewport->get_viewport_rid(), camera->get_camera() ); //restore
if (!preview)
preview_camera->hide();
view_menu->show();
@@ -2162,7 +2143,7 @@ void SpatialEditorViewport::_toggle_camera_preview(bool p_activate) {
previewing=preview;
previewing->connect("tree_exited",this,"_preview_exited_scene");
- VS::get_singleton()->viewport_attach_camera( viewport->get_viewport(), preview->get_camera() ); //replace
+ VS::get_singleton()->viewport_attach_camera( viewport->get_viewport_rid(), preview->get_camera() ); //replace
view_menu->hide();
surface->update();
@@ -2267,7 +2248,7 @@ void SpatialEditorViewport::set_state(const Dictionary& p_state) {
if (pv && pv->cast_to<Camera>()) {
previewing=pv->cast_to<Camera>();
previewing->connect("tree_exited",this,"_preview_exited_scene");
- VS::get_singleton()->viewport_attach_camera( viewport->get_viewport(), previewing->get_camera() ); //replace
+ VS::get_singleton()->viewport_attach_camera( viewport->get_viewport_rid(), previewing->get_camera() ); //replace
view_menu->hide();
surface->update();
preview_camera->set_pressed(true);
@@ -2515,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;
@@ -2626,7 +2607,7 @@ Dictionary SpatialEditor::get_state() const {
d["viewports"]=vpdata;
d["default_light"]=view_menu->get_popup()->is_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_DEFAULT_LIGHT) );;
- d["ambient_light_color"]=settings_ambient_color->get_color();
+ d["ambient_light_color"]=settings_ambient_color->get_pick_color();
d["default_srgb"]=view_menu->get_popup()->is_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_USE_DEFAULT_SRGB) );;
d["show_grid"]=view_menu->get_popup()->is_item_checked( view_menu->get_popup()->get_item_index(MENU_VIEW_GRID) );;
@@ -2715,7 +2696,7 @@ void SpatialEditor::set_state(const Dictionary& p_state) {
}
if (d.has("ambient_light_color")) {
- settings_ambient_color->set_color(d["ambient_light_color"]);
+ settings_ambient_color->set_pick_color(d["ambient_light_color"]);
//viewport_environment->fx_set_param(Environment::FX_PARAM_AMBIENT_LIGHT_COLOR,d["ambient_light_color"]);
}
@@ -2778,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() {
@@ -2854,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;
@@ -3231,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);
@@ -3691,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);
@@ -3743,7 +3724,7 @@ void SpatialEditor::clear() {
settings_default_light_rot_y=Math_PI*0.2;
//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));
+ settings_ambient_color->set_pick_color(Color(0.15,0.15,0.15));
if (!light_instance.is_valid())
_menu_item_pressed(MENU_VIEW_USE_DEFAULT_LIGHT);
@@ -3755,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());
}
@@ -4024,10 +4005,7 @@ SpatialEditor::SpatialEditor(EditorNode *p_editor) {
settings_ambient_color = memnew( ColorPickerButton );
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));
- settings_ambient_color->set_color(Color(0.15,0.15,0.15));
+ settings_ambient_color->set_pick_color(Color(0.15,0.15,0.15));
settings_fov = memnew( SpinBox );
@@ -4171,7 +4149,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/spatial_editor_plugin.h b/tools/editor/plugins/spatial_editor_plugin.h
index b05b7d8545..6e5243e6ab 100644
--- a/tools/editor/plugins/spatial_editor_plugin.h
+++ b/tools/editor/plugins/spatial_editor_plugin.h
@@ -156,13 +156,11 @@ private:
NAVIGATION_MAYA,
NAVIGATION_MODO,
};
- NavigationScheme _get_navigation_schema(const String& p_property);
enum NavigationZoomStyle {
NAVIGATION_ZOOM_VERTICAL,
NAVIGATION_ZOOM_HORIZONTAL
};
- NavigationZoomStyle _get_navigation_zoom_style(const String& p_property);
enum NavigationMode {
NAVIGATION_NONE,
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/style_box_editor_plugin.h b/tools/editor/plugins/style_box_editor_plugin.h
index b2288b8e74..29e98efd8b 100644
--- a/tools/editor/plugins/style_box_editor_plugin.h
+++ b/tools/editor/plugins/style_box_editor_plugin.h
@@ -30,7 +30,7 @@
#define STYLE_BOX_EDITOR_PLUGIN_H
#include "scene/resources/style_box.h"
-#include "scene/gui/texture_frame.h"
+#include "scene/gui/texture_rect.h"
#include "scene/gui/option_button.h"
#include "tools/editor/editor_node.h"
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/texture_region_editor_plugin.cpp b/tools/editor/plugins/texture_region_editor_plugin.cpp
index ca49684063..1ad880c4d6 100644
--- a/tools/editor/plugins/texture_region_editor_plugin.cpp
+++ b/tools/editor/plugins/texture_region_editor_plugin.cpp
@@ -935,7 +935,7 @@ void TextureRegionEditorPlugin::edit(Object *p_node)
bool TextureRegionEditorPlugin::handles(Object *p_obj) const
{
- return p_obj->is_class("Sprite") || p_obj->is_class("Patch9Frame") || p_obj->is_class("StyleBoxTexture") || p_obj->is_class("AtlasTexture");
+ return p_obj->is_class("Sprite") || p_obj->is_class("Patch9Rect") || p_obj->is_class("StyleBoxTexture") || p_obj->is_class("AtlasTexture");
}
void TextureRegionEditorPlugin::make_visible(bool p_visible)
diff --git a/tools/editor/plugins/texture_region_editor_plugin.h b/tools/editor/plugins/texture_region_editor_plugin.h
index c529e54dd1..35c0f18efa 100644
--- a/tools/editor/plugins/texture_region_editor_plugin.h
+++ b/tools/editor/plugins/texture_region_editor_plugin.h
@@ -36,7 +36,7 @@
#include "tools/editor/editor_plugin.h"
#include "tools/editor/editor_node.h"
#include "scene/2d/sprite.h"
-#include "scene/gui/patch_9_frame.h"
+#include "scene/gui/patch_9_rect.h"
#include "scene/resources/style_box.h"
#include "scene/resources/texture.h"
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/plugins/theme_editor_plugin.h b/tools/editor/plugins/theme_editor_plugin.h
index 0af9128bf2..9251da8e07 100644
--- a/tools/editor/plugins/theme_editor_plugin.h
+++ b/tools/editor/plugins/theme_editor_plugin.h
@@ -30,7 +30,7 @@
#define THEME_EDITOR_PLUGIN_H
#include "scene/resources/theme.h"
-#include "scene/gui/texture_frame.h"
+#include "scene/gui/texture_rect.h"
#include "scene/gui/option_button.h"
#include "scene/gui/file_dialog.h"
#include "scene/gui/check_box.h"
diff --git a/tools/editor/project_export.cpp b/tools/editor/project_export.cpp
index 7a1b2c518c..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();
@@ -921,7 +921,7 @@ bool ProjectExportDialog::_update_group_treef(TreeItem *p_parent,EditorFileSyste
for(int i=0;i<p_dir->get_file_count();i++) {
String fname = p_dir->get_file(i);
- if (p_extensions.has(fname.to_lower().extension())) {
+ if (p_extensions.has(fname.to_lower().get_extension())) {
String path = p_dir->get_file_path(i);
if (filter!=String() && path.find(filter)==-1)
@@ -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 da12e8d671..2cf940a29a 100644
--- a/tools/editor/project_manager.cpp
+++ b/tools/editor/project_manager.cpp
@@ -42,7 +42,7 @@
#include "scene/gui/center_container.h"
#include "io/stream_peer_ssl.h"
-#include "scene/gui/texture_frame.h"
+#include "scene/gui/texture_rect.h"
#include "scene/gui/margin_container.h"
#include "io/resource_saver.h"
@@ -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..8f294a5102 100644
--- a/tools/editor/property_editor.cpp
+++ b/tools/editor/property_editor.cpp
@@ -824,7 +824,7 @@ bool CustomPropertyEditor::edit(Object* p_owner,const String& p_name,Variant::Ty
color_picker->show();
color_picker->set_edit_alpha(hint!=PROPERTY_HINT_COLOR_NO_ALPHA);
- color_picker->set_color(v);
+ color_picker->set_pick_color(v);
set_size( Size2(300*EDSCALE, color_picker->get_combined_minimum_size().height+10*EDSCALE));
color_picker->set_focus_on_line_edit();
/*
@@ -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/property_editor.h b/tools/editor/property_editor.h
index 305da055a4..900d06497f 100644
--- a/tools/editor/property_editor.h
+++ b/tools/editor/property_editor.h
@@ -37,7 +37,7 @@
#include "scene/gui/dialogs.h"
#include "scene/gui/color_picker.h"
#include "scene/gui/menu_button.h"
-#include "scene/gui/texture_frame.h"
+#include "scene/gui/texture_rect.h"
#include "scene/gui/text_edit.h"
#include "scene/gui/check_button.h"
#include "scene/gui/split_container.h"
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_create_dialog.cpp b/tools/editor/script_create_dialog.cpp
index d1095271fc..2a76224e33 100644
--- a/tools/editor/script_create_dialog.cpp
+++ b/tools/editor/script_create_dialog.cpp
@@ -38,7 +38,7 @@ void ScriptCreateDialog::config(const String& p_base_name,const String&p_base_pa
class_name->set_text("");
parent_name->set_text(p_base_name);
if (p_base_path!="") {
- initial_bp=p_base_path.basename();
+ initial_bp=p_base_path.get_basename();
file_path->set_text(initial_bp+"."+ScriptServer::get_language( language_menu->get_selected() )->get_extension());
} else {
initial_bp="";
@@ -182,7 +182,7 @@ void ScriptCreateDialog::_lang_changed(int l) {
String path=file_path->get_text();
String extension="";
if (path.find(".")>=0) {
- extension=path.extension();
+ extension=path.get_extension();
}
if (extension.length()==0) {
@@ -199,7 +199,7 @@ void ScriptCreateDialog::_lang_changed(int l) {
for(List<String>::Element *E=extensions.front();E;E=E->next()) {
if (E->get().nocasecmp_to(extension)==0) {
- path=path.basename()+selected_ext;
+ path=path.get_basename()+selected_ext;
_path_changed(path);
break;
}
@@ -288,7 +288,7 @@ void ScriptCreateDialog::_path_changed(const String& p_path) {
create_new=!f->file_exists(p);
memdelete(f);
- String extension=p.extension();
+ String extension=p.get_extension();
List<String> extensions;
// get all possible extensions for script
diff --git a/tools/editor/script_editor_debugger.cpp b/tools/editor/script_editor_debugger.cpp
index 47725896e6..e53e69d9e0 100644
--- a/tools/editor/script_editor_debugger.cpp
+++ b/tools/editor/script_editor_debugger.cpp
@@ -177,7 +177,7 @@ void ScriptEditorDebugger::debug_next() {
ERR_FAIL_COND(!breaked);
ERR_FAIL_COND(connection.is_null());
- ERR_FAIL_COND(!connection->is_connected());
+ ERR_FAIL_COND(!connection->is_connected_to_host());
Array msg;
msg.push_back("next");
ppeer->put_var(msg);
@@ -189,7 +189,7 @@ void ScriptEditorDebugger::debug_step() {
ERR_FAIL_COND(!breaked);
ERR_FAIL_COND(connection.is_null());
- ERR_FAIL_COND(!connection->is_connected());
+ ERR_FAIL_COND(!connection->is_connected_to_host());
Array msg;
msg.push_back("step");
@@ -202,7 +202,7 @@ void ScriptEditorDebugger::debug_break() {
ERR_FAIL_COND(breaked);
ERR_FAIL_COND(connection.is_null());
- ERR_FAIL_COND(!connection->is_connected());
+ ERR_FAIL_COND(!connection->is_connected_to_host());
Array msg;
msg.push_back("break");
@@ -214,7 +214,7 @@ void ScriptEditorDebugger::debug_continue() {
ERR_FAIL_COND(!breaked);
ERR_FAIL_COND(connection.is_null());
- ERR_FAIL_COND(!connection->is_connected());
+ ERR_FAIL_COND(!connection->is_connected_to_host());
OS::get_singleton()->enable_for_stealing_focus(EditorNode::get_singleton()->get_child_process_id());
@@ -294,7 +294,7 @@ void ScriptEditorDebugger::_scene_tree_property_select_object(ObjectID p_object)
void ScriptEditorDebugger::_scene_tree_request() {
ERR_FAIL_COND(connection.is_null());
- ERR_FAIL_COND(!connection->is_connected());
+ ERR_FAIL_COND(!connection->is_connected_to_host());
Array msg;
msg.push_back("request_scene_tree");
@@ -305,7 +305,7 @@ void ScriptEditorDebugger::_scene_tree_request() {
void ScriptEditorDebugger::_video_mem_request() {
ERR_FAIL_COND(connection.is_null());
- ERR_FAIL_COND(!connection->is_connected());
+ ERR_FAIL_COND(!connection->is_connected_to_host());
Array msg;
msg.push_back("request_video_mem");
@@ -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);
@@ -993,7 +993,7 @@ void ScriptEditorDebugger::_notification(int p_what) {
}
};
- if (!connection->is_connected()) {
+ if (!connection->is_connected_to_host()) {
stop();
editor->notify_child_process_exited(); //somehow, exited
break;
@@ -1183,7 +1183,7 @@ void ScriptEditorDebugger::_profiler_activate(bool p_enable) {
void ScriptEditorDebugger::_profiler_seeked() {
- if (!connection.is_valid() || !connection->is_connected())
+ if (!connection.is_valid() || !connection->is_connected_to_host())
return;
if (breaked)
@@ -1205,7 +1205,7 @@ void ScriptEditorDebugger::_stack_dump_frame_selected() {
emit_signal("goto_script_line",s,int(d["line"])-1);
ERR_FAIL_COND(connection.is_null());
- ERR_FAIL_COND(!connection->is_connected());
+ ERR_FAIL_COND(!connection->is_connected_to_host());
///
Array msg;
@@ -1620,7 +1620,7 @@ void ScriptEditorDebugger::set_hide_on_stop(bool p_hide) {
void ScriptEditorDebugger::_paused() {
ERR_FAIL_COND(connection.is_null());
- ERR_FAIL_COND(!connection->is_connected());
+ ERR_FAIL_COND(!connection->is_connected_to_host());
if (!breaked && EditorNode::get_singleton()->get_pause_button()->is_pressed()) {
debug_break();
@@ -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) );