diff options
-rw-r--r-- | .github/workflows/static_checks.yml | 2 | ||||
-rw-r--r-- | core/config/project_settings.cpp | 5 | ||||
-rw-r--r-- | doc/classes/@GlobalScope.xml | 2 | ||||
-rw-r--r-- | doc/classes/CPUParticles2D.xml | 2 | ||||
-rw-r--r-- | doc/classes/CPUParticles3D.xml | 2 | ||||
-rw-r--r-- | doc/classes/GPUParticles2D.xml | 3 | ||||
-rw-r--r-- | doc/classes/GPUParticles3D.xml | 3 | ||||
-rw-r--r-- | doc/classes/RefCounted.xml | 1 | ||||
-rw-r--r-- | doc/classes/RenderingServer.xml | 3 | ||||
-rw-r--r-- | drivers/vulkan/rendering_device_vulkan.cpp | 2 | ||||
-rw-r--r-- | editor/plugins/animation_state_machine_editor.cpp | 10 | ||||
-rwxr-xr-x | misc/scripts/codespell.sh | 2 | ||||
-rw-r--r-- | modules/jpg/image_loader_jpegd.cpp | 6 | ||||
-rw-r--r-- | modules/openxr/openxr_api.cpp | 2 | ||||
-rw-r--r-- | modules/text_server_adv/gdextension_build/methods.py | 4 | ||||
-rw-r--r-- | modules/text_server_fb/gdextension_build/methods.py | 4 | ||||
-rw-r--r-- | modules/webp/webp_common.cpp | 4 | ||||
-rw-r--r-- | platform/macos/display_server_macos.mm | 2 | ||||
-rw-r--r-- | platform/web/js/libs/library_godot_input.js | 4 | ||||
-rw-r--r-- | servers/xr_server.cpp | 4 |
20 files changed, 44 insertions, 23 deletions
diff --git a/.github/workflows/static_checks.yml b/.github/workflows/static_checks.yml index 4b7f721a23..e7ebd2fb64 100644 --- a/.github/workflows/static_checks.yml +++ b/.github/workflows/static_checks.yml @@ -112,5 +112,5 @@ jobs: uses: codespell-project/actions-codespell@v2 with: skip: "./bin,./thirdparty,*.desktop,*.gen.*,*.po,*.pot,*.rc,./AUTHORS.md,./COPYRIGHT.txt,./DONORS.md,./core/input/gamecontrollerdb.txt,./core/string/locales.h,./editor/project_converter_3_to_4.cpp,./misc/scripts/codespell.sh,./platform/android/java/lib/src/com,./platform/web/node_modules,./platform/web/package-lock.json" - ignore_words_list: "curvelinear,doubleclick,expct,findn,gird,hel,inout,lod,mis,nd,numer,ot,requestor,te,vai" + ignore_words_list: "breaked,curvelinear,doubleclick,expct,findn,gird,hel,inout,lod,mis,nd,numer,ot,requestor,te,vai" path: ${{ env.CHANGED_FILES }} diff --git a/core/config/project_settings.cpp b/core/config/project_settings.cpp index cbbfe3de75..93934f2320 100644 --- a/core/config/project_settings.cpp +++ b/core/config/project_settings.cpp @@ -852,8 +852,8 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const RBMap<S } if (!p_custom_features.is_empty()) { + // Store how many properties are saved, add one for custom features, which must always go first. file->store_32(count + 1); - //store how many properties are saved, add one for custom featuers, which must always go first String key = CoreStringNames::get_singleton()->_custom_features; file->store_pascal_string(key); @@ -870,7 +870,8 @@ Error ProjectSettings::_save_settings_binary(const String &p_file, const RBMap<S file->store_buffer(buff.ptr(), buff.size()); } else { - file->store_32(count); //store how many properties are saved + // Store how many properties are saved. + file->store_32(count); } for (const KeyValue<String, List<String>> &E : p_props) { diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index b06c28311a..1ae3674f65 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -1477,7 +1477,7 @@ <return type="Variant" /> <param index="0" name="obj" type="Variant" /> <description> - Returns a weak reference to an object, or [code]null[/code] if [param obj] is invalid. + Returns a [WeakRef] instance holding a weak reference to [param obj]. Returns an empty [WeakRef] instance if [param obj] is [code]null[/code]. Prints an error and returns [code]null[/code] if [param obj] is neither [Object]-derived nor [code]null[/code]. A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it. </description> </method> diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index 051635cb48..92a57007bd 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -297,7 +297,7 @@ Particles are drawn in the order emitted. </constant> <constant name="DRAW_ORDER_LIFETIME" value="1" enum="DrawOrder"> - Particles are drawn in order of remaining lifetime. + Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front. </constant> <constant name="PARAM_INITIAL_LINEAR_VELOCITY" value="0" enum="Parameter"> Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set initial velocity properties. diff --git a/doc/classes/CPUParticles3D.xml b/doc/classes/CPUParticles3D.xml index 9d16f3e8a4..27404b68bb 100644 --- a/doc/classes/CPUParticles3D.xml +++ b/doc/classes/CPUParticles3D.xml @@ -322,7 +322,7 @@ Particles are drawn in the order emitted. </constant> <constant name="DRAW_ORDER_LIFETIME" value="1" enum="DrawOrder"> - Particles are drawn in order of remaining lifetime. + Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front. </constant> <constant name="DRAW_ORDER_VIEW_DEPTH" value="2" enum="DrawOrder"> Particles are drawn in order of depth. diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml index 08dc6a5331..2308ec43c5 100644 --- a/doc/classes/GPUParticles2D.xml +++ b/doc/classes/GPUParticles2D.xml @@ -141,9 +141,10 @@ Particles are drawn in the order emitted. </constant> <constant name="DRAW_ORDER_LIFETIME" value="1" enum="DrawOrder"> - Particles are drawn in order of remaining lifetime. + Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front. </constant> <constant name="DRAW_ORDER_REVERSE_LIFETIME" value="2" enum="DrawOrder"> + Particles are drawn in reverse order of remaining lifetime. In other words, the particle with the lowest lifetime is drawn at the front. </constant> <constant name="EMIT_FLAG_POSITION" value="1" enum="EmitFlags"> Particle starts at the specified position. diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml index a982c7e40e..b5af63a8f4 100644 --- a/doc/classes/GPUParticles3D.xml +++ b/doc/classes/GPUParticles3D.xml @@ -166,9 +166,10 @@ Particles are drawn in the order emitted. </constant> <constant name="DRAW_ORDER_LIFETIME" value="1" enum="DrawOrder"> - Particles are drawn in order of remaining lifetime. + Particles are drawn in order of remaining lifetime. In other words, the particle with the highest lifetime is drawn at the front. </constant> <constant name="DRAW_ORDER_REVERSE_LIFETIME" value="2" enum="DrawOrder"> + Particles are drawn in reverse order of remaining lifetime. In other words, the particle with the lowest lifetime is drawn at the front. </constant> <constant name="DRAW_ORDER_VIEW_DEPTH" value="3" enum="DrawOrder"> Particles are drawn in order of depth. diff --git a/doc/classes/RefCounted.xml b/doc/classes/RefCounted.xml index fe10f84449..3ef87e462d 100644 --- a/doc/classes/RefCounted.xml +++ b/doc/classes/RefCounted.xml @@ -6,6 +6,7 @@ <description> Base class for any object that keeps a reference count. [Resource] and many other helper objects inherit this class. Unlike other [Object] types, [RefCounted]s keep an internal reference counter so that they are automatically released when no longer in use, and only then. [RefCounted]s therefore do not need to be freed manually with [method Object.free]. + [RefCounted] instances caught in a cyclic reference will [b]not[/b] be freed automatically. For example, if a node holds a reference to instance [code]A[/code], which directly or indirectly holds a reference back to [code]A[/code], [code]A[/code]'s reference count will be 2. Destruction of the node will leave [code]A[/code] dangling with a reference count of 1, and there will be a memory leak. To prevent this, one of the references in the cycle can be made weak with [method @GlobalScope.weakref]. In the vast majority of use cases, instantiating and using [RefCounted]-derived types is all you need to do. The methods provided in this class are only for advanced users, and can cause issues if misused. [b]Note:[/b] In C#, reference-counted objects will not be freed instantly after they are no longer in use. Instead, garbage collection will run periodically and will free reference-counted objects that are no longer in use. This means that unused ones will linger on for a while before being removed. </description> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index e5409a6e8a..da07582773 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -4505,9 +4505,10 @@ Draw particles in the order that they appear in the particles array. </constant> <constant name="PARTICLES_DRAW_ORDER_LIFETIME" value="1" enum="ParticlesDrawOrder"> - Sort particles based on their lifetime. + Sort particles based on their lifetime. In other words, the particle with the highest lifetime is drawn at the front. </constant> <constant name="PARTICLES_DRAW_ORDER_REVERSE_LIFETIME" value="2" enum="ParticlesDrawOrder"> + Sort particles based on the inverse of their lifetime. In other words, the particle with the lowest lifetime is drawn at the front. </constant> <constant name="PARTICLES_DRAW_ORDER_VIEW_DEPTH" value="3" enum="ParticlesDrawOrder"> Sort particles based on their distance to the camera. diff --git a/drivers/vulkan/rendering_device_vulkan.cpp b/drivers/vulkan/rendering_device_vulkan.cpp index a9f77c9072..c3a365a3b8 100644 --- a/drivers/vulkan/rendering_device_vulkan.cpp +++ b/drivers/vulkan/rendering_device_vulkan.cpp @@ -2105,7 +2105,7 @@ RID RenderingDeviceVulkan::texture_create_shared(const TextureView &p_view, RID VkImageViewUsageCreateInfo usage_info; if (context->is_device_extension_enabled(VK_KHR_MAINTENANCE_2_EXTENSION_NAME)) { - // May need to make VK_KHR_maintenance2 manditory and thus has Vulkan 1.1 be our minimum supported version + // May need to make VK_KHR_maintenance2 mandatory and thus has Vulkan 1.1 be our minimum supported version // if we require setting this information. Vulkan 1.0 may simply not care.. usage_info.sType = VK_STRUCTURE_TYPE_IMAGE_VIEW_USAGE_CREATE_INFO; diff --git a/editor/plugins/animation_state_machine_editor.cpp b/editor/plugins/animation_state_machine_editor.cpp index 11b5cd488b..e9c8b0c610 100644 --- a/editor/plugins/animation_state_machine_editor.cpp +++ b/editor/plugins/animation_state_machine_editor.cpp @@ -76,6 +76,11 @@ void AnimationNodeStateMachineEditor::edit(const Ref<AnimationNode> &p_node) { _update_graph(); } + if (read_only) { + tool_create->set_pressed(false); + tool_connect->set_pressed(false); + } + tool_create->set_disabled(read_only); tool_connect->set_disabled(read_only); } @@ -1591,6 +1596,11 @@ void AnimationNodeStateMachineEditor::_update_mode() { selection_tools_hb->hide(); } + if (read_only) { + tool_create->set_pressed(false); + tool_connect->set_pressed(false); + } + if (tool_connect->is_pressed()) { transition_tools_hb->show(); } else { diff --git a/misc/scripts/codespell.sh b/misc/scripts/codespell.sh index a55a39bf99..2de440679f 100755 --- a/misc/scripts/codespell.sh +++ b/misc/scripts/codespell.sh @@ -3,6 +3,6 @@ SKIP_LIST="./.*,./**/.*,./bin,./thirdparty,*.desktop,*.gen.*,*.po,*.pot,*.rc,./A SKIP_LIST+="./core/input/gamecontrollerdb.txt,./core/string/locales.h,./editor/renames_map_3_to_4.cpp,./misc/scripts/codespell.sh," SKIP_LIST+="./platform/android/java/lib/src/com,./platform/web/node_modules,./platform/web/package-lock.json," -IGNORE_LIST="curvelinear,doubleclick,expct,findn,gird,hel,inout,lod,mis,nd,numer,ot,requestor,te,vai" +IGNORE_LIST="breaked,curvelinear,doubleclick,expct,findn,gird,hel,inout,lod,mis,nd,numer,ot,requestor,te,vai" codespell -w -q 3 -S "${SKIP_LIST}" -L "${IGNORE_LIST}" --builtin "clear,rare,en-GB_to_en-US" diff --git a/modules/jpg/image_loader_jpegd.cpp b/modules/jpg/image_loader_jpegd.cpp index 0b9fcf4455..e7fa909706 100644 --- a/modules/jpg/image_loader_jpegd.cpp +++ b/modules/jpg/image_loader_jpegd.cpp @@ -156,7 +156,11 @@ public: static Error _jpgd_save_to_output_stream(jpge::output_stream *p_output_stream, const Ref<Image> &p_img, float p_quality) { ERR_FAIL_COND_V(p_img.is_null() || p_img->is_empty(), ERR_INVALID_PARAMETER); - Ref<Image> image = p_img; + Ref<Image> image = p_img->duplicate(); + if (image->is_compressed()) { + Error error = image->decompress(); + ERR_FAIL_COND_V_MSG(error != OK, error, "Couldn't decompress image."); + } if (image->get_format() != Image::FORMAT_RGB8) { image->convert(Image::FORMAT_RGB8); } diff --git a/modules/openxr/openxr_api.cpp b/modules/openxr/openxr_api.cpp index dc3ccccd08..3c606de670 100644 --- a/modules/openxr/openxr_api.cpp +++ b/modules/openxr/openxr_api.cpp @@ -289,7 +289,7 @@ bool OpenXRAPI::create_instance() { for (KeyValue<String, bool *> &requested_extension : requested_extensions) { if (!is_extension_supported(requested_extension.key)) { if (requested_extension.value == nullptr) { - // Null means this is a manditory extension so we fail. + // Null means this is a mandatory extension so we fail. ERR_FAIL_V_MSG(false, String("OpenXR: OpenXR Runtime does not support ") + requested_extension.key + String(" extension!")); } else { // Set this extension as not supported. diff --git a/modules/text_server_adv/gdextension_build/methods.py b/modules/text_server_adv/gdextension_build/methods.py index 3c5229462c..e58bc3abec 100644 --- a/modules/text_server_adv/gdextension_build/methods.py +++ b/modules/text_server_adv/gdextension_build/methods.py @@ -99,8 +99,8 @@ def make_icu_data(target, source, env): def write_macos_plist(target, binary_name, identifier, name): - os.makedirs(f"{target}/Resourece/", exist_ok=True) - f = open(f"{target}/Resourece/Info.plist", "w") + os.makedirs(f"{target}/Resource/", exist_ok=True) + f = open(f"{target}/Resource/Info.plist", "w") f.write(f'<?xml version="1.0" encoding="UTF-8"?>\n') f.write(f'<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n') diff --git a/modules/text_server_fb/gdextension_build/methods.py b/modules/text_server_fb/gdextension_build/methods.py index 3c5229462c..e58bc3abec 100644 --- a/modules/text_server_fb/gdextension_build/methods.py +++ b/modules/text_server_fb/gdextension_build/methods.py @@ -99,8 +99,8 @@ def make_icu_data(target, source, env): def write_macos_plist(target, binary_name, identifier, name): - os.makedirs(f"{target}/Resourece/", exist_ok=True) - f = open(f"{target}/Resourece/Info.plist", "w") + os.makedirs(f"{target}/Resource/", exist_ok=True) + f = open(f"{target}/Resource/Info.plist", "w") f.write(f'<?xml version="1.0" encoding="UTF-8"?>\n') f.write(f'<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">\n') diff --git a/modules/webp/webp_common.cpp b/modules/webp/webp_common.cpp index bc34a25733..3a2ac5a90e 100644 --- a/modules/webp/webp_common.cpp +++ b/modules/webp/webp_common.cpp @@ -59,6 +59,10 @@ Vector<uint8_t> _webp_packer(const Ref<Image> &p_image, float p_quality, bool p_ compression_method = CLAMP(compression_method, 0, 6); Ref<Image> img = p_image->duplicate(); + if (img->is_compressed()) { + Error error = img->decompress(); + ERR_FAIL_COND_V_MSG(error != OK, Vector<uint8_t>(), "Couldn't decompress image."); + } if (img->detect_alpha()) { img->convert(Image::FORMAT_RGBA8); } else { diff --git a/platform/macos/display_server_macos.mm b/platform/macos/display_server_macos.mm index d76e41f61c..cb4c80cc75 100644 --- a/platform/macos/display_server_macos.mm +++ b/platform/macos/display_server_macos.mm @@ -2488,7 +2488,7 @@ void DisplayServerMacOS::warp_mouse(const Point2i &p_position) { NSRect pointInWindowRect = NSMakeRect(p_position.x / scale, contentRect.size.height - (p_position.y / scale), scale, scale); NSPoint pointOnScreen = [[wd.window_view window] convertRectToScreen:pointInWindowRect].origin; - // Point in scren coords. + // Point in screen coords. CGPoint lMouseWarpPos = { pointOnScreen.x, CGDisplayBounds(CGMainDisplayID()).size.height - pointOnScreen.y }; // Do the warping. diff --git a/platform/web/js/libs/library_godot_input.js b/platform/web/js/libs/library_godot_input.js index 92113e85c9..eaff40f89c 100644 --- a/platform/web/js/libs/library_godot_input.js +++ b/platform/web/js/libs/library_godot_input.js @@ -135,9 +135,9 @@ const GodotInputGamepads = { } const id = pad.id; - // Chrom* style: NAME (Vendor: xxxx Product: xxxx) + // Chrom* style: NAME (Vendor: xxxx Product: xxxx). const exp1 = /vendor: ([0-9a-f]{4}) product: ([0-9a-f]{4})/i; - // Firefox/Safari style (safari may remove leading zeores) + // Firefox/Safari style (Safari may remove leading zeroes). const exp2 = /^([0-9a-f]+)-([0-9a-f]+)-/i; let vendor = ''; let product = ''; diff --git a/servers/xr_server.cpp b/servers/xr_server.cpp index 7e2c512554..dae342a037 100644 --- a/servers/xr_server.cpp +++ b/servers/xr_server.cpp @@ -198,9 +198,7 @@ void XRServer::remove_interface(const Ref<XRInterface> &p_interface) { }; ERR_FAIL_COND_MSG(idx == -1, "Interface not found."); - - print_verbose("XR: Removed interface" + p_interface->get_name()); - + print_verbose("XR: Removed interface \"" + p_interface->get_name() + "\""); emit_signal(SNAME("interface_removed"), p_interface->get_name()); interfaces.remove_at(idx); }; |