diff options
-rw-r--r-- | editor/debugger/editor_debugger_tree.cpp | 5 | ||||
-rw-r--r-- | editor/editor_node.cpp | 10 | ||||
-rw-r--r-- | editor/gui/editor_object_selector.cpp | 14 | ||||
-rw-r--r-- | editor/import/dynamic_font_import_settings.cpp | 13 | ||||
-rw-r--r-- | editor/plugins/editor_plugin.cpp | 1 | ||||
-rw-r--r-- | platform/linuxbsd/wayland/display_server_wayland.cpp | 2 | ||||
-rw-r--r-- | platform/macos/doc_classes/EditorExportPlatformMacOS.xml | 7 | ||||
-rw-r--r-- | platform/macos/export/export_plugin.cpp | 16 | ||||
-rw-r--r-- | scene/debugger/scene_debugger.cpp | 16 | ||||
-rw-r--r-- | servers/rendering/renderer_canvas_cull.cpp | 6 |
10 files changed, 80 insertions, 10 deletions
diff --git a/editor/debugger/editor_debugger_tree.cpp b/editor/debugger/editor_debugger_tree.cpp index c4d7899b2d..a900842651 100644 --- a/editor/debugger/editor_debugger_tree.cpp +++ b/editor/debugger/editor_debugger_tree.cpp @@ -277,11 +277,14 @@ Variant EditorDebuggerTree::get_drag_data(const Point2 &p_point) { } String path = selected->get_text(0); + const int icon_size = get_theme_constant(SNAME("class_icon_size"), EditorStringName(Editor)); HBoxContainer *hb = memnew(HBoxContainer); TextureRect *tf = memnew(TextureRect); tf->set_texture(selected->get_icon(0)); - tf->set_stretch_mode(TextureRect::STRETCH_KEEP_CENTERED); + tf->set_custom_minimum_size(Size2(icon_size, icon_size)); + tf->set_stretch_mode(TextureRect::STRETCH_KEEP_ASPECT_CENTERED); + tf->set_expand_mode(TextureRect::EXPAND_IGNORE_SIZE); hb->add_child(tf); Label *label = memnew(Label(path)); hb->add_child(label); diff --git a/editor/editor_node.cpp b/editor/editor_node.cpp index 95b3c30d1b..dd6c88ef25 100644 --- a/editor/editor_node.cpp +++ b/editor/editor_node.cpp @@ -4771,7 +4771,13 @@ Ref<Texture2D> EditorNode::_get_class_or_script_icon(const String &p_class, cons // Look for the native base type in the editor theme. This is relevant for // scripts extending other scripts and for built-in classes. String script_class_name = p_script->get_language()->get_global_class_name(p_script->get_path()); - String base_type = ScriptServer::get_global_class_native_base(script_class_name); + String base_type; + if (script_class_name.is_empty()) { + base_type = p_script->get_instance_base_type(); + } else { + base_type = ScriptServer::get_global_class_native_base(script_class_name); + } + if (theme.is_valid() && theme->has_icon(base_type, EditorStringName(EditorIcons))) { return theme->get_icon(base_type, EditorStringName(EditorIcons)); } @@ -4836,6 +4842,8 @@ Ref<Texture2D> EditorNode::get_class_icon(const String &p_class, const String &p Ref<Script> scr; if (ScriptServer::is_global_class(p_class)) { scr = EditorNode::get_editor_data().script_class_load_script(p_class); + } else if (ResourceLoader::exists(p_class)) { // If the script is not a class_name we check if the script resource exists. + scr = ResourceLoader::load(p_class); } return _get_class_or_script_icon(p_class, scr, p_fallback, true); diff --git a/editor/gui/editor_object_selector.cpp b/editor/gui/editor_object_selector.cpp index b73cd3b65c..ec5caa8c2a 100644 --- a/editor/gui/editor_object_selector.cpp +++ b/editor/gui/editor_object_selector.cpp @@ -30,6 +30,7 @@ #include "editor_object_selector.h" +#include "editor/debugger/editor_debugger_inspector.h" #include "editor/editor_data.h" #include "editor/editor_node.h" #include "editor/editor_string_names.h" @@ -131,6 +132,19 @@ void EditorObjectSelector::update_path() { Ref<Texture2D> obj_icon; if (Object::cast_to<MultiNodeEdit>(obj)) { obj_icon = EditorNode::get_singleton()->get_class_icon(Object::cast_to<MultiNodeEdit>(obj)->get_edited_class_name()); + } else if (Object::cast_to<EditorDebuggerRemoteObject>(obj)) { + String class_name; + Ref<Script> base_script = obj->get_script(); + if (base_script.is_valid()) { + class_name = base_script->get_global_name(); + + if (class_name.is_empty()) { + // If there is no class_name in this script we just take the script path. + class_name = base_script->get_path(); + } + } + + obj_icon = EditorNode::get_singleton()->get_class_icon(class_name.is_empty() ? Object::cast_to<EditorDebuggerRemoteObject>(obj)->type_name : class_name); } else { obj_icon = EditorNode::get_singleton()->get_object_icon(obj); } diff --git a/editor/import/dynamic_font_import_settings.cpp b/editor/import/dynamic_font_import_settings.cpp index c526ca0b0c..e124697b20 100644 --- a/editor/import/dynamic_font_import_settings.cpp +++ b/editor/import/dynamic_font_import_settings.cpp @@ -96,7 +96,7 @@ struct UniRange { }; // Unicode Character Blocks -// Source: https://www.unicode.org/Public/14.0.0/ucd/Blocks.txt +// Source: https://www.unicode.org/Public/16.0.0/ucd/Blocks.txt static UniRange unicode_ranges[] = { { 0x0000, 0x007F, U"Basic Latin" }, { 0x0080, 0x00FF, U"Latin-1 Supplement" }, @@ -283,6 +283,7 @@ static UniRange unicode_ranges[] = { { 0x10500, 0x1052F, U"Elbasan" }, { 0x10530, 0x1056F, U"Caucasian Albanian" }, { 0x10570, 0x105BF, U"Vithkuqi" }, + { 0x105C0, 0x105FF, U"Todhri" }, { 0x10600, 0x1077F, U"Linear A" }, { 0x10780, 0x107BF, U"Latin Extended-F" }, { 0x10800, 0x1083F, U"Cypriot Syllabary" }, @@ -305,6 +306,7 @@ static UniRange unicode_ranges[] = { { 0x10C00, 0x10C4F, U"Old Turkic" }, { 0x10C80, 0x10CFF, U"Old Hungarian" }, { 0x10D00, 0x10D3F, U"Hanifi Rohingya" }, + { 0x10D40, 0x10D8F, U"Garay" }, { 0x10E60, 0x10E7F, U"Rumi Numeral Symbols" }, { 0x10E80, 0x10EBF, U"Yezidi" }, { 0x10EC0, 0x10EFF, U"Arabic Extended-C" }, @@ -324,12 +326,14 @@ static UniRange unicode_ranges[] = { { 0x11280, 0x112AF, U"Multani" }, { 0x112B0, 0x112FF, U"Khudawadi" }, { 0x11300, 0x1137F, U"Grantha" }, + { 0x11380, 0x113FF, U"Tulu-Tigalari" }, { 0x11400, 0x1147F, U"Newa" }, { 0x11480, 0x114DF, U"Tirhuta" }, { 0x11580, 0x115FF, U"Siddham" }, { 0x11600, 0x1165F, U"Modi" }, { 0x11660, 0x1167F, U"Mongolian Supplement" }, { 0x11680, 0x116CF, U"Takri" }, + { 0x116D0, 0x116FF, U"Myanmar Extended-C" }, { 0x11700, 0x1174F, U"Ahom" }, { 0x11800, 0x1184F, U"Dogra" }, { 0x118A0, 0x118FF, U"Warang Citi" }, @@ -340,6 +344,7 @@ static UniRange unicode_ranges[] = { { 0x11AB0, 0x11ABF, U"Unified Canadian Aboriginal Syllabics Extended-A" }, { 0x11AC0, 0x11AFF, U"Pau Cin Hau" }, { 0x11B00, 0x11B5F, U"Devanagari Extended-A" }, + { 0x11BC0, 0x11BFF, U"Sunuwar" }, { 0x11C00, 0x11C6F, U"Bhaiksuki" }, { 0x11C70, 0x11CBF, U"Marchen" }, { 0x11D00, 0x11D5F, U"Masaram Gondi" }, @@ -354,12 +359,15 @@ static UniRange unicode_ranges[] = { { 0x12F90, 0x12FFF, U"Cypro-Minoan" }, { 0x13000, 0x1342F, U"Egyptian Hieroglyphs" }, { 0x13430, 0x1343F, U"Egyptian Hieroglyph Format Controls" }, + { 0x13460, 0x143FF, U"Egyptian Hieroglyphs Extended-A" }, { 0x14400, 0x1467F, U"Anatolian Hieroglyphs" }, + { 0x16100, 0x1613F, U"Gurung Khema" }, { 0x16800, 0x16A3F, U"Bamum Supplement" }, { 0x16A40, 0x16A6F, U"Mro" }, { 0x16A70, 0x16ACF, U"Tangsa" }, { 0x16AD0, 0x16AFF, U"Bassa Vah" }, { 0x16B00, 0x16B8F, U"Pahawh Hmong" }, + { 0x16D40, 0x16D7F, U"Kirat Rai" }, { 0x16E40, 0x16E9F, U"Medefaidrin" }, { 0x16F00, 0x16F9F, U"Miao" }, { 0x16FE0, 0x16FFF, U"Ideographic Symbols and Punctuation" }, @@ -374,6 +382,7 @@ static UniRange unicode_ranges[] = { { 0x1B170, 0x1B2FF, U"Nushu" }, { 0x1BC00, 0x1BC9F, U"Duployan" }, { 0x1BCA0, 0x1BCAF, U"Shorthand Format Controls" }, + { 0x1CC00, 0x1CEBF, U"Symbols for Legacy Computing Supplement" }, { 0x1CF00, 0x1CFCF, U"Znamenny Musical Notation" }, { 0x1D000, 0x1D0FF, U"Byzantine Musical Symbols" }, { 0x1D100, 0x1D1FF, U"Musical Symbols" }, @@ -391,6 +400,7 @@ static UniRange unicode_ranges[] = { { 0x1E290, 0x1E2BF, U"Toto" }, { 0x1E2C0, 0x1E2FF, U"Wancho" }, { 0x1E4D0, 0x1E4FF, U"Nag Mundari" }, + { 0x1E5D0, 0x1E5FF, U"Ol Onal" }, { 0x1E7E0, 0x1E7FF, U"Ethiopic Extended-B" }, { 0x1E800, 0x1E8DF, U"Mende Kikakui" }, { 0x1E900, 0x1E95F, U"Adlam" }, @@ -418,6 +428,7 @@ static UniRange unicode_ranges[] = { { 0x2B740, 0x2B81F, U"CJK Unified Ideographs Extension D" }, { 0x2B820, 0x2CEAF, U"CJK Unified Ideographs Extension E" }, { 0x2CEB0, 0x2EBEF, U"CJK Unified Ideographs Extension F" }, + { 0x2EBF0, 0x2EE5F, U"CJK Unified Ideographs Extension I" }, { 0x2F800, 0x2FA1F, U"CJK Compatibility Ideographs Supplement" }, { 0x30000, 0x3134F, U"CJK Unified Ideographs Extension G" }, { 0x31350, 0x323AF, U"CJK Unified Ideographs Extension H" }, diff --git a/editor/plugins/editor_plugin.cpp b/editor/plugins/editor_plugin.cpp index c8426bce73..29e4adb45a 100644 --- a/editor/plugins/editor_plugin.cpp +++ b/editor/plugins/editor_plugin.cpp @@ -153,7 +153,6 @@ void EditorPlugin::add_control_to_container(CustomControlContainer p_location, C } break; case CONTAINER_PROJECT_SETTING_TAB_RIGHT: { ProjectSettingsEditor::get_singleton()->get_tabs()->add_child(p_control); - ProjectSettingsEditor::get_singleton()->get_tabs()->move_child(p_control, 1); } break; } diff --git a/platform/linuxbsd/wayland/display_server_wayland.cpp b/platform/linuxbsd/wayland/display_server_wayland.cpp index 3fbbc263a0..71c721ca1d 100644 --- a/platform/linuxbsd/wayland/display_server_wayland.cpp +++ b/platform/linuxbsd/wayland/display_server_wayland.cpp @@ -1479,12 +1479,12 @@ DisplayServerWayland::DisplayServerWayland(const String &p_rendering_driver, Win driver_found = true; } } +#endif // GLES3_ENABLED if (!driver_found) { r_error = ERR_UNAVAILABLE; ERR_FAIL_MSG("Video driver not found."); } -#endif // GLES3_ENABLED cursor_set_shape(CURSOR_BUSY); diff --git a/platform/macos/doc_classes/EditorExportPlatformMacOS.xml b/platform/macos/doc_classes/EditorExportPlatformMacOS.xml index c261c252ba..dcaba9bbd2 100644 --- a/platform/macos/doc_classes/EditorExportPlatformMacOS.xml +++ b/platform/macos/doc_classes/EditorExportPlatformMacOS.xml @@ -75,6 +75,13 @@ <member name="codesign/custom_options" type="PackedStringArray" setter="" getter=""> Array of the additional command line arguments passed to the code signing tool. </member> + <member name="codesign/entitlements/additional" type="String" setter="" getter=""> + Additional data added to the root [code]<dict>[/code] section of the [url=https://developer.apple.com/documentation/bundleresources/entitlements].entitlements[/url] file. The value should be an XML section with pairs of key-value elements, e.g.: + [codeblock lang=text] + <key>key_name</key> + <string>value</string> + [/codeblock] + </member> <member name="codesign/entitlements/address_book" type="bool" setter="" getter=""> Enable to allow access to contacts in the user's address book, if it's enabled you should also provide usage message in the [member privacy/address_book_usage_description] option. See [url=https://developer.apple.com/documentation/bundleresources/entitlements/com_apple_security_personal-information_addressbook]com.apple.security.personal-information.addressbook[/url]. </member> diff --git a/platform/macos/export/export_plugin.cpp b/platform/macos/export/export_plugin.cpp index c99e9cdd0c..7887e5d0ab 100644 --- a/platform/macos/export/export_plugin.cpp +++ b/platform/macos/export/export_plugin.cpp @@ -327,7 +327,7 @@ bool EditorExportPlatformMacOS::get_export_option_visibility(const EditorExportP } bool advanced_options_enabled = p_preset->are_advanced_options_enabled(); - if (p_option.begins_with("privacy")) { + if (p_option.begins_with("privacy") || p_option == "codesign/entitlements/additional") { return advanced_options_enabled; } } @@ -501,6 +501,7 @@ void EditorExportPlatformMacOS::get_export_options(List<ExportOption> *r_options r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "codesign/entitlements/app_sandbox/files_movies", PROPERTY_HINT_ENUM, "No,Read-only,Read-write"), 0)); r_options->push_back(ExportOption(PropertyInfo(Variant::INT, "codesign/entitlements/app_sandbox/files_user_selected", PROPERTY_HINT_ENUM, "No,Read-only,Read-write"), 0)); r_options->push_back(ExportOption(PropertyInfo(Variant::ARRAY, "codesign/entitlements/app_sandbox/helper_executables", PROPERTY_HINT_ARRAY_TYPE, itos(Variant::STRING) + "/" + itos(PROPERTY_HINT_GLOBAL_FILE) + ":"), Array())); + r_options->push_back(ExportOption(PropertyInfo(Variant::STRING, "codesign/entitlements/additional", PROPERTY_HINT_MULTILINE_TEXT), "")); r_options->push_back(ExportOption(PropertyInfo(Variant::PACKED_STRING_ARRAY, "codesign/custom_options"), PackedStringArray())); #ifdef MACOS_ENABLED @@ -2126,6 +2127,11 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p } } + const String &additional_entitlements = p_preset->get("codesign/entitlements/additional"); + if (!additional_entitlements.is_empty()) { + ent_f->store_line(additional_entitlements); + } + ent_f->store_line("</dict>"); ent_f->store_line("</plist>"); } else { @@ -2288,6 +2294,14 @@ Error EditorExportPlatformMacOS::export_project(const Ref<EditorExportPreset> &p } } + if (FileAccess::exists(ent_path)) { + print_verbose("entitlements:\n" + FileAccess::get_file_as_string(ent_path)); + } + + if (FileAccess::exists(hlp_ent_path)) { + print_verbose("helper entitlements:\n" + FileAccess::get_file_as_string(hlp_ent_path)); + } + // Clean up temporary entitlements files. if (FileAccess::exists(hlp_ent_path)) { DirAccess::remove_file_or_error(hlp_ent_path); diff --git a/scene/debugger/scene_debugger.cpp b/scene/debugger/scene_debugger.cpp index 07c32eef13..22e5238fae 100644 --- a/scene/debugger/scene_debugger.cpp +++ b/scene/debugger/scene_debugger.cpp @@ -535,7 +535,21 @@ SceneDebuggerTree::SceneDebuggerTree(Node *p_root) { } } } - nodes.push_back(RemoteNode(count, n->get_name(), n->get_class(), n->get_instance_id(), n->get_scene_file_path(), view_flags)); + + String class_name; + ScriptInstance *script_instance = n->get_script_instance(); + if (script_instance) { + Ref<Script> script = script_instance->get_script(); + if (script.is_valid()) { + class_name = script->get_global_name(); + + if (class_name.is_empty()) { + // If there is no class_name in this script we just take the script path. + class_name = script->get_path(); + } + } + } + nodes.push_back(RemoteNode(count, n->get_name(), class_name.is_empty() ? n->get_class() : class_name, n->get_instance_id(), n->get_scene_file_path(), view_flags)); } } diff --git a/servers/rendering/renderer_canvas_cull.cpp b/servers/rendering/renderer_canvas_cull.cpp index b5873528f7..701b4da8f8 100644 --- a/servers/rendering/renderer_canvas_cull.cpp +++ b/servers/rendering/renderer_canvas_cull.cpp @@ -95,7 +95,7 @@ void RendererCanvasCull::_collect_ysort_children(RendererCanvasCull::Item *p_can } if (snapping_2d_transforms_to_pixel) { - child_xform.columns[2] = child_xform.columns[2].round(); + child_xform.columns[2] = (child_xform.columns[2] + Point2(0.5, 0.5)).floor(); } r_items[r_index] = child_items[i]; @@ -303,8 +303,8 @@ void RendererCanvasCull::_cull_canvas_item(Item *p_canvas_item, const Transform2 Transform2D parent_xform = p_parent_xform; if (snapping_2d_transforms_to_pixel) { - self_xform.columns[2] = self_xform.columns[2].round(); - parent_xform.columns[2] = parent_xform.columns[2].round(); + self_xform.columns[2] = (self_xform.columns[2] + Point2(0.5, 0.5)).floor(); + parent_xform.columns[2] = (parent_xform.columns[2] + Point2(0.5, 0.5)).floor(); } final_xform = parent_xform * self_xform; |