summaryrefslogtreecommitdiff
path: root/tools
diff options
context:
space:
mode:
Diffstat (limited to 'tools')
-rw-r--r--tools/doc/doc_data.cpp26
-rw-r--r--tools/doc/doc_data.h3
-rw-r--r--tools/editor/asset_library_editor_plugin.cpp66
-rw-r--r--tools/editor/asset_library_editor_plugin.h13
-rw-r--r--tools/editor/editor_file_dialog.cpp92
-rw-r--r--tools/editor/editor_import_export.cpp2
-rw-r--r--tools/editor/editor_node.cpp5
-rw-r--r--tools/editor/editor_settings.cpp6
-rw-r--r--tools/editor/io_plugins/editor_texture_import_plugin.cpp13
-rw-r--r--tools/editor/plugins/script_editor_plugin.cpp4
-rw-r--r--tools/editor/plugins/shader_editor_plugin.cpp3
11 files changed, 190 insertions, 43 deletions
diff --git a/tools/doc/doc_data.cpp b/tools/doc/doc_data.cpp
index 0c4751979c..e3689cf13d 100644
--- a/tools/doc/doc_data.cpp
+++ b/tools/doc/doc_data.cpp
@@ -36,6 +36,21 @@
#include "io/compression.h"
#include "scene/resources/theme.h"
+struct _ConstantComparator {
+
+ inline bool operator()(const DocData::ConstantDoc &a, const DocData::ConstantDoc &b) const {
+ String left_a = a.name.find("_") == -1 ? a.name : a.name.substr(0, a.name.find("_"));
+ String left_b = b.name.find("_") == -1 ? b.name : b.name.substr(0, b.name.find("_"));
+ if (left_a == left_b) // If they have the same prefix
+ if (a.value == b.value)
+ return a.name < b.name; // Sort by name if the values are the same
+ else
+ return a.value < b.value; // Sort by value otherwise
+ else
+ return left_a < left_b; // Sort by name if the prefixes aren't the same
+ }
+};
+
void DocData::merge_from(const DocData& p_data) {
for( Map<String,ClassDoc>::Element *E=class_list.front();E;E=E->next()) {
@@ -942,6 +957,8 @@ Error DocData::save(const String& p_path) {
_write_string(f,1,"</description>");
_write_string(f,1,"<methods>");
+ c.methods.sort();
+
for(int i=0;i<c.methods.size();i++) {
MethodDoc &m=c.methods[i];
@@ -984,6 +1001,8 @@ Error DocData::save(const String& p_path) {
if (c.properties.size()) {
_write_string(f,1,"<members>");
+ c.properties.sort();
+
for(int i=0;i<c.properties.size();i++) {
@@ -999,6 +1018,8 @@ Error DocData::save(const String& p_path) {
if (c.signals.size()) {
+ c.signals.sort();
+
_write_string(f,1,"<signals>");
for(int i=0;i<c.signals.size();i++) {
@@ -1025,6 +1046,8 @@ Error DocData::save(const String& p_path) {
_write_string(f,1,"<constants>");
+ c.constants.sort_custom<_ConstantComparator>();
+
for(int i=0;i<c.constants.size();i++) {
ConstantDoc &k=c.constants[i];
@@ -1037,6 +1060,9 @@ Error DocData::save(const String& p_path) {
_write_string(f,1,"</constants>");
if (c.theme_properties.size()) {
+
+ c.theme_properties.sort();
+
_write_string(f,1,"<theme_items>");
for(int i=0;i<c.theme_properties.size();i++) {
diff --git a/tools/doc/doc_data.h b/tools/doc/doc_data.h
index d1aebff4ce..7996071c74 100644
--- a/tools/doc/doc_data.h
+++ b/tools/doc/doc_data.h
@@ -67,6 +67,9 @@ public:
String name;
String type;
String description;
+ bool operator<(const PropertyDoc& p_prop) const {
+ return name<p_prop.name;
+ }
};
struct ClassDoc {
diff --git a/tools/editor/asset_library_editor_plugin.cpp b/tools/editor/asset_library_editor_plugin.cpp
index c571310ded..a2448921d7 100644
--- a/tools/editor/asset_library_editor_plugin.cpp
+++ b/tools/editor/asset_library_editor_plugin.cpp
@@ -227,11 +227,12 @@ void EditorAssetLibraryItemDescription::_preview_click(int p_id) {
}
}
-void EditorAssetLibraryItemDescription::configure(const String& p_title,int p_asset_id,const String& p_category,int p_category_id,const String& p_author,int p_author_id,int p_rating,const String& p_cost,int p_version,const String& p_version_string,const String& p_description,const String& p_download_url,const String& p_browse_url) {
+void EditorAssetLibraryItemDescription::configure(const String& p_title,int p_asset_id,const String& p_category,int p_category_id,const String& p_author,int p_author_id,int p_rating,const String& p_cost,int p_version,const String& p_version_string,const String& p_description,const String& p_download_url,const String& p_browse_url,const String& p_sha256_hash) {
asset_id=p_asset_id;
title=p_title;
download_url=p_download_url;
+ sha256=p_sha256_hash;
item->configure(p_title,p_asset_id,p_category,p_category_id,p_author,p_author_id,p_rating,p_cost);
description->clear();
description->add_text("Version: "+p_version_string+"\n");
@@ -358,9 +359,12 @@ void EditorAssetLibraryItemDownload::_http_download_completed(int p_status, int
if (p_code!=200) {
error_text=("Request failed, return code: "+itos(p_code));
status->set_text("Failed: "+itos(p_code));
- } else {
-
- //all good
+ } else if(sha256 != "") {
+ String download_sha256 = FileAccess::get_sha256(download->get_download_file());
+ if(sha256 != download_sha256) {
+ error_text="Bad download hash, assuming file has been tampered with.\nExpected: " + sha256 + "\nGot: " + download_sha256;
+ status->set_text("Failed sha256 hash check");
+ }
}
} break;
@@ -384,15 +388,15 @@ void EditorAssetLibraryItemDownload::_http_download_completed(int p_status, int
}
-void EditorAssetLibraryItemDownload::configure(const String& p_title,int p_asset_id,const Ref<Texture>& p_preview, const String& p_download_url) {
+void EditorAssetLibraryItemDownload::configure(const String& p_title,int p_asset_id,const Ref<Texture>& p_preview, const String& p_download_url, const String& p_sha256_hash) {
title->set_text(p_title);
icon->set_texture(p_preview);
asset_id=p_asset_id;
if (!p_preview.is_valid())
icon->set_texture(get_icon("GodotAssetDefault","EditorIcons"));
-
host=p_download_url;
+ sha256=p_sha256_hash;
asset_installer->connect("confirmed",this,"_close");
dismiss->set_normal_texture( get_icon("Close","EditorIcons"));
_make_request();
@@ -604,7 +608,7 @@ void EditorAssetLibrary::_install_asset() {
EditorAssetLibraryItemDownload * download = memnew( EditorAssetLibraryItemDownload );
downloads_hb->add_child(download);
- download->configure(description->get_title(),description->get_asset_id(),description->get_preview_icon(),description->get_download_url());
+ download->configure(description->get_title(),description->get_asset_id(),description->get_preview_icon(),description->get_download_url(),description->get_sha256());
}
@@ -624,6 +628,12 @@ const char* EditorAssetLibrary::sort_text[SORT_MAX]={
"Updated"
};
+const char* EditorAssetLibrary::support_key[SUPPORT_MAX]={
+ "official",
+ "community",
+ "testing"
+};
+
void EditorAssetLibrary::_select_author(int p_id) {
@@ -832,14 +842,43 @@ void EditorAssetLibrary::_request_image(ObjectID p_for,String p_image_url,ImageT
void EditorAssetLibrary::_repository_changed(int p_repository_id) {
host=repository->get_item_metadata(p_repository_id);
print_line(".." + host);
- _api_request("configure", REQUESTING_CONFIG);
+ if(templates_only) {
+ _api_request("configure", REQUESTING_CONFIG, "?type=project");
+ } else {
+ _api_request("configure", REQUESTING_CONFIG);
+ }
+}
+
+void EditorAssetLibrary::_support_toggled(int p_support) {
+ support->get_popup()->set_item_checked(p_support, !support->get_popup()->is_item_checked(p_support));
+ _search();
+}
+
+void EditorAssetLibrary::_rerun_search(int p_ignore) {
+ _search();
}
void EditorAssetLibrary::_search(int p_page) {
String args;
- args=String()+"?sort="+sort_key[sort->get_selected()];
+ if(templates_only) {
+ args += "?type=project&";
+ } else {
+ args += "?";
+ }
+ args+=String()+"sort="+sort_key[sort->get_selected()];
+
+
+ String support_list;
+ for(int i = 0; i < SUPPORT_MAX; i++) {
+ if(support->get_popup()->is_item_checked(i)) {
+ support_list += String(support_key[i]) + "+";
+ }
+ }
+ if(support_list != String()) {
+ args += "&support=" + support_list.substr(0, support_list.length() - 1);
+ }
if (categories->get_selected()>0) {
@@ -1134,6 +1173,7 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
ERR_FAIL_COND(!r.has("cost"));
ERR_FAIL_COND(!r.has("description"));
ERR_FAIL_COND(!r.has("download_url"));
+ ERR_FAIL_COND(!r.has("download_hash"));
ERR_FAIL_COND(!r.has("browse_url"));
if (description) {
@@ -1145,7 +1185,7 @@ void EditorAssetLibrary::_http_request_completed(int p_status, int p_code, const
description->popup_centered_minsize();
description->connect("confirmed",this,"_install_asset");
- description->configure(r["title"],r["asset_id"],category_map[r["category_id"]],r["category_id"],r["author"],r["author_id"],r["rating"],r["cost"],r["version"],r["version_string"],r["description"],r["download_url"],r["browse_url"]);
+ description->configure(r["title"],r["asset_id"],category_map[r["category_id"]],r["category_id"],r["author"],r["author_id"],r["rating"],r["cost"],r["version"],r["version_string"],r["description"],r["download_url"],r["browse_url"], r["download_hash"]);
/*item->connect("asset_selected",this,"_select_asset");
item->connect("author_selected",this,"_select_author");
item->connect("category_selected",this,"_category_selected");*/
@@ -1231,6 +1271,8 @@ void EditorAssetLibrary::_bind_methods() {
ObjectTypeDB::bind_method("_asset_open",&EditorAssetLibrary::_asset_open);
ObjectTypeDB::bind_method("_asset_file_selected",&EditorAssetLibrary::_asset_file_selected);
ObjectTypeDB::bind_method("_repository_changed",&EditorAssetLibrary::_repository_changed);
+ ObjectTypeDB::bind_method("_support_toggled",&EditorAssetLibrary::_support_toggled);
+ ObjectTypeDB::bind_method("_rerun_search",&EditorAssetLibrary::_rerun_search);
}
@@ -1298,9 +1340,11 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
search_hb2->add_child(sort);
sort->set_h_size_flags(SIZE_EXPAND_FILL);
+ sort->connect("item_selected", this, "_rerun_search");
reverse = memnew( ToolButton );
reverse->set_toggle_mode(true);
+ reverse->connect("toggled", this, "_rerun_search");
//reverse->set_text(TTR("Reverse"));
search_hb2->add_child(reverse);
@@ -1314,6 +1358,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
search_hb2->add_child(categories);
categories->set_h_size_flags(SIZE_EXPAND_FILL);
//search_hb2->add_spacer();
+ categories->connect("item_selected", this, "_rerun_search");
search_hb2->add_child(memnew(VSeparator));
@@ -1340,6 +1385,7 @@ EditorAssetLibrary::EditorAssetLibrary(bool p_templates_only) {
support->get_popup()->add_check_item(TTR("Testing"),SUPPORT_TESTING);
support->get_popup()->set_item_checked(SUPPORT_OFFICIAL,true);
support->get_popup()->set_item_checked(SUPPORT_COMMUNITY,true);
+ support->get_popup()->connect("item_pressed",this,"_support_toggled");
/////////
diff --git a/tools/editor/asset_library_editor_plugin.h b/tools/editor/asset_library_editor_plugin.h
index 6a6e29338f..89663aa00b 100644
--- a/tools/editor/asset_library_editor_plugin.h
+++ b/tools/editor/asset_library_editor_plugin.h
@@ -111,6 +111,7 @@ class EditorAssetLibraryItemDescription : public ConfirmationDialog {
int asset_id;
String download_url;
String title;
+ String sha256;
Ref<Texture> icon;
void _link_click(const String& p_url);
@@ -120,13 +121,14 @@ protected:
static void _bind_methods();
public:
- void configure(const String& p_title,int p_asset_id,const String& p_category,int p_category_id,const String& p_author,int p_author_id,int p_rating,const String& p_cost,int p_version,const String& p_version_string,const String& p_description,const String& p_download_url,const String& p_browse_url);
+ void configure(const String& p_title,int p_asset_id,const String& p_category,int p_category_id,const String& p_author,int p_author_id,int p_rating,const String& p_cost,int p_version,const String& p_version_string,const String& p_description,const String& p_download_url,const String& p_browse_url,const String& p_sha256_hash);
void add_preview(int p_id, bool p_video,const String& p_url);
String get_title() { return title; }
Ref<Texture> get_preview_icon() { return icon; }
String get_download_url() { return download_url; }
int get_asset_id() { return asset_id; }
+ String get_sha256() { return sha256; }
EditorAssetLibraryItemDescription();
};
@@ -146,6 +148,7 @@ class EditorAssetLibraryItemDownload : public PanelContainer {
AcceptDialog *download_error;
HTTPRequest *download;
String host;
+ String sha256;
Label *status;
int prev_status;
@@ -166,7 +169,7 @@ protected:
public:
int get_asset_id() { return asset_id; }
- void configure(const String& p_title,int p_asset_id,const Ref<Texture>& p_preview, const String& p_download_url);
+ void configure(const String& p_title,int p_asset_id,const Ref<Texture>& p_preview, const String& p_download_url, const String& p_sha256_hash);
EditorAssetLibraryItemDownload();
};
@@ -210,7 +213,8 @@ class EditorAssetLibrary : public PanelContainer {
enum Support {
SUPPORT_OFFICIAL,
SUPPORT_COMMUNITY,
- SUPPORT_TESTING
+ SUPPORT_TESTING,
+ SUPPORT_MAX
};
enum SortOrder {
@@ -225,6 +229,7 @@ class EditorAssetLibrary : public PanelContainer {
static const char* sort_key[SORT_MAX];
static const char* sort_text[SORT_MAX];
+ static const char* support_key[SUPPORT_MAX];
///MainListing
@@ -288,11 +293,13 @@ class EditorAssetLibrary : public PanelContainer {
void _manage_plugins();
void _search(int p_page=0);
+ void _rerun_search(int p_ignore);
void _api_request(const String& p_request, RequestType p_request_type, const String &p_arguments="");
void _http_request_completed(int p_status, int p_code, const StringArray& headers, const ByteArray& p_data);
void _http_download_completed(int p_status, int p_code, const StringArray& headers, const ByteArray& p_data);
void _repository_changed(int p_repository_id);
+ void _support_toggled(int p_support);
friend class EditorAssetLibraryItemDescription;
friend class EditorAssetLibraryItem;
diff --git a/tools/editor/editor_file_dialog.cpp b/tools/editor/editor_file_dialog.cpp
index 97feaa80a5..e68a53659b 100644
--- a/tools/editor/editor_file_dialog.cpp
+++ b/tools/editor/editor_file_dialog.cpp
@@ -98,35 +98,64 @@ void EditorFileDialog::_unhandled_input(const InputEvent& p_event) {
if (p_event.type==InputEvent::KEY && is_window_modal_on_top()) {
- const InputEventKey &k=p_event.key;
+ if (p_event.key.pressed) {
- if (k.pressed) {
+ bool handled=false;
- bool handled=true;
-
- switch (k.scancode) {
-
- case KEY_H: {
-
- if (k.mod.command) {
-
- bool show=!show_hidden_files;
- set_show_hidden_files(show);
- EditorSettings::get_singleton()->set("file_dialog/show_hidden_files",show);
- } else {
- handled=false;
- }
-
- } break;
- case KEY_F5: {
-
- invalidate();
- } break;
- default: { handled=false; }
+ if (ED_IS_SHORTCUT("file_dialog/go_back", p_event)) {
+ _go_back();
+ handled=true;
+ }
+ if (ED_IS_SHORTCUT("file_dialog/go_forward", p_event)) {
+ _go_forward();
+ handled=true;
+ }
+ if (ED_IS_SHORTCUT("file_dialog/go_up", p_event)) {
+ _go_up();
+ handled=true;
+ }
+ if (ED_IS_SHORTCUT("file_dialog/refresh", p_event)) {
+ invalidate();
+ handled=true;
+ }
+ if (ED_IS_SHORTCUT("file_dialog/toggle_hidden_files", p_event)) {
+ bool show=!show_hidden_files;
+ set_show_hidden_files(show);
+ EditorSettings::get_singleton()->set("file_dialog/show_hidden_files",show);
+ handled=true;
+ }
+ if (ED_IS_SHORTCUT("file_dialog/toggle_favorite", p_event)) {
+ _favorite_toggled(favorite->is_pressed());
+ handled=true;
+ }
+ if (ED_IS_SHORTCUT("file_dialog/toggle_mode", p_event)) {
+ if (mode_thumbnails->is_pressed()) {
+ set_display_mode(DISPLAY_LIST);
+ } else {
+ set_display_mode(DISPLAY_THUMBNAILS);
+ }
+ handled=true;
+ }
+ if (ED_IS_SHORTCUT("file_dialog/create_folder", p_event)) {
+ _make_dir();
+ handled=true;
+ }
+ if (ED_IS_SHORTCUT("file_dialog/focus_path", p_event)) {
+ dir->grab_focus();
+ handled=true;
+ }
+ if (ED_IS_SHORTCUT("file_dialog/mode_favorite_up", p_event)) {
+ _favorite_move_up();
+ handled=true;
+ }
+ if (ED_IS_SHORTCUT("file_dialog/mode_favorite_down", p_event)) {
+ _favorite_move_down();
+ handled=true;
}
- if (handled)
+ if (handled) {
accept_event();
+ }
}
}
}
@@ -437,10 +466,7 @@ void EditorFileDialog::_item_dc_selected(int p_item) {
if (d["dir"]) {
- //print_line("change dir: "+String(d["name"]));
dir_access->change_dir(d["name"]);
- if (mode==MODE_OPEN_FILE || mode==MODE_OPEN_FILES || mode==MODE_OPEN_DIR || MODE_OPEN_ANY)
- file->set_text("");
call_deferred("_update_file_list");
call_deferred("_update_dir");
@@ -1261,6 +1287,18 @@ EditorFileDialog::EditorFileDialog() {
mode=MODE_SAVE_FILE;
set_title(TTR("Save a File"));
+ ED_SHORTCUT("file_dialog/go_back", TTR("Go Back"), KEY_MASK_ALT|KEY_LEFT);
+ ED_SHORTCUT("file_dialog/go_forward", TTR("Go Forward"), KEY_MASK_ALT|KEY_RIGHT);
+ ED_SHORTCUT("file_dialog/go_up", TTR("Go Up"), KEY_MASK_ALT|KEY_UP);
+ ED_SHORTCUT("file_dialog/refresh", TTR("Refresh"), KEY_MASK_CMD|KEY_F5); // ctrl + f5 else it launches the game as well..
+ ED_SHORTCUT("file_dialog/toggle_hidden_files", TTR("Toggle Hidden Files"), KEY_MASK_CMD|KEY_H);
+ ED_SHORTCUT("file_dialog/toggle_favorite", TTR("Toggle Favorite"), KEY_MASK_ALT|KEY_F);
+ ED_SHORTCUT("file_dialog/toggle_mode", TTR("Toggle Mode"), KEY_MASK_ALT|KEY_V);
+ ED_SHORTCUT("file_dialog/create_folder", TTR("Create Folder"), KEY_MASK_CMD|KEY_N);
+ ED_SHORTCUT("file_dialog/focus_path", TTR("Focus Path"), KEY_MASK_CMD|KEY_D);
+ ED_SHORTCUT("file_dialog/mode_favorite_up", TTR("Mode Favorite Up"), KEY_MASK_CMD|KEY_UP);
+ ED_SHORTCUT("file_dialog/mode_favorite_down", TTR("Mode Favorite Down"), KEY_MASK_CMD|KEY_DOWN);
+
HBoxContainer *pathhb = memnew( HBoxContainer );
dir_prev = memnew( ToolButton );
diff --git a/tools/editor/editor_import_export.cpp b/tools/editor/editor_import_export.cpp
index f9b9c0b41c..357d139c04 100644
--- a/tools/editor/editor_import_export.cpp
+++ b/tools/editor/editor_import_export.cpp
@@ -861,9 +861,11 @@ Error EditorExportPlatform::export_project_files(EditorExportSaveFunction p_func
Ref<ResourceImportMetadata> imd = memnew( ResourceImportMetadata );
//imd->set_editor();
+
for (List<StringName>::Element *F=atlas_images.front();F;F=F->next()) {
imd->add_source(EditorImportPlugin::validate_source_path(F->get()),FileAccess::get_md5(F->get()));
+
}
diff --git a/tools/editor/editor_node.cpp b/tools/editor/editor_node.cpp
index 5a3e3069e4..0f8ddafb20 100644
--- a/tools/editor/editor_node.cpp
+++ b/tools/editor/editor_node.cpp
@@ -2952,6 +2952,9 @@ void EditorNode::remove_editor_plugin(EditorPlugin *p_editor) {
//singleton->main_editor_tabs->add_tab(p_editor->get_name());
singleton->editor_table.erase(p_editor);
}
+ p_editor->make_visible(false);
+ p_editor->clear();
+ singleton->editor_plugins_over->get_plugins_list().erase(p_editor);
singleton->remove_child(p_editor);
singleton->editor_data.remove_editor_plugin( p_editor );
@@ -3004,7 +3007,7 @@ void EditorNode::set_addon_plugin_enabled(const String& p_addon,bool p_enabled)
if (!p_enabled) {
EditorPlugin *addon = plugin_addons[p_addon];
- editor_data.remove_editor_plugin( addon );
+ remove_editor_plugin(addon);
memdelete(addon); //bye
plugin_addons.erase(p_addon);
_update_addon_config();
diff --git a/tools/editor/editor_settings.cpp b/tools/editor/editor_settings.cpp
index 49a1158ec6..457aecba4a 100644
--- a/tools/editor/editor_settings.cpp
+++ b/tools/editor/editor_settings.cpp
@@ -674,6 +674,9 @@ void EditorSettings::_load_defaults(Ref<ConfigFile> p_extra_config) {
void EditorSettings::_load_default_text_editor_theme() {
set("text_editor/background_color",Color::html("3b000000"));
+ set("text_editor/completion_background_color", Color::html("2C2A32"));
+ set("text_editor/completion_selected_color", Color::html("434244"));
+ set("text_editor/completion_existing_color", Color::html("21dfdfdf"));
set("text_editor/caret_color",Color::html("aaaaaa"));
set("text_editor/line_number_color",Color::html("66aaaaaa"));
set("text_editor/text_color",Color::html("aaaaaa"));
@@ -906,6 +909,9 @@ bool EditorSettings::_save_text_editor_theme(String p_file) {
String theme_section = "color_theme";
Ref<ConfigFile> cf = memnew( ConfigFile ); // hex is better?
cf->set_value(theme_section, "background_color", ((Color)get("text_editor/background_color")).to_html());
+ cf->set_value(theme_section, "completion_background_color", ((Color)get("text_editor/completion_background_color")).to_html());
+ cf->set_value(theme_section, "completion_selected_color", ((Color)get("text_editor/completion_selected_color")).to_html());
+ cf->set_value(theme_section, "completion_existing_color", ((Color)get("text_editor/completion_existing_color")).to_html());
cf->set_value(theme_section, "caret_color", ((Color)get("text_editor/caret_color")).to_html());
cf->set_value(theme_section, "line_number_color", ((Color)get("text_editor/line_number_color")).to_html());
cf->set_value(theme_section, "text_color", ((Color)get("text_editor/text_color")).to_html());
diff --git a/tools/editor/io_plugins/editor_texture_import_plugin.cpp b/tools/editor/io_plugins/editor_texture_import_plugin.cpp
index 1fa7a50515..16ea803da4 100644
--- a/tools/editor/io_plugins/editor_texture_import_plugin.cpp
+++ b/tools/editor/io_plugins/editor_texture_import_plugin.cpp
@@ -1312,21 +1312,30 @@ Error EditorTextureImportPlugin::import2(const String& p_path, const Ref<Resourc
ERR_CONTINUE( !source_map.has(i) );
for (List<int>::Element *E=source_map[i].front();E;E=E->next()) {
- String apath = p_path.get_base_dir().plus_file(from->get_source_path(E->get()).get_file().basename()+".atex");
+ String apath;
+ String spath = from->get_source_path(E->get()).get_file();
+
+ if (p_external) {
+ apath = p_path.get_base_dir().plus_file(spath.basename()+"."+from->get_source_path(E->get()).md5_text()+".atex");
+ } else {
+ apath = p_path.get_base_dir().plus_file(spath.basename()+".atex");
+ }
Ref<AtlasTexture> at;
if (ResourceCache::has(apath)) {
+
at = Ref<AtlasTexture>( ResourceCache::get(apath)->cast_to<AtlasTexture>() );
} else {
at = Ref<AtlasTexture>( memnew( AtlasTexture ) );
+
}
at->set_region(region);
at->set_margin(margin);
at->set_path(apath);
atlases[E->get()]=at;
- print_line("Atlas Tex: "+apath);
+
}
}
if (ResourceCache::has(p_path)) {
diff --git a/tools/editor/plugins/script_editor_plugin.cpp b/tools/editor/plugins/script_editor_plugin.cpp
index 7de80e767b..10e4fc8475 100644
--- a/tools/editor/plugins/script_editor_plugin.cpp
+++ b/tools/editor/plugins/script_editor_plugin.cpp
@@ -287,6 +287,9 @@ void ScriptTextEditor::_load_theme_settings() {
get_text_edit()->set_custom_bg_color(EDITOR_DEF("text_editor/background_color",Color(0,0,0,0)));
+ get_text_edit()->add_color_override("completion_background_color", EDITOR_DEF("text_editor/completion_background_color", Color(0,0,0,0)));
+ get_text_edit()->add_color_override("completion_selected_color", EDITOR_DEF("text_editor/completion_selected_color", Color::html("434244")));
+ get_text_edit()->add_color_override("completion_existing_color", EDITOR_DEF("text_editor/completion_existing_color", Color::html("21dfdfdf")));
get_text_edit()->add_color_override("font_color",EDITOR_DEF("text_editor/text_color",Color(0,0,0)));
get_text_edit()->add_color_override("line_number_color",EDITOR_DEF("text_editor/line_number_color",Color(0,0,0)));
get_text_edit()->add_color_override("caret_color",EDITOR_DEF("text_editor/caret_color",Color(0,0,0)));
@@ -1135,6 +1138,7 @@ void ScriptEditor::_menu_option(int p_option) {
if (trim_trailing_whitespace_on_save) {
_trim_trailing_whitespace(current->get_text_edit());
}
+ editor->push_item(current->get_edited_script()->cast_to<Object>());
editor->save_resource_as( current->get_edited_script() );
} break;
diff --git a/tools/editor/plugins/shader_editor_plugin.cpp b/tools/editor/plugins/shader_editor_plugin.cpp
index 83db650952..76042c3028 100644
--- a/tools/editor/plugins/shader_editor_plugin.cpp
+++ b/tools/editor/plugins/shader_editor_plugin.cpp
@@ -78,6 +78,9 @@ void ShaderTextEditor::_load_theme_settings() {
/* keyword color */
get_text_edit()->set_custom_bg_color(EDITOR_DEF("text_editor/background_color",Color(0,0,0,0)));
+ get_text_edit()->add_color_override("completion_background_color", EDITOR_DEF("text_editor/completion_background_color", Color(0,0,0,0)));
+ get_text_edit()->add_color_override("completion_selected_color", EDITOR_DEF("text_editor/completion_selected_color", Color::html("434244")));
+ get_text_edit()->add_color_override("completion_existing_color", EDITOR_DEF("text_editor/completion_existing_color", Color::html("21dfdfdf")));
get_text_edit()->add_color_override("font_color",EDITOR_DEF("text_editor/text_color",Color(0,0,0)));
get_text_edit()->add_color_override("line_number_color",EDITOR_DEF("text_editor/line_number_color",Color(0,0,0)));
get_text_edit()->add_color_override("caret_color",EDITOR_DEF("text_editor/caret_color",Color(0,0,0)));