diff options
-rw-r--r-- | core/io/resource_uid.cpp | 7 | ||||
-rw-r--r-- | doc/classes/ProjectSettings.xml | 2 | ||||
-rw-r--r-- | drivers/gles3/storage/material_storage.cpp | 2 | ||||
-rw-r--r-- | editor/editor_run.cpp | 2 | ||||
-rw-r--r-- | editor/editor_run_native.cpp | 4 | ||||
-rw-r--r-- | editor/export/editor_export_platform.cpp | 4 | ||||
-rw-r--r-- | editor/export/editor_export_platform.h | 2 | ||||
-rw-r--r-- | editor/plugins/debugger_editor_plugin.cpp | 14 | ||||
-rw-r--r-- | editor/plugins/debugger_editor_plugin.h | 2 | ||||
-rw-r--r-- | editor/plugins/script_text_editor.cpp | 20 | ||||
-rw-r--r-- | editor/project_converter_3_to_4.cpp | 3 | ||||
-rw-r--r-- | main/main.cpp | 7 | ||||
-rw-r--r-- | servers/rendering/renderer_rd/shaders/particles.glsl | 2 | ||||
-rw-r--r-- | servers/rendering/renderer_rd/storage_rd/particles_storage.cpp | 2 |
14 files changed, 47 insertions, 26 deletions
diff --git a/core/io/resource_uid.cpp b/core/io/resource_uid.cpp index 5324c5dd84..ed5ce3b911 100644 --- a/core/io/resource_uid.cpp +++ b/core/io/resource_uid.cpp @@ -113,7 +113,12 @@ void ResourceUID::set_id(ID p_id, const String &p_path) { MutexLock l(mutex); ERR_FAIL_COND(!unique_ids.has(p_id)); CharString cs = p_path.utf8(); - if (strcmp(cs.ptr(), unique_ids[p_id].cs.ptr()) != 0) { + const char *update_ptr = cs.ptr(); + const char *cached_ptr = unique_ids[p_id].cs.ptr(); + if (update_ptr == nullptr && cached_ptr == nullptr) { + return; // Both are empty strings. + } + if ((update_ptr == nullptr) != (cached_ptr == nullptr) || strcmp(update_ptr, cached_ptr) != 0) { unique_ids[p_id].cs = cs; unique_ids[p_id].saved_to_cache = false; //changed changed = true; diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 498283b2f3..6b8e077fad 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -1986,7 +1986,7 @@ [b]Mobile[/b]: Modern renderer designed for mobile devices. Has a lower base overhead than Clustered, but does not scale as well to large scenes with many elements. [b]Compatibility[/b]: Low-end renderer designed for older devices. Based on the limitations of the OpenGL 3.3/ OpenGL ES 3.0 / WebGL 2 APIs. </member> - <member name="rendering/renderer/rendering_method.mobile" type="String" setter="" getter="" default=""forward_plus""> + <member name="rendering/renderer/rendering_method.mobile" type="String" setter="" getter="" default=""mobile""> Override for [member rendering/renderer/rendering_method] on mobile devices. </member> <member name="rendering/renderer/rendering_method.web" type="String" setter="" getter="" default=""gl_compatibility""> diff --git a/drivers/gles3/storage/material_storage.cpp b/drivers/gles3/storage/material_storage.cpp index bc734ef148..d9a797778c 100644 --- a/drivers/gles3/storage/material_storage.cpp +++ b/drivers/gles3/storage/material_storage.cpp @@ -1656,7 +1656,7 @@ ShaderCompiler::DefaultIdentifierActions actions; actions.render_mode_defines["disable_force"] = "#define DISABLE_FORCE\n"; actions.render_mode_defines["disable_velocity"] = "#define DISABLE_VELOCITY\n"; actions.render_mode_defines["keep_data"] = "#define ENABLE_KEEP_DATA\n"; - actions.render_mode_defines["collision_use_scale"] = "#define USE_COLLISON_SCALE\n"; + actions.render_mode_defines["collision_use_scale"] = "#define USE_COLLISION_SCALE\n"; actions.sampler_array_name = "material_samplers"; actions.base_texture_binding_index = 1; diff --git a/editor/editor_run.cpp b/editor/editor_run.cpp index 26dac8a675..99c8481d33 100644 --- a/editor/editor_run.cpp +++ b/editor/editor_run.cpp @@ -63,7 +63,7 @@ Error EditorRun::run(const String &p_scene, const String &p_write_movie) { args.push_back("--editor-pid"); args.push_back(itos(OS::get_singleton()->get_process_id())); - bool debug_collisions = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_collisons", false); + bool debug_collisions = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_collisions", false); bool debug_paths = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_paths", false); bool debug_navigation = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_navigation", false); if (debug_collisions) { diff --git a/editor/editor_run_native.cpp b/editor/editor_run_native.cpp index 3e8f17085d..47a9661bcb 100644 --- a/editor/editor_run_native.cpp +++ b/editor/editor_run_native.cpp @@ -134,7 +134,7 @@ Error EditorRunNative::run_native(int p_idx, int p_platform) { bool deploy_debug_remote = is_deploy_debug_remote_enabled(); bool deploy_dumb = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_file_server", false); - bool debug_collisions = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_collisons", false); + bool debug_collisions = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_collisions", false); bool debug_navigation = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_navigation", false); if (deploy_debug_remote) { @@ -144,7 +144,7 @@ Error EditorRunNative::run_native(int p_idx, int p_platform) { flags |= EditorExportPlatform::DEBUG_FLAG_DUMB_CLIENT; } if (debug_collisions) { - flags |= EditorExportPlatform::DEBUG_FLAG_VIEW_COLLISONS; + flags |= EditorExportPlatform::DEBUG_FLAG_VIEW_COLLISIONS; } if (debug_navigation) { flags |= EditorExportPlatform::DEBUG_FLAG_VIEW_NAVIGATION; diff --git a/editor/export/editor_export_platform.cpp b/editor/export/editor_export_platform.cpp index 13ab5cebf6..c292eb832b 100644 --- a/editor/export/editor_export_platform.cpp +++ b/editor/export/editor_export_platform.cpp @@ -176,7 +176,7 @@ void EditorExportPlatform::gen_debug_flags(Vector<String> &r_flags, int p_flags) } } - if (p_flags & DEBUG_FLAG_VIEW_COLLISONS) { + if (p_flags & DEBUG_FLAG_VIEW_COLLISIONS) { r_flags.push_back("--debug-collisions"); } @@ -1609,7 +1609,7 @@ void EditorExportPlatform::gen_export_flags(Vector<String> &r_flags, int p_flags } } - if (p_flags & DEBUG_FLAG_VIEW_COLLISONS) { + if (p_flags & DEBUG_FLAG_VIEW_COLLISIONS) { r_flags.push_back("--debug-collisions"); } diff --git a/editor/export/editor_export_platform.h b/editor/export/editor_export_platform.h index 93bc54284f..88dc7bd5cd 100644 --- a/editor/export/editor_export_platform.h +++ b/editor/export/editor_export_platform.h @@ -210,7 +210,7 @@ public: DEBUG_FLAG_DUMB_CLIENT = 1, DEBUG_FLAG_REMOTE_DEBUG = 2, DEBUG_FLAG_REMOTE_DEBUG_LOCALHOST = 4, - DEBUG_FLAG_VIEW_COLLISONS = 8, + DEBUG_FLAG_VIEW_COLLISIONS = 8, DEBUG_FLAG_VIEW_NAVIGATION = 16, }; diff --git a/editor/plugins/debugger_editor_plugin.cpp b/editor/plugins/debugger_editor_plugin.cpp index 40e7dfead2..dd6187c264 100644 --- a/editor/plugins/debugger_editor_plugin.cpp +++ b/editor/plugins/debugger_editor_plugin.cpp @@ -69,7 +69,7 @@ DebuggerEditorPlugin::DebuggerEditorPlugin(PopupMenu *p_debug_menu) { debug_menu->set_item_tooltip(-1, TTR("When this option is enabled, using one-click deploy for Android will only export an executable without the project data.\nThe filesystem will be provided from the project by the editor over the network.\nOn Android, deploying will use the USB cable for faster performance. This option speeds up testing for projects with large assets.")); debug_menu->add_separator(); - debug_menu->add_check_shortcut(ED_SHORTCUT("editor/visible_collision_shapes", TTR("Visible Collision Shapes")), RUN_DEBUG_COLLISONS); + debug_menu->add_check_shortcut(ED_SHORTCUT("editor/visible_collision_shapes", TTR("Visible Collision Shapes")), RUN_DEBUG_COLLISIONS); debug_menu->set_item_tooltip(-1, TTR("When this option is enabled, collision shapes and raycast nodes (for 2D and 3D) will be visible in the running project.")); debug_menu->add_check_shortcut(ED_SHORTCUT("editor/visible_paths", TTR("Visible Paths")), RUN_DEBUG_PATHS); @@ -150,10 +150,10 @@ void DebuggerEditorPlugin::_menu_option(int p_option) { EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_deploy_remote_debug", !ischecked); } break; - case RUN_DEBUG_COLLISONS: { - bool ischecked = debug_menu->is_item_checked(debug_menu->get_item_index(RUN_DEBUG_COLLISONS)); - debug_menu->set_item_checked(debug_menu->get_item_index(RUN_DEBUG_COLLISONS), !ischecked); - EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_debug_collisons", !ischecked); + case RUN_DEBUG_COLLISIONS: { + bool ischecked = debug_menu->is_item_checked(debug_menu->get_item_index(RUN_DEBUG_COLLISIONS)); + debug_menu->set_item_checked(debug_menu->get_item_index(RUN_DEBUG_COLLISIONS), !ischecked); + EditorSettings::get_singleton()->set_project_metadata("debug_options", "run_debug_collisions", !ischecked); } break; case RUN_DEBUG_PATHS: { @@ -190,7 +190,7 @@ void DebuggerEditorPlugin::_notification(int p_what) { void DebuggerEditorPlugin::_update_debug_options() { bool check_deploy_remote = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_deploy_remote_debug", false); bool check_file_server = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_file_server", false); - bool check_debug_collisions = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_collisons", false); + bool check_debug_collisions = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_collisions", false); bool check_debug_paths = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_paths", false); bool check_debug_navigation = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_debug_navigation", false); bool check_live_debug = EditorSettings::get_singleton()->get_project_metadata("debug_options", "run_live_debug", true); @@ -204,7 +204,7 @@ void DebuggerEditorPlugin::_update_debug_options() { _menu_option(RUN_FILE_SERVER); } if (check_debug_collisions) { - _menu_option(RUN_DEBUG_COLLISONS); + _menu_option(RUN_DEBUG_COLLISIONS); } if (check_debug_paths) { _menu_option(RUN_DEBUG_PATHS); diff --git a/editor/plugins/debugger_editor_plugin.h b/editor/plugins/debugger_editor_plugin.h index d8871128c3..c706acdb5c 100644 --- a/editor/plugins/debugger_editor_plugin.h +++ b/editor/plugins/debugger_editor_plugin.h @@ -48,7 +48,7 @@ private: enum MenuOptions { RUN_FILE_SERVER, RUN_LIVE_DEBUG, - RUN_DEBUG_COLLISONS, + RUN_DEBUG_COLLISIONS, RUN_DEBUG_PATHS, RUN_DEBUG_NAVIGATION, RUN_DEPLOY_REMOTE_DEBUG, diff --git a/editor/plugins/script_text_editor.cpp b/editor/plugins/script_text_editor.cpp index e3459775ff..c21b4356f8 100644 --- a/editor/plugins/script_text_editor.cpp +++ b/editor/plugins/script_text_editor.cpp @@ -1056,14 +1056,22 @@ void ScriptTextEditor::_update_connected_methods() { inherited_script = inherited_script->get_base_script(); } - if (found_base_class.is_empty() && base_class) { - List<MethodInfo> methods; - ClassDB::get_method_list(base_class, &methods); - for (int j = 0; j < methods.size(); j++) { - if (methods[j].name == name) { - found_base_class = "builtin:" + base_class; + if (found_base_class.is_empty()) { + while (base_class) { + List<MethodInfo> methods; + ClassDB::get_method_list(base_class, &methods, true); + for (int j = 0; j < methods.size(); j++) { + if (methods[j].name == name) { + found_base_class = "builtin:" + base_class; + break; + } + } + + ClassDB::ClassInfo *base_class_ptr = ClassDB::classes.getptr(base_class)->inherits_ptr; + if (base_class_ptr == nullptr) { break; } + base_class = base_class_ptr->name; } } diff --git a/editor/project_converter_3_to_4.cpp b/editor/project_converter_3_to_4.cpp index cb76147a56..d8ff1e1b6e 100644 --- a/editor/project_converter_3_to_4.cpp +++ b/editor/project_converter_3_to_4.cpp @@ -3607,6 +3607,9 @@ void ProjectConverter3To4::process_gdscript_line(String &line, const RegExContai if (line.contains("OS.get_unix_time")) { line = line.replace("OS.get_unix_time", "Time.get_unix_time_from_system"); } + if (line.contains("OS.get_datetime")) { + line = line.replace("OS.get_datetime", "Time.get_datetime_dict_from_system"); + } } void ProjectConverter3To4::process_csharp_line(String &line, const RegExContainer ®_container) { diff --git a/main/main.cpp b/main/main.cpp index aac77c1625..28a73ce585 100644 --- a/main/main.cpp +++ b/main/main.cpp @@ -710,6 +710,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph bool force_res = false; String default_renderer = ""; + String default_renderer_mobile = ""; String renderer_hints = ""; packed_data = PackedData::get_singleton(); @@ -1517,6 +1518,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph // Start with RenderingDevice-based backends. Should be included if any RD driver present. #ifdef VULKAN_ENABLED renderer_hints = "forward_plus,mobile"; + default_renderer_mobile = "mobile"; #endif // And Compatibility next, or first if Vulkan is disabled. @@ -1525,6 +1527,9 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph renderer_hints += ","; } renderer_hints += "gl_compatibility"; + if (default_renderer_mobile.is_empty()) { + default_renderer_mobile = "gl_compatibility"; + } #endif if (renderer_hints.is_empty()) { ERR_PRINT("No renderers available."); @@ -1616,7 +1621,7 @@ Error Main::setup(const char *execpath, int argc, char *argv[], bool p_second_ph default_renderer = renderer_hints.get_slice(",", 0); GLOBAL_DEF_RST_BASIC("rendering/renderer/rendering_method", default_renderer); - GLOBAL_DEF_RST_BASIC("rendering/renderer/rendering_method.mobile", default_renderer); + GLOBAL_DEF_RST_BASIC("rendering/renderer/rendering_method.mobile", default_renderer_mobile); GLOBAL_DEF_RST_BASIC("rendering/renderer/rendering_method.web", "gl_compatibility"); // This is a bit of a hack until we have WebGPU support. ProjectSettings::get_singleton()->set_custom_property_info("rendering/renderer/rendering_method", diff --git a/servers/rendering/renderer_rd/shaders/particles.glsl b/servers/rendering/renderer_rd/shaders/particles.glsl index fb5759bc17..3a6dd579b9 100644 --- a/servers/rendering/renderer_rd/shaders/particles.glsl +++ b/servers/rendering/renderer_rd/shaders/particles.glsl @@ -475,7 +475,7 @@ void main() { float particle_size = FRAME.particle_size; -#ifdef USE_COLLISON_SCALE +#ifdef USE_COLLISION_SCALE particle_size *= dot(vec3(length(PARTICLE.xform[0].xyz), length(PARTICLE.xform[1].xyz), length(PARTICLE.xform[2].xyz)), vec3(0.33333333333)); diff --git a/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp b/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp index 07d682bcc1..4dca2233fe 100644 --- a/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp +++ b/servers/rendering/renderer_rd/storage_rd/particles_storage.cpp @@ -102,7 +102,7 @@ ParticlesStorage::ParticlesStorage() { actions.render_mode_defines["disable_force"] = "#define DISABLE_FORCE\n"; actions.render_mode_defines["disable_velocity"] = "#define DISABLE_VELOCITY\n"; actions.render_mode_defines["keep_data"] = "#define ENABLE_KEEP_DATA\n"; - actions.render_mode_defines["collision_use_scale"] = "#define USE_COLLISON_SCALE\n"; + actions.render_mode_defines["collision_use_scale"] = "#define USE_COLLISION_SCALE\n"; actions.sampler_array_name = "material_samplers"; actions.base_texture_binding_index = 1; |