summaryrefslogtreecommitdiff
path: root/editor
diff options
context:
space:
mode:
Diffstat (limited to 'editor')
-rw-r--r--editor/animation_editor.cpp4
-rw-r--r--editor/animation_editor.h4
-rw-r--r--editor/array_property_edit.cpp4
-rw-r--r--editor/array_property_edit.h4
-rw-r--r--editor/code_editor.cpp6
-rw-r--r--editor/code_editor.h4
-rw-r--r--editor/collada/collada.cpp4
-rw-r--r--editor/collada/collada.h4
-rw-r--r--editor/connections_dialog.cpp4
-rw-r--r--editor/connections_dialog.h4
-rw-r--r--editor/create_dialog.cpp85
-rw-r--r--editor/create_dialog.h7
-rw-r--r--editor/dependency_editor.cpp4
-rw-r--r--editor/dependency_editor.h4
-rw-r--r--editor/dictionary_property_edit.cpp4
-rw-r--r--editor/dictionary_property_edit.h4
-rw-r--r--editor/doc/doc_data.cpp4
-rw-r--r--editor/doc/doc_data.h4
-rw-r--r--editor/doc/doc_dump.cpp4
-rw-r--r--editor/doc/doc_dump.h4
-rw-r--r--editor/doc_code_font.h4
-rw-r--r--editor/doc_font.h4
-rw-r--r--editor/doc_title_font.h4
-rw-r--r--editor/editor_about.cpp9
-rw-r--r--editor/editor_about.h4
-rw-r--r--editor/editor_asset_installer.cpp4
-rw-r--r--editor/editor_asset_installer.h4
-rw-r--r--editor/editor_audio_buses.cpp4
-rw-r--r--editor/editor_audio_buses.h4
-rw-r--r--editor/editor_autoload_settings.cpp4
-rw-r--r--editor/editor_autoload_settings.h4
-rw-r--r--editor/editor_data.cpp13
-rw-r--r--editor/editor_data.h5
-rw-r--r--editor/editor_dir_dialog.cpp4
-rw-r--r--editor/editor_dir_dialog.h4
-rw-r--r--editor/editor_export.cpp4
-rw-r--r--editor/editor_export.h4
-rw-r--r--editor/editor_file_dialog.cpp67
-rw-r--r--editor/editor_file_dialog.h5
-rw-r--r--editor/editor_file_system.cpp50
-rw-r--r--editor/editor_file_system.h4
-rw-r--r--editor/editor_fonts.cpp36
-rw-r--r--editor/editor_fonts.h4
-rw-r--r--editor/editor_help.cpp11
-rw-r--r--editor/editor_help.h4
-rw-r--r--editor/editor_initialize_ssl.cpp4
-rw-r--r--editor/editor_initialize_ssl.h4
-rw-r--r--editor/editor_log.cpp12
-rw-r--r--editor/editor_log.h4
-rw-r--r--editor/editor_name_dialog.cpp4
-rw-r--r--editor/editor_name_dialog.h4
-rw-r--r--editor/editor_node.cpp23
-rw-r--r--editor/editor_node.h4
-rw-r--r--editor/editor_path.cpp4
-rw-r--r--editor/editor_path.h4
-rw-r--r--editor/editor_plugin.cpp4
-rw-r--r--editor/editor_plugin.h4
-rw-r--r--editor/editor_plugin_settings.cpp4
-rw-r--r--editor/editor_plugin_settings.h4
-rw-r--r--editor/editor_profiler.cpp4
-rw-r--r--editor/editor_profiler.h4
-rw-r--r--editor/editor_resource_preview.cpp4
-rw-r--r--editor/editor_resource_preview.h4
-rw-r--r--editor/editor_run.cpp4
-rw-r--r--editor/editor_run.h4
-rw-r--r--editor/editor_run_native.cpp4
-rw-r--r--editor/editor_run_native.h4
-rw-r--r--editor/editor_run_script.cpp4
-rw-r--r--editor/editor_run_script.h4
-rw-r--r--editor/editor_scale.cpp4
-rw-r--r--editor/editor_scale.h4
-rw-r--r--editor/editor_settings.cpp43
-rw-r--r--editor/editor_settings.h4
-rw-r--r--editor/editor_sub_scene.cpp4
-rw-r--r--editor/editor_sub_scene.h4
-rw-r--r--editor/editor_themes.cpp113
-rw-r--r--editor/editor_themes.h4
-rw-r--r--editor/export_template_manager.cpp4
-rw-r--r--editor/export_template_manager.h4
-rw-r--r--editor/file_type_cache.cpp4
-rw-r--r--editor/file_type_cache.h4
-rw-r--r--editor/fileserver/editor_file_server.cpp4
-rw-r--r--editor/fileserver/editor_file_server.h4
-rw-r--r--editor/filesystem_dock.cpp77
-rw-r--r--editor/filesystem_dock.h5
-rw-r--r--editor/groups_editor.cpp4
-rw-r--r--editor/groups_editor.h4
-rw-r--r--editor/import/editor_import_collada.cpp4
-rw-r--r--editor/import/editor_import_collada.h4
-rw-r--r--editor/import/editor_import_plugin.cpp4
-rw-r--r--editor/import/editor_import_plugin.h4
-rw-r--r--editor/import/editor_scene_importer_gltf.cpp282
-rw-r--r--editor/import/editor_scene_importer_gltf.h39
-rw-r--r--editor/import/resource_importer_csv_translation.cpp4
-rw-r--r--editor/import/resource_importer_csv_translation.h4
-rw-r--r--editor/import/resource_importer_obj.cpp4
-rw-r--r--editor/import/resource_importer_obj.h4
-rw-r--r--editor/import/resource_importer_scene.cpp4
-rw-r--r--editor/import/resource_importer_scene.h4
-rw-r--r--editor/import/resource_importer_texture.cpp4
-rw-r--r--editor/import/resource_importer_texture.h4
-rw-r--r--editor/import/resource_importer_wav.cpp4
-rw-r--r--editor/import/resource_importer_wav.h4
-rw-r--r--editor/import_dock.cpp4
-rw-r--r--editor/import_dock.h4
-rw-r--r--editor/multi_node_edit.cpp4
-rw-r--r--editor/multi_node_edit.h4
-rw-r--r--editor/node_dock.cpp4
-rw-r--r--editor/node_dock.h4
-rw-r--r--editor/output_strings.cpp4
-rw-r--r--editor/output_strings.h4
-rw-r--r--editor/pane_drag.cpp4
-rw-r--r--editor/pane_drag.h4
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.cpp114
-rw-r--r--editor/plugins/abstract_polygon_2d_editor.h4
-rw-r--r--editor/plugins/animation_player_editor_plugin.cpp4
-rw-r--r--editor/plugins/animation_player_editor_plugin.h4
-rw-r--r--editor/plugins/animation_tree_editor_plugin.cpp4
-rw-r--r--editor/plugins/animation_tree_editor_plugin.h4
-rw-r--r--editor/plugins/asset_library_editor_plugin.cpp4
-rw-r--r--editor/plugins/asset_library_editor_plugin.h4
-rw-r--r--editor/plugins/baked_lightmap_editor_plugin.cpp1
-rw-r--r--editor/plugins/camera_editor_plugin.cpp4
-rw-r--r--editor/plugins/camera_editor_plugin.h4
-rw-r--r--editor/plugins/canvas_item_editor_plugin.cpp24
-rw-r--r--editor/plugins/canvas_item_editor_plugin.h8
-rw-r--r--editor/plugins/collision_polygon_2d_editor_plugin.cpp4
-rw-r--r--editor/plugins/collision_polygon_2d_editor_plugin.h4
-rw-r--r--editor/plugins/collision_polygon_editor_plugin.cpp4
-rw-r--r--editor/plugins/collision_polygon_editor_plugin.h4
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.cpp4
-rw-r--r--editor/plugins/collision_shape_2d_editor_plugin.h4
-rw-r--r--editor/plugins/cube_grid_theme_editor_plugin.cpp4
-rw-r--r--editor/plugins/cube_grid_theme_editor_plugin.h4
-rw-r--r--editor/plugins/curve_editor_plugin.cpp27
-rw-r--r--editor/plugins/curve_editor_plugin.h4
-rw-r--r--editor/plugins/editor_preview_plugins.cpp4
-rw-r--r--editor/plugins/editor_preview_plugins.h4
-rw-r--r--editor/plugins/gi_probe_editor_plugin.cpp4
-rw-r--r--editor/plugins/gi_probe_editor_plugin.h4
-rw-r--r--editor/plugins/gradient_editor_plugin.cpp4
-rw-r--r--editor/plugins/gradient_editor_plugin.h4
-rw-r--r--editor/plugins/item_list_editor_plugin.cpp4
-rw-r--r--editor/plugins/item_list_editor_plugin.h4
-rw-r--r--editor/plugins/light_occluder_2d_editor_plugin.cpp4
-rw-r--r--editor/plugins/light_occluder_2d_editor_plugin.h4
-rw-r--r--editor/plugins/line_2d_editor_plugin.cpp4
-rw-r--r--editor/plugins/line_2d_editor_plugin.h4
-rw-r--r--editor/plugins/material_editor_plugin.cpp4
-rw-r--r--editor/plugins/material_editor_plugin.h4
-rw-r--r--editor/plugins/mesh_editor_plugin.cpp4
-rw-r--r--editor/plugins/mesh_editor_plugin.h4
-rw-r--r--editor/plugins/mesh_instance_editor_plugin.cpp4
-rw-r--r--editor/plugins/mesh_instance_editor_plugin.h4
-rw-r--r--editor/plugins/multimesh_editor_plugin.cpp4
-rw-r--r--editor/plugins/multimesh_editor_plugin.h4
-rw-r--r--editor/plugins/navigation_mesh_editor_plugin.cpp4
-rw-r--r--editor/plugins/navigation_mesh_editor_plugin.h4
-rw-r--r--editor/plugins/navigation_mesh_generator.cpp4
-rw-r--r--editor/plugins/navigation_mesh_generator.h4
-rw-r--r--editor/plugins/navigation_polygon_editor_plugin.cpp4
-rw-r--r--editor/plugins/navigation_polygon_editor_plugin.h4
-rw-r--r--editor/plugins/particles_2d_editor_plugin.cpp4
-rw-r--r--editor/plugins/particles_2d_editor_plugin.h4
-rw-r--r--editor/plugins/particles_editor_plugin.cpp4
-rw-r--r--editor/plugins/particles_editor_plugin.h4
-rw-r--r--editor/plugins/path_2d_editor_plugin.cpp4
-rw-r--r--editor/plugins/path_2d_editor_plugin.h4
-rw-r--r--editor/plugins/path_editor_plugin.cpp4
-rw-r--r--editor/plugins/path_editor_plugin.h4
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.cpp4
-rw-r--r--editor/plugins/polygon_2d_editor_plugin.h4
-rw-r--r--editor/plugins/resource_preloader_editor_plugin.cpp4
-rw-r--r--editor/plugins/resource_preloader_editor_plugin.h4
-rw-r--r--editor/plugins/script_editor_plugin.cpp22
-rw-r--r--editor/plugins/script_editor_plugin.h5
-rw-r--r--editor/plugins/script_text_editor.cpp100
-rw-r--r--editor/plugins/script_text_editor.h4
-rw-r--r--editor/plugins/shader_editor_plugin.cpp101
-rw-r--r--editor/plugins/shader_editor_plugin.h4
-rw-r--r--editor/plugins/shader_graph_editor_plugin.cpp4
-rw-r--r--editor/plugins/shader_graph_editor_plugin.h4
-rw-r--r--editor/plugins/spatial_editor_plugin.cpp6
-rw-r--r--editor/plugins/spatial_editor_plugin.h4
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.cpp4
-rw-r--r--editor/plugins/sprite_frames_editor_plugin.h4
-rw-r--r--editor/plugins/style_box_editor_plugin.cpp4
-rw-r--r--editor/plugins/style_box_editor_plugin.h4
-rw-r--r--editor/plugins/texture_editor_plugin.cpp4
-rw-r--r--editor/plugins/texture_editor_plugin.h4
-rw-r--r--editor/plugins/texture_region_editor_plugin.cpp4
-rw-r--r--editor/plugins/texture_region_editor_plugin.h4
-rw-r--r--editor/plugins/theme_editor_plugin.cpp4
-rw-r--r--editor/plugins/theme_editor_plugin.h4
-rw-r--r--editor/plugins/tile_map_editor_plugin.cpp4
-rw-r--r--editor/plugins/tile_map_editor_plugin.h4
-rw-r--r--editor/plugins/tile_set_editor_plugin.cpp363
-rw-r--r--editor/plugins/tile_set_editor_plugin.h31
-rw-r--r--editor/progress_dialog.cpp4
-rw-r--r--editor/progress_dialog.h4
-rw-r--r--editor/project_export.cpp4
-rw-r--r--editor/project_export.h4
-rw-r--r--editor/project_manager.cpp144
-rw-r--r--editor/project_manager.h4
-rw-r--r--editor/project_settings_editor.cpp4
-rw-r--r--editor/project_settings_editor.h4
-rw-r--r--editor/property_editor.cpp53
-rw-r--r--editor/property_editor.h4
-rw-r--r--editor/property_selector.cpp4
-rw-r--r--editor/property_selector.h4
-rw-r--r--editor/pvrtc_compress.cpp4
-rw-r--r--editor/pvrtc_compress.h4
-rw-r--r--editor/quick_open.cpp4
-rw-r--r--editor/quick_open.h4
-rw-r--r--editor/register_exporters.h4
-rw-r--r--editor/reparent_dialog.cpp4
-rw-r--r--editor/reparent_dialog.h4
-rw-r--r--editor/run_settings_dialog.cpp4
-rw-r--r--editor/run_settings_dialog.h4
-rw-r--r--editor/scene_tree_dock.cpp8
-rw-r--r--editor/scene_tree_dock.h4
-rw-r--r--editor/scene_tree_editor.cpp4
-rw-r--r--editor/scene_tree_editor.h4
-rw-r--r--editor/script_create_dialog.cpp20
-rw-r--r--editor/script_create_dialog.h4
-rw-r--r--editor/script_editor_debugger.cpp71
-rw-r--r--editor/script_editor_debugger.h14
-rw-r--r--editor/settings_config_dialog.cpp6
-rw-r--r--editor/settings_config_dialog.h4
-rw-r--r--editor/spatial_editor_gizmos.cpp4
-rw-r--r--editor/spatial_editor_gizmos.h4
-rw-r--r--editor/translations/af.po4
-rw-r--r--editor/translations/ar.po4
-rw-r--r--editor/translations/bg.po4
-rw-r--r--editor/translations/bn.po4
-rw-r--r--editor/translations/ca.po4
-rw-r--r--editor/translations/cs.po4
-rw-r--r--editor/translations/da.po4
-rw-r--r--editor/translations/de.po4
-rw-r--r--editor/translations/de_CH.po4
-rw-r--r--editor/translations/editor.pot4
-rw-r--r--editor/translations/el.po4
-rw-r--r--editor/translations/es.po4
-rw-r--r--editor/translations/es_AR.po4
-rwxr-xr-xeditor/translations/extract.py4
-rw-r--r--editor/translations/fa.po4
-rw-r--r--editor/translations/fi.po4
-rw-r--r--editor/translations/fr.po4
-rw-r--r--editor/translations/he.po4
-rw-r--r--editor/translations/hi.po4
-rw-r--r--editor/translations/hu.po4
-rw-r--r--editor/translations/id.po4
-rw-r--r--editor/translations/is.po4
-rw-r--r--editor/translations/it.po4
-rw-r--r--editor/translations/ja.po4
-rw-r--r--editor/translations/ko.po4
-rw-r--r--editor/translations/lt.po4
-rw-r--r--editor/translations/nb.po4
-rw-r--r--editor/translations/nl.po4
-rw-r--r--editor/translations/pl.po4
-rw-r--r--editor/translations/pr.po4
-rw-r--r--editor/translations/pt_BR.po4
-rw-r--r--editor/translations/pt_PT.po4
-rw-r--r--editor/translations/ru.po4
-rw-r--r--editor/translations/sk.po4
-rw-r--r--editor/translations/sl.po4
-rw-r--r--editor/translations/sr_Cyrl.po4
-rw-r--r--editor/translations/sv.po4
-rw-r--r--editor/translations/ta.po4
-rw-r--r--editor/translations/th.po4
-rw-r--r--editor/translations/tr.po4
-rw-r--r--editor/translations/uk.po4
-rw-r--r--editor/translations/ur_PK.po4
-rw-r--r--editor/translations/vi.po4
-rw-r--r--editor/translations/zh_CN.po4
-rw-r--r--editor/translations/zh_HK.po4
-rw-r--r--editor/translations/zh_TW.po4
277 files changed, 1731 insertions, 1231 deletions
diff --git a/editor/animation_editor.cpp b/editor/animation_editor.cpp
index c6381864b3..f73c81ed9c 100644
--- a/editor/animation_editor.cpp
+++ b/editor/animation_editor.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/animation_editor.h b/editor/animation_editor.h
index 8a89dc1a1c..56e3f34aac 100644
--- a/editor/animation_editor.h
+++ b/editor/animation_editor.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/array_property_edit.cpp b/editor/array_property_edit.cpp
index bcf1600b36..3c2fc5c23f 100644
--- a/editor/array_property_edit.cpp
+++ b/editor/array_property_edit.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/array_property_edit.h b/editor/array_property_edit.h
index c028c45b04..6b637f8b52 100644
--- a/editor/array_property_edit.h
+++ b/editor/array_property_edit.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/code_editor.cpp b/editor/code_editor.cpp
index 216f2027fb..4b59656903 100644
--- a/editor/code_editor.cpp
+++ b/editor/code_editor.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -1251,7 +1251,7 @@ CodeTextEditor::CodeTextEditor() {
error = memnew(Label);
status_bar->add_child(error);
- error->set_clip_text(true); //do not change, or else very long errors can push the whole container to the right
+ error->set_autowrap(true);
error->set_valign(Label::VALIGN_CENTER);
error->add_color_override("font_color", EditorNode::get_singleton()->get_gui_base()->get_color("error_color", "Editor"));
error->add_font_override("font", EditorNode::get_singleton()->get_gui_base()->get_font("status_source", "EditorFonts"));
diff --git a/editor/code_editor.h b/editor/code_editor.h
index 656ea4b47b..6f4e45352b 100644
--- a/editor/code_editor.h
+++ b/editor/code_editor.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/collada/collada.cpp b/editor/collada/collada.cpp
index 6dbfd84c86..f7f11f40f5 100644
--- a/editor/collada/collada.cpp
+++ b/editor/collada/collada.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/collada/collada.h b/editor/collada/collada.h
index d41a72d7c5..34bd93bcfe 100644
--- a/editor/collada/collada.h
+++ b/editor/collada/collada.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/connections_dialog.cpp b/editor/connections_dialog.cpp
index c095229374..9783d0cc4e 100644
--- a/editor/connections_dialog.cpp
+++ b/editor/connections_dialog.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/connections_dialog.h b/editor/connections_dialog.h
index 99a83ff599..59715c15c3 100644
--- a/editor/connections_dialog.h
+++ b/editor/connections_dialog.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/create_dialog.cpp b/editor/create_dialog.cpp
index 2189830acb..96c3a27ea7 100644
--- a/editor/create_dialog.cpp
+++ b/editor/create_dialog.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -37,7 +37,7 @@
#include "print_string.h"
#include "scene/gui/box_container.h"
-void CreateDialog::popup_create(bool p_dontclear) {
+void CreateDialog::popup_create(bool p_dont_clear, bool p_replace_mode) {
recent->clear();
@@ -89,11 +89,12 @@ void CreateDialog::popup_create(bool p_dontclear) {
popup_centered_ratio();
}
- if (p_dontclear)
+ if (p_dont_clear) {
search_box->select_all();
- else {
+ } else {
search_box->clear();
}
+
search_box->grab_focus();
_update_search();
@@ -104,8 +105,19 @@ void CreateDialog::popup_create(bool p_dontclear) {
if (enable_rl) {
search_options->add_constant_override("draw_relationship_lines", 1);
search_options->add_color_override("relationship_line_color", rl_color);
- } else
+ } else {
search_options->add_constant_override("draw_relationship_lines", 0);
+ }
+
+ is_replace_mode = p_replace_mode;
+
+ if (p_replace_mode) {
+ set_title(vformat(TTR("Change %s Type"), base_type));
+ get_ok()->set_text(TTR("Change"));
+ } else {
+ set_title(vformat(TTR("Create New %s"), base_type));
+ get_ok()->set_text(TTR("Create"));
+ }
}
void CreateDialog::_text_changed(const String &p_newtext) {
@@ -369,7 +381,11 @@ void CreateDialog::_notification(int p_what) {
void CreateDialog::set_base_type(const String &p_base) {
base_type = p_base;
- set_title(vformat(TTR("Create New %s"), p_base));
+ if (is_replace_mode)
+ set_title(vformat(TTR("Change %s Type"), p_base));
+ else
+ set_title(vformat(TTR("Create New %s"), p_base));
+
_update_search();
}
@@ -624,6 +640,8 @@ void CreateDialog::_bind_methods() {
CreateDialog::CreateDialog() {
+ is_replace_mode = false;
+
ClassDB::get_class_list(&type_list);
type_list.sort_custom<StringName::AlphCompare>();
@@ -635,34 +653,30 @@ CreateDialog::CreateDialog() {
VSplitContainer *vsc = memnew(VSplitContainer);
hsc->add_child(vsc);
- {
- VBoxContainer *lvbc = memnew(VBoxContainer);
- vsc->add_child(lvbc);
- lvbc->set_custom_minimum_size(Size2(150, 100) * EDSCALE);
- lvbc->set_v_size_flags(SIZE_EXPAND_FILL);
-
- favorites = memnew(Tree);
- lvbc->add_margin_child(TTR("Favorites:"), favorites, true);
- favorites->set_hide_root(true);
- favorites->set_hide_folding(true);
- favorites->connect("cell_selected", this, "_favorite_selected");
- favorites->connect("item_activated", this, "_favorite_activated");
- favorites->set_drag_forwarding(this);
- }
-
- {
- VBoxContainer *lvbc = memnew(VBoxContainer);
- vsc->add_child(lvbc);
- lvbc->set_custom_minimum_size(Size2(150, 100) * EDSCALE);
- lvbc->set_v_size_flags(SIZE_EXPAND_FILL);
-
- recent = memnew(Tree);
- lvbc->add_margin_child(TTR("Recent:"), recent, true);
- recent->set_hide_root(true);
- recent->set_hide_folding(true);
- recent->connect("cell_selected", this, "_history_selected");
- recent->connect("item_activated", this, "_history_activated");
- }
+ VBoxContainer *fav_vb = memnew(VBoxContainer);
+ vsc->add_child(fav_vb);
+ fav_vb->set_custom_minimum_size(Size2(150, 100) * EDSCALE);
+ fav_vb->set_v_size_flags(SIZE_EXPAND_FILL);
+
+ favorites = memnew(Tree);
+ fav_vb->add_margin_child(TTR("Favorites:"), favorites, true);
+ favorites->set_hide_root(true);
+ favorites->set_hide_folding(true);
+ favorites->connect("cell_selected", this, "_favorite_selected");
+ favorites->connect("item_activated", this, "_favorite_activated");
+ favorites->set_drag_forwarding(this);
+
+ VBoxContainer *rec_vb = memnew(VBoxContainer);
+ vsc->add_child(rec_vb);
+ rec_vb->set_custom_minimum_size(Size2(150, 100) * EDSCALE);
+ rec_vb->set_v_size_flags(SIZE_EXPAND_FILL);
+
+ recent = memnew(Tree);
+ rec_vb->add_margin_child(TTR("Recent:"), recent, true);
+ recent->set_hide_root(true);
+ recent->set_hide_folding(true);
+ recent->connect("cell_selected", this, "_history_selected");
+ recent->connect("item_activated", this, "_history_activated");
VBoxContainer *vbc = memnew(VBoxContainer);
hsc->add_child(vbc);
@@ -682,7 +696,6 @@ CreateDialog::CreateDialog() {
search_box->connect("gui_input", this, "_sbox_input");
search_options = memnew(Tree);
vbc->add_margin_child(TTR("Matches:"), search_options, true);
- get_ok()->set_text(TTR("Create"));
get_ok()->set_disabled(true);
register_text_enter(search_box);
set_hide_on_ok(false);
diff --git a/editor/create_dialog.h b/editor/create_dialog.h
index 157c126c66..ed23fb4ae8 100644
--- a/editor/create_dialog.h
+++ b/editor/create_dialog.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -52,6 +52,7 @@ class CreateDialog : public ConfirmationDialog {
Button *favorite;
LineEdit *search_box;
Tree *search_options;
+ bool is_replace_mode;
String base_type;
String preferred_search_result_type;
EditorHelpBit *help_bit;
@@ -97,7 +98,7 @@ public:
void set_preferred_search_result_type(const String &p_preferred_type);
String get_preferred_search_result_type();
- void popup_create(bool p_dontclear);
+ void popup_create(bool p_dont_clear, bool p_replace_mode = false);
CreateDialog();
};
diff --git a/editor/dependency_editor.cpp b/editor/dependency_editor.cpp
index f357f1e51f..f18a966151 100644
--- a/editor/dependency_editor.cpp
+++ b/editor/dependency_editor.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/dependency_editor.h b/editor/dependency_editor.h
index 0cc153945d..bbe2b3494b 100644
--- a/editor/dependency_editor.h
+++ b/editor/dependency_editor.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/dictionary_property_edit.cpp b/editor/dictionary_property_edit.cpp
index 5b5a7ec9b0..b1451dc378 100644
--- a/editor/dictionary_property_edit.cpp
+++ b/editor/dictionary_property_edit.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/dictionary_property_edit.h b/editor/dictionary_property_edit.h
index 7a86727fb2..8e495b31a9 100644
--- a/editor/dictionary_property_edit.h
+++ b/editor/dictionary_property_edit.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* http://www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/doc/doc_data.cpp b/editor/doc/doc_data.cpp
index 0bb059f425..4a99ce8f51 100644
--- a/editor/doc/doc_data.cpp
+++ b/editor/doc/doc_data.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/doc/doc_data.h b/editor/doc/doc_data.h
index 68d30d8237..53774ce1f0 100644
--- a/editor/doc/doc_data.h
+++ b/editor/doc/doc_data.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/doc/doc_dump.cpp b/editor/doc/doc_dump.cpp
index 9dd05d9d0f..8d35cad6d6 100644
--- a/editor/doc/doc_dump.cpp
+++ b/editor/doc/doc_dump.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/doc/doc_dump.h b/editor/doc/doc_dump.h
index 4764a0e0d4..70280195c4 100644
--- a/editor/doc/doc_dump.h
+++ b/editor/doc/doc_dump.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/doc_code_font.h b/editor/doc_code_font.h
index e962351daf..41713befcb 100644
--- a/editor/doc_code_font.h
+++ b/editor/doc_code_font.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/doc_font.h b/editor/doc_font.h
index 4ec8c39db2..ae80db7b1c 100644
--- a/editor/doc_font.h
+++ b/editor/doc_font.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/doc_title_font.h b/editor/doc_title_font.h
index dd1bb7ca8e..d190896f18 100644
--- a/editor/doc_title_font.h
+++ b/editor/doc_title_font.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_about.cpp b/editor/editor_about.cpp
index 5f026abb6d..7fa4776141 100644
--- a/editor/editor_about.cpp
+++ b/editor/editor_about.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -131,7 +131,8 @@ EditorAbout::EditorAbout() {
Label *about_text = memnew(Label);
about_text->set_v_size_flags(Control::SIZE_SHRINK_CENTER);
- about_text->set_text(VERSION_FULL_NAME + hash + String::utf8("\n\xc2\xa9 2007-2017 Juan Linietsky, Ariel Manzur.\n\xc2\xa9 2014-2017 ") +
+ about_text->set_text(VERSION_FULL_NAME + hash +
+ String::utf8("\n\xc2\xa9 2007-2018 Juan Linietsky, Ariel Manzur.\n\xc2\xa9 2014-2018 ") +
TTR("Godot Engine contributors") + "\n");
hbc->add_child(about_text);
@@ -145,7 +146,7 @@ EditorAbout::EditorAbout() {
List<String> dev_sections;
dev_sections.push_back(TTR("Project Founders"));
dev_sections.push_back(TTR("Lead Developer"));
- dev_sections.push_back(TTR("Project Manager"));
+ dev_sections.push_back(TTR("Project Manager ")); // " " appended to distinguish between 'project supervisor' and 'project list'
dev_sections.push_back(TTR("Developers"));
const char **dev_src[] = { dev_founders, dev_lead, dev_manager, dev_names };
tc->add_child(_populate_list(TTR("Authors"), dev_sections, dev_src, 1));
diff --git a/editor/editor_about.h b/editor/editor_about.h
index fe40ce5f14..c573382679 100644
--- a/editor/editor_about.h
+++ b/editor/editor_about.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_asset_installer.cpp b/editor/editor_asset_installer.cpp
index 94108a52fc..8a3e1e85f7 100644
--- a/editor/editor_asset_installer.cpp
+++ b/editor/editor_asset_installer.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_asset_installer.h b/editor/editor_asset_installer.h
index cda1b4d2b5..09ea405c07 100644
--- a/editor/editor_asset_installer.h
+++ b/editor/editor_asset_installer.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_audio_buses.cpp b/editor/editor_audio_buses.cpp
index 6e507fac9b..a64b4922f2 100644
--- a/editor/editor_audio_buses.cpp
+++ b/editor/editor_audio_buses.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_audio_buses.h b/editor/editor_audio_buses.h
index 995def468c..850cb0bd15 100644
--- a/editor/editor_audio_buses.h
+++ b/editor/editor_audio_buses.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_autoload_settings.cpp b/editor/editor_autoload_settings.cpp
index 2796f776d7..960e0e0bb7 100644
--- a/editor/editor_autoload_settings.cpp
+++ b/editor/editor_autoload_settings.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_autoload_settings.h b/editor/editor_autoload_settings.h
index 2e0ce8835e..39f902179c 100644
--- a/editor/editor_autoload_settings.h
+++ b/editor/editor_autoload_settings.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_data.cpp b/editor/editor_data.cpp
index 49d55e6305..4acee1363c 100644
--- a/editor/editor_data.cpp
+++ b/editor/editor_data.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -701,6 +701,15 @@ String EditorData::get_scene_title(int p_idx) const {
return name;
}
+void EditorData::set_scene_path(int p_idx, const String &p_path) {
+
+ ERR_FAIL_INDEX(p_idx, edited_scene.size());
+
+ if (!edited_scene[p_idx].root)
+ return;
+ edited_scene[p_idx].root->set_filename(p_path);
+}
+
String EditorData::get_scene_path(int p_idx) const {
ERR_FAIL_INDEX_V(p_idx, edited_scene.size(), String());
diff --git a/editor/editor_data.h b/editor/editor_data.h
index 33a4091a65..2c95c3feea 100644
--- a/editor/editor_data.h
+++ b/editor/editor_data.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -185,6 +185,7 @@ public:
String get_scene_title(int p_idx) const;
String get_scene_path(int p_idx) const;
String get_scene_type(int p_idx) const;
+ void set_scene_path(int p_idx, const String &p_path);
Ref<Script> get_scene_root_script(int p_idx) const;
void set_edited_scene_version(uint64_t version, int p_scene_idx = -1);
uint64_t get_edited_scene_version() const;
diff --git a/editor/editor_dir_dialog.cpp b/editor/editor_dir_dialog.cpp
index 658c12d4d0..bf9c1ec9c6 100644
--- a/editor/editor_dir_dialog.cpp
+++ b/editor/editor_dir_dialog.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_dir_dialog.h b/editor/editor_dir_dialog.h
index 8aa685947b..8f585ae311 100644
--- a/editor/editor_dir_dialog.h
+++ b/editor/editor_dir_dialog.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_export.cpp b/editor/editor_export.cpp
index 1b88a56b75..1a10040bac 100644
--- a/editor/editor_export.cpp
+++ b/editor/editor_export.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_export.h b/editor/editor_export.h
index 02b15aff10..aa0391c8f5 100644
--- a/editor/editor_export.h
+++ b/editor/editor_export.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_file_dialog.cpp b/editor/editor_file_dialog.cpp
index deba16a524..1bf4c6741d 100644
--- a/editor/editor_file_dialog.cpp
+++ b/editor/editor_file_dialog.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -54,7 +54,7 @@ void EditorFileDialog::_notification(int p_what) {
if (p_what == NOTIFICATION_ENTER_TREE) {
- //_update_icons
+ // update icons
mode_thumbnails->set_icon(get_icon("FileThumbnail", "EditorIcons"));
mode_list->set_icon(get_icon("FileList", "EditorIcons"));
dir_prev->set_icon(get_icon("Back", "EditorIcons"));
@@ -65,7 +65,6 @@ void EditorFileDialog::_notification(int p_what) {
fav_up->set_icon(get_icon("MoveUp", "EditorIcons"));
fav_down->set_icon(get_icon("MoveDown", "EditorIcons"));
- fav_rm->set_icon(get_icon("Remove", "EditorIcons"));
} else if (p_what == NOTIFICATION_PROCESS) {
@@ -80,10 +79,6 @@ void EditorFileDialog::_notification(int p_what) {
preview_wheel_timeout = 0.1;
}
}
- } else if (p_what == NOTIFICATION_DRAW) {
-
- //RID ci = get_canvas_item();
- //get_stylebox("panel","PopupMenu")->draw(ci,Rect2(Point2(),get_size()));
} else if (p_what == NOTIFICATION_POPUP_HIDE) {
set_process_unhandled_input(false);
@@ -95,7 +90,7 @@ void EditorFileDialog::_notification(int p_what) {
set_show_hidden_files(show_hidden);
set_display_mode((DisplayMode)EditorSettings::get_singleton()->get("filesystem/file_dialog/display_mode").operator int());
- //_update_icons
+ // update icons
mode_thumbnails->set_icon(get_icon("FileThumbnail", "EditorIcons"));
mode_list->set_icon(get_icon("FileList", "EditorIcons"));
dir_prev->set_icon(get_icon("Back", "EditorIcons"));
@@ -106,7 +101,6 @@ void EditorFileDialog::_notification(int p_what) {
fav_up->set_icon(get_icon("MoveUp", "EditorIcons"));
fav_down->set_icon(get_icon("MoveDown", "EditorIcons"));
- fav_rm->set_icon(get_icon("Remove", "EditorIcons"));
// DO NOT CALL UPDATE FILE LIST HERE, ALL HUNDREDS OF HIDDEN DIALOGS WILL RESPOND, CALL INVALIDATE INSTEAD
invalidate();
}
@@ -260,7 +254,6 @@ void EditorFileDialog::_post_popup() {
name = name.get_file() + "/";
}
- //print_line("file: "+name);
recent->add_item(name, folder);
recent->set_item_metadata(recent->get_item_count() - 1, recentd[i]);
}
@@ -316,7 +309,7 @@ void EditorFileDialog::_request_single_thumbnail(const String &p_path) {
return;
EditorResourcePreview::get_singleton()->queue_resource_preview(p_path, this, "_thumbnail_done", p_path);
- //print_line("want file "+p_path);
+
set_process(true);
preview_waiting = true;
preview_wheel_timeout = 0;
@@ -376,7 +369,7 @@ void EditorFileDialog::_action_pressed() {
bool valid = false;
if (filter->get_selected() == filter->get_item_count() - 1) {
- valid = true; //match none
+ valid = true; // match none
} else if (filters.size() > 1 && filter->get_selected() == 0) {
// match all filters
for (int i = 0; i < filters.size(); i++) {
@@ -777,14 +770,12 @@ void EditorFileDialog::update_file_list() {
}
if (match) {
- //TreeItem *ti=tree->create_item(root);
- //ti->set_text(0,files.front()->get());
+
item_list->add_item(files.front()->get());
if (get_icon_func) {
Ref<Texture> icon = get_icon_func(cdir.plus_file(files.front()->get()));
- //ti->set_icon(0,icon);
if (display_mode == DISPLAY_THUMBNAILS) {
item_list->set_item_icon(item_list->get_item_count() - 1, file_thumbnail);
@@ -794,11 +785,6 @@ void EditorFileDialog::update_file_list() {
}
}
- if (mode == MODE_OPEN_DIR) {
- //disabled mode?
- //ti->set_custom_color(0,get_color("files_disabled"));
- //ti->set_selectable(0,false);
- }
Dictionary d;
d["name"] = files.front()->get();
d["dir"] = false;
@@ -807,7 +793,6 @@ void EditorFileDialog::update_file_list() {
EditorResourcePreview::get_singleton()->queue_resource_preview(fullpath, this, "_thumbnail_result", fullpath);
}
d["path"] = fullpath;
- //ti->set_metadata(0,d);
item_list->set_item_metadata(item_list->get_item_count() - 1, d);
if (file->get_text() == files.front()->get())
@@ -838,11 +823,6 @@ void EditorFileDialog::update_file_list() {
break;
}
}
- // ??
- /*
- if (tree->get_root() && tree->get_root()->get_children())
- tree->get_root()->get_children()->select(0);
- */
files.clear();
}
@@ -916,7 +896,6 @@ void EditorFileDialog::set_current_dir(const String &p_dir) {
dir_access->change_dir(p_dir);
update_dir();
invalidate();
- //_push_history();
}
void EditorFileDialog::set_current_file(const String &p_file) {
@@ -1191,7 +1170,6 @@ void EditorFileDialog::_update_favorites() {
name = name.get_file() + "/";
}
- //print_line("file: "+name);
favorites->add_item(name, star);
favorites->set_item_metadata(favorites->get_item_count() - 1, favorited[i]);
@@ -1442,6 +1420,8 @@ bool EditorFileDialog::is_overwrite_warning_disabled() const {
EditorFileDialog::EditorFileDialog() {
+ set_resizable(true);
+
show_hidden_files = default_show_hidden_files;
display_mode = default_display_mode;
local_history_pos = 0;
@@ -1499,6 +1479,8 @@ EditorFileDialog::EditorFileDialog() {
Ref<ButtonGroup> view_mode_group;
view_mode_group.instance();
+ pathhb->add_child(memnew(VSeparator));
+
mode_thumbnails = memnew(ToolButton);
mode_thumbnails->connect("pressed", this, "set_display_mode", varray(DISPLAY_THUMBNAILS));
mode_thumbnails->set_toggle_mode(true);
@@ -1528,8 +1510,13 @@ EditorFileDialog::EditorFileDialog() {
vbc->add_child(list_hb);
list_hb->set_v_size_flags(SIZE_EXPAND_FILL);
+ VSplitContainer *vsc = memnew(VSplitContainer);
+ list_hb->add_child(vsc);
+
VBoxContainer *fav_vb = memnew(VBoxContainer);
- list_hb->add_child(fav_vb);
+ vsc->add_child(fav_vb);
+ fav_vb->set_custom_minimum_size(Size2(150, 100) * EDSCALE);
+ fav_vb->set_v_size_flags(SIZE_EXPAND_FILL);
HBoxContainer *fav_hb = memnew(HBoxContainer);
fav_vb->add_child(fav_hb);
fav_hb->add_child(memnew(Label(TTR("Favorites:"))));
@@ -1540,23 +1527,23 @@ EditorFileDialog::EditorFileDialog() {
fav_down = memnew(ToolButton);
fav_hb->add_child(fav_down);
fav_down->connect("pressed", this, "_favorite_move_down");
- fav_rm = memnew(ToolButton);
- fav_hb->add_child(fav_rm);
- fav_rm->hide(); // redundant
- MarginContainer *fav_mv = memnew(MarginContainer);
- fav_vb->add_child(fav_mv);
- fav_mv->set_v_size_flags(SIZE_EXPAND_FILL);
favorites = memnew(ItemList);
- fav_mv->add_child(favorites);
+ fav_vb->add_child(favorites);
+ favorites->set_v_size_flags(SIZE_EXPAND_FILL);
favorites->connect("item_selected", this, "_favorite_selected");
+ VBoxContainer *rec_vb = memnew(VBoxContainer);
+ vsc->add_child(rec_vb);
+ rec_vb->set_custom_minimum_size(Size2(150, 100) * EDSCALE);
+ rec_vb->set_v_size_flags(SIZE_EXPAND_FILL);
recent = memnew(ItemList);
- fav_vb->add_margin_child(TTR("Recent:"), recent, true);
+ rec_vb->add_margin_child(TTR("Recent:"), recent, true);
recent->connect("item_selected", this, "_recent_selected");
VBoxContainer *item_vb = memnew(VBoxContainer);
list_hb->add_child(item_vb);
+ item_vb->set_custom_minimum_size(Size2(320, 0) * EDSCALE);
HBoxContainer *preview_hb = memnew(HBoxContainer);
preview_hb->set_v_size_flags(SIZE_EXPAND_FILL);
@@ -1599,7 +1586,7 @@ EditorFileDialog::EditorFileDialog() {
filter = memnew(OptionButton);
filter->set_stretch_ratio(3);
filter->set_h_size_flags(SIZE_EXPAND_FILL);
- filter->set_clip_text(true); //too many extensions overflow it
+ filter->set_clip_text(true); // too many extensions overflow it
filename_hbc->add_child(filter);
filename_hbc->set_h_size_flags(SIZE_EXPAND_FILL);
item_vb->add_child(filename_hbc);
@@ -1609,7 +1596,6 @@ EditorFileDialog::EditorFileDialog() {
_update_drives();
connect("confirmed", this, "_action_pressed");
- //cancel->connect("pressed", this,"_cancel_pressed");
item_list->connect("item_selected", this, "_item_selected", varray(), CONNECT_DEFERRED);
item_list->connect("item_activated", this, "_item_db_selected", varray());
item_list->connect("nothing_selected", this, "_items_clear_selection");
@@ -1643,7 +1629,6 @@ EditorFileDialog::EditorFileDialog() {
exterr->set_text(TTR("Must use a valid extension."));
add_child(exterr);
- //update_file_list();
update_filters();
update_dir();
diff --git a/editor/editor_file_dialog.h b/editor/editor_file_dialog.h
index f4a9a174e7..1a7fa756cc 100644
--- a/editor/editor_file_dialog.h
+++ b/editor/editor_file_dialog.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -36,6 +36,7 @@
#include "scene/gui/item_list.h"
#include "scene/gui/line_edit.h"
#include "scene/gui/option_button.h"
+#include "scene/gui/separator.h"
#include "scene/gui/split_container.h"
#include "scene/gui/texture_rect.h"
#include "scene/gui/tool_button.h"
diff --git a/editor/editor_file_system.cpp b/editor/editor_file_system.cpp
index d462cce908..bff090cdbc 100644
--- a/editor/editor_file_system.cpp
+++ b/editor/editor_file_system.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -320,7 +320,10 @@ bool EditorFileSystem::_test_for_reimport(const String &p_path, bool p_only_impo
List<String> to_check;
+ String source_file;
String source_md5;
+ Vector<String> dest_files;
+ String dest_md5;
while (true) {
@@ -346,8 +349,16 @@ bool EditorFileSystem::_test_for_reimport(const String &p_path, bool p_only_impo
for (int i = 0; i < fa.size(); i++) {
to_check.push_back(fa[i]);
}
- } else if (!p_only_imported_files && assign == "source_md5") {
- source_md5 = value;
+ } else if (!p_only_imported_files) {
+ if (assign == "source_md5") {
+ source_md5 = value;
+ } else if (assign == "source_file") {
+ source_file = value;
+ } else if (assign == "dest_md5") {
+ dest_md5 = value;
+ } else if (assign == "dest_files") {
+ dest_files = value;
+ }
}
} else if (next_tag.name != "remap" && next_tag.name != "deps") {
@@ -366,6 +377,11 @@ bool EditorFileSystem::_test_for_reimport(const String &p_path, bool p_only_impo
//check source md5 matching
if (!p_only_imported_files) {
+
+ if (source_file != String() && source_file != p_path) {
+ return true; //file was moved, reimport
+ }
+
if (source_md5 == String()) {
return true; //lacks md5, so just reimport
}
@@ -374,6 +390,13 @@ bool EditorFileSystem::_test_for_reimport(const String &p_path, bool p_only_impo
if (md5 != source_md5) {
return true;
}
+
+ if (dest_files.size() && dest_md5 != String()) {
+ md5 = FileAccess::get_multiple_md5(dest_files);
+ if (md5 != dest_md5) {
+ return true;
+ }
+ }
}
return false; //nothing changed
@@ -1388,6 +1411,8 @@ void EditorFileSystem::_reimport_file(const String &p_file) {
f->store_line("type=\"" + importer->get_resource_type() + "\"");
}
+ Vector<String> dest_paths;
+
if (err == OK) {
if (importer->get_save_extension() == "") {
@@ -1399,10 +1424,12 @@ void EditorFileSystem::_reimport_file(const String &p_file) {
String path = base_path.c_escape() + "." + E->get() + "." + importer->get_save_extension();
f->store_line("path." + E->get() + "=\"" + path + "\"");
+ dest_paths.push_back(path);
}
} else {
-
- f->store_line("path=\"" + base_path + "." + importer->get_save_extension() + "\"");
+ String path = base_path + "." + importer->get_save_extension();
+ f->store_line("path=\"" + path + "\"");
+ dest_paths.push_back(path);
}
} else {
@@ -1418,6 +1445,7 @@ void EditorFileSystem::_reimport_file(const String &p_file) {
Array genf;
for (List<String>::Element *E = gen_files.front(); E; E = E->next()) {
genf.push_back(E->get());
+ dest_paths.push_back(E->get());
}
String value;
@@ -1426,8 +1454,18 @@ void EditorFileSystem::_reimport_file(const String &p_file) {
f->store_line("");
}
+ f->store_line("source_file=" + Variant(p_file).get_construct_string());
f->store_line("source_md5=\"" + FileAccess::get_md5(p_file) + "\"\n");
+ if (dest_paths.size()) {
+ Array dp;
+ for (int i = 0; i < dest_paths.size(); i++) {
+ dp.push_back(dest_paths[i]);
+ }
+ f->store_line("dest_files=" + Variant(dp).get_construct_string());
+ f->store_line("dest_md5=\"" + FileAccess::get_multiple_md5(dest_paths) + "\"\n");
+ }
+
f->store_line("[params]");
f->store_line("");
diff --git a/editor/editor_file_system.h b/editor/editor_file_system.h
index f2470bfd40..3e0325dfdc 100644
--- a/editor/editor_file_system.h
+++ b/editor/editor_file_system.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_fonts.cpp b/editor/editor_fonts.cpp
index 8aca007e6b..c50995fc2b 100644
--- a/editor/editor_fonts.cpp
+++ b/editor/editor_fonts.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -77,12 +77,27 @@ static Ref<BitmapFont> make_font(int p_height, int p_ascent, int p_valign, int p
Ref<DynamicFont> m_name; \
m_name.instance(); \
m_name->set_size(m_size); \
- m_name->set_font_data(DefaultFont); \
+ if (CustomFont.is_valid()) { \
+ m_name->set_font_data(CustomFont); \
+ m_name->add_fallback(DefaultFont); \
+ } else { \
+ m_name->set_font_data(DefaultFont); \
+ } \
m_name->set_spacing(DynamicFont::SPACING_TOP, -EDSCALE); \
m_name->set_spacing(DynamicFont::SPACING_BOTTOM, -EDSCALE); \
MAKE_FALLBACKS(m_name);
void editor_register_fonts(Ref<Theme> p_theme) {
+ /* Custom font */
+
+ String custom_font = EditorSettings::get_singleton()->get("interface/editor/custom_font");
+ Ref<DynamicFontData> CustomFont;
+ if (custom_font.length() > 0) {
+ CustomFont.instance();
+ CustomFont->set_font_path(custom_font);
+ CustomFont->set_force_autohinter(true); //just looks better..i think?
+ }
+
/* Droid Sans */
Ref<DynamicFontData> DefaultFont;
@@ -173,11 +188,12 @@ void editor_register_fonts(Ref<Theme> p_theme) {
p_theme->set_font("output_source", "EditorFonts", df_output_code);
Ref<DynamicFont> df_text_editor_status_code;
- df_output_code.instance();
- df_output_code->set_size(14 * EDSCALE);
- df_output_code->set_spacing(DynamicFont::SPACING_TOP, -EDSCALE);
- df_output_code->set_spacing(DynamicFont::SPACING_BOTTOM, -EDSCALE);
- df_output_code->set_font_data(dfmono);
- MAKE_FALLBACKS(df_output_code);
- p_theme->set_font("status_source", "EditorFonts", df_output_code);
+ df_text_editor_status_code.instance();
+ df_text_editor_status_code->set_size(14 * EDSCALE);
+ df_text_editor_status_code->set_spacing(DynamicFont::SPACING_TOP, -EDSCALE);
+ df_text_editor_status_code->set_spacing(DynamicFont::SPACING_BOTTOM, -EDSCALE);
+ df_text_editor_status_code->set_font_data(dfmono);
+ MAKE_FALLBACKS(df_text_editor_status_code);
+
+ p_theme->set_font("status_source", "EditorFonts", df_text_editor_status_code);
}
diff --git a/editor/editor_fonts.h b/editor/editor_fonts.h
index 6a55876fd0..abbccb685d 100644
--- a/editor/editor_fonts.h
+++ b/editor/editor_fonts.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_help.cpp b/editor/editor_help.cpp
index 814da4b5f4..c094d4be6b 100644
--- a/editor/editor_help.cpp
+++ b/editor/editor_help.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -613,7 +613,7 @@ void EditorHelp::_class_desc_input(const Ref<InputEvent> &p_input) {
Ref<InputEventMouseButton> mb = p_input;
- if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == 1) {
+ if (mb.is_valid() && mb->is_pressed() && mb->get_button_index() == 1 && !mb->is_doubleclick()) {
class_desc->set_selection_enabled(false);
class_desc->set_selection_enabled(true);
}
@@ -947,6 +947,7 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
class_desc->pop();
class_desc->pop();
+ class_desc->push_font(doc_code_font);
class_desc->push_indent(1);
class_desc->push_table(2);
class_desc->set_table_column_expand(1, 1);
@@ -1002,6 +1003,7 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
class_desc->pop(); //table
class_desc->pop();
+ class_desc->pop(); // font
class_desc->add_newline();
class_desc->add_newline();
}
@@ -1072,6 +1074,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->push_indent(1);
@@ -1393,7 +1396,9 @@ Error EditorHelp::_goto_desc(const String &p_class, int p_vscr) {
for (int i = 0; i < methods.size(); i++) {
+ class_desc->push_font(doc_code_font);
_add_method(methods[i], false);
+ class_desc->pop();
class_desc->add_newline();
class_desc->push_color(text_color);
diff --git a/editor/editor_help.h b/editor/editor_help.h
index 96a3309ca3..adcd73471e 100644
--- a/editor/editor_help.h
+++ b/editor/editor_help.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_initialize_ssl.cpp b/editor/editor_initialize_ssl.cpp
index 4bc194a47c..81521bc0a5 100644
--- a/editor/editor_initialize_ssl.cpp
+++ b/editor/editor_initialize_ssl.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_initialize_ssl.h b/editor/editor_initialize_ssl.h
index cad219c56b..52b67dea92 100644
--- a/editor/editor_initialize_ssl.h
+++ b/editor/editor_initialize_ssl.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_log.cpp b/editor/editor_log.cpp
index 407420d3d0..79542f3b5c 100644
--- a/editor/editor_log.cpp
+++ b/editor/editor_log.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -29,6 +29,7 @@
/*************************************************************************/
#include "editor_log.h"
+#include "core/os/keyboard.h"
#include "editor_node.h"
#include "scene/gui/center_container.h"
#include "scene/resources/dynamic_font.h"
@@ -65,7 +66,9 @@ void EditorLog::_notification(int p_what) {
Ref<DynamicFont> df_output_code = get_font("output_source", "EditorFonts");
if (df_output_code.is_valid()) {
df_output_code->set_size(int(EDITOR_DEF("run/output/font_size", 13)) * EDSCALE);
- log->add_font_override("normal_font", get_font("output_source", "EditorFonts"));
+ if (log != NULL) {
+ log->add_font_override("normal_font", get_font("output_source", "EditorFonts"));
+ }
}
}
@@ -154,6 +157,7 @@ EditorLog::EditorLog() {
clearbutton = memnew(Button);
hb->add_child(clearbutton);
clearbutton->set_text(TTR("Clear"));
+ clearbutton->set_shortcut(ED_SHORTCUT("editor/clear_output", TTR("Clear Output"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_K));
clearbutton->connect("pressed", this, "_clear_request");
log = memnew(RichTextLabel);
@@ -164,7 +168,7 @@ EditorLog::EditorLog() {
log->set_v_size_flags(SIZE_EXPAND_FILL);
log->set_h_size_flags(SIZE_EXPAND_FILL);
vb->add_child(log);
- add_message(VERSION_FULL_NAME " (c) 2008-2017 Juan Linietsky, Ariel Manzur.");
+ add_message(VERSION_FULL_NAME " (c) 2007-2018 Juan Linietsky, Ariel Manzur & Godot Contributors.");
//log->add_text("Initialization Complete.\n"); //because it looks cool.
eh.errfunc = _error_handler;
diff --git a/editor/editor_log.h b/editor/editor_log.h
index e551623140..c75dc0dd44 100644
--- a/editor/editor_log.h
+++ b/editor/editor_log.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_name_dialog.cpp b/editor/editor_name_dialog.cpp
index 9f3593c269..25d12a75ff 100644
--- a/editor/editor_name_dialog.cpp
+++ b/editor/editor_name_dialog.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_name_dialog.h b/editor/editor_name_dialog.h
index 2ec8c67169..e8a3da57ca 100644
--- a/editor/editor_name_dialog.h
+++ b/editor/editor_name_dialog.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp
index 24a737e4af..b52161813d 100644
--- a/editor/editor_node.cpp
+++ b/editor/editor_node.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -3529,6 +3529,11 @@ void EditorNode::_dock_select_input(const Ref<InputEvent> &p_input) {
splits[i]->hide();
}
+ if (right_l_vsplit->is_visible() || right_r_vsplit->is_visible())
+ right_hsplit->show();
+ else
+ right_hsplit->hide();
+
_edit_current();
_save_docks();
}
@@ -3805,7 +3810,11 @@ void EditorNode::_update_dock_slots_visibility() {
}
}
bottom_panel->show();
- right_hsplit->show();
+
+ if (right_l_vsplit->is_visible() || right_r_vsplit->is_visible())
+ right_hsplit->show();
+ else
+ right_hsplit->hide();
}
}
@@ -3895,6 +3904,11 @@ void EditorNode::_load_docks_from_config(Ref<ConfigFile> p_layout, const String
splits[i]->hide();
}
+ if (right_l_vsplit->is_visible() || right_r_vsplit->is_visible())
+ right_hsplit->show();
+ else
+ right_hsplit->hide();
+
for (int i = 0; i < DOCK_SLOT_MAX; i++) {
if (dock_slot[i]->is_visible() && dock_slot[i]->get_tab_count()) {
@@ -4405,10 +4419,11 @@ void EditorNode::_dropped_files(const Vector<String> &p_files, int p_screen) {
String to_path = ProjectSettings::get_singleton()->globalize_path(get_filesystem_dock()->get_current_path());
DirAccessRef dir = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
+ Vector<String> just_copy = String("ttf,otf").split(",");
for (int i = 0; i < p_files.size(); i++) {
String from = p_files[i];
- if (!ResourceFormatImporter::get_singleton()->can_be_imported(from)) {
+ if (!ResourceFormatImporter::get_singleton()->can_be_imported(from) && (just_copy.find(from.get_extension().to_lower()) != -1)) {
continue;
}
String to = to_path.plus_file(from.get_file());
diff --git a/editor/editor_node.h b/editor/editor_node.h
index e7ef9eefb5..d090d83241 100644
--- a/editor/editor_node.h
+++ b/editor/editor_node.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_path.cpp b/editor/editor_path.cpp
index f0d3c29c11..c01f56581f 100644
--- a/editor/editor_path.cpp
+++ b/editor/editor_path.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_path.h b/editor/editor_path.h
index c79968c5e3..597746faf4 100644
--- a/editor/editor_path.h
+++ b/editor/editor_path.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_plugin.cpp b/editor/editor_plugin.cpp
index 5c4c2b694f..b3ac5e4ce5 100644
--- a/editor/editor_plugin.cpp
+++ b/editor/editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_plugin.h b/editor/editor_plugin.h
index f45d1c1ecc..4bfa1fa7cf 100644
--- a/editor/editor_plugin.h
+++ b/editor/editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_plugin_settings.cpp b/editor/editor_plugin_settings.cpp
index 8baa56b9b4..234363cdff 100644
--- a/editor/editor_plugin_settings.cpp
+++ b/editor/editor_plugin_settings.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_plugin_settings.h b/editor/editor_plugin_settings.h
index f24b2b8781..fac14fa177 100644
--- a/editor/editor_plugin_settings.h
+++ b/editor/editor_plugin_settings.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_profiler.cpp b/editor/editor_profiler.cpp
index 71c26244ee..c55d62fbe5 100644
--- a/editor/editor_profiler.cpp
+++ b/editor/editor_profiler.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_profiler.h b/editor/editor_profiler.h
index e9e88ed7f2..c4543848ab 100644
--- a/editor/editor_profiler.h
+++ b/editor/editor_profiler.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_resource_preview.cpp b/editor/editor_resource_preview.cpp
index 467451cd2b..b981f74242 100644
--- a/editor/editor_resource_preview.cpp
+++ b/editor/editor_resource_preview.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_resource_preview.h b/editor/editor_resource_preview.h
index 60eaee9c5e..6f1719e0a5 100644
--- a/editor/editor_resource_preview.h
+++ b/editor/editor_resource_preview.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp
index 09bfa0aff0..ecb4b4aa8f 100644
--- a/editor/editor_run.cpp
+++ b/editor/editor_run.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_run.h b/editor/editor_run.h
index 3745a76ea3..9eee1122c8 100644
--- a/editor/editor_run.h
+++ b/editor/editor_run.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_run_native.cpp b/editor/editor_run_native.cpp
index 95700915d5..a546f34c17 100644
--- a/editor/editor_run_native.cpp
+++ b/editor/editor_run_native.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_run_native.h b/editor/editor_run_native.h
index de0cec7f34..d9bce34e48 100644
--- a/editor/editor_run_native.h
+++ b/editor/editor_run_native.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_run_script.cpp b/editor/editor_run_script.cpp
index 87eba78a3e..4ead241bbb 100644
--- a/editor/editor_run_script.cpp
+++ b/editor/editor_run_script.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_run_script.h b/editor/editor_run_script.h
index 52905ccc86..c613e61feb 100644
--- a/editor/editor_run_script.h
+++ b/editor/editor_run_script.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_scale.cpp b/editor/editor_scale.cpp
index 6b4d6192f5..d3ef5bfa32 100644
--- a/editor/editor_scale.cpp
+++ b/editor/editor_scale.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_scale.h b/editor/editor_scale.h
index a47539dc31..9af245e8d2 100644
--- a/editor/editor_scale.h
+++ b/editor/editor_scale.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_settings.cpp b/editor/editor_settings.cpp
index 8e4e845c18..a5001cb1ac 100644
--- a/editor/editor_settings.cpp
+++ b/editor/editor_settings.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* http:/www.godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -75,20 +75,33 @@ bool EditorSettings::_set(const StringName &p_name, const Variant &p_value, bool
return true;
}
+ bool changed = false;
+
if (p_value.get_type() == Variant::NIL) {
- props.erase(p_name);
+ if (props.has(p_name)) {
+ props.erase(p_name);
+ changed = true;
+ }
} else {
- if (props.has(p_name))
- props[p_name].variant = p_value;
- else
+ if (props.has(p_name)) {
+ if (p_value != props[p_name].variant) {
+ props[p_name].variant = p_value;
+ changed = true;
+ }
+ } else {
props[p_name] = VariantContainer(p_value, last_order++);
+ changed = true;
+ }
if (save_changed_setting) {
- props[p_name].save = true;
+ if (props[p_name].save != true) {
+ props[p_name].save = true;
+ changed = true;
+ }
}
}
- if (p_emit_signal) {
+ if (changed && p_emit_signal) {
emit_signal("settings_changed");
}
return true;
@@ -264,7 +277,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("interface/editor/source_font_size", 14);
hints["interface/editor/source_font_size"] = PropertyInfo(Variant::INT, "interface/editor/source_font_size", PROPERTY_HINT_RANGE, "8,96,1", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
_initial_set("interface/editor/custom_font", "");
- hints["interface/editor/custom_font"] = PropertyInfo(Variant::STRING, "interface/editor/custom_font", PROPERTY_HINT_GLOBAL_FILE, "*.font,*.tres,*.res", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
+ hints["interface/editor/custom_font"] = PropertyInfo(Variant::STRING, "interface/editor/custom_font", PROPERTY_HINT_GLOBAL_FILE, "*.ttf,*.otf", PROPERTY_USAGE_DEFAULT | PROPERTY_USAGE_RESTART_IF_CHANGED);
_initial_set("interface/editor/dim_editor_on_dialog_popup", true);
_initial_set("interface/editor/dim_amount", 0.6f);
hints["interface/editor/dim_amount"] = PropertyInfo(Variant::REAL, "interface/editor/dim_amount", PROPERTY_HINT_RANGE, "0,1,0.01", PROPERTY_USAGE_DEFAULT);
@@ -310,7 +323,7 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
_initial_set("interface/scene_tabs/show_script_button", false);
_initial_set("text_editor/theme/color_theme", "Adaptive");
- hints["text_editor/theme/color_theme"] = PropertyInfo(Variant::STRING, "text_editor/theme/color_theme", PROPERTY_HINT_ENUM, "Adaptive,Default");
+ hints["text_editor/theme/color_theme"] = PropertyInfo(Variant::STRING, "text_editor/theme/color_theme", PROPERTY_HINT_ENUM, "Adaptive,Default,Custom");
_initial_set("text_editor/theme/line_spacing", 4);
@@ -1141,13 +1154,13 @@ void EditorSettings::load_favorites() {
}
void EditorSettings::list_text_editor_themes() {
- String themes = "Adaptive,Default";
+ String themes = "Adaptive,Default,Custom";
DirAccess *d = DirAccess::open(get_text_editor_themes_dir());
if (d) {
d->list_dir_begin();
String file = d->get_next();
while (file != String()) {
- if (file.get_extension() == "tet" && file.get_basename().to_lower() != "default" && file.get_basename().to_lower() != "adaptive") {
+ if (file.get_extension() == "tet" && file.get_basename().to_lower() != "default" && file.get_basename().to_lower() != "adaptive" && file.get_basename().to_lower() != "custom") {
themes += "," + file.get_basename();
}
file = d->get_next();
@@ -1159,7 +1172,7 @@ void EditorSettings::list_text_editor_themes() {
}
void EditorSettings::load_text_editor_theme() {
- if (get("text_editor/theme/color_theme") == "Default" || get("text_editor/theme/color_theme") == "Adaptive") {
+ if (get("text_editor/theme/color_theme") == "Default" || get("text_editor/theme/color_theme") == "Adaptive" || get("text_editor/theme/color_theme") == "Custom") {
_load_default_text_editor_theme(); // sorry for "Settings changed" console spam
return;
}
@@ -1216,7 +1229,7 @@ bool EditorSettings::save_text_editor_theme() {
String p_file = get("text_editor/theme/color_theme");
- if (p_file.get_file().to_lower() == "default" || p_file.get_file().to_lower() == "adaptive") {
+ if (p_file.get_file().to_lower() == "default" || p_file.get_file().to_lower() == "adaptive" || p_file.get_file().to_lower() == "custom") {
return false;
}
String theme_path = get_text_editor_themes_dir().plus_file(p_file + ".tet");
@@ -1228,7 +1241,7 @@ bool EditorSettings::save_text_editor_theme_as(String p_file) {
p_file += ".tet";
}
- if (p_file.get_file().to_lower() == "default.tet" || p_file.get_file().to_lower() == "adaptive.tet") {
+ if (p_file.get_file().to_lower() == "default.tet" || p_file.get_file().to_lower() == "adaptive.tet" || p_file.get_file().to_lower() == "custom.tet") {
return false;
}
if (_save_text_editor_theme(p_file)) {
diff --git a/editor/editor_settings.h b/editor/editor_settings.h
index 5b15b1d6be..b079f71b6a 100644
--- a/editor/editor_settings.h
+++ b/editor/editor_settings.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_sub_scene.cpp b/editor/editor_sub_scene.cpp
index fad9346b38..0eaf475c14 100644
--- a/editor/editor_sub_scene.cpp
+++ b/editor/editor_sub_scene.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_sub_scene.h b/editor/editor_sub_scene.h
index db9d91018a..56c08c7532 100644
--- a/editor/editor_sub_scene.h
+++ b/editor/editor_sub_scene.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/editor_themes.cpp b/editor/editor_themes.cpp
index 5610baa775..8a3e7e6716 100644
--- a/editor/editor_themes.cpp
+++ b/editor/editor_themes.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -332,6 +332,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
const Color font_color = mono_color.linear_interpolate(base_color, 0.25);
const Color font_color_hl = mono_color.linear_interpolate(base_color, 0.15);
const Color font_color_disabled = Color(mono_color.r, mono_color.g, mono_color.b, 0.3);
+ const Color font_color_selection = Color::html("#7d7d7d");
const Color color_disabled = mono_color.inverted().linear_interpolate(base_color, 0.7);
const Color color_disabled_bg = mono_color.inverted().linear_interpolate(base_color, 0.9);
@@ -790,6 +791,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_color("read_only", "LineEdit", font_color_disabled);
theme->set_color("font_color", "LineEdit", font_color);
theme->set_color("cursor_color", "LineEdit", font_color);
+ theme->set_color("selection_color", "LineEdit", font_color_selection);
// TextEdit
theme->set_stylebox("normal", "TextEdit", style_widget);
@@ -799,6 +801,7 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
theme->set_icon("tab", "TextEdit", theme->get_icon("GuiTab", "EditorIcons"));
theme->set_color("font_color", "TextEdit", font_color);
theme->set_color("caret_color", "TextEdit", highlight_color);
+ theme->set_color("selection_color", "TextEdit", font_color_selection);
// H/VSplitContainer
theme->set_stylebox("bg", "VSplitContainer", make_stylebox(theme->get_icon("GuiVsplitBg", "EditorIcons"), 1, 1, 1, 1));
@@ -1056,36 +1059,71 @@ Ref<Theme> create_editor_theme(const Ref<Theme> p_theme) {
const Color search_result_color = alpha1;
const Color search_result_border_color = alpha4;
- theme->set_color("text_editor/theme/symbol_color", "Editor", symbol_color);
- theme->set_color("text_editor/theme/keyword_color", "Editor", keyword_color);
- theme->set_color("text_editor/theme/basetype_color", "Editor", basetype_color);
- theme->set_color("text_editor/theme/type_color", "Editor", type_color);
- theme->set_color("text_editor/theme/comment_color", "Editor", comment_color);
- theme->set_color("text_editor/theme/string_color", "Editor", string_color);
- theme->set_color("text_editor/theme/background_color", "Editor", te_background_color);
- theme->set_color("text_editor/theme/completion_background_color", "Editor", completion_background_color);
- theme->set_color("text_editor/theme/completion_selected_color", "Editor", completion_selected_color);
- theme->set_color("text_editor/theme/completion_existing_color", "Editor", completion_existing_color);
- theme->set_color("text_editor/theme/completion_scroll_color", "Editor", completion_scroll_color);
- theme->set_color("text_editor/theme/completion_font_color", "Editor", completion_font_color);
- theme->set_color("text_editor/theme/text_color", "Editor", text_color);
- theme->set_color("text_editor/theme/line_number_color", "Editor", line_number_color);
- theme->set_color("text_editor/theme/caret_color", "Editor", caret_color);
- theme->set_color("text_editor/theme/caret_background_color", "Editor", caret_background_color);
- theme->set_color("text_editor/theme/text_selected_color", "Editor", text_selected_color);
- theme->set_color("text_editor/theme/selection_color", "Editor", selection_color);
- theme->set_color("text_editor/theme/brace_mismatch_color", "Editor", brace_mismatch_color);
- theme->set_color("text_editor/theme/current_line_color", "Editor", current_line_color);
- theme->set_color("text_editor/theme/line_length_guideline_color", "Editor", line_length_guideline_color);
- theme->set_color("text_editor/theme/word_highlighted_color", "Editor", word_highlighted_color);
- theme->set_color("text_editor/theme/number_color", "Editor", number_color);
- theme->set_color("text_editor/theme/function_color", "Editor", function_color);
- theme->set_color("text_editor/theme/member_variable_color", "Editor", member_variable_color);
- theme->set_color("text_editor/theme/mark_color", "Editor", mark_color);
- theme->set_color("text_editor/theme/breakpoint_color", "Editor", breakpoint_color);
- theme->set_color("text_editor/theme/code_folding_color", "Editor", code_folding_color);
- theme->set_color("text_editor/theme/search_result_color", "Editor", search_result_color);
- theme->set_color("text_editor/theme/search_result_border_color", "Editor", search_result_border_color);
+ EditorSettings *setting = EditorSettings::get_singleton();
+ String text_editor_color_theme = setting->get("text_editor/theme/color_theme");
+ if (text_editor_color_theme == "Adaptive") {
+ setting->set_manually("text_editor/highlighting/symbol_color", symbol_color);
+ setting->set_manually("text_editor/highlighting/keyword_color", keyword_color);
+ setting->set_manually("text_editor/highlighting/base_type_color", basetype_color);
+ setting->set_manually("text_editor/highlighting/engine_type_color", type_color);
+ setting->set_manually("text_editor/highlighting/comment_color", comment_color);
+ setting->set_manually("text_editor/highlighting/string_color", string_color);
+ setting->set_manually("text_editor/highlighting/background_color", background_color);
+ setting->set_manually("text_editor/highlighting/completion_background_color", completion_background_color);
+ setting->set_manually("text_editor/highlighting/completion_selected_color", completion_selected_color);
+ setting->set_manually("text_editor/highlighting/completion_existing_color", completion_existing_color);
+ setting->set_manually("text_editor/highlighting/completion_scroll_color", completion_scroll_color);
+ setting->set_manually("text_editor/highlighting/completion_font_color", completion_font_color);
+ setting->set_manually("text_editor/highlighting/text_color", text_color);
+ setting->set_manually("text_editor/highlighting/line_number_color", line_number_color);
+ setting->set_manually("text_editor/highlighting/caret_color", caret_color);
+ setting->set_manually("text_editor/highlighting/caret_background_color", caret_background_color);
+ setting->set_manually("text_editor/highlighting/text_selected_color", text_selected_color);
+ setting->set_manually("text_editor/highlighting/selection_color", selection_color);
+ setting->set_manually("text_editor/highlighting/brace_mismatch_color", brace_mismatch_color);
+ setting->set_manually("text_editor/highlighting/current_line_color", current_line_color);
+ setting->set_manually("text_editor/highlighting/line_length_guideline_color", line_length_guideline_color);
+ setting->set_manually("text_editor/highlighting/word_highlighted_color", word_highlighted_color);
+ setting->set_manually("text_editor/highlighting/number_color", number_color);
+ setting->set_manually("text_editor/highlighting/function_color", function_color);
+ setting->set_manually("text_editor/highlighting/member_variable_color", member_variable_color);
+ setting->set_manually("text_editor/highlighting/mark_color", mark_color);
+ setting->set_manually("text_editor/highlighting/breakpoint_color", breakpoint_color);
+ setting->set_manually("text_editor/highlighting/code_folding_color", code_folding_color);
+ setting->set_manually("text_editor/highlighting/search_result_color", search_result_color);
+ setting->set_manually("text_editor/highlighting/search_result_border_color", search_result_border_color);
+ } else if (text_editor_color_theme == "Default") {
+ setting->set_manually("text_editor/highlighting/symbol_color", Color::html("badfff"));
+ setting->set_manually("text_editor/highlighting/keyword_color", Color::html("ffffb3"));
+ setting->set_manually("text_editor/highlighting/base_type_color", Color::html("a4ffd4"));
+ setting->set_manually("text_editor/highlighting/engine_type_color", Color::html("83d3ff"));
+ setting->set_manually("text_editor/highlighting/comment_color", Color::html("676767"));
+ setting->set_manually("text_editor/highlighting/string_color", Color::html("ef6ebe"));
+ setting->set_manually("text_editor/highlighting/background_color", Color::html("3b000000"));
+ setting->set_manually("text_editor/highlighting/completion_background_color", Color::html("2C2A32"));
+ setting->set_manually("text_editor/highlighting/completion_selected_color", Color::html("434244"));
+ setting->set_manually("text_editor/highlighting/completion_existing_color", Color::html("21dfdfdf"));
+ setting->set_manually("text_editor/highlighting/completion_scroll_color", Color::html("ffffff"));
+ setting->set_manually("text_editor/highlighting/completion_font_color", Color::html("aaaaaa"));
+ setting->set_manually("text_editor/highlighting/text_color", Color::html("aaaaaa"));
+ setting->set_manually("text_editor/highlighting/line_number_color", Color::html("66aaaaaa"));
+ setting->set_manually("text_editor/highlighting/caret_color", Color::html("aaaaaa"));
+ setting->set_manually("text_editor/highlighting/caret_background_color", Color::html("000000"));
+ setting->set_manually("text_editor/highlighting/text_selected_color", Color::html("000000"));
+ setting->set_manually("text_editor/highlighting/selection_color", Color::html("6ca9c2"));
+ setting->set_manually("text_editor/highlighting/brace_mismatch_color", Color(1, 0.2, 0.2));
+ setting->set_manually("text_editor/highlighting/current_line_color", Color(0.3, 0.5, 0.8, 0.15));
+ setting->set_manually("text_editor/highlighting/line_length_guideline_color", Color(0.3, 0.5, 0.8, 0.1));
+ setting->set_manually("text_editor/highlighting/word_highlighted_color", Color(0.8, 0.9, 0.9, 0.15));
+ setting->set_manually("text_editor/highlighting/number_color", Color::html("EB9532"));
+ setting->set_manually("text_editor/highlighting/function_color", Color::html("66a2ce"));
+ setting->set_manually("text_editor/highlighting/member_variable_color", Color::html("e64e59"));
+ setting->set_manually("text_editor/highlighting/mark_color", Color(1.0, 0.4, 0.4, 0.4));
+ setting->set_manually("text_editor/highlighting/breakpoint_color", Color(0.8, 0.8, 0.4, 0.2));
+ setting->set_manually("text_editor/highlighting/code_folding_color", Color(0.8, 0.8, 0.8, 0.8));
+ setting->set_manually("text_editor/highlighting/search_result_color", Color(0.05, 0.25, 0.05, 1));
+ setting->set_manually("text_editor/highlighting/search_result_border_color", Color(0.1, 0.45, 0.1, 1));
+ }
return theme;
}
@@ -1100,16 +1138,5 @@ Ref<Theme> create_custom_theme(const Ref<Theme> p_theme) {
theme = create_editor_theme(p_theme);
}
- String global_font = EditorSettings::get_singleton()->get("interface/editor/custom_font");
- if (global_font != "") {
- Ref<Font> fnt = ResourceLoader::load(global_font);
- if (fnt.is_valid()) {
- if (!theme.is_valid()) {
- theme.instance();
- }
- theme->set_default_theme_font(fnt);
- }
- }
-
return theme;
}
diff --git a/editor/editor_themes.h b/editor/editor_themes.h
index 6f3b83e0b0..6f4e527cb2 100644
--- a/editor/editor_themes.h
+++ b/editor/editor_themes.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/export_template_manager.cpp b/editor/export_template_manager.cpp
index a72769b222..0206e37c43 100644
--- a/editor/export_template_manager.cpp
+++ b/editor/export_template_manager.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/export_template_manager.h b/editor/export_template_manager.h
index 36093da66a..413fe82593 100644
--- a/editor/export_template_manager.h
+++ b/editor/export_template_manager.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/file_type_cache.cpp b/editor/file_type_cache.cpp
index c8b21acb36..73adea5779 100644
--- a/editor/file_type_cache.cpp
+++ b/editor/file_type_cache.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/file_type_cache.h b/editor/file_type_cache.h
index 307e8e27bb..d3ffccc1a8 100644
--- a/editor/file_type_cache.h
+++ b/editor/file_type_cache.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/fileserver/editor_file_server.cpp b/editor/fileserver/editor_file_server.cpp
index ad035b48f3..de620070aa 100644
--- a/editor/fileserver/editor_file_server.cpp
+++ b/editor/fileserver/editor_file_server.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/fileserver/editor_file_server.h b/editor/fileserver/editor_file_server.h
index 32c28b4358..a4a7dba1d2 100644
--- a/editor/fileserver/editor_file_server.h
+++ b/editor/fileserver/editor_file_server.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/filesystem_dock.cpp b/editor/filesystem_dock.cpp
index 75e4f39e25..b18cd6b747 100644
--- a/editor/filesystem_dock.cpp
+++ b/editor/filesystem_dock.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -403,12 +403,12 @@ void FileSystemDock::_search(EditorFileSystemDirectory *p_path, List<FileInfo> *
_search(p_path->get_subdir(i), matches, p_max_items);
}
- String match = search_box->get_text();
+ String match = search_box->get_text().to_lower();
for (int i = 0; i < p_path->get_file_count(); i++) {
String file = p_path->get_file(i);
- if (file.find(match) != -1) {
+ if (file.to_lower().find(match) != -1) {
FileInfo fi;
fi.name = file;
@@ -819,7 +819,7 @@ void FileSystemDock::_try_duplicate_item(const FileOrFolder &p_item, const Strin
DirAccess *da = DirAccess::create(DirAccess::ACCESS_RESOURCES);
print_line("Duplicating " + old_path + " -> " + new_path);
- Error err = da->copy(old_path, new_path);
+ Error err = p_item.is_file ? da->copy(old_path, new_path) : da->copy_dir(old_path, new_path);
if (err == OK) {
//Move/Rename any corresponding import settings too
if (p_item.is_file && FileAccess::exists(old_path + ".import")) {
@@ -834,6 +834,58 @@ void FileSystemDock::_try_duplicate_item(const FileOrFolder &p_item, const Strin
memdelete(da);
}
+void FileSystemDock::_update_resource_paths_after_move(const Map<String, String> &p_renames) const {
+
+ //Rename all resources loaded, be it subresources or actual resources
+ List<Ref<Resource> > cached;
+ ResourceCache::get_cached_resources(&cached);
+
+ for (List<Ref<Resource> >::Element *E = cached.front(); E; E = E->next()) {
+
+ Ref<Resource> r = E->get();
+
+ String base_path = r->get_path();
+ String extra_path;
+ int sep_pos = r->get_path().find("::");
+ if (sep_pos >= 0) {
+ extra_path = base_path.substr(sep_pos, base_path.length());
+ base_path = base_path.substr(0, sep_pos);
+ }
+
+ if (p_renames.has(base_path)) {
+ base_path = p_renames[base_path];
+ }
+
+ r->set_path(base_path + extra_path);
+ }
+
+ for (int i = 0; i < EditorNode::get_editor_data().get_edited_scene_count(); i++) {
+
+ String path;
+ if (i == EditorNode::get_editor_data().get_edited_scene()) {
+ if (!get_tree()->get_edited_scene_root())
+ continue;
+
+ path = get_tree()->get_edited_scene_root()->get_filename();
+ } else {
+
+ path = EditorNode::get_editor_data().get_scene_path(i);
+ }
+
+ if (p_renames.has(path)) {
+ path = p_renames[path];
+ }
+
+ if (i == EditorNode::get_editor_data().get_edited_scene()) {
+
+ get_tree()->get_edited_scene_root()->set_filename(path);
+ } else {
+
+ EditorNode::get_editor_data().set_scene_path(i, path);
+ }
+ }
+}
+
void FileSystemDock::_update_dependencies_after_move(const Map<String, String> &p_renames) const {
//The following code assumes that the following holds:
// 1) EditorFileSystem contains the old paths/folder structure from before the rename/move.
@@ -910,6 +962,7 @@ void FileSystemDock::_rename_operation_confirm() {
Map<String, String> renames;
_try_move_item(to_rename, new_path, renames);
_update_dependencies_after_move(renames);
+ _update_resource_paths_after_move(renames);
//Rescan everything
print_line("call rescan!");
@@ -927,10 +980,12 @@ void FileSystemDock::_duplicate_operation_confirm() {
return;
}
- String old_path = to_duplicate.path.ends_with("/") ? to_duplicate.path.substr(0, to_duplicate.path.length() - 1) : to_rename.path;
- String new_path = old_path.get_base_dir().plus_file(new_name);
- if (old_path == new_path) {
- return;
+ String new_path;
+ String base_dir = to_duplicate.path.get_base_dir();
+ if (to_duplicate.is_file) {
+ new_path = base_dir.plus_file(new_name);
+ } else {
+ new_path = base_dir.substr(0, base_dir.find_last("/")) + "/" + new_name;
}
//Present a more user friendly warning for name conflict
@@ -942,7 +997,7 @@ void FileSystemDock::_duplicate_operation_confirm() {
}
memdelete(da);
- _try_duplicate_item(to_duplicate, new_name);
+ _try_duplicate_item(to_duplicate, new_path);
//Rescan everything
print_line("call rescan!");
@@ -959,6 +1014,8 @@ void FileSystemDock::_move_operation_confirm(const String &p_to_path) {
}
_update_dependencies_after_move(renames);
+ _update_resource_paths_after_move(renames);
+
print_line("call rescan!");
_rescan();
}
diff --git a/editor/filesystem_dock.h b/editor/filesystem_dock.h
index bc8d835ba1..45c0aff439 100644
--- a/editor/filesystem_dock.h
+++ b/editor/filesystem_dock.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -178,6 +178,7 @@ private:
void _try_move_item(const FileOrFolder &p_item, const String &p_new_path, Map<String, String> &p_renames) const;
void _try_duplicate_item(const FileOrFolder &p_item, const String &p_new_path) const;
void _update_dependencies_after_move(const Map<String, String> &p_renames) const;
+ void _update_resource_paths_after_move(const Map<String, String> &p_renames) const;
void _make_dir_confirm();
void _rename_operation_confirm();
diff --git a/editor/groups_editor.cpp b/editor/groups_editor.cpp
index dcb96f3531..6f823534ca 100644
--- a/editor/groups_editor.cpp
+++ b/editor/groups_editor.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/groups_editor.h b/editor/groups_editor.h
index c9b37a405d..c60ab4bc22 100644
--- a/editor/groups_editor.h
+++ b/editor/groups_editor.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/import/editor_import_collada.cpp b/editor/import/editor_import_collada.cpp
index c4315f1b83..52659b360f 100644
--- a/editor/import/editor_import_collada.cpp
+++ b/editor/import/editor_import_collada.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/import/editor_import_collada.h b/editor/import/editor_import_collada.h
index 904080c19b..004b07b5be 100644
--- a/editor/import/editor_import_collada.h
+++ b/editor/import/editor_import_collada.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/import/editor_import_plugin.cpp b/editor/import/editor_import_plugin.cpp
index 8af4ab63c7..6297e1eca6 100644
--- a/editor/import/editor_import_plugin.cpp
+++ b/editor/import/editor_import_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/import/editor_import_plugin.h b/editor/import/editor_import_plugin.h
index 08d6de5531..9f860401ed 100644
--- a/editor/import/editor_import_plugin.h
+++ b/editor/import/editor_import_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/import/editor_scene_importer_gltf.cpp b/editor/import/editor_scene_importer_gltf.cpp
index 00eb69a568..189e98ea68 100644
--- a/editor/import/editor_scene_importer_gltf.cpp
+++ b/editor/import/editor_scene_importer_gltf.cpp
@@ -185,11 +185,13 @@ Error EditorSceneImporterGLTF::_parse_nodes(GLTFState &state) {
}
if (n.has("skin")) {
node->skin = n["skin"];
+ /*
if (!state.skin_users.has(node->skin)) {
state.skin_users[node->skin] = Vector<int>();
}
state.skin_users[node->skin].push_back(i);
+ */
}
if (n.has("matrix")) {
node->xform = _arr_to_xform(n["matrix"]);
@@ -1316,8 +1318,10 @@ Error EditorSceneImporterGLTF::_parse_skins(GLTFState &state) {
for (int j = 0; j < joints.size(); j++) {
int index = joints[j];
ERR_FAIL_INDEX_V(index, state.nodes.size(), ERR_PARSE_ERROR);
- state.nodes[index]->joint_skin = state.skins.size();
- state.nodes[index]->joint_bone = j;
+ GLTFNode::Joint joint;
+ joint.skin = state.skins.size();
+ joint.bone = j;
+ state.nodes[index]->joints.push_back(joint);
GLTFSkin::Bone bone;
bone.node = index;
if (bind_matrices.size()) {
@@ -1331,7 +1335,7 @@ Error EditorSceneImporterGLTF::_parse_skins(GLTFState &state) {
if (d.has("skeleton")) {
int skeleton = d["skeleton"];
ERR_FAIL_INDEX_V(skeleton, state.nodes.size(), ERR_PARSE_ERROR);
- state.nodes[skeleton]->skeleton_skin = state.skins.size();
+ //state.nodes[skeleton]->skeleton_skin = state.skins.size();
print_line("setting skeleton skin to" + itos(skeleton));
skin.skeleton = skeleton;
}
@@ -1341,7 +1345,7 @@ Error EditorSceneImporterGLTF::_parse_skins(GLTFState &state) {
}
//locate the right place to put a Skeleton node
-
+ /*
if (state.skin_users.has(i)) {
Vector<int> users = state.skin_users[i];
int skin_node = -1;
@@ -1382,6 +1386,7 @@ Error EditorSceneImporterGLTF::_parse_skins(GLTFState &state) {
state.nodes[skin_node]->skeleton_children.push_back(i);
}
}
+ */
state.skins.push_back(skin);
}
print_line("total skins: " + itos(state.skins.size()));
@@ -1577,7 +1582,7 @@ void EditorSceneImporterGLTF::_assign_scene_names(GLTFState &state) {
if (n->name == "") {
if (n->mesh >= 0) {
n->name = "Mesh";
- } else if (n->joint_skin >= 0) {
+ } else if (n->joints.size()) {
n->name = "Bone";
} else {
n->name = "Node";
@@ -1607,6 +1612,7 @@ void EditorSceneImporterGLTF::_generate_node(GLTFState &state, int p_node, Node
}
node = mi;
+
} else if (n->camera >= 0) {
ERR_FAIL_INDEX(n->camera, state.cameras.size());
Camera *camera = memnew(Camera);
@@ -1625,18 +1631,20 @@ void EditorSceneImporterGLTF::_generate_node(GLTFState &state, int p_node, Node
node->set_name(n->name);
- if (n->child_of_skeleton >= 0) {
- //move skeleton around and place it on node, as the node _is_ a skeleton.
- Skeleton *s = skeletons[n->child_of_skeleton];
- p_parent = s;
- }
-
p_parent->add_child(node);
node->set_owner(p_owner);
node->set_transform(n->xform);
- n->godot_node = node;
+ n->godot_nodes.push_back(node);
+
+ if (n->skin >= 0 && Object::cast_to<MeshInstance>(node)) {
+ MeshInstance *mi = Object::cast_to<MeshInstance>(node);
+ //move skeleton around and place it on node, as the node _is_ a skeleton.
+ Skeleton *s = skeletons[n->skin];
+ mi->set_skeleton_path(mi->get_path_to(s));
+ }
+#if 0
for (int i = 0; i < n->skeleton_children.size(); i++) {
Skeleton *s = skeletons[n->skeleton_children[i]];
@@ -1644,36 +1652,39 @@ void EditorSceneImporterGLTF::_generate_node(GLTFState &state, int p_node, Node
node->add_child(s);
s->set_owner(p_owner);
}
-
+#endif
for (int i = 0; i < n->children.size(); i++) {
- if (state.nodes[n->children[i]]->joint_skin >= 0) {
- _generate_bone(state, n->children[i], skeletons, -1);
+ if (state.nodes[n->children[i]]->joints.size()) {
+ _generate_bone(state, n->children[i], skeletons, Vector<int>());
} else {
_generate_node(state, n->children[i], node, p_owner, skeletons);
}
}
}
-void EditorSceneImporterGLTF::_generate_bone(GLTFState &state, int p_node, Vector<Skeleton *> &skeletons, int p_parent_bone) {
+void EditorSceneImporterGLTF::_generate_bone(GLTFState &state, int p_node, Vector<Skeleton *> &skeletons, const Vector<int> &p_parent_bones) {
ERR_FAIL_INDEX(p_node, state.nodes.size());
GLTFNode *n = state.nodes[p_node];
+ Vector<int> parent_bones;
- ERR_FAIL_COND(n->joint_skin < 0);
+ for (int i = 0; i < n->joints.size(); i++) {
+ ERR_FAIL_COND(n->joints[i].skin < 0);
- int bone_index = skeletons[n->joint_skin]->get_bone_count();
- skeletons[n->joint_skin]->add_bone(n->name);
- if (p_parent_bone >= 0) {
- skeletons[n->joint_skin]->set_bone_parent(bone_index, p_parent_bone);
- }
- skeletons[n->joint_skin]->set_bone_rest(bone_index, state.skins[n->joint_skin].bones[n->joint_bone].inverse_bind.affine_inverse());
+ int bone_index = skeletons[n->joints[i].skin]->get_bone_count();
+ skeletons[n->joints[i].skin]->add_bone(n->name);
+ if (p_parent_bones.size()) {
+ skeletons[n->joints[i].skin]->set_bone_parent(bone_index, p_parent_bones[i]);
+ }
+ skeletons[n->joints[i].skin]->set_bone_rest(bone_index, state.skins[n->joints[i].skin].bones[n->joints[i].bone].inverse_bind.affine_inverse());
- n->godot_node = skeletons[n->joint_skin];
- n->godot_bone_index = bone_index;
+ n->godot_nodes.push_back(skeletons[n->joints[i].skin]);
+ n->joints[i].godot_bone_index = bone_index;
+ parent_bones.push_back(bone_index);
+ }
for (int i = 0; i < n->children.size(); i++) {
- ERR_CONTINUE(state.nodes[n->children[i]]->joint_skin < 0);
- _generate_bone(state, n->children[i], skeletons, bone_index);
+ _generate_bone(state, n->children[i], skeletons, parent_bones);
}
}
@@ -1818,141 +1829,104 @@ void EditorSceneImporterGLTF::_import_animation(GLTFState &state, AnimationPlaye
NodePath node_path;
GLTFNode *node = state.nodes[E->key()];
- ERR_CONTINUE(!node->godot_node);
-
- if (node->godot_bone_index >= 0) {
- Skeleton *sk = (Skeleton *)node->godot_node;
- String path = ap->get_parent()->get_path_to(sk);
- String bone = sk->get_bone_name(node->godot_bone_index);
- node_path = path + ":" + bone;
- } else {
- node_path = ap->get_parent()->get_path_to(node->godot_node);
- }
-
- float length = 0;
+ for (int i = 0; i < node->godot_nodes.size(); i++) {
- for (int i = 0; i < track.rotation_track.times.size(); i++) {
- length = MAX(length, track.rotation_track.times[i]);
- }
- for (int i = 0; i < track.translation_track.times.size(); i++) {
- length = MAX(length, track.translation_track.times[i]);
- }
- for (int i = 0; i < track.scale_track.times.size(); i++) {
- length = MAX(length, track.scale_track.times[i]);
- }
-
- for (int i = 0; i < track.weight_tracks.size(); i++) {
- for (int j = 0; j < track.weight_tracks[i].times.size(); j++) {
- length = MAX(length, track.weight_tracks[i].times[j]);
+ if (node->joints.size()) {
+ Skeleton *sk = (Skeleton *)node->godot_nodes[i];
+ String path = ap->get_parent()->get_path_to(sk);
+ String bone = sk->get_bone_name(node->joints[i].godot_bone_index);
+ node_path = path + ":" + bone;
+ } else {
+ node_path = ap->get_parent()->get_path_to(node->godot_nodes[i]);
}
- }
-
- animation->set_length(length);
-
- if (track.rotation_track.values.size() || track.translation_track.values.size() || track.scale_track.values.size()) {
- //make transform track
- int track_idx = animation->get_track_count();
- animation->add_track(Animation::TYPE_TRANSFORM);
- animation->track_set_path(track_idx, node_path);
- //first determine animation length
- float increment = 1.0 / float(bake_fps);
- float time = 0.0;
+ float length = 0;
- Vector3 base_pos;
- Quat base_rot;
- Vector3 base_scale = Vector3(1, 1, 1);
-
- if (!track.rotation_track.values.size()) {
- base_rot = state.nodes[E->key()]->rotation;
+ for (int i = 0; i < track.rotation_track.times.size(); i++) {
+ length = MAX(length, track.rotation_track.times[i]);
}
-
- if (!track.translation_track.values.size()) {
- base_pos = state.nodes[E->key()]->translation;
+ for (int i = 0; i < track.translation_track.times.size(); i++) {
+ length = MAX(length, track.translation_track.times[i]);
+ }
+ for (int i = 0; i < track.scale_track.times.size(); i++) {
+ length = MAX(length, track.scale_track.times[i]);
}
- if (!track.scale_track.values.size()) {
- base_scale = state.nodes[E->key()]->scale;
+ for (int i = 0; i < track.weight_tracks.size(); i++) {
+ for (int j = 0; j < track.weight_tracks[i].times.size(); j++) {
+ length = MAX(length, track.weight_tracks[i].times[j]);
+ }
}
- bool last = false;
- while (true) {
+ animation->set_length(length);
+
+ if (track.rotation_track.values.size() || track.translation_track.values.size() || track.scale_track.values.size()) {
+ //make transform track
+ int track_idx = animation->get_track_count();
+ animation->add_track(Animation::TYPE_TRANSFORM);
+ animation->track_set_path(track_idx, node_path);
+ //first determine animation length
- Vector3 pos = base_pos;
- Quat rot = base_rot;
- Vector3 scale = base_scale;
+ float increment = 1.0 / float(bake_fps);
+ float time = 0.0;
- if (track.translation_track.times.size()) {
+ Vector3 base_pos;
+ Quat base_rot;
+ Vector3 base_scale = Vector3(1, 1, 1);
- pos = _interpolate_track<Vector3>(track.translation_track.times, track.translation_track.values, time, track.translation_track.interpolation);
+ if (!track.rotation_track.values.size()) {
+ base_rot = state.nodes[E->key()]->rotation;
}
- if (track.rotation_track.times.size()) {
+ if (!track.translation_track.values.size()) {
+ base_pos = state.nodes[E->key()]->translation;
+ }
- rot = _interpolate_track<Quat>(track.rotation_track.times, track.rotation_track.values, time, track.rotation_track.interpolation);
+ if (!track.scale_track.values.size()) {
+ base_scale = state.nodes[E->key()]->scale;
}
- if (track.scale_track.times.size()) {
+ bool last = false;
+ while (true) {
- scale = _interpolate_track<Vector3>(track.scale_track.times, track.scale_track.values, time, track.scale_track.interpolation);
- }
+ Vector3 pos = base_pos;
+ Quat rot = base_rot;
+ Vector3 scale = base_scale;
- if (node->godot_bone_index >= 0) {
+ if (track.translation_track.times.size()) {
- Transform xform;
- xform.basis = Basis(rot);
- xform.basis.scale(scale);
- xform.origin = pos;
+ pos = _interpolate_track<Vector3>(track.translation_track.times, track.translation_track.values, time, track.translation_track.interpolation);
+ }
- Skeleton *skeleton = skeletons[node->joint_skin];
- int bone = node->godot_bone_index;
- xform = skeleton->get_bone_rest(bone).affine_inverse() * xform;
+ if (track.rotation_track.times.size()) {
- rot = xform.basis;
- rot.normalize();
- scale = xform.basis.get_scale();
- pos = xform.origin;
- }
+ rot = _interpolate_track<Quat>(track.rotation_track.times, track.rotation_track.values, time, track.rotation_track.interpolation);
+ }
- animation->transform_track_insert_key(track_idx, time, pos, rot, scale);
+ if (track.scale_track.times.size()) {
- if (last) {
- break;
- }
- time += increment;
- if (time >= length) {
- last = true;
- time = length;
- }
- }
- }
+ scale = _interpolate_track<Vector3>(track.scale_track.times, track.scale_track.values, time, track.scale_track.interpolation);
+ }
- for (int i = 0; i < track.weight_tracks.size(); i++) {
- ERR_CONTINUE(node->mesh < 0 || node->mesh >= state.meshes.size());
- const GLTFMesh &mesh = state.meshes[node->mesh];
- String prop = "blend_shapes/" + mesh.mesh->get_blend_shape_name(i);
- node_path = String(node_path) + ":" + prop;
+ if (node->joints.size()) {
- int track_idx = animation->get_track_count();
- animation->add_track(Animation::TYPE_VALUE);
- animation->track_set_path(track_idx, node_path);
+ Transform xform;
+ xform.basis = Basis(rot);
+ xform.basis.scale(scale);
+ xform.origin = pos;
- if (track.weight_tracks[i].interpolation <= GLTFAnimation::INTERP_STEP) {
- animation->track_set_interpolation_type(track_idx, track.weight_tracks[i].interpolation == GLTFAnimation::INTERP_STEP ? Animation::INTERPOLATION_NEAREST : Animation::INTERPOLATION_NEAREST);
- for (int j = 0; j < track.weight_tracks[i].times.size(); j++) {
- float t = track.weight_tracks[i].times[j];
- float w = track.weight_tracks[i].values[j];
- animation->track_insert_key(track_idx, t, w);
- }
- } else {
- //must bake, apologies.
- float increment = 1.0 / float(bake_fps);
- float time = 0.0;
+ Skeleton *skeleton = skeletons[node->joints[i].skin];
+ int bone = node->joints[i].godot_bone_index;
+ xform = skeleton->get_bone_rest(bone).affine_inverse() * xform;
- bool last = false;
- while (true) {
+ rot = xform.basis;
+ rot.normalize();
+ scale = xform.basis.get_scale();
+ pos = xform.origin;
+ }
+
+ animation->transform_track_insert_key(track_idx, time, pos, rot, scale);
- _interpolate_track<float>(track.weight_tracks[i].times, track.weight_tracks[i].values, time, track.weight_tracks[i].interpolation);
if (last) {
break;
}
@@ -1963,6 +1937,44 @@ void EditorSceneImporterGLTF::_import_animation(GLTFState &state, AnimationPlaye
}
}
}
+
+ for (int i = 0; i < track.weight_tracks.size(); i++) {
+ ERR_CONTINUE(node->mesh < 0 || node->mesh >= state.meshes.size());
+ const GLTFMesh &mesh = state.meshes[node->mesh];
+ String prop = "blend_shapes/" + mesh.mesh->get_blend_shape_name(i);
+ node_path = String(node_path) + ":" + prop;
+
+ int track_idx = animation->get_track_count();
+ animation->add_track(Animation::TYPE_VALUE);
+ animation->track_set_path(track_idx, node_path);
+
+ if (track.weight_tracks[i].interpolation <= GLTFAnimation::INTERP_STEP) {
+ animation->track_set_interpolation_type(track_idx, track.weight_tracks[i].interpolation == GLTFAnimation::INTERP_STEP ? Animation::INTERPOLATION_NEAREST : Animation::INTERPOLATION_NEAREST);
+ for (int j = 0; j < track.weight_tracks[i].times.size(); j++) {
+ float t = track.weight_tracks[i].times[j];
+ float w = track.weight_tracks[i].values[j];
+ animation->track_insert_key(track_idx, t, w);
+ }
+ } else {
+ //must bake, apologies.
+ float increment = 1.0 / float(bake_fps);
+ float time = 0.0;
+
+ bool last = false;
+ while (true) {
+
+ _interpolate_track<float>(track.weight_tracks[i].times, track.weight_tracks[i].values, time, track.weight_tracks[i].interpolation);
+ if (last) {
+ break;
+ }
+ time += increment;
+ if (time >= length) {
+ last = true;
+ time = length;
+ }
+ }
+ }
+ }
}
}
@@ -1987,8 +1999,8 @@ Spatial *EditorSceneImporterGLTF::_generate_scene(GLTFState &state, int p_bake_f
skeletons.push_back(s);
}
for (int i = 0; i < state.root_nodes.size(); i++) {
- if (state.nodes[state.root_nodes[i]]->joint_skin >= 0) {
- _generate_bone(state, state.root_nodes[i], skeletons, -1);
+ if (state.nodes[state.root_nodes[i]]->joints.size()) {
+ _generate_bone(state, state.root_nodes[i], skeletons, Vector<int>());
} else {
_generate_node(state, state.root_nodes[i], root, root, skeletons);
}
diff --git a/editor/import/editor_scene_importer_gltf.h b/editor/import/editor_scene_importer_gltf.h
index 91c584a05a..abbdfa418b 100644
--- a/editor/import/editor_scene_importer_gltf.h
+++ b/editor/import/editor_scene_importer_gltf.h
@@ -52,18 +52,29 @@ class EditorSceneImporterGLTF : public EditorSceneImporter {
Transform xform;
String name;
- Node *godot_node;
- int godot_bone_index;
+ //Node *godot_node;
+ //int godot_bone_index;
int mesh;
int camera;
int skin;
- int skeleton_skin;
- int child_of_skeleton; // put as children of skeleton
- Vector<int> skeleton_children; //skeleton put as children of this
+ //int skeleton_skin;
+ //int child_of_skeleton; // put as children of skeleton
+ //Vector<int> skeleton_children; //skeleton put as children of this
+
+ struct Joint {
+ int skin;
+ int bone;
+ int godot_bone_index;
+
+ Joint() {
+ skin = -1;
+ bone = -1;
+ godot_bone_index = -1;
+ }
+ };
- int joint_skin;
- int joint_bone;
+ Vector<Joint> joints;
//keep them for animation
Vector3 translation;
@@ -71,17 +82,15 @@ class EditorSceneImporterGLTF : public EditorSceneImporter {
Vector3 scale;
Vector<int> children;
+ Vector<Node *> godot_nodes;
GLTFNode() {
- godot_node = NULL;
- godot_bone_index = -1;
- joint_skin = -1;
- joint_bone = -1;
- child_of_skeleton = -1;
- skeleton_skin = -1;
+ // child_of_skeleton = -1;
+ // skeleton_skin = -1;
mesh = -1;
camera = -1;
parent = -1;
+ skin = -1;
scale = Vector3(1, 1, 1);
}
};
@@ -235,7 +244,7 @@ class EditorSceneImporterGLTF : public EditorSceneImporter {
Vector<GLTFAnimation> animations;
- Map<int, Vector<int> > skin_users; //cache skin users
+ //Map<int, Vector<int> > skin_users; //cache skin users
~GLTFState() {
for (int i = 0; i < nodes.size(); i++) {
@@ -269,7 +278,7 @@ class EditorSceneImporterGLTF : public EditorSceneImporter {
Vector<Basis> _decode_accessor_as_basis(GLTFState &state, int p_accessor, bool p_for_vertex);
Vector<Transform> _decode_accessor_as_xform(GLTFState &state, int p_accessor, bool p_for_vertex);
- void _generate_bone(GLTFState &state, int p_node, Vector<Skeleton *> &skeletons, int p_parent_bone);
+ void _generate_bone(GLTFState &state, int p_node, Vector<Skeleton *> &skeletons, const Vector<int> &p_parent_bones);
void _generate_node(GLTFState &state, int p_node, Node *p_parent, Node *p_owner, Vector<Skeleton *> &skeletons);
void _import_animation(GLTFState &state, AnimationPlayer *ap, int index, int bake_fps, Vector<Skeleton *> skeletons);
diff --git a/editor/import/resource_importer_csv_translation.cpp b/editor/import/resource_importer_csv_translation.cpp
index 4bbf5ba316..70093d13a7 100644
--- a/editor/import/resource_importer_csv_translation.cpp
+++ b/editor/import/resource_importer_csv_translation.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/import/resource_importer_csv_translation.h b/editor/import/resource_importer_csv_translation.h
index 8919f4ed33..ca6e63f8aa 100644
--- a/editor/import/resource_importer_csv_translation.h
+++ b/editor/import/resource_importer_csv_translation.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/import/resource_importer_obj.cpp b/editor/import/resource_importer_obj.cpp
index 0297a6c24e..d2cdfb5013 100644
--- a/editor/import/resource_importer_obj.cpp
+++ b/editor/import/resource_importer_obj.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/import/resource_importer_obj.h b/editor/import/resource_importer_obj.h
index e66ea47b69..8710432aa1 100644
--- a/editor/import/resource_importer_obj.h
+++ b/editor/import/resource_importer_obj.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/import/resource_importer_scene.cpp b/editor/import/resource_importer_scene.cpp
index b6e4729352..d36cb5cb59 100644
--- a/editor/import/resource_importer_scene.cpp
+++ b/editor/import/resource_importer_scene.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/import/resource_importer_scene.h b/editor/import/resource_importer_scene.h
index 933585a48c..4d0e236cf1 100644
--- a/editor/import/resource_importer_scene.h
+++ b/editor/import/resource_importer_scene.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/import/resource_importer_texture.cpp b/editor/import/resource_importer_texture.cpp
index 3e3f1d1e19..45ce347244 100644
--- a/editor/import/resource_importer_texture.cpp
+++ b/editor/import/resource_importer_texture.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/import/resource_importer_texture.h b/editor/import/resource_importer_texture.h
index b374a9bc04..3d9e657017 100644
--- a/editor/import/resource_importer_texture.h
+++ b/editor/import/resource_importer_texture.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/import/resource_importer_wav.cpp b/editor/import/resource_importer_wav.cpp
index bd15ed535b..de82c12b98 100644
--- a/editor/import/resource_importer_wav.cpp
+++ b/editor/import/resource_importer_wav.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/import/resource_importer_wav.h b/editor/import/resource_importer_wav.h
index f58392e820..89a6bfb015 100644
--- a/editor/import/resource_importer_wav.h
+++ b/editor/import/resource_importer_wav.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/import_dock.cpp b/editor/import_dock.cpp
index 8a16f125b7..cec7fc6a4c 100644
--- a/editor/import_dock.cpp
+++ b/editor/import_dock.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/import_dock.h b/editor/import_dock.h
index 28c29e4b20..d6b5c4d9b4 100644
--- a/editor/import_dock.h
+++ b/editor/import_dock.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/multi_node_edit.cpp b/editor/multi_node_edit.cpp
index df1d7ff3d1..030510feee 100644
--- a/editor/multi_node_edit.cpp
+++ b/editor/multi_node_edit.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/multi_node_edit.h b/editor/multi_node_edit.h
index 5abe7f6438..c6422faaf2 100644
--- a/editor/multi_node_edit.h
+++ b/editor/multi_node_edit.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/node_dock.cpp b/editor/node_dock.cpp
index 366230be51..429eb4ae34 100644
--- a/editor/node_dock.cpp
+++ b/editor/node_dock.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/node_dock.h b/editor/node_dock.h
index 7c4f6bbecc..23bc7af90b 100644
--- a/editor/node_dock.h
+++ b/editor/node_dock.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/output_strings.cpp b/editor/output_strings.cpp
index 213cd47d01..37198ef6ab 100644
--- a/editor/output_strings.cpp
+++ b/editor/output_strings.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/output_strings.h b/editor/output_strings.h
index 8482e55752..58d966a6ee 100644
--- a/editor/output_strings.h
+++ b/editor/output_strings.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/pane_drag.cpp b/editor/pane_drag.cpp
index 33db2307b5..eb76a1ad00 100644
--- a/editor/pane_drag.cpp
+++ b/editor/pane_drag.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/pane_drag.h b/editor/pane_drag.h
index 55372198d1..22e46a6df7 100644
--- a/editor/pane_drag.h
+++ b/editor/pane_drag.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/abstract_polygon_2d_editor.cpp b/editor/plugins/abstract_polygon_2d_editor.cpp
index ff72a5a25e..06d07ad5e6 100644
--- a/editor/plugins/abstract_polygon_2d_editor.cpp
+++ b/editor/plugins/abstract_polygon_2d_editor.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -235,7 +235,7 @@ void AbstractPolygon2DEditor::_wip_close() {
if (_is_line()) {
_set_polygon(0, wip);
- } else if (wip.size() >= 3) {
+ } else if (wip.size() >= (_is_line() ? 2 : 3)) {
undo_redo->create_action(TTR("Create Poly"));
_action_add_polygon(wip);
@@ -281,46 +281,7 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
Vector2 gpoint = mb->get_position();
Vector2 cpoint = _get_node()->get_global_transform().affine_inverse().xform(canvas_item_editor->snap_point(canvas_item_editor->get_canvas_transform().affine_inverse().xform(mb->get_position())));
- if (mode == MODE_CREATE) {
-
- if (mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) {
-
- if (!wip_active) {
-
- wip.clear();
- wip.push_back(cpoint);
- wip_active = true;
- _wip_changed();
- edited_point = PosVertex(-1, 1, cpoint);
- canvas_item_editor->get_viewport_control()->update();
- hover_point = Vertex();
- selected_point = Vertex(0);
- edge_point = PosVertex();
- return true;
- } else {
-
- const real_t grab_threshold = EDITOR_DEF("editors/poly_editor/point_grab_radius", 8);
-
- if (!_is_line() && wip.size() > 1 && xform.xform(wip[0]).distance_to(gpoint) < grab_threshold) {
- //wip closed
- _wip_close();
-
- return true;
- } else {
-
- //add wip point
- wip.push_back(cpoint);
- _wip_changed();
- edited_point = PosVertex(-1, wip.size(), cpoint);
- selected_point = Vertex(wip.size() - 1);
- canvas_item_editor->get_viewport_control()->update();
- return true;
- }
- }
- } else if (mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed() && wip_active) {
- _wip_close();
- }
- } else if (mode == MODE_EDIT) {
+ if (mode == MODE_EDIT || (_is_line() && mode == MODE_CREATE)) {
if (mb->get_button_index() == BUTTON_LEFT) {
@@ -332,7 +293,7 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
Vector<Vector2> vertices = _get_polygon(insert.polygon);
- if (vertices.size() < 3) {
+ if (vertices.size() < (_is_line() ? 2 : 3)) {
vertices.push_back(cpoint);
undo_redo->create_action(TTR("Edit Poly"));
@@ -344,6 +305,7 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
Vector<Vector2> vertices = _get_polygon(insert.polygon);
pre_move_edit = vertices;
+ printf("setting pre_move_edit\n");
edited_point = PosVertex(insert.polygon, insert.vertex + 1, xform.affine_inverse().xform(insert.pos));
vertices.insert(edited_point.vertex, edited_point.pos);
selected_point = edited_point;
@@ -362,6 +324,7 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
if (closest.valid()) {
+ printf("setting pre_move_edit\n");
pre_move_edit = _get_polygon(closest.polygon);
edited_point = PosVertex(closest, xform.affine_inverse().xform(closest.pos));
selected_point = closest;
@@ -414,6 +377,56 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
}
}
}
+
+ if (mode == MODE_CREATE) {
+
+ if (mb->get_button_index() == BUTTON_LEFT && mb->is_pressed()) {
+
+ if (_is_line()) {
+
+ // for lines, we don't have a wip mode, and we can undo each single add point.
+ Vector<Vector2> vertices = _get_polygon(0);
+ vertices.push_back(cpoint);
+ undo_redo->create_action(TTR("Insert Point"));
+ _action_set_polygon(0, vertices);
+ _commit_action();
+ return true;
+ } else if (!wip_active) {
+
+ wip.clear();
+ wip.push_back(cpoint);
+ wip_active = true;
+ _wip_changed();
+ edited_point = PosVertex(-1, 1, cpoint);
+ canvas_item_editor->get_viewport_control()->update();
+ hover_point = Vertex();
+ selected_point = Vertex(0);
+ edge_point = PosVertex();
+ return true;
+ } else {
+
+ const real_t grab_threshold = EDITOR_DEF("editors/poly_editor/point_grab_radius", 8);
+
+ if (!_is_line() && wip.size() > 1 && xform.xform(wip[0]).distance_to(gpoint) < grab_threshold) {
+ //wip closed
+ _wip_close();
+
+ return true;
+ } else {
+
+ //add wip point
+ wip.push_back(cpoint);
+ _wip_changed();
+ edited_point = PosVertex(-1, wip.size(), cpoint);
+ selected_point = Vertex(wip.size() - 1);
+ canvas_item_editor->get_viewport_control()->update();
+ return true;
+ }
+ }
+ } else if (mb->get_button_index() == BUTTON_RIGHT && mb->is_pressed() && wip_active) {
+ _wip_close();
+ }
+ }
}
Ref<InputEventMouseMotion> mm = p_event;
@@ -436,7 +449,7 @@ bool AbstractPolygon2DEditor::forward_gui_input(const Ref<InputEvent> &p_event)
}
canvas_item_editor->get_viewport_control()->update();
- } else if (mode == MODE_EDIT) {
+ } else if (mode == MODE_EDIT || (_is_line() && mode == MODE_CREATE)) {
const PosVertex onEdgeVertex = closest_edge_point(gpoint);
@@ -535,7 +548,7 @@ void AbstractPolygon2DEditor::forward_draw_over_viewport(Control *p_overlay) {
const Color col = Color(0.5, 0.5, 0.5); // FIXME polygon->get_outline_color();
const int n = pre_move_edit.size();
- for (int i = 0; i < n - is_closed ? 0 : 1; i++) {
+ for (int i = 0; i < n - (is_closed ? 0 : 1); i++) {
Vector2 p, p2;
p = pre_move_edit[i] + offset;
@@ -544,7 +557,7 @@ void AbstractPolygon2DEditor::forward_draw_over_viewport(Control *p_overlay) {
Vector2 point = xform.xform(p);
Vector2 next_point = xform.xform(p2);
- vpc->draw_line(point, next_point, col, 2);
+ vpc->draw_line(point, next_point, col, 2 * EDSCALE);
}
}
@@ -568,7 +581,7 @@ void AbstractPolygon2DEditor::forward_draw_over_viewport(Control *p_overlay) {
p2 = points[(i + 1) % n_points] + offset;
const Vector2 next_point = xform.xform(p2);
- vpc->draw_line(point, next_point, col, 2);
+ vpc->draw_line(point, next_point, col, 2 * EDSCALE);
}
}
@@ -630,7 +643,7 @@ void AbstractPolygon2DEditor::remove_point(const Vertex &p_vertex) {
PoolVector<Vector2> vertices = _get_polygon(p_vertex.polygon);
- if (vertices.size() > 3) {
+ if (vertices.size() > (_is_line() ? 2 : 3)) {
vertices.remove(p_vertex.vertex);
@@ -705,8 +718,9 @@ AbstractPolygon2DEditor::PosVertex AbstractPolygon2DEditor::closest_edge_point(c
PoolVector<Vector2> points = _get_polygon(j);
const Vector2 offset = _get_offset(j);
const int n_points = points.size();
+ const int n_segments = n_points - (_is_line() ? 1 : 0);
- for (int i = 0; i < n_points; i++) {
+ for (int i = 0; i < n_segments; i++) {
Vector2 segment[2] = { xform.xform(points[i] + offset),
xform.xform(points[(i + 1) % n_points] + offset) };
diff --git a/editor/plugins/abstract_polygon_2d_editor.h b/editor/plugins/abstract_polygon_2d_editor.h
index 545eff6ef4..38aff47706 100644
--- a/editor/plugins/abstract_polygon_2d_editor.h
+++ b/editor/plugins/abstract_polygon_2d_editor.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/animation_player_editor_plugin.cpp b/editor/plugins/animation_player_editor_plugin.cpp
index d70f41d2e0..dcc766ad0d 100644
--- a/editor/plugins/animation_player_editor_plugin.cpp
+++ b/editor/plugins/animation_player_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/animation_player_editor_plugin.h b/editor/plugins/animation_player_editor_plugin.h
index 1a1e92d7b7..67c6aa1fd7 100644
--- a/editor/plugins/animation_player_editor_plugin.h
+++ b/editor/plugins/animation_player_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/animation_tree_editor_plugin.cpp b/editor/plugins/animation_tree_editor_plugin.cpp
index 0c6c608d3d..9337bd21fc 100644
--- a/editor/plugins/animation_tree_editor_plugin.cpp
+++ b/editor/plugins/animation_tree_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/animation_tree_editor_plugin.h b/editor/plugins/animation_tree_editor_plugin.h
index a5bef263f4..c46d84893e 100644
--- a/editor/plugins/animation_tree_editor_plugin.h
+++ b/editor/plugins/animation_tree_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/asset_library_editor_plugin.cpp b/editor/plugins/asset_library_editor_plugin.cpp
index f04bc04d92..19b92a8d58 100644
--- a/editor/plugins/asset_library_editor_plugin.cpp
+++ b/editor/plugins/asset_library_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/asset_library_editor_plugin.h b/editor/plugins/asset_library_editor_plugin.h
index 5536fbb2ec..8974e01448 100644
--- a/editor/plugins/asset_library_editor_plugin.h
+++ b/editor/plugins/asset_library_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/baked_lightmap_editor_plugin.cpp b/editor/plugins/baked_lightmap_editor_plugin.cpp
index 08f4d06ef7..6849563ae2 100644
--- a/editor/plugins/baked_lightmap_editor_plugin.cpp
+++ b/editor/plugins/baked_lightmap_editor_plugin.cpp
@@ -20,7 +20,6 @@ void BakedLightmapEditorPlugin::_bake() {
case BakedLightmap::BAKE_ERROR_CANT_CREATE_IMAGE:
EditorNode::get_singleton()->show_warning(TTR("Failed creating lightmap images, make sure path is writable."));
break;
- defaut : {}
}
}
}
diff --git a/editor/plugins/camera_editor_plugin.cpp b/editor/plugins/camera_editor_plugin.cpp
index c19540116e..c5cdbc0ad8 100644
--- a/editor/plugins/camera_editor_plugin.cpp
+++ b/editor/plugins/camera_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/camera_editor_plugin.h b/editor/plugins/camera_editor_plugin.h
index 12702db7a5..1fcdc50f68 100644
--- a/editor/plugins/camera_editor_plugin.h
+++ b/editor/plugins/camera_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/canvas_item_editor_plugin.cpp b/editor/plugins/canvas_item_editor_plugin.cpp
index ceb1ec09fc..a52c914096 100644
--- a/editor/plugins/canvas_item_editor_plugin.cpp
+++ b/editor/plugins/canvas_item_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -612,6 +612,7 @@ void CanvasItemEditor::_find_canvas_items_at_pos(const Point2 &p_pos, Node *p_no
if (Object::cast_to<Viewport>(p_node))
return;
+ const real_t grab_distance = EDITOR_DEF("editors/poly_editor/point_grab_radius", 8);
CanvasItem *c = Object::cast_to<CanvasItem>(p_node);
for (int i = p_node->get_child_count() - 1; i >= 0; i--) {
@@ -630,14 +631,17 @@ void CanvasItemEditor::_find_canvas_items_at_pos(const Point2 &p_pos, Node *p_no
if (c && c->is_visible_in_tree() && !c->has_meta("_edit_lock_") && !Object::cast_to<CanvasLayer>(c)) {
Rect2 rect = c->_edit_get_rect();
- Point2 local_pos = (p_parent_xform * p_canvas_xform * c->get_transform()).affine_inverse().xform(p_pos);
+ Transform2D to_local = (p_parent_xform * p_canvas_xform * c->get_transform()).affine_inverse();
+ Point2 local_pos = to_local.xform(p_pos);
+ const real_t local_grab_distance = (to_local.xform(p_pos + Vector2(grab_distance, 0)) - local_pos).length();
+ Rect2 local_pos_rect = Rect2(local_pos, Vector2(0, 0)).grow(local_grab_distance);
- if (rect.has_point(local_pos)) {
+ if (rect.intersects(local_pos_rect) && c->_edit_is_selected_on_click(local_pos, local_grab_distance)) {
Node2D *node = Object::cast_to<Node2D>(c);
_SelectResult res;
res.item = c;
- res.z = node ? node->get_z() : 0;
+ res.z_index = node ? node->get_z_index() : 0;
res.has_z = node;
r_items.push_back(res);
}
@@ -3464,7 +3468,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
- if (!canvas_item || !canvas_item->is_visible_in_tree())
+ if (!canvas_item || !canvas_item->is_inside_tree())
continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
@@ -3482,7 +3486,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
- if (!canvas_item || !canvas_item->is_visible_in_tree())
+ if (!canvas_item || !canvas_item->is_inside_tree())
continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
@@ -3502,7 +3506,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
- if (!canvas_item || !canvas_item->is_visible_in_tree())
+ if (!canvas_item || !canvas_item->is_inside_tree())
continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
@@ -3520,7 +3524,7 @@ void CanvasItemEditor::_popup_callback(int p_op) {
for (List<Node *>::Element *E = selection.front(); E; E = E->next()) {
CanvasItem *canvas_item = Object::cast_to<CanvasItem>(E->get());
- if (!canvas_item || !canvas_item->is_visible_in_tree())
+ if (!canvas_item || !canvas_item->is_inside_tree())
continue;
if (canvas_item->get_viewport() != EditorNode::get_singleton()->get_scene_root())
@@ -4344,7 +4348,7 @@ CanvasItemEditor::CanvasItemEditor(EditorNode *p_editor) {
additive_selection = false;
// Update the menus checkboxes
- call_deferred("set_state", get_state());
+ set_state(get_state());
}
CanvasItemEditor *CanvasItemEditor::singleton = NULL;
diff --git a/editor/plugins/canvas_item_editor_plugin.h b/editor/plugins/canvas_item_editor_plugin.h
index 4be09a16e9..0866fe77aa 100644
--- a/editor/plugins/canvas_item_editor_plugin.h
+++ b/editor/plugins/canvas_item_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -252,10 +252,10 @@ class CanvasItemEditor : public VBoxContainer {
struct _SelectResult {
CanvasItem *item;
- float z;
+ float z_index;
bool has_z;
_FORCE_INLINE_ bool operator<(const _SelectResult &p_rr) const {
- return has_z && p_rr.has_z ? p_rr.z < z : p_rr.has_z;
+ return has_z && p_rr.has_z ? p_rr.z_index < z_index : p_rr.has_z;
}
};
diff --git a/editor/plugins/collision_polygon_2d_editor_plugin.cpp b/editor/plugins/collision_polygon_2d_editor_plugin.cpp
index 6ac80caf94..53b06c17be 100644
--- a/editor/plugins/collision_polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_polygon_2d_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/collision_polygon_2d_editor_plugin.h b/editor/plugins/collision_polygon_2d_editor_plugin.h
index edf3bbcc08..82a30d6b97 100644
--- a/editor/plugins/collision_polygon_2d_editor_plugin.h
+++ b/editor/plugins/collision_polygon_2d_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/collision_polygon_editor_plugin.cpp b/editor/plugins/collision_polygon_editor_plugin.cpp
index 0818c8975e..c95f10441b 100644
--- a/editor/plugins/collision_polygon_editor_plugin.cpp
+++ b/editor/plugins/collision_polygon_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/collision_polygon_editor_plugin.h b/editor/plugins/collision_polygon_editor_plugin.h
index 0f63810443..0ccdf0ad16 100644
--- a/editor/plugins/collision_polygon_editor_plugin.h
+++ b/editor/plugins/collision_polygon_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.cpp b/editor/plugins/collision_shape_2d_editor_plugin.cpp
index 029e3a558d..1da3d55b3d 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.cpp
+++ b/editor/plugins/collision_shape_2d_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/collision_shape_2d_editor_plugin.h b/editor/plugins/collision_shape_2d_editor_plugin.h
index 1e930ef371..7e5dd44c5e 100644
--- a/editor/plugins/collision_shape_2d_editor_plugin.h
+++ b/editor/plugins/collision_shape_2d_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/cube_grid_theme_editor_plugin.cpp b/editor/plugins/cube_grid_theme_editor_plugin.cpp
index 2b31f192b3..416441befc 100644
--- a/editor/plugins/cube_grid_theme_editor_plugin.cpp
+++ b/editor/plugins/cube_grid_theme_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/cube_grid_theme_editor_plugin.h b/editor/plugins/cube_grid_theme_editor_plugin.h
index b5fa18a4ad..fc5b3d8006 100644
--- a/editor/plugins/cube_grid_theme_editor_plugin.h
+++ b/editor/plugins/cube_grid_theme_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/curve_editor_plugin.cpp b/editor/plugins/curve_editor_plugin.cpp
index f77016c1d6..3be68f21af 100644
--- a/editor/plugins/curve_editor_plugin.cpp
+++ b/editor/plugins/curve_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -347,7 +347,8 @@ void CurveEditor::open_context_menu(Vector2 pos) {
_context_menu->set_item_checked(_context_menu->get_item_index(CONTEXT_LINEAR), is_linear);
} else {
- _context_menu->add_separator();
+ if (_selected_point > 0 || _selected_point + 1 < _curve_ref->get_point_count())
+ _context_menu->add_separator();
if (_selected_point > 0) {
_context_menu->add_check_item(TTR("Left linear"), CONTEXT_LEFT_LINEAR);
@@ -367,6 +368,7 @@ void CurveEditor::open_context_menu(Vector2 pos) {
_context_menu->add_submenu_item(TTR("Load preset"), _presets_menu->get_name());
+ _context_menu->set_size(Size2(0, 0));
_context_menu->popup();
}
@@ -566,7 +568,6 @@ static void plot_curve_accurate(const Curve &curve, float step, T plot_func) {
Vector2 prev_pos = a;
float len = b.x - a.x;
- //float step = 4.f / view_size.x;
for (float x = step; x < len; x += step) {
pos.x = a.x + x;
@@ -694,24 +695,6 @@ void CurveEditor::_draw() {
CanvasItemPlotCurve plot_func(*this, line_color, edge_line_color);
plot_curve_accurate(curve, 4.f / view_size.x, plot_func);
- /*// TEST draw baked curve
- {
- Vector2 pos = Vector2(0, curve.interpolate_baked(0));
- Vector2 prev_pos = pos;
-
- float len = 1.0;
- float step = 4.f / view_size.x;
-
- for(float x = step; x < len; x += step) {
- pos.x = x;
- pos.y = curve.interpolate_baked(x);
- draw_line(get_point_view_pos(prev_pos), get_point_view_pos(pos), Color(0,1,0));
- prev_pos = pos;
- }
-
- draw_line(get_point_view_pos(prev_pos), get_point_view_pos(Vector2(1, curve.interpolate_baked(1))), Color(0,1,0));
- }//*/
-
// Draw points
draw_set_transform_matrix(Transform2D());
diff --git a/editor/plugins/curve_editor_plugin.h b/editor/plugins/curve_editor_plugin.h
index 2df9d05533..97f1ba2fa1 100644
--- a/editor/plugins/curve_editor_plugin.h
+++ b/editor/plugins/curve_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/editor_preview_plugins.cpp b/editor/plugins/editor_preview_plugins.cpp
index 558f44769d..a42f5b09bb 100644
--- a/editor/plugins/editor_preview_plugins.cpp
+++ b/editor/plugins/editor_preview_plugins.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/editor_preview_plugins.h b/editor/plugins/editor_preview_plugins.h
index c422d5c686..d77bf5e7bb 100644
--- a/editor/plugins/editor_preview_plugins.h
+++ b/editor/plugins/editor_preview_plugins.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/gi_probe_editor_plugin.cpp b/editor/plugins/gi_probe_editor_plugin.cpp
index 416b0edb20..48978aeae5 100644
--- a/editor/plugins/gi_probe_editor_plugin.cpp
+++ b/editor/plugins/gi_probe_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/gi_probe_editor_plugin.h b/editor/plugins/gi_probe_editor_plugin.h
index 527f420510..cf1c8b5aa3 100644
--- a/editor/plugins/gi_probe_editor_plugin.h
+++ b/editor/plugins/gi_probe_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/gradient_editor_plugin.cpp b/editor/plugins/gradient_editor_plugin.cpp
index 51f00e5751..738a92380c 100644
--- a/editor/plugins/gradient_editor_plugin.cpp
+++ b/editor/plugins/gradient_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/gradient_editor_plugin.h b/editor/plugins/gradient_editor_plugin.h
index ff7bf858c7..6eeb28aa81 100644
--- a/editor/plugins/gradient_editor_plugin.h
+++ b/editor/plugins/gradient_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/item_list_editor_plugin.cpp b/editor/plugins/item_list_editor_plugin.cpp
index aeb6e5c302..436a9c6532 100644
--- a/editor/plugins/item_list_editor_plugin.cpp
+++ b/editor/plugins/item_list_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/item_list_editor_plugin.h b/editor/plugins/item_list_editor_plugin.h
index 808f308c0c..6dbea59585 100644
--- a/editor/plugins/item_list_editor_plugin.h
+++ b/editor/plugins/item_list_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/light_occluder_2d_editor_plugin.cpp b/editor/plugins/light_occluder_2d_editor_plugin.cpp
index 3febc99239..31287ccdfb 100644
--- a/editor/plugins/light_occluder_2d_editor_plugin.cpp
+++ b/editor/plugins/light_occluder_2d_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/light_occluder_2d_editor_plugin.h b/editor/plugins/light_occluder_2d_editor_plugin.h
index dc3ff74052..a519acb601 100644
--- a/editor/plugins/light_occluder_2d_editor_plugin.h
+++ b/editor/plugins/light_occluder_2d_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/line_2d_editor_plugin.cpp b/editor/plugins/line_2d_editor_plugin.cpp
index 04d8519b2f..5d5dc8f449 100644
--- a/editor/plugins/line_2d_editor_plugin.cpp
+++ b/editor/plugins/line_2d_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/line_2d_editor_plugin.h b/editor/plugins/line_2d_editor_plugin.h
index 24c19c420d..04272064ea 100644
--- a/editor/plugins/line_2d_editor_plugin.h
+++ b/editor/plugins/line_2d_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/material_editor_plugin.cpp b/editor/plugins/material_editor_plugin.cpp
index 1fc112896d..27a16fd3dd 100644
--- a/editor/plugins/material_editor_plugin.cpp
+++ b/editor/plugins/material_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/material_editor_plugin.h b/editor/plugins/material_editor_plugin.h
index 2cc24be33a..11d707d044 100644
--- a/editor/plugins/material_editor_plugin.h
+++ b/editor/plugins/material_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/mesh_editor_plugin.cpp b/editor/plugins/mesh_editor_plugin.cpp
index 60e8858b2d..4c09d3b760 100644
--- a/editor/plugins/mesh_editor_plugin.cpp
+++ b/editor/plugins/mesh_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/mesh_editor_plugin.h b/editor/plugins/mesh_editor_plugin.h
index 8ae20a5434..b13c6524dc 100644
--- a/editor/plugins/mesh_editor_plugin.h
+++ b/editor/plugins/mesh_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/mesh_instance_editor_plugin.cpp b/editor/plugins/mesh_instance_editor_plugin.cpp
index 9d116349c0..3ad8cef079 100644
--- a/editor/plugins/mesh_instance_editor_plugin.cpp
+++ b/editor/plugins/mesh_instance_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/mesh_instance_editor_plugin.h b/editor/plugins/mesh_instance_editor_plugin.h
index 32c779509a..a1c0d9eab0 100644
--- a/editor/plugins/mesh_instance_editor_plugin.h
+++ b/editor/plugins/mesh_instance_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/multimesh_editor_plugin.cpp b/editor/plugins/multimesh_editor_plugin.cpp
index 79345754b6..12fe25f4d7 100644
--- a/editor/plugins/multimesh_editor_plugin.cpp
+++ b/editor/plugins/multimesh_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/multimesh_editor_plugin.h b/editor/plugins/multimesh_editor_plugin.h
index 6b44662091..67dd92f3a9 100644
--- a/editor/plugins/multimesh_editor_plugin.h
+++ b/editor/plugins/multimesh_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/navigation_mesh_editor_plugin.cpp b/editor/plugins/navigation_mesh_editor_plugin.cpp
index f0f5a62494..8c80225db6 100644
--- a/editor/plugins/navigation_mesh_editor_plugin.cpp
+++ b/editor/plugins/navigation_mesh_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/navigation_mesh_editor_plugin.h b/editor/plugins/navigation_mesh_editor_plugin.h
index bac7f608ab..cecaff5648 100644
--- a/editor/plugins/navigation_mesh_editor_plugin.h
+++ b/editor/plugins/navigation_mesh_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/navigation_mesh_generator.cpp b/editor/plugins/navigation_mesh_generator.cpp
index 005a132e22..0bebdf3c90 100644
--- a/editor/plugins/navigation_mesh_generator.cpp
+++ b/editor/plugins/navigation_mesh_generator.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/navigation_mesh_generator.h b/editor/plugins/navigation_mesh_generator.h
index 0a1c497f8f..dd0c1df718 100644
--- a/editor/plugins/navigation_mesh_generator.h
+++ b/editor/plugins/navigation_mesh_generator.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/navigation_polygon_editor_plugin.cpp b/editor/plugins/navigation_polygon_editor_plugin.cpp
index 36c608310b..260cb7c45e 100644
--- a/editor/plugins/navigation_polygon_editor_plugin.cpp
+++ b/editor/plugins/navigation_polygon_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/navigation_polygon_editor_plugin.h b/editor/plugins/navigation_polygon_editor_plugin.h
index 54cc347a8c..4652b63095 100644
--- a/editor/plugins/navigation_polygon_editor_plugin.h
+++ b/editor/plugins/navigation_polygon_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/particles_2d_editor_plugin.cpp b/editor/plugins/particles_2d_editor_plugin.cpp
index ff8a9f93d6..a76775700b 100644
--- a/editor/plugins/particles_2d_editor_plugin.cpp
+++ b/editor/plugins/particles_2d_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/particles_2d_editor_plugin.h b/editor/plugins/particles_2d_editor_plugin.h
index fd42abb6bd..86f82db84f 100644
--- a/editor/plugins/particles_2d_editor_plugin.h
+++ b/editor/plugins/particles_2d_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/particles_editor_plugin.cpp b/editor/plugins/particles_editor_plugin.cpp
index 52eba099c6..d129b6c5c3 100644
--- a/editor/plugins/particles_editor_plugin.cpp
+++ b/editor/plugins/particles_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/particles_editor_plugin.h b/editor/plugins/particles_editor_plugin.h
index a65538c7fa..23fa0d9378 100644
--- a/editor/plugins/particles_editor_plugin.h
+++ b/editor/plugins/particles_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/path_2d_editor_plugin.cpp b/editor/plugins/path_2d_editor_plugin.cpp
index 5e811bfa11..d329d547ef 100644
--- a/editor/plugins/path_2d_editor_plugin.cpp
+++ b/editor/plugins/path_2d_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/path_2d_editor_plugin.h b/editor/plugins/path_2d_editor_plugin.h
index 638d933797..e15ad2f541 100644
--- a/editor/plugins/path_2d_editor_plugin.h
+++ b/editor/plugins/path_2d_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/path_editor_plugin.cpp b/editor/plugins/path_editor_plugin.cpp
index fa97c96614..92f5025956 100644
--- a/editor/plugins/path_editor_plugin.cpp
+++ b/editor/plugins/path_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/path_editor_plugin.h b/editor/plugins/path_editor_plugin.h
index b672e828a9..a61905ffe0 100644
--- a/editor/plugins/path_editor_plugin.h
+++ b/editor/plugins/path_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/polygon_2d_editor_plugin.cpp b/editor/plugins/polygon_2d_editor_plugin.cpp
index 25e734187d..43d4f5df18 100644
--- a/editor/plugins/polygon_2d_editor_plugin.cpp
+++ b/editor/plugins/polygon_2d_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/polygon_2d_editor_plugin.h b/editor/plugins/polygon_2d_editor_plugin.h
index 90da3e61c1..3721c98486 100644
--- a/editor/plugins/polygon_2d_editor_plugin.h
+++ b/editor/plugins/polygon_2d_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/resource_preloader_editor_plugin.cpp b/editor/plugins/resource_preloader_editor_plugin.cpp
index 88649ca267..0db002b689 100644
--- a/editor/plugins/resource_preloader_editor_plugin.cpp
+++ b/editor/plugins/resource_preloader_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/resource_preloader_editor_plugin.h b/editor/plugins/resource_preloader_editor_plugin.h
index 46539f432c..f18e7a18ec 100644
--- a/editor/plugins/resource_preloader_editor_plugin.h
+++ b/editor/plugins/resource_preloader_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/script_editor_plugin.cpp b/editor/plugins/script_editor_plugin.cpp
index c1c75656c5..bc29c92d7f 100644
--- a/editor/plugins/script_editor_plugin.cpp
+++ b/editor/plugins/script_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -1027,6 +1027,15 @@ void ScriptEditor::_menu_option(int p_option) {
case FILE_COPY_PATH: {
_copy_script_path();
} break;
+ case SHOW_IN_FILE_SYSTEM: {
+ ScriptEditorBase *se = Object::cast_to<ScriptEditorBase>(tab_container->get_child(tab_container->get_current_tab()));
+ Ref<Script> script = se->get_edited_script();
+ FileSystemDock *file_system_dock = EditorNode::get_singleton()->get_filesystem_dock();
+ file_system_dock->navigate_to_path(script->get_path());
+ // Ensure that the FileSystem dock is visible.
+ TabContainer *tab_container = (TabContainer *)file_system_dock->get_parent_control();
+ tab_container->set_current_tab(file_system_dock->get_position_in_parent());
+ } break;
case CLOSE_DOCS: {
_close_docs_tab();
} break;
@@ -2164,7 +2173,7 @@ void ScriptEditor::_make_script_list_context_menu() {
context_menu->add_separator();
context_menu->add_shortcut(ED_GET_SHORTCUT("script_editor/copy_path"), FILE_COPY_PATH);
context_menu->add_shortcut(ED_GET_SHORTCUT("script_editor/reload_script_soft"), FILE_TOOL_RELOAD_SOFT);
-
+ context_menu->add_shortcut(ED_GET_SHORTCUT("script_editor/show_in_file_system"), SHOW_IN_FILE_SYSTEM);
Ref<Script> scr = se->get_edited_script();
if (!scr.is_null() && scr->is_tool()) {
context_menu->add_separator();
@@ -2517,9 +2526,9 @@ void ScriptEditor::_bind_methods() {
ClassDB::bind_method("_script_changed", &ScriptEditor::_script_changed);
ClassDB::bind_method("_update_recent_scripts", &ScriptEditor::_update_recent_scripts);
- ClassDB::bind_method(D_METHOD("get_drag_data_fw"), &ScriptEditor::get_drag_data_fw);
- ClassDB::bind_method(D_METHOD("can_drop_data_fw"), &ScriptEditor::can_drop_data_fw);
- ClassDB::bind_method(D_METHOD("drop_data_fw"), &ScriptEditor::drop_data_fw);
+ ClassDB::bind_method(D_METHOD("get_drag_data_fw", "point", "from"), &ScriptEditor::get_drag_data_fw);
+ ClassDB::bind_method(D_METHOD("can_drop_data_fw", "point", "data", "from"), &ScriptEditor::can_drop_data_fw);
+ ClassDB::bind_method(D_METHOD("drop_data_fw", "point", "data", "from"), &ScriptEditor::drop_data_fw);
ClassDB::bind_method(D_METHOD("get_current_script"), &ScriptEditor::_get_current_script);
ClassDB::bind_method(D_METHOD("get_open_scripts"), &ScriptEditor::_get_open_scripts);
@@ -2613,6 +2622,7 @@ ScriptEditor::ScriptEditor(EditorNode *p_editor) {
file_menu->get_popup()->add_separator();
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/reload_script_soft", TTR("Soft Reload Script"), KEY_MASK_CMD | KEY_MASK_SHIFT | KEY_R), FILE_TOOL_RELOAD_SOFT);
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/copy_path", TTR("Copy Script Path")), FILE_COPY_PATH);
+ file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/show_in_file_system", TTR("Show In File System")), SHOW_IN_FILE_SYSTEM);
file_menu->get_popup()->add_separator();
file_menu->get_popup()->add_shortcut(ED_SHORTCUT("script_editor/history_previous", TTR("History Prev"), KEY_MASK_ALT | KEY_LEFT), WINDOW_PREV);
diff --git a/editor/plugins/script_editor_plugin.h b/editor/plugins/script_editor_plugin.h
index 9d5c110dec..d90cf7b912 100644
--- a/editor/plugins/script_editor_plugin.h
+++ b/editor/plugins/script_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -137,6 +137,7 @@ class ScriptEditor : public PanelContainer {
CLOSE_ALL,
CLOSE_OTHER_TABS,
TOGGLE_SCRIPTS_PANEL,
+ SHOW_IN_FILE_SYSTEM,
FILE_COPY_PATH,
FILE_TOOL_RELOAD,
FILE_TOOL_RELOAD_SOFT,
diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp
index 3c9cd74aa1..9ad4bfb037 100644
--- a/editor/plugins/script_text_editor.cpp
+++ b/editor/plugins/script_text_editor.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -75,72 +75,36 @@ void ScriptTextEditor::_load_theme_settings() {
text_edit->clear_colors();
- Color background_color = EDITOR_DEF("text_editor/highlighting/background_color", Color(0, 0, 0, 0));
- Color completion_background_color = EDITOR_DEF("text_editor/highlighting/completion_background_color", Color(0, 0, 0, 0));
- Color completion_selected_color = EDITOR_DEF("text_editor/highlighting/completion_selected_color", Color::html("434244"));
- Color completion_existing_color = EDITOR_DEF("text_editor/highlighting/completion_existing_color", Color::html("21dfdfdf"));
- Color completion_scroll_color = EDITOR_DEF("text_editor/highlighting/completion_scroll_color", Color::html("ffffff"));
- Color completion_font_color = EDITOR_DEF("text_editor/highlighting/completion_font_color", Color::html("aaaaaa"));
- Color text_color = EDITOR_DEF("text_editor/highlighting/text_color", Color(0, 0, 0));
- Color line_number_color = EDITOR_DEF("text_editor/highlighting/line_number_color", Color(0, 0, 0));
- Color caret_color = EDITOR_DEF("text_editor/highlighting/caret_color", Color(0, 0, 0));
- Color caret_background_color = EDITOR_DEF("text_editor/highlighting/caret_background_color", Color(0, 0, 0));
- Color text_selected_color = EDITOR_DEF("text_editor/highlighting/text_selected_color", Color(1, 1, 1));
- Color selection_color = EDITOR_DEF("text_editor/highlighting/selection_color", Color(0.2, 0.2, 1));
- Color brace_mismatch_color = EDITOR_DEF("text_editor/highlighting/brace_mismatch_color", Color(1, 0.2, 0.2));
- Color current_line_color = EDITOR_DEF("text_editor/highlighting/current_line_color", Color(0.3, 0.5, 0.8, 0.15));
- Color line_length_guideline_color = EDITOR_DEF("text_editor/highlighting/line_length_guideline_color", Color(0, 0, 0));
- Color word_highlighted_color = EDITOR_DEF("text_editor/highlighting/word_highlighted_color", Color(0.8, 0.9, 0.9, 0.15));
- Color number_color = EDITOR_DEF("text_editor/highlighting/number_color", Color(0.9, 0.6, 0.0, 2));
- Color function_color = EDITOR_DEF("text_editor/highlighting/function_color", Color(0.4, 0.6, 0.8));
- Color member_variable_color = EDITOR_DEF("text_editor/highlighting/member_variable_color", Color(0.9, 0.3, 0.3));
- Color mark_color = EDITOR_DEF("text_editor/highlighting/mark_color", Color(1.0, 0.4, 0.4, 0.4));
- Color breakpoint_color = EDITOR_DEF("text_editor/highlighting/breakpoint_color", Color(0.8, 0.8, 0.4, 0.2));
- Color code_folding_color = EDITOR_DEF("text_editor/highlighting/code_folding_color", Color(0.8, 0.8, 0.8, 0.8));
- Color search_result_color = EDITOR_DEF("text_editor/highlighting/search_result_color", Color(0.05, 0.25, 0.05, 1));
- Color search_result_border_color = EDITOR_DEF("text_editor/highlighting/search_result_border_color", Color(0.1, 0.45, 0.1, 1));
- Color symbol_color = EDITOR_DEF("text_editor/highlighting/symbol_color", Color::hex(0x005291ff));
- Color keyword_color = EDITOR_DEF("text_editor/highlighting/keyword_color", Color(0.5, 0.0, 0.2));
- Color basetype_color = EDITOR_DEF("text_editor/highlighting/base_type_color", Color(0.3, 0.3, 0.0));
- Color type_color = EDITOR_DEF("text_editor/highlighting/engine_type_color", Color(0.0, 0.2, 0.4));
- Color comment_color = EDITOR_DEF("text_editor/highlighting/comment_color", Color::hex(0x797e7eff));
- Color string_color = EDITOR_DEF("text_editor/highlighting/string_color", Color::hex(0x6b6f00ff));
-
- // Adapt
- if (EditorSettings::get_singleton()->get("text_editor/theme/color_theme") == "Adaptive") {
- Ref<Theme> tm = EditorNode::get_singleton()->get_theme_base()->get_theme();
-
- symbol_color = tm->get_color("text_editor/theme/symbol_color", "Editor");
- keyword_color = tm->get_color("text_editor/theme/keyword_color", "Editor");
- basetype_color = tm->get_color("text_editor/theme/basetype_color", "Editor");
- type_color = tm->get_color("text_editor/theme/type_color", "Editor");
- comment_color = tm->get_color("text_editor/theme/comment_color", "Editor");
- string_color = tm->get_color("text_editor/theme/string_color", "Editor");
- background_color = tm->get_color("text_editor/theme/background_color", "Editor");
- completion_background_color = tm->get_color("text_editor/theme/completion_background_color", "Editor");
- completion_selected_color = tm->get_color("text_editor/theme/completion_selected_color", "Editor");
- completion_existing_color = tm->get_color("text_editor/theme/completion_existing_color", "Editor");
- completion_scroll_color = tm->get_color("text_editor/theme/completion_scroll_color", "Editor");
- completion_font_color = tm->get_color("text_editor/theme/completion_font_color", "Editor");
- text_color = tm->get_color("text_editor/theme/text_color", "Editor");
- line_number_color = tm->get_color("text_editor/theme/line_number_color", "Editor");
- caret_color = tm->get_color("text_editor/theme/caret_color", "Editor");
- caret_background_color = tm->get_color("text_editor/theme/caret_background_color", "Editor");
- text_selected_color = tm->get_color("text_editor/theme/text_selected_color", "Editor");
- selection_color = tm->get_color("text_editor/theme/selection_color", "Editor");
- brace_mismatch_color = tm->get_color("text_editor/theme/brace_mismatch_color", "Editor");
- current_line_color = tm->get_color("text_editor/theme/current_line_color", "Editor");
- line_length_guideline_color = tm->get_color("text_editor/theme/line_length_guideline_color", "Editor");
- word_highlighted_color = tm->get_color("text_editor/theme/word_highlighted_color", "Editor");
- number_color = tm->get_color("text_editor/theme/number_color", "Editor");
- function_color = tm->get_color("text_editor/theme/function_color", "Editor");
- member_variable_color = tm->get_color("text_editor/theme/member_variable_color", "Editor");
- mark_color = tm->get_color("text_editor/theme/mark_color", "Editor");
- breakpoint_color = tm->get_color("text_editor/theme/breakpoint_color", "Editor");
- code_folding_color = tm->get_color("text_editor/theme/code_folding_color", "Editor");
- search_result_color = tm->get_color("text_editor/theme/search_result_color", "Editor");
- search_result_border_color = tm->get_color("text_editor/theme/search_result_border_color", "Editor");
- }
+ Color background_color = EDITOR_GET("text_editor/highlighting/background_color");
+ Color completion_background_color = EDITOR_GET("text_editor/highlighting/completion_background_color");
+ Color completion_selected_color = EDITOR_GET("text_editor/highlighting/completion_selected_color");
+ Color completion_existing_color = EDITOR_GET("text_editor/highlighting/completion_existing_color");
+ Color completion_scroll_color = EDITOR_GET("text_editor/highlighting/completion_scroll_color");
+ Color completion_font_color = EDITOR_GET("text_editor/highlighting/completion_font_color");
+ Color text_color = EDITOR_GET("text_editor/highlighting/text_color");
+ Color line_number_color = EDITOR_GET("text_editor/highlighting/line_number_color");
+ Color caret_color = EDITOR_GET("text_editor/highlighting/caret_color");
+ Color caret_background_color = EDITOR_GET("text_editor/highlighting/caret_background_color");
+ Color text_selected_color = EDITOR_GET("text_editor/highlighting/text_selected_color");
+ Color selection_color = EDITOR_GET("text_editor/highlighting/selection_color");
+ Color brace_mismatch_color = EDITOR_GET("text_editor/highlighting/brace_mismatch_color");
+ Color current_line_color = EDITOR_GET("text_editor/highlighting/current_line_color");
+ Color line_length_guideline_color = EDITOR_GET("text_editor/highlighting/line_length_guideline_color");
+ Color word_highlighted_color = EDITOR_GET("text_editor/highlighting/word_highlighted_color");
+ Color number_color = EDITOR_GET("text_editor/highlighting/number_color");
+ Color function_color = EDITOR_GET("text_editor/highlighting/function_color");
+ Color member_variable_color = EDITOR_GET("text_editor/highlighting/member_variable_color");
+ Color mark_color = EDITOR_GET("text_editor/highlighting/mark_color");
+ Color breakpoint_color = EDITOR_GET("text_editor/highlighting/breakpoint_color");
+ Color code_folding_color = EDITOR_GET("text_editor/highlighting/code_folding_color");
+ Color search_result_color = EDITOR_GET("text_editor/highlighting/search_result_color");
+ Color search_result_border_color = EDITOR_GET("text_editor/highlighting/search_result_border_color");
+ Color symbol_color = EDITOR_GET("text_editor/highlighting/symbol_color");
+ Color keyword_color = EDITOR_GET("text_editor/highlighting/keyword_color");
+ Color basetype_color = EDITOR_GET("text_editor/highlighting/base_type_color");
+ Color type_color = EDITOR_GET("text_editor/highlighting/engine_type_color");
+ Color comment_color = EDITOR_GET("text_editor/highlighting/comment_color");
+ Color string_color = EDITOR_GET("text_editor/highlighting/string_color");
text_edit->add_color_override("background_color", background_color);
text_edit->add_color_override("completion_background_color", completion_background_color);
diff --git a/editor/plugins/script_text_editor.h b/editor/plugins/script_text_editor.h
index e3b81e7c3f..86b829495d 100644
--- a/editor/plugins/script_text_editor.h
+++ b/editor/plugins/script_text_editor.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/shader_editor_plugin.cpp b/editor/plugins/shader_editor_plugin.cpp
index d0b0d3690a..4f2fbca862 100644
--- a/editor/plugins/shader_editor_plugin.cpp
+++ b/editor/plugins/shader_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -60,73 +60,36 @@ void ShaderTextEditor::_load_theme_settings() {
get_text_edit()->clear_colors();
- Color background_color = EDITOR_DEF("text_editor/highlighting/background_color", Color(0, 0, 0, 0));
- Color completion_background_color = EDITOR_DEF("text_editor/highlighting/completion_background_color", Color(0, 0, 0, 0));
- Color completion_selected_color = EDITOR_DEF("text_editor/highlighting/completion_selected_color", Color::html("434244"));
- Color completion_existing_color = EDITOR_DEF("text_editor/highlighting/completion_existing_color", Color::html("21dfdfdf"));
- Color completion_scroll_color = EDITOR_DEF("text_editor/highlighting/completion_scroll_color", Color::html("ffffff"));
- Color completion_font_color = EDITOR_DEF("text_editor/highlighting/completion_font_color", Color::html("aaaaaa"));
- Color text_color = EDITOR_DEF("text_editor/highlighting/text_color", Color(0, 0, 0));
- Color line_number_color = EDITOR_DEF("text_editor/highlighting/line_number_color", Color(0, 0, 0));
- Color caret_color = EDITOR_DEF("text_editor/highlighting/caret_color", Color(0, 0, 0));
- Color caret_background_color = EDITOR_DEF("text_editor/highlighting/caret_background_color", Color(0, 0, 0));
- Color text_selected_color = EDITOR_DEF("text_editor/highlighting/text_selected_color", Color(1, 1, 1));
- Color selection_color = EDITOR_DEF("text_editor/highlighting/selection_color", Color(0.2, 0.2, 1));
- Color brace_mismatch_color = EDITOR_DEF("text_editor/highlighting/brace_mismatch_color", Color(1, 0.2, 0.2));
- Color current_line_color = EDITOR_DEF("text_editor/highlighting/current_line_color", Color(0.3, 0.5, 0.8, 0.15));
- Color line_length_guideline_color = EDITOR_DEF("text_editor/highlighting/line_length_guideline_color", Color(0, 0, 0));
- Color word_highlighted_color = EDITOR_DEF("text_editor/highlighting/word_highlighted_color", Color(0.8, 0.9, 0.9, 0.15));
- Color number_color = EDITOR_DEF("text_editor/highlighting/number_color", Color(0.9, 0.6, 0.0, 2));
- Color function_color = EDITOR_DEF("text_editor/highlighting/function_color", Color(0.4, 0.6, 0.8));
- Color member_variable_color = EDITOR_DEF("text_editor/highlighting/member_variable_color", Color(0.9, 0.3, 0.3));
- Color mark_color = EDITOR_DEF("text_editor/highlighting/mark_color", Color(1.0, 0.4, 0.4, 0.4));
- Color breakpoint_color = EDITOR_DEF("text_editor/highlighting/breakpoint_color", Color(0.8, 0.8, 0.4, 0.2));
- Color code_folding_color = EDITOR_DEF("text_editor/highlighting/code_folding_color", Color(0.8, 0.8, 0.8, 0.8));
- Color search_result_color = EDITOR_DEF("text_editor/highlighting/search_result_color", Color(0.05, 0.25, 0.05, 1));
- Color search_result_border_color = EDITOR_DEF("text_editor/highlighting/search_result_border_color", Color(0.1, 0.45, 0.1, 1));
- Color symbol_color = EDITOR_DEF("text_editor/highlighting/symbol_color", Color::hex(0x005291ff));
-
- Color keyword_color = EDITOR_DEF("text_editor/highlighting/keyword_color", Color(0.5, 0.0, 0.2));
- Color basetype_color = EDITOR_DEF("text_editor/highlighting/base_type_color", Color(0.3, 0.3, 0.0));
- Color type_color = EDITOR_DEF("text_editor/highlighting/engine_type_color", Color(0.0, 0.2, 0.4));
- Color comment_color = EDITOR_DEF("text_editor/highlighting/comment_color", Color::hex(0x797e7eff));
- Color string_color = EDITOR_DEF("text_editor/highlighting/string_color", Color::hex(0x6b6f00ff));
-
- // Adapt
- if (EditorSettings::get_singleton()->get("text_editor/theme/color_theme") == "Adaptive") {
- Ref<Theme> tm = EditorNode::get_singleton()->get_theme_base()->get_theme();
-
- symbol_color = tm->get_color("text_editor/theme/symbol_color", "Editor");
- keyword_color = tm->get_color("text_editor/theme/keyword_color", "Editor");
- basetype_color = tm->get_color("text_editor/theme/basetype_color", "Editor");
- type_color = tm->get_color("text_editor/theme/type_color", "Editor");
- comment_color = tm->get_color("text_editor/theme/comment_color", "Editor");
- string_color = tm->get_color("text_editor/theme/string_color", "Editor");
- background_color = tm->get_color("text_editor/theme/background_color", "Editor");
- completion_background_color = tm->get_color("text_editor/theme/completion_background_color", "Editor");
- completion_selected_color = tm->get_color("text_editor/theme/completion_selected_color", "Editor");
- completion_existing_color = tm->get_color("text_editor/theme/completion_existing_color", "Editor");
- completion_scroll_color = tm->get_color("text_editor/theme/completion_scroll_color", "Editor");
- completion_font_color = tm->get_color("text_editor/theme/completion_font_color", "Editor");
- text_color = tm->get_color("text_editor/theme/text_color", "Editor");
- line_number_color = tm->get_color("text_editor/theme/line_number_color", "Editor");
- caret_color = tm->get_color("text_editor/theme/caret_color", "Editor");
- caret_background_color = tm->get_color("text_editor/theme/caret_background_color", "Editor");
- text_selected_color = tm->get_color("text_editor/theme/text_selected_color", "Editor");
- selection_color = tm->get_color("text_editor/theme/selection_color", "Editor");
- brace_mismatch_color = tm->get_color("text_editor/theme/brace_mismatch_color", "Editor");
- current_line_color = tm->get_color("text_editor/theme/current_line_color", "Editor");
- line_length_guideline_color = tm->get_color("text_editor/theme/line_length_guideline_color", "Editor");
- word_highlighted_color = tm->get_color("text_editor/theme/word_highlighted_color", "Editor");
- number_color = tm->get_color("text_editor/theme/number_color", "Editor");
- function_color = tm->get_color("text_editor/theme/function_color", "Editor");
- member_variable_color = tm->get_color("text_editor/theme/member_variable_color", "Editor");
- mark_color = tm->get_color("text_editor/theme/mark_color", "Editor");
- breakpoint_color = tm->get_color("text_editor/theme/breakpoint_color", "Editor");
- code_folding_color = tm->get_color("text_editor/theme/code_folding_color", "Editor");
- search_result_color = tm->get_color("text_editor/theme/search_result_color", "Editor");
- search_result_border_color = tm->get_color("text_editor/theme/search_result_border_color", "Editor");
- }
+ Color background_color = EDITOR_GET("text_editor/highlighting/background_color");
+ Color completion_background_color = EDITOR_GET("text_editor/highlighting/completion_background_color");
+ Color completion_selected_color = EDITOR_GET("text_editor/highlighting/completion_selected_color");
+ Color completion_existing_color = EDITOR_GET("text_editor/highlighting/completion_existing_color");
+ Color completion_scroll_color = EDITOR_GET("text_editor/highlighting/completion_scroll_color");
+ Color completion_font_color = EDITOR_GET("text_editor/highlighting/completion_font_color");
+ Color text_color = EDITOR_GET("text_editor/highlighting/text_color");
+ Color line_number_color = EDITOR_GET("text_editor/highlighting/line_number_color");
+ Color caret_color = EDITOR_GET("text_editor/highlighting/caret_color");
+ Color caret_background_color = EDITOR_GET("text_editor/highlighting/caret_background_color");
+ Color text_selected_color = EDITOR_GET("text_editor/highlighting/text_selected_color");
+ Color selection_color = EDITOR_GET("text_editor/highlighting/selection_color");
+ Color brace_mismatch_color = EDITOR_GET("text_editor/highlighting/brace_mismatch_color");
+ Color current_line_color = EDITOR_GET("text_editor/highlighting/current_line_color");
+ Color line_length_guideline_color = EDITOR_GET("text_editor/highlighting/line_length_guideline_color");
+ Color word_highlighted_color = EDITOR_GET("text_editor/highlighting/word_highlighted_color");
+ Color number_color = EDITOR_GET("text_editor/highlighting/number_color");
+ Color function_color = EDITOR_GET("text_editor/highlighting/function_color");
+ Color member_variable_color = EDITOR_GET("text_editor/highlighting/member_variable_color");
+ Color mark_color = EDITOR_GET("text_editor/highlighting/mark_color");
+ Color breakpoint_color = EDITOR_GET("text_editor/highlighting/breakpoint_color");
+ Color code_folding_color = EDITOR_GET("text_editor/highlighting/code_folding_color");
+ Color search_result_color = EDITOR_GET("text_editor/highlighting/search_result_color");
+ Color search_result_border_color = EDITOR_GET("text_editor/highlighting/search_result_border_color");
+ Color symbol_color = EDITOR_GET("text_editor/highlighting/symbol_color");
+ Color keyword_color = EDITOR_GET("text_editor/highlighting/keyword_color");
+ Color basetype_color = EDITOR_GET("text_editor/highlighting/base_type_color");
+ Color type_color = EDITOR_GET("text_editor/highlighting/engine_type_color");
+ Color comment_color = EDITOR_GET("text_editor/highlighting/comment_color");
+ Color string_color = EDITOR_GET("text_editor/highlighting/string_color");
get_text_edit()->add_color_override("background_color", background_color);
get_text_edit()->add_color_override("completion_background_color", completion_background_color);
diff --git a/editor/plugins/shader_editor_plugin.h b/editor/plugins/shader_editor_plugin.h
index b191f5700f..a446fc4134 100644
--- a/editor/plugins/shader_editor_plugin.h
+++ b/editor/plugins/shader_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/shader_graph_editor_plugin.cpp b/editor/plugins/shader_graph_editor_plugin.cpp
index cd90d47896..59085c203f 100644
--- a/editor/plugins/shader_graph_editor_plugin.cpp
+++ b/editor/plugins/shader_graph_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/shader_graph_editor_plugin.h b/editor/plugins/shader_graph_editor_plugin.h
index f53dd8200d..98a9365727 100644
--- a/editor/plugins/shader_graph_editor_plugin.h
+++ b/editor/plugins/shader_graph_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/spatial_editor_plugin.cpp b/editor/plugins/spatial_editor_plugin.cpp
index b26038fe09..f6aef52e8b 100644
--- a/editor/plugins/spatial_editor_plugin.cpp
+++ b/editor/plugins/spatial_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -3213,7 +3213,7 @@ bool SpatialEditorViewport::can_drop_data_fw(const Point2 &p_point, const Varian
continue;
}
memdelete(instanced_scene);
- } else if (type == "Mesh" || "ArrayMesh" || "PrimitiveMesh") {
+ } else if (type == "Mesh" || type == "ArrayMesh" || type == "PrimitiveMesh") {
Ref<Mesh> mesh = ResourceLoader::load(files[i]);
if (!mesh.is_valid()) {
continue;
diff --git a/editor/plugins/spatial_editor_plugin.h b/editor/plugins/spatial_editor_plugin.h
index d080745dc9..b1d4a03893 100644
--- a/editor/plugins/spatial_editor_plugin.h
+++ b/editor/plugins/spatial_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/sprite_frames_editor_plugin.cpp b/editor/plugins/sprite_frames_editor_plugin.cpp
index 71c81f7111..35fc987e10 100644
--- a/editor/plugins/sprite_frames_editor_plugin.cpp
+++ b/editor/plugins/sprite_frames_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/sprite_frames_editor_plugin.h b/editor/plugins/sprite_frames_editor_plugin.h
index 9fdab37f0e..f94eb6f98c 100644
--- a/editor/plugins/sprite_frames_editor_plugin.h
+++ b/editor/plugins/sprite_frames_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/style_box_editor_plugin.cpp b/editor/plugins/style_box_editor_plugin.cpp
index 9840d9021c..a0c7eb178a 100644
--- a/editor/plugins/style_box_editor_plugin.cpp
+++ b/editor/plugins/style_box_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/style_box_editor_plugin.h b/editor/plugins/style_box_editor_plugin.h
index bf3c56197c..7a8e5aa99b 100644
--- a/editor/plugins/style_box_editor_plugin.h
+++ b/editor/plugins/style_box_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/texture_editor_plugin.cpp b/editor/plugins/texture_editor_plugin.cpp
index 855e857d80..572e2f9d83 100644
--- a/editor/plugins/texture_editor_plugin.cpp
+++ b/editor/plugins/texture_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/texture_editor_plugin.h b/editor/plugins/texture_editor_plugin.h
index c7734b5b3d..590dd6d9aa 100644
--- a/editor/plugins/texture_editor_plugin.h
+++ b/editor/plugins/texture_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/texture_region_editor_plugin.cpp b/editor/plugins/texture_region_editor_plugin.cpp
index 48aed0cf6c..861af05c61 100644
--- a/editor/plugins/texture_region_editor_plugin.cpp
+++ b/editor/plugins/texture_region_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Author: Mariano Suligoy */
/* */
diff --git a/editor/plugins/texture_region_editor_plugin.h b/editor/plugins/texture_region_editor_plugin.h
index 2058dad791..b84480d3d6 100644
--- a/editor/plugins/texture_region_editor_plugin.h
+++ b/editor/plugins/texture_region_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Author: Mariano Suligoy */
/* */
diff --git a/editor/plugins/theme_editor_plugin.cpp b/editor/plugins/theme_editor_plugin.cpp
index 38a4bfbfc6..5f1944fe74 100644
--- a/editor/plugins/theme_editor_plugin.cpp
+++ b/editor/plugins/theme_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/theme_editor_plugin.h b/editor/plugins/theme_editor_plugin.h
index 4d46282ba1..6484fb948d 100644
--- a/editor/plugins/theme_editor_plugin.h
+++ b/editor/plugins/theme_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/tile_map_editor_plugin.cpp b/editor/plugins/tile_map_editor_plugin.cpp
index 40abc4026a..acaf2ebcd3 100644
--- a/editor/plugins/tile_map_editor_plugin.cpp
+++ b/editor/plugins/tile_map_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/tile_map_editor_plugin.h b/editor/plugins/tile_map_editor_plugin.h
index b5f2618576..6388cfb3cc 100644
--- a/editor/plugins/tile_map_editor_plugin.h
+++ b/editor/plugins/tile_map_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/plugins/tile_set_editor_plugin.cpp b/editor/plugins/tile_set_editor_plugin.cpp
index b56585f62c..50db80ba01 100644
--- a/editor/plugins/tile_set_editor_plugin.cpp
+++ b/editor/plugins/tile_set_editor_plugin.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -238,19 +238,16 @@ void TileSetEditor::_bind_methods() {
TileSetEditor::TileSetEditor(EditorNode *p_editor) {
- Panel *panel = memnew(Panel);
- panel->set_anchors_and_margins_preset(Control::PRESET_WIDE);
- add_child(panel);
- MenuButton *options = memnew(MenuButton);
- panel->add_child(options);
- options->set_position(Point2(1, 1));
- options->set_text(TTR("Tile Set"));
- options->get_popup()->add_item(TTR("Add Item"), MENU_OPTION_ADD_ITEM);
- options->get_popup()->add_item(TTR("Remove Item"), MENU_OPTION_REMOVE_ITEM);
- options->get_popup()->add_separator();
- options->get_popup()->add_item(TTR("Create from Scene"), MENU_OPTION_CREATE_FROM_SCENE);
- options->get_popup()->add_item(TTR("Merge from Scene"), MENU_OPTION_MERGE_FROM_SCENE);
- options->get_popup()->connect("id_pressed", this, "_menu_cbk");
+ menu = memnew(MenuButton);
+ CanvasItemEditor::get_singleton()->add_control_to_menu_panel(menu);
+ menu->hide();
+ menu->set_text(TTR("Tile Set"));
+ menu->get_popup()->add_item(TTR("Add Item"), MENU_OPTION_ADD_ITEM);
+ menu->get_popup()->add_item(TTR("Remove Item"), MENU_OPTION_REMOVE_ITEM);
+ menu->get_popup()->add_separator();
+ menu->get_popup()->add_item(TTR("Create from Scene"), MENU_OPTION_CREATE_FROM_SCENE);
+ menu->get_popup()->add_item(TTR("Merge from Scene"), MENU_OPTION_MERGE_FROM_SCENE);
+ menu->get_popup()->connect("id_pressed", this, "_menu_cbk");
editor = p_editor;
cd = memnew(ConfirmationDialog);
add_child(cd);
@@ -286,6 +283,7 @@ void TileSetEditorPlugin::make_visible(bool p_visible) {
if (p_visible) {
tileset_editor->show();
+ tileset_editor->menu->show();
autotile_button->show();
autotile_editor->side_panel->show();
if (autotile_button->is_pressed()) {
@@ -293,6 +291,7 @@ void TileSetEditorPlugin::make_visible(bool p_visible) {
}
} else {
tileset_editor->hide();
+ tileset_editor->menu->hide();
autotile_editor->side_panel->hide();
autotile_editor->hide();
autotile_button->hide();
@@ -333,7 +332,7 @@ AutotileEditor::AutotileEditor(EditorNode *p_editor) {
autotile_list = memnew(ItemList);
autotile_list->set_v_size_flags(SIZE_EXPAND_FILL);
autotile_list->set_h_size_flags(SIZE_EXPAND_FILL);
- autotile_list->set_custom_minimum_size(Size2(02, 200));
+ autotile_list->set_custom_minimum_size(Size2(10, 200));
autotile_list->connect("item_selected", this, "_on_autotile_selected");
split->add_child(autotile_list);
@@ -343,12 +342,13 @@ AutotileEditor::AutotileEditor(EditorNode *p_editor) {
split->add_child(property_editor);
helper = memnew(AutotileEditorHelper(this));
- property_editor->call_deferred("edit", helper);
+ property_editor->edit(helper);
- // Editor
+ //Editor
dragging_point = -1;
creating_shape = false;
+ snap_step = Vector2(32, 32);
set_custom_minimum_size(Size2(0, 150));
@@ -419,17 +419,83 @@ AutotileEditor::AutotileEditor(EditorNode *p_editor) {
p.push_back((int)SHAPE_DELETE);
tools[SHAPE_DELETE]->connect("pressed", this, "_on_tool_clicked", p);
tool_containers[TOOLBAR_SHAPE]->add_child(tools[SHAPE_DELETE]);
- //tools[SHAPE_CREATE_FROM_NOT_BITMASKED] = memnew(ToolButton);
- //tool_containers[TOOLBAR_SHAPE]->add_child(tools[SHAPE_CREATE_FROM_NOT_BITMASKED]);
tool_containers[TOOLBAR_SHAPE]->add_change_receptor(memnew(VSeparator));
tools[SHAPE_KEEP_INSIDE_TILE] = memnew(ToolButton);
tools[SHAPE_KEEP_INSIDE_TILE]->set_toggle_mode(true);
tools[SHAPE_KEEP_INSIDE_TILE]->set_pressed(true);
tool_containers[TOOLBAR_SHAPE]->add_child(tools[SHAPE_KEEP_INSIDE_TILE]);
- tools[SHAPE_SNAP_TO_BITMASK_GRID] = memnew(ToolButton);
- tools[SHAPE_SNAP_TO_BITMASK_GRID]->set_toggle_mode(true);
- tools[SHAPE_SNAP_TO_BITMASK_GRID]->set_pressed(true);
- tool_containers[TOOLBAR_SHAPE]->add_child(tools[SHAPE_SNAP_TO_BITMASK_GRID]);
+ tools[SHAPE_GRID_SNAP] = memnew(ToolButton);
+ tools[SHAPE_GRID_SNAP]->set_toggle_mode(true);
+ tools[SHAPE_GRID_SNAP]->connect("toggled", this, "_on_grid_snap_toggled");
+ tool_containers[TOOLBAR_SHAPE]->add_child(tools[SHAPE_GRID_SNAP]);
+
+ hb_grid = memnew(HBoxContainer);
+ tool_containers[TOOLBAR_SHAPE]->add_child(hb_grid);
+
+ hb_grid->add_child(memnew(VSeparator));
+ hb_grid->add_child(memnew(Label(TTR("Offset:"))));
+
+ sb_off_x = memnew(SpinBox);
+ sb_off_x->set_min(-256);
+ sb_off_x->set_max(256);
+ sb_off_x->set_step(1);
+ sb_off_x->set_value(snap_offset.x);
+ sb_off_x->set_suffix("px");
+ sb_off_x->connect("value_changed", this, "_set_snap_off_x");
+ hb_grid->add_child(sb_off_x);
+
+ sb_off_y = memnew(SpinBox);
+ sb_off_y->set_min(-256);
+ sb_off_y->set_max(256);
+ sb_off_y->set_step(1);
+ sb_off_y->set_value(snap_offset.y);
+ sb_off_y->set_suffix("px");
+ sb_off_y->connect("value_changed", this, "_set_snap_off_y");
+ hb_grid->add_child(sb_off_y);
+
+ hb_grid->add_child(memnew(VSeparator));
+ hb_grid->add_child(memnew(Label(TTR("Step:"))));
+
+ sb_step_x = memnew(SpinBox);
+ sb_step_x->set_min(-256);
+ sb_step_x->set_max(256);
+ sb_step_x->set_step(1);
+ sb_step_x->set_value(snap_step.x);
+ sb_step_x->set_suffix("px");
+ sb_step_x->connect("value_changed", this, "_set_snap_step_x");
+ hb_grid->add_child(sb_step_x);
+
+ sb_step_y = memnew(SpinBox);
+ sb_step_y->set_min(-256);
+ sb_step_y->set_max(256);
+ sb_step_y->set_step(1);
+ sb_step_y->set_value(snap_step.y);
+ sb_step_y->set_suffix("px");
+ sb_step_y->connect("value_changed", this, "_set_snap_step_y");
+ hb_grid->add_child(sb_step_y);
+
+ hb_grid->add_child(memnew(VSeparator));
+ hb_grid->add_child(memnew(Label(TTR("Separation:"))));
+
+ sb_sep_x = memnew(SpinBox);
+ sb_sep_x->set_min(0);
+ sb_sep_x->set_max(256);
+ sb_sep_x->set_step(1);
+ sb_sep_x->set_value(snap_separation.x);
+ sb_sep_x->set_suffix("px");
+ sb_sep_x->connect("value_changed", this, "_set_snap_sep_x");
+ hb_grid->add_child(sb_sep_x);
+
+ sb_sep_y = memnew(SpinBox);
+ sb_sep_y->set_min(0);
+ sb_sep_y->set_max(256);
+ sb_sep_y->set_step(1);
+ sb_sep_y->set_value(snap_separation.y);
+ sb_sep_y->set_suffix("px");
+ sb_sep_y->connect("value_changed", this, "_set_snap_sep_y");
+ hb_grid->add_child(sb_sep_y);
+
+ hb_grid->hide();
spin_priority = memnew(SpinBox);
spin_priority->set_min(1);
@@ -462,7 +528,7 @@ AutotileEditor::AutotileEditor(EditorNode *p_editor) {
main_vb->add_child(toolbar);
- ScrollContainer *scroll = memnew(ScrollContainer);
+ scroll = memnew(ScrollContainer);
main_vb->add_child(scroll);
scroll->set_v_size_flags(SIZE_EXPAND_FILL);
@@ -489,6 +555,13 @@ void AutotileEditor::_bind_methods() {
ClassDB::bind_method("_on_workspace_input", &AutotileEditor::_on_workspace_input);
ClassDB::bind_method("_on_tool_clicked", &AutotileEditor::_on_tool_clicked);
ClassDB::bind_method("_on_priority_changed", &AutotileEditor::_on_priority_changed);
+ ClassDB::bind_method("_on_grid_snap_toggled", &AutotileEditor::_on_grid_snap_toggled);
+ ClassDB::bind_method("_set_snap_step_x", &AutotileEditor::_set_snap_step_x);
+ ClassDB::bind_method("_set_snap_step_y", &AutotileEditor::_set_snap_step_y);
+ ClassDB::bind_method("_set_snap_off_x", &AutotileEditor::_set_snap_off_x);
+ ClassDB::bind_method("_set_snap_off_y", &AutotileEditor::_set_snap_off_y);
+ ClassDB::bind_method("_set_snap_sep_x", &AutotileEditor::_set_snap_sep_x);
+ ClassDB::bind_method("_set_snap_sep_y", &AutotileEditor::_set_snap_sep_y);
}
void AutotileEditor::_notification(int p_what) {
@@ -501,7 +574,7 @@ void AutotileEditor::_notification(int p_what) {
tools[SHAPE_NEW_POLYGON]->set_icon(get_icon("CollisionPolygon2D", "EditorIcons"));
tools[SHAPE_DELETE]->set_icon(get_icon("Remove", "EditorIcons"));
tools[SHAPE_KEEP_INSIDE_TILE]->set_icon(get_icon("Snap", "EditorIcons"));
- tools[SHAPE_SNAP_TO_BITMASK_GRID]->set_icon(get_icon("SnapGrid", "EditorIcons"));
+ tools[SHAPE_GRID_SNAP]->set_icon(get_icon("SnapGrid", "EditorIcons"));
tools[ZOOM_OUT]->set_icon(get_icon("ZoomLess", "EditorIcons"));
tools[ZOOM_1]->set_icon(get_icon("ZoomReset", "EditorIcons"));
tools[ZOOM_IN]->set_icon(get_icon("ZoomMore", "EditorIcons"));
@@ -543,6 +616,7 @@ void AutotileEditor::_on_edit_mode_changed(int p_edit_mode) {
tool_containers[TOOLBAR_BITMASK]->hide();
tool_containers[TOOLBAR_SHAPE]->show();
tools[TOOL_SELECT]->set_tooltip(TTR("Select current edited sub-tile."));
+ current_shape = PoolVector2Array();
spin_priority->hide();
} break;
default: {
@@ -632,6 +706,7 @@ void AutotileEditor::_on_workspace_draw() {
Vector2 coord = edited_shape_coord;
draw_highlight_tile(coord);
draw_polygon_shapes();
+ draw_grid_snap();
} break;
case EDITMODE_PRIORITY: {
spin_priority->set_value(tile_set->autotile_get_subtile_priority(get_current_tile(), edited_shape_coord));
@@ -880,15 +955,15 @@ void AutotileEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
Vector<TileSet::ShapeData> sd = tile_set->tile_get_shapes(get_current_tile());
for (int i = 0; i < sd.size(); i++) {
if (sd[i].autotile_coord == coord) {
- Ref<ConcavePolygonShape2D> shape = sd[i].shape;
+ Ref<ConvexPolygonShape2D> shape = sd[i].shape;
if (shape.is_valid()) {
- //FIXME: i need a way to know if the point is countained on the polygon instead of the rect
+
Rect2 bounding_rect;
PoolVector2Array polygon;
- bounding_rect.position = shape->get_segments()[0];
- for (int j = 0; j < shape->get_segments().size(); j += 2) {
- polygon.push_back(shape->get_segments()[j] + shape_anchor);
- bounding_rect.expand_to(shape->get_segments()[j] + shape_anchor);
+ bounding_rect.position = shape->get_points()[0];
+ for (int j = 0; j < shape->get_points().size(); j++) {
+ polygon.push_back(shape->get_points()[j] + shape_anchor);
+ bounding_rect.expand_to(shape->get_points()[j] + shape_anchor);
}
if (bounding_rect.has_point(mb->get_position())) {
current_shape = polygon;
@@ -905,17 +980,17 @@ void AutotileEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
if (dragging_point >= 0) {
dragging_point = -1;
- PoolVector<Vector2> segments;
- segments.resize(current_shape.size() * 2);
- PoolVector<Vector2>::Write w = segments.write();
+ Vector<Vector2> points;
for (int i = 0; i < current_shape.size(); i++) {
- w[(i << 1) + 0] = current_shape[i] - shape_anchor;
- w[(i << 1) + 1] = current_shape[(i + 1) % current_shape.size()] - shape_anchor;
+ Vector2 p = current_shape[i];
+ if (tools[SHAPE_GRID_SNAP]->is_pressed() || tools[SHAPE_KEEP_INSIDE_TILE]->is_pressed()) {
+ p = snap_point(p);
+ }
+ points.push_back(p - shape_anchor);
}
- w = PoolVector<Vector2>::Write();
- edited_collision_shape->set_segments(segments);
+ edited_collision_shape->set_points(points);
workspace->update();
}
@@ -982,11 +1057,53 @@ void AutotileEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
current_shape.push_back(pos);
workspace->update();
} else {
+ int t_id = get_current_tile();
+ if (t_id >= 0) {
+ if (edit_mode == EDITMODE_COLLISION) {
+ Vector<TileSet::ShapeData> sd = tile_set->tile_get_shapes(t_id);
+ for (int i = 0; i < sd.size(); i++) {
+ if (sd[i].autotile_coord == edited_shape_coord) {
+ Ref<ConvexPolygonShape2D> shape = sd[i].shape;
+
+ if (!shape.is_null()) {
+ sd.remove(i);
+ tile_set->tile_set_shapes(get_current_tile(), sd);
+ edited_collision_shape = Ref<Shape2D>();
+ workspace->update();
+ }
+ break;
+ }
+ }
+ } else if (edit_mode == EDITMODE_OCCLUSION) {
+ Map<Vector2, Ref<OccluderPolygon2D> > map = tile_set->autotile_get_light_oclusion_map(t_id);
+ for (Map<Vector2, Ref<OccluderPolygon2D> >::Element *E = map.front(); E; E = E->next()) {
+ if (E->key() == edited_shape_coord) {
+ tile_set->autotile_set_light_occluder(get_current_tile(), Ref<OccluderPolygon2D>(), edited_shape_coord);
+ break;
+ }
+ }
+
+ edited_occlusion_shape = Ref<OccluderPolygon2D>();
+ workspace->update();
+ } else if (edit_mode == EDITMODE_NAVIGATION) {
+ Map<Vector2, Ref<NavigationPolygon> > map = tile_set->autotile_get_navigation_map(t_id);
+ for (Map<Vector2, Ref<NavigationPolygon> >::Element *E = map.front(); E; E = E->next()) {
+ if (E->key() == edited_shape_coord) {
+ tile_set->autotile_set_navigation_polygon(t_id, Ref<NavigationPolygon>(), edited_shape_coord);
+ break;
+ }
+ }
+
+ edited_navigation_shape = Ref<NavigationPolygon>();
+ workspace->update();
+ }
+ }
+
creating_shape = true;
current_shape.resize(0);
current_shape.push_back(snap_point(pos));
}
- } else if (mb->is_pressed() && mb->get_button_index() == BUTTON_RIGHT) {
+ } else if (mb->is_pressed() && mb->get_button_index() == BUTTON_RIGHT && current_shape.size() > 2) {
if (creating_shape) {
close_shape(shape_anchor);
}
@@ -999,6 +1116,16 @@ void AutotileEditor::_on_workspace_input(const Ref<InputEvent> &p_ie) {
}
} break;
}
+
+ //Drag Middle Mouse
+ if (mm.is_valid()) {
+ if (mm->get_button_mask() & BUTTON_MASK_MIDDLE) {
+
+ Vector2 dragged(mm->get_relative().x, mm->get_relative().y);
+ scroll->set_h_scroll(scroll->get_h_scroll() - dragged.x * workspace->get_scale().x);
+ scroll->set_v_scroll(scroll->get_v_scroll() - dragged.y * workspace->get_scale().x);
+ }
+ }
}
}
@@ -1034,7 +1161,7 @@ void AutotileEditor::_on_tool_clicked(int p_tool) {
if (index >= 0) {
sd.remove(index);
tile_set->tile_set_shapes(get_current_tile(), sd);
- edited_collision_shape = Ref<ConcavePolygonShape2D>();
+ edited_collision_shape = Ref<Shape2D>();
current_shape.resize(0);
workspace->update();
}
@@ -1081,6 +1208,43 @@ void AutotileEditor::_on_priority_changed(float val) {
workspace->update();
}
+void AutotileEditor::_on_grid_snap_toggled(bool p_val) {
+ if (p_val)
+ hb_grid->show();
+ else
+ hb_grid->hide();
+ workspace->update();
+}
+
+void AutotileEditor::_set_snap_step_x(float p_val) {
+ snap_step.x = p_val;
+ workspace->update();
+}
+
+void AutotileEditor::_set_snap_step_y(float p_val) {
+ snap_step.y = p_val;
+ workspace->update();
+}
+
+void AutotileEditor::_set_snap_off_x(float p_val) {
+ snap_offset.x = p_val;
+ workspace->update();
+}
+
+void AutotileEditor::_set_snap_off_y(float p_val) {
+ snap_offset.y = p_val;
+ workspace->update();
+}
+void AutotileEditor::_set_snap_sep_x(float p_val) {
+ snap_separation.x = p_val;
+ workspace->update();
+}
+
+void AutotileEditor::_set_snap_sep_y(float p_val) {
+ snap_separation.y = p_val;
+ workspace->update();
+}
+
void AutotileEditor::draw_highlight_tile(Vector2 coord, const Vector<Vector2> &other_highlighted) {
Vector2 size = tile_set->autotile_get_size(get_current_tile());
@@ -1103,6 +1267,49 @@ void AutotileEditor::draw_highlight_tile(Vector2 coord, const Vector<Vector2> &o
}
}
+void AutotileEditor::draw_grid_snap() {
+ if (tools[SHAPE_GRID_SNAP]->is_pressed()) {
+ Color grid_color = Color(0.39, 0, 1, 0.2f);
+ Size2 s = workspace->get_size();
+
+ Vector2 size = tile_set->autotile_get_size(get_current_tile());
+
+ int width_count = (int)(s.width / (snap_step.x + snap_separation.x));
+ int height_count = (int)(s.height / (snap_step.y + snap_separation.y));
+
+ if (snap_step.x != 0) {
+ int last_p = 0;
+ for (int i = 0; i <= width_count; i++) {
+ if (i == 0 && snap_offset.x != 0) {
+ last_p = snap_offset.x;
+ }
+ if (snap_separation.x != 0 && i != 0) {
+ workspace->draw_rect(Rect2(last_p, 0, snap_separation.x, s.height), grid_color);
+ last_p += snap_separation.x;
+ } else
+ workspace->draw_line(Point2(last_p, 0), Point2(last_p, s.height), grid_color);
+
+ last_p += snap_step.x;
+ }
+ }
+
+ if (snap_step.y != 0) {
+ int last_p = 0;
+ for (int i = 0; i <= height_count; i++) {
+ if (i == 0 && snap_offset.y != 0) {
+ last_p = snap_offset.y;
+ }
+ if (snap_separation.x != 0 && i != 0) {
+ workspace->draw_rect(Rect2(0, last_p, s.width, snap_separation.y), grid_color);
+ last_p += snap_separation.y;
+ } else
+ workspace->draw_line(Point2(0, last_p), Point2(s.width, last_p), grid_color);
+ last_p += snap_step.y;
+ }
+ }
+ }
+}
+
void AutotileEditor::draw_polygon_shapes() {
int t_id = get_current_tile();
@@ -1119,7 +1326,7 @@ void AutotileEditor::draw_polygon_shapes() {
anchor.y += tile_set->autotile_get_spacing(t_id);
anchor.x *= coord.x;
anchor.y *= coord.y;
- Ref<ConcavePolygonShape2D> shape = sd[i].shape;
+ Ref<ConvexPolygonShape2D> shape = sd[i].shape;
if (shape.is_valid()) {
Color c_bg;
Color c_border;
@@ -1138,19 +1345,22 @@ void AutotileEditor::draw_polygon_shapes() {
colors.push_back(c_bg);
}
} else {
- for (int j = 0; j < shape->get_segments().size(); j += 2) {
- polygon.push_back(shape->get_segments()[j] + anchor);
+ for (int j = 0; j < shape->get_points().size(); j++) {
+ polygon.push_back(shape->get_points()[j] + anchor);
colors.push_back(c_bg);
}
}
- workspace->draw_polygon(polygon, colors);
+ if (polygon.size() > 2) {
+ workspace->draw_polygon(polygon, colors);
+ }
if (coord == edited_shape_coord) {
- for (int j = 0; j < shape->get_segments().size(); j += 2) {
- workspace->draw_line(shape->get_segments()[j] + anchor, shape->get_segments()[j + 1] + anchor, c_border, 1, true);
+ for (int j = 0; j < shape->get_points().size() - 1; j++) {
+ workspace->draw_line(shape->get_points()[j] + anchor, shape->get_points()[j + 1] + anchor, c_border, 1, true);
}
+
if (shape == edited_collision_shape) {
for (int j = 0; j < current_shape.size(); j++) {
- workspace->draw_circle(current_shape[j], 5, Color(1, 0, 0));
+ workspace->draw_circle(current_shape[j], 8 / workspace->get_scale().x, Color(1, 0, 0, 0.7f));
}
}
}
@@ -1198,7 +1408,7 @@ void AutotileEditor::draw_polygon_shapes() {
workspace->draw_line(shape->get_polygon()[shape->get_polygon().size() - 1] + anchor, shape->get_polygon()[0] + anchor, c_border, 1, true);
if (shape == edited_occlusion_shape) {
for (int j = 0; j < current_shape.size(); j++) {
- workspace->draw_circle(current_shape[j], 5, Color(1, 0, 0));
+ workspace->draw_circle(current_shape[j], 8 / workspace->get_scale().x, Color(1, 0, 0));
}
}
}
@@ -1248,7 +1458,7 @@ void AutotileEditor::draw_polygon_shapes() {
}
if (shape == edited_navigation_shape) {
for (int j = 0; j < current_shape.size(); j++) {
- workspace->draw_circle(current_shape[j], 5, Color(1, 0, 0));
+ workspace->draw_circle(current_shape[j], 8 / workspace->get_scale().x, Color(1, 0, 0));
}
}
}
@@ -1270,22 +1480,30 @@ void AutotileEditor::close_shape(const Vector2 &shape_anchor) {
creating_shape = false;
if (edit_mode == EDITMODE_COLLISION) {
- Ref<ConcavePolygonShape2D> shape = memnew(ConcavePolygonShape2D);
+ if (current_shape.size() >= 3) {
+ Ref<ConvexPolygonShape2D> shape = memnew(ConvexPolygonShape2D);
- PoolVector<Vector2> segments;
- segments.resize(current_shape.size() * 2);
- PoolVector<Vector2>::Write w = segments.write();
+ Vector<Vector2> segments;
+ float p_total = 0;
- for (int i = 0; i < current_shape.size(); i++) {
- w[(i << 1) + 0] = current_shape[i] - shape_anchor;
- w[(i << 1) + 1] = current_shape[(i + 1) % current_shape.size()] - shape_anchor;
- }
+ for (int i = 0; i < current_shape.size(); i++) {
+ segments.push_back(current_shape[i] - shape_anchor);
- w = PoolVector<Vector2>::Write();
- shape->set_segments(segments);
+ if (i != current_shape.size() - 1)
+ p_total += ((current_shape[i + 1].x - current_shape[i].x) * (-current_shape[i + 1].y + (-current_shape[i].y)));
+ else
+ p_total += ((current_shape[0].x - current_shape[i].x) * (-current_shape[0].y + (-current_shape[i].y)));
+ }
+
+ if (p_total < 0)
+ segments.invert();
+
+ shape->set_points(segments);
+
+ tile_set->tile_add_shape(get_current_tile(), shape, Transform2D(), false, edited_shape_coord);
+ edited_collision_shape = shape;
+ }
- tile_set->tile_add_shape(get_current_tile(), shape, Transform2D(), false, edited_shape_coord);
- edited_collision_shape = shape;
tools[TOOL_SELECT]->set_pressed(true);
workspace->update();
} else if (edit_mode == EDITMODE_OCCLUSION) {
@@ -1338,6 +1556,10 @@ Vector2 AutotileEditor::snap_point(const Vector2 &point) {
anchor.x *= (tile_size.x + spacing);
anchor.y *= (tile_size.y + spacing);
Rect2 region(anchor, tile_size);
+ if (tools[SHAPE_GRID_SNAP]->is_pressed()) {
+ p.x = Math::snap_scalar_seperation(snap_offset.x, snap_step.x, p.x, snap_separation.x);
+ p.y = Math::snap_scalar_seperation(snap_offset.y, snap_step.y, p.y, snap_separation.y);
+ }
if (tools[SHAPE_KEEP_INSIDE_TILE]->is_pressed()) {
if (p.x < region.position.x)
p.x = region.position.x;
@@ -1348,23 +1570,6 @@ Vector2 AutotileEditor::snap_point(const Vector2 &point) {
if (p.y > region.position.y + region.size.y)
p.y = region.position.y + region.size.y;
}
- if (tools[SHAPE_SNAP_TO_BITMASK_GRID]->is_pressed()) {
- Vector2 p2 = p;
- if (tile_set->autotile_get_bitmask_mode(get_current_tile()) == TileSet::BITMASK_2X2) {
- p2.x = Math::stepify(p2.x, tile_size.x / 2);
- p2.y = Math::stepify(p2.y, tile_size.y / 2);
- if ((p2 - p).length_squared() <= MAX(tile_size.y / 4, MIN_DISTANCE_SQUARED)) {
- p = p2;
- }
- } else if (tile_set->autotile_get_bitmask_mode(get_current_tile()) == TileSet::BITMASK_3X3) {
- p2.x = Math::stepify(p2.x, tile_size.x / 3);
- p2.y = Math::stepify(p2.y, tile_size.y / 3);
- if ((p2 - p).length_squared() <= MAX(tile_size.y / 6, MIN_DISTANCE_SQUARED)) {
- p = p2;
- }
- }
- }
- p.floor();
return p;
}
diff --git a/editor/plugins/tile_set_editor_plugin.h b/editor/plugins/tile_set_editor_plugin.h
index d60d0d5c3c..0f66f04cb1 100644
--- a/editor/plugins/tile_set_editor_plugin.h
+++ b/editor/plugins/tile_set_editor_plugin.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -33,7 +33,7 @@
#include "editor/editor_name_dialog.h"
#include "editor/editor_node.h"
#include "scene/2d/sprite.h"
-#include "scene/resources/concave_polygon_shape_2d.h"
+#include "scene/resources/convex_polygon_shape_2d.h"
#include "scene/resources/tile_set.h"
class AutotileEditorHelper;
@@ -70,7 +70,7 @@ class AutotileEditor : public Control {
SHAPE_CREATE_FROM_BITMASK,
SHAPE_CREATE_FROM_NOT_BITMASK,
SHAPE_KEEP_INSIDE_TILE,
- SHAPE_SNAP_TO_BITMASK_GRID,
+ SHAPE_GRID_SNAP,
ZOOM_OUT,
ZOOM_1,
ZOOM_IN,
@@ -78,7 +78,7 @@ class AutotileEditor : public Control {
};
Ref<TileSet> tile_set;
- Ref<ConcavePolygonShape2D> edited_collision_shape;
+ Ref<ConvexPolygonShape2D> edited_collision_shape;
Ref<OccluderPolygon2D> edited_occlusion_shape;
Ref<NavigationPolygon> edited_navigation_shape;
@@ -86,15 +86,27 @@ class AutotileEditor : public Control {
int current_item_index;
Sprite *preview;
+ ScrollContainer *scroll;
Control *workspace_container;
Control *workspace;
Button *tool_editmode[EDITMODE_MAX];
HBoxContainer *tool_containers[TOOLBAR_MAX];
HBoxContainer *toolbar;
+ HBoxContainer *hb_grid;
ToolButton *tools[TOOL_MAX];
SpinBox *spin_priority;
+ SpinBox *sb_step_y;
+ SpinBox *sb_step_x;
+ SpinBox *sb_off_y;
+ SpinBox *sb_off_x;
+ SpinBox *sb_sep_y;
+ SpinBox *sb_sep_x;
EditMode edit_mode;
+ Vector2 snap_step;
+ Vector2 snap_offset;
+ Vector2 snap_separation;
+
bool creating_shape;
int dragging_point;
Vector2 edited_shape_coord;
@@ -119,9 +131,16 @@ private:
void _on_workspace_input(const Ref<InputEvent> &p_ie);
void _on_tool_clicked(int p_tool);
void _on_priority_changed(float val);
+ void _on_grid_snap_toggled(bool p_val);
+ void _set_snap_step_x(float p_val);
+ void _set_snap_step_y(float p_val);
+ void _set_snap_off_x(float p_val);
+ void _set_snap_off_y(float p_val);
+ void _set_snap_sep_x(float p_val);
+ void _set_snap_sep_y(float p_val);
void draw_highlight_tile(Vector2 coord, const Vector<Vector2> &other_highlighted = Vector<Vector2>());
- void draw_grid(const Vector2 &size, int spacing);
+ void draw_grid_snap();
void draw_polygon_shapes();
void close_shape(const Vector2 &shape_anchor);
Vector2 snap_point(const Vector2 &point);
diff --git a/editor/progress_dialog.cpp b/editor/progress_dialog.cpp
index e02925e377..70866df8ec 100644
--- a/editor/progress_dialog.cpp
+++ b/editor/progress_dialog.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/progress_dialog.h b/editor/progress_dialog.h
index b13ea606bc..a914606e6d 100644
--- a/editor/progress_dialog.h
+++ b/editor/progress_dialog.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/project_export.cpp b/editor/project_export.cpp
index 3c31b70564..dfcd3da42a 100644
--- a/editor/project_export.cpp
+++ b/editor/project_export.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/project_export.h b/editor/project_export.h
index b258112fa8..d793e21f45 100644
--- a/editor/project_export.h
+++ b/editor/project_export.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/project_manager.cpp b/editor/project_manager.cpp
index 04e9f0adc1..eb5cec2a2e 100644
--- a/editor/project_manager.cpp
+++ b/editor/project_manager.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -89,33 +89,50 @@ private:
String created_folder_path;
void set_message(const String &p_msg, MessageType p_type = MESSAGE_SUCCESS) {
+
msg->set_text(p_msg);
- if (p_msg == "") {
- status_btn->set_icon(get_icon("StatusSuccess", "EditorIcons"));
- return;
- }
- msg->hide();
+ Ref<Texture> current_icon = status_btn->get_icon();
+
switch (p_type) {
- case MESSAGE_ERROR:
+
+ case MESSAGE_ERROR: {
+
msg->add_color_override("font_color", get_color("error_color", "Editor"));
- status_btn->set_icon(get_icon("StatusError", "EditorIcons"));
- msg->show();
- break;
- case MESSAGE_WARNING:
+ Ref<Texture> new_icon = get_icon("StatusError", "EditorIcons");
+ if (current_icon != new_icon) {
+
+ status_btn->set_icon(new_icon);
+ msg->show();
+ }
+ } break;
+ case MESSAGE_WARNING: {
+
msg->add_color_override("font_color", get_color("warning_color", "Editor"));
- status_btn->set_icon(get_icon("StatusWarning", "EditorIcons"));
- break;
- case MESSAGE_SUCCESS:
+ Ref<Texture> new_icon = get_icon("StatusWarning", "EditorIcons");
+ if (current_icon != new_icon) {
+
+ status_btn->set_icon(new_icon);
+ if (current_icon != get_icon("StatusSuccess", "EditorIcons"))
+ msg->hide();
+ }
+ } break;
+ case MESSAGE_SUCCESS: {
+
msg->add_color_override("font_color", get_color("success_color", "Editor"));
- status_btn->set_icon(get_icon("StatusSuccess", "EditorIcons"));
- break;
+ Ref<Texture> new_icon = get_icon("StatusSuccess", "EditorIcons");
+ if (current_icon != new_icon) {
+
+ status_btn->set_icon(new_icon);
+ msg->hide();
+ }
+ } break;
}
+
+ set_size(Size2(500, 0) * EDSCALE);
}
String _test_path() {
- set_message(" ");
- get_ok()->set_disabled(true);
DirAccess *d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
String valid_path;
if (d->change_dir(project_path->get_text()) == OK) {
@@ -127,6 +144,7 @@ private:
if (valid_path == "") {
set_message(TTR("The path does not exist."), MESSAGE_ERROR);
memdelete(d);
+ get_ok()->set_disabled(true);
return "";
}
@@ -136,6 +154,7 @@ private:
set_message(TTR("Please choose a 'project.godot' file."), MESSAGE_ERROR);
memdelete(d);
+ get_ok()->set_disabled(true);
return "";
}
@@ -155,19 +174,22 @@ private:
d->list_dir_end();
if (!is_empty) {
+
set_message(TTR("Your project will be created in a non empty folder (you might want to create a new folder)."), MESSAGE_WARNING);
+ memdelete(d);
+ get_ok()->set_disabled(false);
+ return valid_path;
}
- } else {
-
- if (d->file_exists("project.godot")) {
+ } else if (d->file_exists("project.godot")) {
- set_message(TTR("Please choose a folder that does not contain a 'project.godot' file."), MESSAGE_ERROR);
- memdelete(d);
- return "";
- }
+ set_message(TTR("Please choose a folder that does not contain a 'project.godot' file."), MESSAGE_ERROR);
+ memdelete(d);
+ get_ok()->set_disabled(true);
+ return "";
}
+ set_message(TTR("That's a BINGO!"));
memdelete(d);
get_ok()->set_disabled(false);
return valid_path;
@@ -213,7 +235,6 @@ private:
}
String sp = p.simplify_path();
project_path->set_text(sp);
- set_message(" "); // just so it does not disappear
get_ok()->call_deferred("grab_focus");
}
@@ -242,21 +263,32 @@ private:
void _create_folder() {
- if (project_name->get_text() == "" || created_folder_path != "") {
+ if (project_name->get_text() == "" || created_folder_path != "")
return;
- }
DirAccess *d = DirAccess::create(DirAccess::ACCESS_FILESYSTEM);
if (d->change_dir(project_path->get_text()) == OK) {
+
if (!d->dir_exists(project_name->get_text())) {
+
if (d->make_dir(project_name->get_text()) == OK) {
+
d->change_dir(project_name->get_text());
project_path->set_text(d->get_current_dir());
created_folder_path = d->get_current_dir();
create_dir->set_disabled(true);
+ } else {
+
+ dialog_error->set_text(TTR("Couldn't create folder."));
+ dialog_error->popup_centered_minsize();
}
+ } else {
+
+ dialog_error->set_text(TTR("There is already a folder in this path with the specified name."));
+ dialog_error->popup_centered_minsize();
}
}
+
memdelete(d);
}
@@ -337,6 +369,7 @@ private:
if (!pkg) {
dialog_error->set_text(TTR("Error opening package file, not in zip format."));
+ dialog_error->popup_centered_minsize();
return;
}
@@ -448,7 +481,10 @@ private:
}
void _toggle_message() {
+
msg->set_visible(!msg->is_visible());
+ if (!msg->is_visible())
+ set_size(Size2(500, 0) * EDSCALE);
}
void cancel_pressed() {
@@ -457,6 +493,15 @@ private:
project_path->clear();
project_name->clear();
+
+ if (status_btn->get_icon() == get_icon("StatusError", "EditorIcons"))
+ msg->show();
+ }
+
+ void _notification(int p_what) {
+
+ if (p_what == MainLoop::NOTIFICATION_WM_QUIT_REQUEST)
+ _remove_created_folder();
}
protected:
@@ -558,7 +603,7 @@ public:
_test_path();
}
- popup_centered(Size2(500, 125) * EDSCALE);
+ popup_centered(Size2(500, 0) * EDSCALE);
}
ProjectDialog() {
@@ -610,7 +655,6 @@ public:
pphb->add_child(browse);
msg = memnew(Label);
- msg->set_text(TTR("That's a BINGO!"));
msg->set_align(Label::ALIGN_CENTER);
msg->hide();
vb->add_child(msg);
@@ -652,19 +696,20 @@ struct ProjectItem {
void ProjectManager::_notification(int p_what) {
- if (p_what == NOTIFICATION_ENTER_TREE) {
-
- Engine::get_singleton()->set_editor_hint(false);
-
- } else if (p_what == NOTIFICATION_READY) {
+ switch (p_what) {
+ case NOTIFICATION_ENTER_TREE: {
- if (scroll_childs->get_child_count() == 0) {
- open_templates->popup_centered_minsize();
- }
+ Engine::get_singleton()->set_editor_hint(false);
+ } break;
+ case NOTIFICATION_READY: {
- } else if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
+ if (scroll_childs->get_child_count() == 0)
+ open_templates->popup_centered_minsize();
+ } break;
+ case NOTIFICATION_VISIBILITY_CHANGED: {
- set_process_unhandled_input(is_visible_in_tree());
+ set_process_unhandled_input(is_visible_in_tree());
+ } break;
}
}
@@ -1039,9 +1084,9 @@ void ProjectManager::_load_recent_projects() {
favorite->set_normal_texture(favorite_icon);
if (!is_favorite)
favorite->set_modulate(Color(1, 1, 1, 0.2));
- favorite->set_v_size_flags(SIZE_EXPAND);
favorite->connect("pressed", this, "_favorite_pressed", varray(hb));
favorite_box->add_child(favorite);
+ favorite_box->set_alignment(BoxContainer::ALIGN_CENTER);
hb->add_child(favorite_box);
TextureRect *tf = memnew(TextureRect);
@@ -1214,7 +1259,6 @@ 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
}
void ProjectManager::_run_project() {
@@ -1496,7 +1540,7 @@ ProjectManager::ProjectManager() {
String cp;
cp.push_back(0xA9);
cp.push_back(0);
- OS::get_singleton()->set_window_title(VERSION_NAME + String(" - ") + TTR("Project Manager") + " - " + cp + " 2008-2017 Juan Linietsky, Ariel Manzur & Godot Contributors");
+ OS::get_singleton()->set_window_title(VERSION_NAME + String(" - ") + TTR("Project Manager") + " - " + cp + " 2007-2018 Juan Linietsky, Ariel Manzur & Godot Contributors");
HBoxContainer *top_hb = memnew(HBoxContainer);
vb->add_child(top_hb);
@@ -1556,9 +1600,6 @@ ProjectManager::ProjectManager() {
scroll_childs->set_h_size_flags(SIZE_EXPAND_FILL);
scroll->add_child(scroll_childs);
- //HBoxContainer *hb = memnew( HBoxContainer );
- //vb->add_child(hb);
-
Button *open = memnew(Button);
open->set_text(TTR("Edit"));
tree_vb->add_child(open);
@@ -1663,7 +1704,7 @@ ProjectManager::ProjectManager() {
cancel->connect("pressed", this, "_exit_dialog");
vb->add_child(cc);
- //
+ //////////////////////////////////////////////////////////////
language_restart_ask = memnew(ConfirmationDialog);
language_restart_ask->get_ok()->set_text(TTR("Restart Now"));
@@ -1772,12 +1813,9 @@ void ProjectListFilter::_filter_option_selected(int p_idx) {
}
void ProjectListFilter::_notification(int p_what) {
- switch (p_what) {
- case NOTIFICATION_ENTER_TREE: {
- clear_search_button->set_icon(get_icon("Close", "EditorIcons"));
- } break;
- }
+ if (p_what == NOTIFICATION_ENTER_TREE)
+ clear_search_button->set_icon(get_icon("Close", "EditorIcons"));
}
void ProjectListFilter::_bind_methods() {
diff --git a/editor/project_manager.h b/editor/project_manager.h
index 4080f1df22..7fc938f660 100644
--- a/editor/project_manager.h
+++ b/editor/project_manager.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/project_settings_editor.cpp b/editor/project_settings_editor.cpp
index e69577489e..06befe8f3c 100644
--- a/editor/project_settings_editor.cpp
+++ b/editor/project_settings_editor.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/project_settings_editor.h b/editor/project_settings_editor.h
index dbca158133..be5a51dd45 100644
--- a/editor/project_settings_editor.h
+++ b/editor/project_settings_editor.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/property_editor.cpp b/editor/property_editor.cpp
index 64351dec4f..1dcc5a3231 100644
--- a/editor/property_editor.cpp
+++ b/editor/property_editor.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -335,6 +335,8 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
easing_draw->hide();
spinbox->hide();
slider->hide();
+ menu->clear();
+ menu->set_size(Size2(1, 1) * EDSCALE);
for (int i = 0; i < MAX_VALUE_EDITORS; i++) {
@@ -413,7 +415,6 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
} else if (hint == PROPERTY_HINT_ENUM) {
- menu->clear();
Vector<String> options = hint_text.split(",");
for (int i = 0; i < options.size(); i++) {
if (options[i].find(":") != -1) {
@@ -494,7 +495,6 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
easing_draw->show();
set_size(Size2(200, 150) * EDSCALE);
} else if (hint == PROPERTY_HINT_FLAGS) {
- menu->clear();
Vector<String> flags = hint_text.split(",");
for (int i = 0; i < flags.size(); i++) {
String flag = flags[i];
@@ -536,7 +536,6 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
config_action_buttons(names);
} else if (hint == PROPERTY_HINT_ENUM) {
- menu->clear();
Vector<String> options = hint_text.split(",");
for (int i = 0; i < options.size(); i++) {
menu->add_item(options[i], i);
@@ -869,9 +868,6 @@ bool CustomPropertyEditor::edit(Object *p_owner, const String &p_name, Variant::
if (hint != PROPERTY_HINT_RESOURCE_TYPE)
break;
- menu->clear();
- menu->set_size(Size2(1, 1) * EDSCALE);
-
if (p_name == "script" && hint_text == "Script" && Object::cast_to<Node>(owner)) {
menu->add_icon_item(get_icon("Script", "EditorIcons"), TTR("New Script"), OBJ_MENU_NEW_SCRIPT);
menu->add_separator();
@@ -1764,24 +1760,40 @@ void CustomPropertyEditor::_focus_exit() {
void CustomPropertyEditor::config_action_buttons(const List<String> &p_strings) {
- int cell_width = 60;
- int cell_height = 25;
- int cell_margin = 5;
+ Ref<StyleBox> sb = get_stylebox("panel");
+ int margin_top = sb->get_margin(MARGIN_TOP);
+ int margin_left = sb->get_margin(MARGIN_LEFT);
+ int margin_bottom = sb->get_margin(MARGIN_BOTTOM);
+ int margin_right = sb->get_margin(MARGIN_RIGHT);
- set_size(Size2(cell_margin + (cell_width + cell_margin) * p_strings.size(), (cell_margin * 2) + cell_height) * EDSCALE);
+ int max_width = 0;
+ int height = 0;
for (int i = 0; i < MAX_ACTION_BUTTONS; i++) {
if (i < p_strings.size()) {
+
action_buttons[i]->show();
action_buttons[i]->set_text(p_strings[i]);
- action_buttons[i]->set_position(Point2(cell_margin + (cell_width + cell_margin) * i, cell_margin) * EDSCALE);
- action_buttons[i]->set_size(Size2(cell_width, cell_height - cell_margin * 2) * EDSCALE);
- action_buttons[i]->set_flat(true);
+
+ Size2 btn_m_size = action_buttons[i]->get_minimum_size();
+ if (btn_m_size.width > max_width)
+ max_width = btn_m_size.width;
+
} else {
action_buttons[i]->hide();
}
}
+
+ for (int i = 0; i < p_strings.size(); i++) {
+
+ Size2 btn_m_size = action_buttons[i]->get_size();
+ action_buttons[i]->set_position(Point2(0, height) + Point2(margin_left, margin_top));
+ action_buttons[i]->set_size(Size2(max_width, btn_m_size.height));
+
+ height += btn_m_size.height;
+ }
+ set_size(Size2(max_width, height) + Size2(margin_left + margin_right, margin_top + margin_bottom));
}
void CustomPropertyEditor::config_value_editors(int p_amount, int p_columns, int p_label_w, const List<String> &p_strings) {
@@ -1902,6 +1914,7 @@ CustomPropertyEditor::CustomPropertyEditor() {
Vector<Variant> binds;
binds.push_back(i);
action_buttons[i]->connect("pressed", this, "_action_pressed", binds);
+ action_buttons[i]->set_flat(true);
}
color_picker = NULL;
@@ -3956,11 +3969,13 @@ void PropertyEditor::_edit_button(Object *p_item, int p_column, int p_button) {
if (t == Variant::NODE_PATH) {
Variant v = obj->get(n);
- custom_editor->edit(obj, n, (Variant::Type)t, v, h, ht);
Rect2 where = tree->get_item_rect(ti, 1);
where.position -= tree->get_scroll();
- where.position += tree->get_global_position();
+ where.position += tree->get_global_position() + Point2(where.size.width, 0);
+ for (int i = ti->get_button_count(p_column) - 1; i >= p_button; i--)
+ where.position.x -= ti->get_button(p_column, i)->get_width();
custom_editor->set_position(where.position);
+ custom_editor->edit(obj, n, (Variant::Type)t, v, h, ht);
custom_editor->popup();
} else if (t == Variant::STRING) {
@@ -3971,7 +3986,9 @@ void PropertyEditor::_edit_button(Object *p_item, int p_column, int p_button) {
Rect2 where = tree->get_item_rect(ti, 1);
where.position -= tree->get_scroll();
- where.position += tree->get_global_position();
+ where.position += tree->get_global_position() + Point2(where.size.width, 0);
+ for (int i = ti->get_button_count(p_column) - 1; i >= p_button; i--)
+ where.position.x -= ti->get_button(p_column, i)->get_width();
custom_editor->set_position(where.position);
custom_editor->popup();
} else {
diff --git a/editor/property_editor.h b/editor/property_editor.h
index 115ce07339..bd088ad0f6 100644
--- a/editor/property_editor.h
+++ b/editor/property_editor.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/property_selector.cpp b/editor/property_selector.cpp
index 77b73e4635..eac5e2efd7 100644
--- a/editor/property_selector.cpp
+++ b/editor/property_selector.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/property_selector.h b/editor/property_selector.h
index eb745d776f..1f6903de20 100644
--- a/editor/property_selector.h
+++ b/editor/property_selector.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/pvrtc_compress.cpp b/editor/pvrtc_compress.cpp
index 575ff40287..aace3e895b 100644
--- a/editor/pvrtc_compress.cpp
+++ b/editor/pvrtc_compress.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/pvrtc_compress.h b/editor/pvrtc_compress.h
index cd11f260fe..2d626aa9ef 100644
--- a/editor/pvrtc_compress.h
+++ b/editor/pvrtc_compress.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/quick_open.cpp b/editor/quick_open.cpp
index 4bcbe073ee..c2a194ebaf 100644
--- a/editor/quick_open.cpp
+++ b/editor/quick_open.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/quick_open.h b/editor/quick_open.h
index 5b91965920..52f9c08ae6 100644
--- a/editor/quick_open.h
+++ b/editor/quick_open.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/register_exporters.h b/editor/register_exporters.h
index fefa1477b8..9645ffddea 100644
--- a/editor/register_exporters.h
+++ b/editor/register_exporters.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/reparent_dialog.cpp b/editor/reparent_dialog.cpp
index 5e765fe70f..7aa8d849e6 100644
--- a/editor/reparent_dialog.cpp
+++ b/editor/reparent_dialog.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/reparent_dialog.h b/editor/reparent_dialog.h
index 667c7fe705..2f185b3d88 100644
--- a/editor/reparent_dialog.h
+++ b/editor/reparent_dialog.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/run_settings_dialog.cpp b/editor/run_settings_dialog.cpp
index a76e94a173..dede4c6dc8 100644
--- a/editor/run_settings_dialog.cpp
+++ b/editor/run_settings_dialog.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/run_settings_dialog.h b/editor/run_settings_dialog.h
index 225d5ee085..f9c09b06c2 100644
--- a/editor/run_settings_dialog.h
+++ b/editor/run_settings_dialog.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/scene_tree_dock.cpp b/editor/scene_tree_dock.cpp
index a107bea820..e7da78a35c 100644
--- a/editor/scene_tree_dock.cpp
+++ b/editor/scene_tree_dock.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -307,7 +307,7 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
} break;
case TOOL_REPLACE: {
- create_dialog->popup_create(false);
+ create_dialog->popup_create(false, true);
} break;
case TOOL_ATTACH_SCRIPT: {
@@ -417,7 +417,6 @@ void SceneTreeDock::_tool_selected(int p_tool, bool p_confirm_override) {
if (editor_selection->is_selected(edited_scene)) {
current_option = -1;
- //accept->get_cancel()->hide();
accept->get_ok()->set_text(TTR("I see.."));
accept->set_text(TTR("This operation can't be done on the tree root."));
accept->popup_centered_minsize();
@@ -1360,6 +1359,7 @@ void SceneTreeDock::_create() {
editor_data->get_undo_redo().commit_action();
editor->push_item(c);
editor_selection->clear();
+ editor_selection->add_node(child);
if (Object::cast_to<Control>(c)) {
//make editor more comfortable, so some controls don't appear super shrunk
Control *ct = Object::cast_to<Control>(c);
diff --git a/editor/scene_tree_dock.h b/editor/scene_tree_dock.h
index 6a281bb7e8..0a5b20ed9c 100644
--- a/editor/scene_tree_dock.h
+++ b/editor/scene_tree_dock.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/scene_tree_editor.cpp b/editor/scene_tree_editor.cpp
index 827e8d9ee4..957f50a052 100644
--- a/editor/scene_tree_editor.cpp
+++ b/editor/scene_tree_editor.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/scene_tree_editor.h b/editor/scene_tree_editor.h
index 88d60f9b8a..542b32d4cd 100644
--- a/editor/scene_tree_editor.h
+++ b/editor/scene_tree_editor.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/script_create_dialog.cpp b/editor/script_create_dialog.cpp
index 97f442b0ec..96863a59d2 100644
--- a/editor/script_create_dialog.cpp
+++ b/editor/script_create_dialog.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -232,7 +232,7 @@ void ScriptCreateDialog::_lang_changed(int l) {
String path = file_path->get_text();
String extension = "";
if (path != "") {
- if (path.find(".") >= 0) {
+ if (path.find(".") != -1) {
extension = path.get_extension();
}
@@ -359,16 +359,14 @@ void ScriptCreateDialog::_path_changed(const String &p_path) {
return;
}
- if (p.find("/") || p.find("\\")) {
- DirAccess *d = DirAccess::create(DirAccess::ACCESS_RESOURCES);
- if (d->change_dir(p.get_base_dir()) != OK) {
- _msg_path_valid(false, TTR("Invalid base path"));
- memdelete(d);
- _update_dialog();
- return;
- }
+ DirAccess *d = DirAccess::create(DirAccess::ACCESS_RESOURCES);
+ if (d->change_dir(p.get_base_dir()) != OK) {
+ _msg_path_valid(false, TTR("Invalid base path"));
memdelete(d);
+ _update_dialog();
+ return;
}
+ memdelete(d);
/* Does file already exist */
diff --git a/editor/script_create_dialog.h b/editor/script_create_dialog.h
index 1cff9871d8..882e4796f9 100644
--- a/editor/script_create_dialog.h
+++ b/editor/script_create_dialog.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/script_editor_debugger.cpp b/editor/script_editor_debugger.cpp
index a1c1ec3351..f1a5aa4654 100644
--- a/editor/script_editor_debugger.cpp
+++ b/editor/script_editor_debugger.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -1686,6 +1686,45 @@ void ScriptEditorDebugger::_clear_remote_objects() {
remote_objects.clear();
}
+void ScriptEditorDebugger::_clear_errors_list() {
+
+ error_list->clear();
+ error_count = 0;
+ _notification(NOTIFICATION_PROCESS);
+}
+
+// Right click on specific file(s) or folder(s).
+void ScriptEditorDebugger::_error_list_item_rmb_selected(int p_item, const Vector2 &p_pos) {
+
+ item_menu->clear();
+ item_menu->set_size(Size2(1, 1));
+
+ // Allow specific actions only on one item.
+ bool single_item_selected = error_list->get_selected_items().size() == 1;
+
+ if (single_item_selected) {
+ item_menu->add_icon_item(get_icon("CopyNodePath", "EditorIcons"), TTR("Copy Error"), ITEM_MENU_COPY_ERROR);
+ }
+
+ if (item_menu->get_item_count() > 0) {
+ item_menu->set_position(error_list->get_global_position() + p_pos);
+ item_menu->popup();
+ }
+}
+
+void ScriptEditorDebugger::_item_menu_id_pressed(int p_option) {
+
+ switch (p_option) {
+
+ case ITEM_MENU_COPY_ERROR: {
+ String title = error_list->get_item_text(error_list->get_current());
+ String desc = error_list->get_item_tooltip(error_list->get_current());
+
+ OS::get_singleton()->set_clipboard(title + "\n----------\n" + desc);
+ } break;
+ }
+}
+
void ScriptEditorDebugger::_bind_methods() {
ClassDB::bind_method(D_METHOD("_stack_dump_frame_selected"), &ScriptEditorDebugger::_stack_dump_frame_selected);
@@ -1705,6 +1744,10 @@ void ScriptEditorDebugger::_bind_methods() {
ClassDB::bind_method(D_METHOD("_error_stack_selected"), &ScriptEditorDebugger::_error_stack_selected);
ClassDB::bind_method(D_METHOD("_profiler_activate"), &ScriptEditorDebugger::_profiler_activate);
ClassDB::bind_method(D_METHOD("_profiler_seeked"), &ScriptEditorDebugger::_profiler_seeked);
+ ClassDB::bind_method(D_METHOD("_clear_errors_list"), &ScriptEditorDebugger::_clear_errors_list);
+
+ ClassDB::bind_method(D_METHOD("_error_list_item_rmb_selected"), &ScriptEditorDebugger::_error_list_item_rmb_selected);
+ ClassDB::bind_method(D_METHOD("_item_menu_id_pressed"), &ScriptEditorDebugger::_item_menu_id_pressed);
ClassDB::bind_method(D_METHOD("_paused"), &ScriptEditorDebugger::_paused);
@@ -1829,9 +1872,31 @@ ScriptEditorDebugger::ScriptEditorDebugger(EditorNode *p_editor) {
error_split = memnew(HSplitContainer);
VBoxContainer *errvb = memnew(VBoxContainer);
+ HBoxContainer *errhb = memnew(HBoxContainer);
errvb->set_h_size_flags(SIZE_EXPAND_FILL);
+ Label *velb = memnew(Label(TTR("Errors:")));
+ velb->set_h_size_flags(SIZE_EXPAND_FILL);
+ errhb->add_child(velb);
+
+ clearbutton = memnew(Button);
+ clearbutton->set_text(TTR("Clear"));
+ clearbutton->connect("pressed", this, "_clear_errors_list");
+ errhb->add_child(clearbutton);
+ errvb->add_child(errhb);
+
error_list = memnew(ItemList);
- errvb->add_margin_child(TTR("Errors:"), error_list, true);
+ error_list->set_v_size_flags(SIZE_EXPAND_FILL);
+ error_list->set_h_size_flags(SIZE_EXPAND_FILL);
+ error_list->connect("item_rmb_selected", this, "_error_list_item_rmb_selected");
+ error_list->set_allow_rmb_select(true);
+ error_list->set_autoscroll_to_bottom(true);
+
+ item_menu = memnew(PopupMenu);
+ item_menu->connect("id_pressed", this, "_item_menu_id_pressed");
+ error_list->add_child(item_menu);
+
+ errvb->add_child(error_list);
+
error_split->add_child(errvb);
errvb = memnew(VBoxContainer);
diff --git a/editor/script_editor_debugger.h b/editor/script_editor_debugger.h
index 82dcba469c..7f8348d82f 100644
--- a/editor/script_editor_debugger.h
+++ b/editor/script_editor_debugger.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -62,6 +62,10 @@ class ScriptEditorDebugger : public Control {
MESSAGE_SUCCESS,
};
+ enum ItemMenu {
+ ITEM_MENU_COPY_ERROR,
+ };
+
AcceptDialog *msgdialog;
Button *debugger_button;
@@ -85,6 +89,8 @@ class ScriptEditorDebugger : public Control {
ItemList *error_list;
ItemList *error_stack;
Tree *inspect_scene_tree;
+ Button *clearbutton;
+ PopupMenu *item_menu;
int error_count;
int last_error_count;
@@ -175,6 +181,10 @@ class ScriptEditorDebugger : public Control {
void _set_remote_object(ObjectID p_id, ScriptEditorDebuggerInspectedObject *p_obj);
void _clear_remote_objects();
+ void _clear_errors_list();
+
+ void _error_list_item_rmb_selected(int p_item, const Vector2 &p_pos);
+ void _item_menu_id_pressed(int p_option);
protected:
void _notification(int p_what);
diff --git a/editor/settings_config_dialog.cpp b/editor/settings_config_dialog.cpp
index 2bdc824248..1919504b5c 100644
--- a/editor/settings_config_dialog.cpp
+++ b/editor/settings_config_dialog.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
@@ -61,6 +61,8 @@ void EditorSettingsDialog::_settings_property_edited(const String &p_name) {
property_editor->get_property_editor()->update_tree();
} else if (full_name == "interface/theme/accent_color" || full_name == "interface/theme/base_color" || full_name == "interface/theme/contrast") {
EditorSettings::get_singleton()->set_manually("interface/theme/preset", 6); // set preset to Custom
+ } else if (full_name.begins_with("text_editor/highlighting")) {
+ EditorSettings::get_singleton()->set_manually("text_editor/theme/color_theme", "Custom");
}
}
diff --git a/editor/settings_config_dialog.h b/editor/settings_config_dialog.h
index 64b8833821..6925de0777 100644
--- a/editor/settings_config_dialog.h
+++ b/editor/settings_config_dialog.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/spatial_editor_gizmos.cpp b/editor/spatial_editor_gizmos.cpp
index 1a3ab309f7..b06d25d8ee 100644
--- a/editor/spatial_editor_gizmos.cpp
+++ b/editor/spatial_editor_gizmos.cpp
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/spatial_editor_gizmos.h b/editor/spatial_editor_gizmos.h
index 7bf632d371..240d2145c1 100644
--- a/editor/spatial_editor_gizmos.h
+++ b/editor/spatial_editor_gizmos.h
@@ -5,8 +5,8 @@
/* GODOT ENGINE */
/* https://godotengine.org */
/*************************************************************************/
-/* Copyright (c) 2007-2017 Juan Linietsky, Ariel Manzur. */
-/* Copyright (c) 2014-2017 Godot Engine contributors (cf. AUTHORS.md) */
+/* Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur. */
+/* Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md) */
/* */
/* Permission is hereby granted, free of charge, to any person obtaining */
/* a copy of this software and associated documentation files (the */
diff --git a/editor/translations/af.po b/editor/translations/af.po
index 86d5294a57..cfe5cdc24e 100644
--- a/editor/translations/af.po
+++ b/editor/translations/af.po
@@ -1,6 +1,6 @@
# Afrikaans translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Ray West <the.raxar@gmail.com>, 2017.
diff --git a/editor/translations/ar.po b/editor/translations/ar.po
index ccf40c8316..908f49ab94 100644
--- a/editor/translations/ar.po
+++ b/editor/translations/ar.po
@@ -1,6 +1,6 @@
# Arabic translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# athomield <athomield@hotmail.com>, 2017.
diff --git a/editor/translations/bg.po b/editor/translations/bg.po
index 3fbb7b4339..001ec0f321 100644
--- a/editor/translations/bg.po
+++ b/editor/translations/bg.po
@@ -1,6 +1,6 @@
# Bulgarian translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Bojidar Marinov <bojidar.marinov.bg@gmail.com>, 2016.
diff --git a/editor/translations/bn.po b/editor/translations/bn.po
index 99dbbf427b..63719c1a8b 100644
--- a/editor/translations/bn.po
+++ b/editor/translations/bn.po
@@ -1,6 +1,6 @@
# Bengali translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Abu Md. Maruf Sarker <maruf.webdev@gmail.com>, 2016-2017.
diff --git a/editor/translations/ca.po b/editor/translations/ca.po
index 9f6e600978..6c30c703c1 100644
--- a/editor/translations/ca.po
+++ b/editor/translations/ca.po
@@ -1,6 +1,6 @@
# Catalan translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# BennyBeat <bennybeat@gmail.com>, 2017.
diff --git a/editor/translations/cs.po b/editor/translations/cs.po
index cfc390fd24..5cf6103dcc 100644
--- a/editor/translations/cs.po
+++ b/editor/translations/cs.po
@@ -1,6 +1,6 @@
# Czech translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Fadex <vitekpaulik@gmail.com>, 2017.
diff --git a/editor/translations/da.po b/editor/translations/da.po
index 66434011a7..8c7d899ea2 100644
--- a/editor/translations/da.po
+++ b/editor/translations/da.po
@@ -1,6 +1,6 @@
# Danish translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# David Lamhauge <davidlamhauge@gmail.com>, 2016.
diff --git a/editor/translations/de.po b/editor/translations/de.po
index 5dc85b2c40..14316d4862 100644
--- a/editor/translations/de.po
+++ b/editor/translations/de.po
@@ -1,6 +1,6 @@
# German translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Alexander Mahr <alex.mahr@gmail.com>, 2016.
diff --git a/editor/translations/de_CH.po b/editor/translations/de_CH.po
index 48cc0b9c7b..52cf8a1ec4 100644
--- a/editor/translations/de_CH.po
+++ b/editor/translations/de_CH.po
@@ -1,6 +1,6 @@
# Swiss High German translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Christian Fisch <christian.fiesel@gmail.com>, 2016.
diff --git a/editor/translations/editor.pot b/editor/translations/editor.pot
index d21bbc374a..20ded4a4fb 100644
--- a/editor/translations/editor.pot
+++ b/editor/translations/editor.pot
@@ -1,6 +1,6 @@
# LANGUAGE translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
diff --git a/editor/translations/el.po b/editor/translations/el.po
index f0c3fd284b..6b63d8eef8 100644
--- a/editor/translations/el.po
+++ b/editor/translations/el.po
@@ -1,6 +1,6 @@
# Greek translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# George Tsiamasiotis <gtsiam@windowslive.com>, 2017.
diff --git a/editor/translations/es.po b/editor/translations/es.po
index 0e82da23b9..328e50d9f2 100644
--- a/editor/translations/es.po
+++ b/editor/translations/es.po
@@ -1,6 +1,6 @@
# Spanish translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Addiel Lucena Perez <addiell2017@gmail.com>, 2017.
diff --git a/editor/translations/es_AR.po b/editor/translations/es_AR.po
index eacbe22f45..a97f2361cc 100644
--- a/editor/translations/es_AR.po
+++ b/editor/translations/es_AR.po
@@ -1,6 +1,6 @@
# Spanish (Argentina) translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Diego López <diegodario21@gmail.com>, 2017.
diff --git a/editor/translations/extract.py b/editor/translations/extract.py
index 5e6c894936..bbc157788d 100755
--- a/editor/translations/extract.py
+++ b/editor/translations/extract.py
@@ -38,8 +38,8 @@ unique_str = []
unique_loc = {}
main_po = """
# LANGUAGE translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# FIRST AUTHOR <EMAIL@ADDRESS>, YEAR.
diff --git a/editor/translations/fa.po b/editor/translations/fa.po
index a3ac63f911..ec548d97ae 100644
--- a/editor/translations/fa.po
+++ b/editor/translations/fa.po
@@ -1,6 +1,6 @@
# Persian translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# alabd14313 <alabd14313@yahoo.com>, 2016.
diff --git a/editor/translations/fi.po b/editor/translations/fi.po
index 751c5a9718..f0a58b9e1c 100644
--- a/editor/translations/fi.po
+++ b/editor/translations/fi.po
@@ -1,6 +1,6 @@
# Finnish translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# basse <basse@roiske.org>, 2017.
diff --git a/editor/translations/fr.po b/editor/translations/fr.po
index dcfa996ee5..396dc01a02 100644
--- a/editor/translations/fr.po
+++ b/editor/translations/fr.po
@@ -1,6 +1,6 @@
# French translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Antoine Carrier <ac.g392@gmail.com>, 2017.
diff --git a/editor/translations/he.po b/editor/translations/he.po
index b4fbcb9123..032e8bcac7 100644
--- a/editor/translations/he.po
+++ b/editor/translations/he.po
@@ -1,6 +1,6 @@
# Hebrew translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Ben Golan <golanben4@gmail.com>, 2017.
diff --git a/editor/translations/hi.po b/editor/translations/hi.po
index 4b77c00e83..2da7f0fed1 100644
--- a/editor/translations/hi.po
+++ b/editor/translations/hi.po
@@ -1,6 +1,6 @@
# Hindi translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Abhas Kumar Sinha <abhaskumarsinha@gmail.com>, 2017.
diff --git a/editor/translations/hu.po b/editor/translations/hu.po
index aec0003e77..9f38422bbc 100644
--- a/editor/translations/hu.po
+++ b/editor/translations/hu.po
@@ -1,6 +1,6 @@
# Hungarian translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Nagy Lajos <neutron9707@gmail.com>, 2017.
diff --git a/editor/translations/id.po b/editor/translations/id.po
index 137e404750..e739435ee9 100644
--- a/editor/translations/id.po
+++ b/editor/translations/id.po
@@ -1,6 +1,6 @@
# Indonesian translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Abdul Aziz Muslim Alqudsy <abdul.aziz.muslim.alqudsy@gmail.com>, 2016.
diff --git a/editor/translations/is.po b/editor/translations/is.po
index 56baed878b..33e2f9ad3f 100644
--- a/editor/translations/is.po
+++ b/editor/translations/is.po
@@ -1,6 +1,6 @@
# Icelandic translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Jóhannes G. Þorsteinsson <johannesg@johannesg.com>, 2017.
diff --git a/editor/translations/it.po b/editor/translations/it.po
index 251c29c110..974e667dfb 100644
--- a/editor/translations/it.po
+++ b/editor/translations/it.po
@@ -1,6 +1,6 @@
# Italian translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Dario Bonfanti <bonfi.96@hotmail.it>, 2016-2017.
diff --git a/editor/translations/ja.po b/editor/translations/ja.po
index f440ad85f4..66b9115692 100644
--- a/editor/translations/ja.po
+++ b/editor/translations/ja.po
@@ -1,6 +1,6 @@
# Japanese translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# akirakido <achts.y@gmail.com>, 2016-2017.
diff --git a/editor/translations/ko.po b/editor/translations/ko.po
index 249f8bff9e..743f32a9e6 100644
--- a/editor/translations/ko.po
+++ b/editor/translations/ko.po
@@ -1,6 +1,6 @@
# Korean translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# 박한얼 (volzhs) <volzhs@gmail.com>, 2016-2017.
diff --git a/editor/translations/lt.po b/editor/translations/lt.po
index f51aeb7e23..49858d179f 100644
--- a/editor/translations/lt.po
+++ b/editor/translations/lt.po
@@ -1,6 +1,6 @@
# Lithuanian translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Ignas Kiela <ignaskiela@super.lt>, 2017.
diff --git a/editor/translations/nb.po b/editor/translations/nb.po
index b64f7bcf09..5843a0797c 100644
--- a/editor/translations/nb.po
+++ b/editor/translations/nb.po
@@ -1,6 +1,6 @@
# Norwegian Bokmål translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Allan Nordhøy <epost@anotheragency.no>, 2017.
diff --git a/editor/translations/nl.po b/editor/translations/nl.po
index f80b7e1dac..7d84e04306 100644
--- a/editor/translations/nl.po
+++ b/editor/translations/nl.po
@@ -1,6 +1,6 @@
# Dutch translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# aelspire <aelspire@gmail.com>, 2017.
diff --git a/editor/translations/pl.po b/editor/translations/pl.po
index 498b06136a..cc543c97bb 100644
--- a/editor/translations/pl.po
+++ b/editor/translations/pl.po
@@ -1,6 +1,6 @@
# Polish translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# 8-bit Pixel <dawdejw@gmail.com>, 2016.
diff --git a/editor/translations/pr.po b/editor/translations/pr.po
index ba0b466386..8f649949e1 100644
--- a/editor/translations/pr.po
+++ b/editor/translations/pr.po
@@ -1,6 +1,6 @@
# Pirate translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Calum Knott <calum@calumk.com>, 2017.
diff --git a/editor/translations/pt_BR.po b/editor/translations/pt_BR.po
index 73dd892eda..a0f94fbb4f 100644
--- a/editor/translations/pt_BR.po
+++ b/editor/translations/pt_BR.po
@@ -1,6 +1,6 @@
# Portuguese (Brazil) translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Allyson Souza <allyson_as@outlook.com>, 2017.
diff --git a/editor/translations/pt_PT.po b/editor/translations/pt_PT.po
index cd254a8170..3fdb664e07 100644
--- a/editor/translations/pt_PT.po
+++ b/editor/translations/pt_PT.po
@@ -1,6 +1,6 @@
# Portuguese (Portugal) translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# António Sarmento <antonio.luis.sarmento@gmail.com>, 2016.
diff --git a/editor/translations/ru.po b/editor/translations/ru.po
index 3403a2789d..0dd2003fd3 100644
--- a/editor/translations/ru.po
+++ b/editor/translations/ru.po
@@ -1,6 +1,6 @@
# Russian translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# B10nicMachine <shumik1337@gmail.com>, 2017.
diff --git a/editor/translations/sk.po b/editor/translations/sk.po
index aaa15bab4b..83201baab1 100644
--- a/editor/translations/sk.po
+++ b/editor/translations/sk.po
@@ -1,6 +1,6 @@
# Slovak translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# J08nY <johnenter@gmail.com>, 2016.
diff --git a/editor/translations/sl.po b/editor/translations/sl.po
index 6856af3469..07b74c1367 100644
--- a/editor/translations/sl.po
+++ b/editor/translations/sl.po
@@ -1,6 +1,6 @@
# Slovenian translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# matevž lapajne <sivar.lapajne@gmail.com>, 2016-2017.
diff --git a/editor/translations/sr_Cyrl.po b/editor/translations/sr_Cyrl.po
index d1732b1d1c..06b90e8b70 100644
--- a/editor/translations/sr_Cyrl.po
+++ b/editor/translations/sr_Cyrl.po
@@ -1,6 +1,6 @@
# Serbian (cyrillic) translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Александар Урошевић <nicecubedude@gmail.com>, 2017.
diff --git a/editor/translations/sv.po b/editor/translations/sv.po
index 2fdcab409f..6eb50bacf1 100644
--- a/editor/translations/sv.po
+++ b/editor/translations/sv.po
@@ -1,6 +1,6 @@
# Swedish translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# bergmarklund <davemcgroin@gmail.com>, 2017.
diff --git a/editor/translations/ta.po b/editor/translations/ta.po
index 25a38597f4..30b6f45c0b 100644
--- a/editor/translations/ta.po
+++ b/editor/translations/ta.po
@@ -1,6 +1,6 @@
# Tamil translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Senthil Kumar K <logickumar@gmail.com>, 2017.
diff --git a/editor/translations/th.po b/editor/translations/th.po
index ccce3e16f9..69ba3b2279 100644
--- a/editor/translations/th.po
+++ b/editor/translations/th.po
@@ -1,6 +1,6 @@
# Thai translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Kaveeta Vivatchai <goodytong@gmail.com>, 2017.
diff --git a/editor/translations/tr.po b/editor/translations/tr.po
index ce0ef645dc..1a80028964 100644
--- a/editor/translations/tr.po
+++ b/editor/translations/tr.po
@@ -1,6 +1,6 @@
# Turkish translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Aprın Çor Tigin <kabusturk38@gmail.com>, 2016-2017.
diff --git a/editor/translations/uk.po b/editor/translations/uk.po
index 7d6eb9ce9f..de2ab23773 100644
--- a/editor/translations/uk.po
+++ b/editor/translations/uk.po
@@ -1,6 +1,6 @@
# Ukrainian translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Aleksandr <XpycT.TOP@gmail.com>, 2017.
diff --git a/editor/translations/ur_PK.po b/editor/translations/ur_PK.po
index 5b0708e977..8876d52ace 100644
--- a/editor/translations/ur_PK.po
+++ b/editor/translations/ur_PK.po
@@ -1,6 +1,6 @@
# Urdu (Pakistan) translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Muhammad Ali <ali@codeonion.com>, 2016.
diff --git a/editor/translations/vi.po b/editor/translations/vi.po
index 5aa4f10d06..89b1200f6b 100644
--- a/editor/translations/vi.po
+++ b/editor/translations/vi.po
@@ -1,6 +1,6 @@
# Vietnamese translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Hai Le <dark.hades.1102@gmail.com>, 2017.
diff --git a/editor/translations/zh_CN.po b/editor/translations/zh_CN.po
index c19be8aaec..e1ee53bf94 100644
--- a/editor/translations/zh_CN.po
+++ b/editor/translations/zh_CN.po
@@ -1,6 +1,6 @@
# Chinese (China) translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# 纯洁的坏蛋 <tqj.zyy@gmail.com>, 2016.
diff --git a/editor/translations/zh_HK.po b/editor/translations/zh_HK.po
index 9a36df351c..a4fd11fc40 100644
--- a/editor/translations/zh_HK.po
+++ b/editor/translations/zh_HK.po
@@ -1,6 +1,6 @@
# Chinese (Hong Kong) translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Wesley (zx-wt) <ZX_WT@ymail.com>, 2016-2017.
diff --git a/editor/translations/zh_TW.po b/editor/translations/zh_TW.po
index 4b17c01e15..1cd5d9a4a7 100644
--- a/editor/translations/zh_TW.po
+++ b/editor/translations/zh_TW.po
@@ -1,6 +1,6 @@
# Chinese (Taiwan) translation of the Godot Engine editor
-# Copyright (C) 2007-2017 Juan Linietsky, Ariel Manzur
-# Copyright (C) 2014-2017 Godot Engine contributors (cf. AUTHORS.md)
+# Copyright (c) 2007-2018 Juan Linietsky, Ariel Manzur.
+# Copyright (c) 2014-2018 Godot Engine contributors (cf. AUTHORS.md)
# This file is distributed under the same license as the Godot source code.
#
# Allen H <w84miracle@gmail.com>, 2017.