Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cherry-picks for the 4.1 branch (future 4.1.1) - 1st batch #79297

Merged
merged 77 commits into from
Jul 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
77 commits
Select commit Hold shift + click to select a range
71d5827
Fixed the fallback logic of OS::shell_show_in_file_manager
Daylily-Zeleen Jul 6, 2023
0ec5994
Revert "Fix focusloss of non-exclusive `AcceptDialog` with `close_on_…
Sauermann Jul 5, 2023
bc9bc23
Initialize particles instance buffer in case it is used before being …
clayjohn Jun 29, 2023
6255a64
Fix using uint suffix at the hex number declaration in shaders
Chaosus Jul 1, 2023
da1e511
Linux: Allow unbundling brotli to use system library
akien-mga Jul 6, 2023
89e64da
Take eye offset into account for depth in StandardMaterial3D
BastiaanOlij Jul 5, 2023
03e82be
Fix export options of scripted EditorExportPlugins
RedworkDE Jul 4, 2023
7a8ac69
Fix a typo in the `String.to_float` description
Amir-Rasteg Jul 3, 2023
371b31c
Fix: Incorrect property names in FontFile::_get_property_list().
zorbathut Jul 1, 2023
a8bfdd8
Fix error when non-ASCII characters in resource pack path
timothyqiu Jul 2, 2023
545e37c
Translate "No match" message in FindReplaceBar
timothyqiu Jul 2, 2023
92040e8
Fix wrong type casting for octahedral tangents
nklbdev Jun 30, 2023
2bfeb29
Potencially fix nan's on octahedral tangents in RenderingServer
nklbdev Jul 1, 2023
8010522
C#: Compare symbol names without null flow state
raulsntos Jul 6, 2023
836913c
Make sure the shortcut key respects the context in `TileSetAtlasSourc…
Rindbee Jul 1, 2023
705c1d6
Fix dropping files from res:// to res://
KoBeWi Jul 1, 2023
a0366f1
Fix regression with enum descriptions now showing up in documentation.
anvilfolk Jul 2, 2023
0dec3d6
Fix shader language float literal precision truncation
bitsawer Jul 3, 2023
f5addd5
Make shader preprocessor keyword colors consistent
bitsawer Jul 6, 2023
ed9c091
Fix infinity loop state can't break
TokageItLab Jul 7, 2023
8cea540
Do not change a node unique name to the same name
theraot Jul 2, 2023
6018ff4
Add tooltip description wrapping in scene tree and plugin settings
mb4c Jul 6, 2023
69948f7
C#: Add null check before calling `UnregisterGodotObject`
RedworkDE Jul 7, 2023
4e84660
Fix that `_drop_physics_mouseover` only happens when necessary
Sauermann Jun 10, 2023
221535c
[Windows] Flash both the window caption and taskbar button on `reques…
bruvzg Jun 15, 2023
3fd5fec
Fix Camera3D project_* methods not accounting for frustum offset
bcmpinc Jun 20, 2023
ffc87b2
Focus current node after connecting
KoBeWi Oct 21, 2021
4cec4bd
Sort project tags before saving
aaronfranke Jun 27, 2023
ab14aa9
Fix enum tooltip with no description
MewPurPur Jun 21, 2023
8cefce5
Improve string printing in the tiledata editor
MewPurPur Jun 21, 2023
2ba192e
Fix comments and indentation in .gdshaderinc files
jpcerrone Jul 7, 2023
1875ecb
Project converter: Use same rendering driver as Project Manager
akien-mga Jun 28, 2023
87b4143
Fix cursor behaviour in Tree while holding CTRL
marzecdawid Jan 6, 2023
a084f05
Return shader parse error when using 'hint_normal_roughness_texture' …
lewiji Jun 29, 2023
e323304
Remove uses of `vformat()` with no placeholders
Calinou Jun 28, 2023
fe8e7a0
Use bullet points in shader editor creation dialog
Calinou Jun 24, 2023
ac87b5d
Mention Xbox menu button by name in Start button description
Calinou Jun 26, 2023
240701f
Fix invalid minimum size for translated messages in option button
yvie-k Jun 27, 2023
c9b1d99
Update the RiderPathLocator to support the JetBrains Toolbox 2.0
van800 Jun 22, 2023
393076a
[macOS/iOS] Set MoltenVK logging level based on `--verbose` flag.
bruvzg Jul 5, 2023
fa45bb6
[Windows] Fix setting initial non-exclusive window mode.
bruvzg Jul 4, 2023
4c1c269
Linux: Link libsquish directly when unbundling, .pc file unreliable
akien-mga Jul 6, 2023
cdeddff
Check parameter validity in `Object::set_script`
angad-k Feb 17, 2021
fa6fb0a
fix threading bug in vulkan rendering device
joemarshall Jun 28, 2023
09c245f
Fixed grid disappearance
Jun 26, 2023
90b4a3f
Add compatibility properties to `TouchScreenButton`
AThousandShips Jul 2, 2023
fb8e21b
Fix `rpc` calls with binds
AThousandShips Jun 22, 2023
a4547db
Fix erroneous pad_zeros warning
MewPurPur Jul 8, 2023
c8b5087
Fix incorrect documentation for `Engine.get_architecture_name()`
aaronfranke Jul 7, 2023
361c0d5
Clear specular buffer if bg mode is canvas and ss effects are used
puchik Jun 23, 2023
add7c21
fix typo on TLSOptions.xml and library_godot_display.js
sepTN Jul 5, 2023
42b8ae5
Fix `Node::add_sibling` parent check
Sauermann Jun 29, 2023
3f334cb
C#: Fix command line exporting
RedworkDE Jul 7, 2023
5576f5a
Fix various typos in documentation
sepTN Jul 8, 2023
7447946
Avoid freeze when interacting with menus on Wayland by re-aquiring ne…
clayjohn Jul 7, 2023
6becf94
Fix formatting of dlopen error message on Windows
KamilBrzoskowski Jun 28, 2023
bbfdfab
Add performance note for parsing source geometry
smix8 Jul 9, 2023
0d51fec
Fix closest possible navigation path position
smix8 Jul 3, 2023
55ae2a3
Fix rigid body property description
cbscribe Jul 9, 2023
d6d8f6a
Unify error condition for particles trail lifetime
clayjohn Jul 10, 2023
1c1d4f6
Fix `PackedScene::get_last_modified_time()` always returns `0`
Rindbee Jul 9, 2023
36ce14a
Fix disabled slider highlighting
NiskashY Jun 27, 2023
4f40525
add 3.x compatibility for animation loop mode
Owl-A Jul 7, 2023
29b4ee3
Change explicit 'Godot 4.0' references to 'Godot 4'
akien-mga Jul 10, 2023
2f32a34
Fix `Camera2D.rotating` not being converted and reversed properly
OverloadedOrama Jul 10, 2023
b3a5622
Fix zero-sized WorkerThreadPool not processing group tasks
RandomShaper Jun 29, 2023
a79160e
Collapse bottom panel if there is no active tab
KoBeWi Jul 5, 2023
ec6d258
Fix property hint class name type string restriction and replace mode
aaronfranke Jul 7, 2023
5729e40
Improve user-friendliness of project version mismatch message
aaronfranke Jul 6, 2023
438a598
Update FileDialog button activity when file_mode is changed.
HolonProduction Jul 8, 2023
167b02d
Clarify EditorExportPlugin::add_file only remaps in _export_file
timothyqiu Jul 11, 2023
1e2bfdc
Improve error message for `Node.set_owner`
AThousandShips Jul 3, 2023
e3cfc02
Improve text in popup warning, remove "upgrade or downgrade" text
aaronfranke Jul 10, 2023
6ec2d6d
Linux: Fix build with `use_sowrap=no` and various warnings/errors
akien-mga Jul 6, 2023
30ab0e2
Fix Linux `move_to_trash` wrongly reporting files as not found
akien-mga Jul 10, 2023
2796b62
Hide/show AcceptDialog's button spacer on button visibility changed
kleonc Jul 10, 2023
92cf616
Add changelog for 4.1.1
YuriSizov Jul 11, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
159 changes: 159 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,164 @@ All notable changes to this project will be documented in this file.

The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).

## [4.1.1] - TBD

See the [release announcement](https://godotengine.org/article/maintenance-release-godot-4-1-1) for details.

### Added

#### Animation

- Add 3.x compatibility for animation loop mode ([GH-79155](https://github.com/godotengine/godot/pull/79155)).

#### GUI

- Add compatibility properties to `TouchScreenButton` ([GH-78940](https://github.com/godotengine/godot/pull/78940)).

### Changed

#### 2D

- Improve string drawing in the tiledata editor ([GH-78522](https://github.com/godotengine/godot/pull/78522)).
- Make sure the shortcut key respects the context in `TileSetAtlasSourceEditor` ([GH-78920](https://github.com/godotengine/godot/pull/78920)).

#### Buildsystem

- Linux: Allow unbundling brotli to use system library ([GH-79101](https://github.com/godotengine/godot/pull/79101)).
- Linux: Link libsquish directly when unbundling, .pc file unreliable ([GH-79105](https://github.com/godotengine/godot/pull/79105)).

#### C#/.NET

- Update the RiderPathLocator to support the JetBrains Toolbox 2.0 ([GH-78832](https://github.com/godotengine/godot/pull/78832)).
- Compare symbol names without null flow state ([GH-79094](https://github.com/godotengine/godot/pull/79094)).
- Add null check before calling `UnregisterGodotObject` ([GH-79151](https://github.com/godotengine/godot/pull/79151)).

#### Core

- Check parameter validity in `Object::set_script` ([GH-46125](https://github.com/godotengine/godot/pull/46125)).
- Improve error message for `Node.set_owner` ([GH-79000](https://github.com/godotengine/godot/pull/79000)).

#### Editor

- Focus current node after connecting ([GH-54071](https://github.com/godotengine/godot/pull/54071)).
- Fix tooltip of enum value without description ([GH-78524](https://github.com/godotengine/godot/pull/78524)).
- Use bullet points in shader editor creation dialog ([GH-78631](https://github.com/godotengine/godot/pull/78631)).
- Sort project tags before saving ([GH-78775](https://github.com/godotengine/godot/pull/78775)).
- Project converter: Use same rendering driver as Project Manager ([GH-78795](https://github.com/godotengine/godot/pull/78795)).
- Add tooltip description wrapping in scene tree and plugin settings ([GH-79090](https://github.com/godotengine/godot/pull/79090)).
- Improve user-friendliness of project version mismatch messages ([GH-79118](https://github.com/godotengine/godot/pull/79118), [GH-79299](https://github.com/godotengine/godot/pull/79299)).

#### GUI

- Ensure that `_drop_physics_mouseover` only happens when necessary ([GH-78078](https://github.com/godotengine/godot/pull/78078)).
- Update FileDialog button activity when `file_mode` is changed ([GH-79211](https://github.com/godotengine/godot/pull/79211)).
- Hide/show `AcceptDialog`'s button spacer on button visibility changed ([GH-79274](https://github.com/godotengine/godot/pull/79274)).

#### Porting

- macOS/iOS: Set MoltenVK logging level based on `--verbose` flag ([GH-79061](https://github.com/godotengine/godot/pull/79061)).
- Windows: Flash both the window caption and taskbar button on `request_attention` ([GH-78263](https://github.com/godotengine/godot/pull/78263)).

#### Rendering

- Clear specular buffer if sky mode is canvas and screen space effects are used ([GH-78624](https://github.com/godotengine/godot/pull/78624)).
- Take eye offset into account for depth in StandardMaterial3D ([GH-79049](https://github.com/godotengine/godot/pull/79049)).

### Fixed

#### 2D

- Fix `Camera2D.rotating` not being converted and reversed properly ([GH-79264](https://github.com/godotengine/godot/pull/79264)).

#### 3D

- Fix Camera3D `project_*` methods not accounting for frustum offset ([GH-75806](https://github.com/godotengine/godot/pull/75806)).
- Fix 3D viewport grid disappearing on scene tab changes ([GH-78694](https://github.com/godotengine/godot/pull/78694)).

#### Animation

- Fix infinite loop state check in `AnimationStateMachine` ([GH-79141](https://github.com/godotengine/godot/pull/79141)).

#### Buildsystem

- Linux: Fix build with `use_sowrap=no` and various warnings/errors ([GH-79097](https://github.com/godotengine/godot/pull/79097)).

#### C#/.NET

- Fix command line exporting ([GH-79173](https://github.com/godotengine/godot/pull/79173)).

#### Core

- Fix zero-sized WorkerThreadPool not processing group tasks ([GH-78845](https://github.com/godotengine/godot/pull/78845)).
- Fix `Node::add_sibling` parent check ([GH-78847](https://github.com/godotengine/godot/pull/78847)).
- Fix error when non-ASCII characters in resource pack path ([GH-78935](https://github.com/godotengine/godot/pull/78935)).
- Fix erroneous `pad_zeros()` warning ([GH-79202](https://github.com/godotengine/godot/pull/79202)).
- Fix `PackedScene::get_last_modified_time()` always returns `0` ([GH-79237](https://github.com/godotengine/godot/pull/79237)).

#### Editor

- Fix dropping files from `res://` to `res://` ([GH-78914](https://github.com/godotengine/godot/pull/78914)).
- Do not change a node unique name to the same name ([GH-78925](https://github.com/godotengine/godot/pull/78925)).
- Collapse bottom panel if there is no active tab ([GH-79078](https://github.com/godotengine/godot/pull/79078)).

#### Export

- Fix export options of scripted `EditorExportPlugin`s ([GH-79025](https://github.com/godotengine/godot/pull/79025)).

#### GDScript

- Fix regression with GDScript enum descriptions now showing up in documentation ([GH-78953](https://github.com/godotengine/godot/pull/78953)).

#### GUI

- Fix cursor behavior for multiselect in Tree while holding CTRL ([GH-71024](https://github.com/godotengine/godot/pull/71024)).
- Fix disabled slider highlighting ([GH-78776](https://github.com/godotengine/godot/pull/78776)).
- Fix invalid minimum size for translated messages in option button ([GH-78835](https://github.com/godotengine/godot/pull/78835)).
- Fix incorrect property names in `FontFile::_get_property_list()` ([GH-78907](https://github.com/godotengine/godot/pull/78907)).
- Revert "Fix focusloss of non-exclusive `AcceptDialog` with `close_on_escape`" ([GH-79084](https://github.com/godotengine/godot/pull/79084)).

#### Import

- Fix property hint class name type string restriction and replace mode ([GH-79139](https://github.com/godotengine/godot/pull/79139)).

#### Navigation

- Fix closest possible navigation path position ([GH-79004](https://github.com/godotengine/godot/pull/79004)).

#### Networking

- Fix `rpc` calls with binds ([GH-78551](https://github.com/godotengine/godot/pull/78551)).

#### Particles

- Initialize particles instance buffer in case it is used before being updated ([GH-78852](https://github.com/godotengine/godot/pull/78852)).
- Unify error condition for particles trail lifetime ([GH-79270](https://github.com/godotengine/godot/pull/79270)).

#### Physics

- Fix rigid body `contact_monitor` property description ([GH-79250](https://github.com/godotengine/godot/pull/79250)).

#### Porting

- Fix formatting of `dlopen` error messages ([GH-78802](https://github.com/godotengine/godot/pull/78802)).
- Fix the fallback logic of `OS::shell_show_in_file_manager` ([GH-79087](https://github.com/godotengine/godot/pull/79087)).
- Linux/BSD: Avoid freeze when interacting with menus on Wayland ([GH-79143](https://github.com/godotengine/godot/pull/79143)).
- Linux/BSD: Fix `move_to_trash` wrongly reporting files as not found ([GH-79284](https://github.com/godotengine/godot/pull/79284)).
- Windows: Fix setting initial non-exclusive window mode ([GH-79016](https://github.com/godotengine/godot/pull/79016)).

#### Rendering

- Fix threading bug in Vulkan rendering device ([GH-78794](https://github.com/godotengine/godot/pull/78794)).
- Fix sanitizers reports about octahedral tangents in RenderingServer ([GH-78902](https://github.com/godotengine/godot/pull/78902)).

#### Shaders

- Fix invalid shader compilation when using `hint_normal_roughness_texture` in mobile backend ([GH-78839](https://github.com/godotengine/godot/pull/78839)).
- Fix using uint suffix at the hex number declaration in shaders ([GH-78906](https://github.com/godotengine/godot/pull/78906)).
- Fix shader language float literal precision truncation ([GH-78972](https://github.com/godotengine/godot/pull/78972)).
- Fix comments and indentation in `.gdshaderinc` files ([GH-79158](https://github.com/godotengine/godot/pull/79158)).


## [4.1] - 2023-07-06

See the [release announcement](https://godotengine.org/article/godot-4-1-is-here) for details.
Expand Down Expand Up @@ -2876,6 +3034,7 @@ See the [release announcement](https://godotengine.org/article/godot-3-3-has-arr
- Only WebAssembly is supported now, since all browsers supporting WebGL 2.0 also support WebAssembly.


[4.1.1]: https://github.com/godotengine/godot/compare/4.1-stable...4.1.1-stable
[4.1]: https://github.com/godotengine/godot/compare/4.0-stable...4.1-stable
[4.0]: https://github.com/godotengine/godot/compare/3.2-stable...4.0-stable
[3.5]: https://github.com/godotengine/godot/compare/3.4-stable...3.5-stable
Expand Down
7 changes: 4 additions & 3 deletions SConstruct
Original file line number Diff line number Diff line change
Expand Up @@ -222,6 +222,7 @@ opts.Add(BoolVariable("use_precise_math_checks", "Math checks use very precise e
opts.Add(BoolVariable("scu_build", "Use single compilation unit build", False))

# Thirdparty libraries
opts.Add(BoolVariable("builtin_brotli", "Use the built-in Brotli library", True))
opts.Add(BoolVariable("builtin_certs", "Use the built-in SSL certificates bundles", True))
opts.Add(BoolVariable("builtin_embree", "Use the built-in Embree library", True))
opts.Add(BoolVariable("builtin_enet", "Use the built-in ENet library", True))
Expand Down Expand Up @@ -296,21 +297,21 @@ else:
if selected_platform in ["macos", "osx"]:
if selected_platform == "osx":
# Deprecated alias kept for compatibility.
print('Platform "osx" has been renamed to "macos" in Godot 4.0. Building for platform "macos".')
print('Platform "osx" has been renamed to "macos" in Godot 4. Building for platform "macos".')
# Alias for convenience.
selected_platform = "macos"

if selected_platform in ["ios", "iphone"]:
if selected_platform == "iphone":
# Deprecated alias kept for compatibility.
print('Platform "iphone" has been renamed to "ios" in Godot 4.0. Building for platform "ios".')
print('Platform "iphone" has been renamed to "ios" in Godot 4. Building for platform "ios".')
# Alias for convenience.
selected_platform = "ios"

if selected_platform in ["linux", "bsd", "x11"]:
if selected_platform == "x11":
# Deprecated alias kept for compatibility.
print('Platform "x11" has been renamed to "linuxbsd" in Godot 4.0. Building for platform "linuxbsd".')
print('Platform "x11" has been renamed to "linuxbsd" in Godot 4. Building for platform "linuxbsd".')
# Alias for convenience.
selected_platform = "linuxbsd"

Expand Down
2 changes: 1 addition & 1 deletion core/SCsub
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ thirdparty_misc_sources = [thirdparty_misc_dir + file for file in thirdparty_mis
env_thirdparty.add_source_files(thirdparty_obj, thirdparty_misc_sources)

# Brotli
if env["brotli"]:
if env["brotli"] and env["builtin_brotli"]:
thirdparty_brotli_dir = "#thirdparty/brotli/"
thirdparty_brotli_sources = [
"common/constants.c",
Expand Down
2 changes: 1 addition & 1 deletion core/input/input_event.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1192,7 +1192,7 @@ static const char *_joy_button_descriptions[(size_t)JoyButton::SDL_MAX] = {
TTRC("Top Action, Sony Triangle, Xbox Y, Nintendo X"),
TTRC("Back, Sony Select, Xbox Back, Nintendo -"),
TTRC("Guide, Sony PS, Xbox Home"),
TTRC("Start, Nintendo +"),
TTRC("Start, Xbox Menu, Nintendo +"),
TTRC("Left Stick, Sony L3, Xbox L/LS"),
TTRC("Right Stick, Sony R3, Xbox R/RS"),
TTRC("Left Shoulder, Sony L1, Xbox LB"),
Expand Down
8 changes: 4 additions & 4 deletions core/io/compression.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,13 +35,13 @@

#include "thirdparty/misc/fastlz.h"

#ifdef BROTLI_ENABLED
#include "thirdparty/brotli/include/brotli/decode.h"
#endif

#include <zlib.h>
#include <zstd.h>

#ifdef BROTLI_ENABLED
#include <brotli/decode.h>
#endif

int Compression::compress(uint8_t *p_dst, const uint8_t *p_src, int p_src_size, Mode p_mode) {
switch (p_mode) {
case MODE_BROTLI: {
Expand Down
2 changes: 1 addition & 1 deletion core/io/file_access_zip.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -47,7 +47,7 @@ static void *godot_open(voidpf opaque, const char *p_fname, int mode) {
return nullptr;
}

Ref<FileAccess> f = FileAccess::open(p_fname, FileAccess::READ);
Ref<FileAccess> f = FileAccess::open(String::utf8(p_fname), FileAccess::READ);
ERR_FAIL_COND_V(f.is_null(), nullptr);

ZipData *zd = memnew(ZipData);
Expand Down
8 changes: 5 additions & 3 deletions core/object/object.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -836,14 +836,16 @@ void Object::set_script(const Variant &p_script) {
return;
}

Ref<Script> s = p_script;
ERR_FAIL_COND_MSG(s.is_null() && !p_script.is_null(), "Invalid parameter, it should be a reference to a valid script (or null).");

script = p_script;

if (script_instance) {
memdelete(script_instance);
script_instance = nullptr;
}

script = p_script;
Ref<Script> s = script;

if (!s.is_null()) {
if (s->can_instantiate()) {
OBJ_DEBUG_LOCK
Expand Down
2 changes: 1 addition & 1 deletion core/object/worker_thread_pool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -416,7 +416,7 @@ Error WorkerThreadPool::wait_for_task_completion(TaskID p_task_id) {
WorkerThreadPool::GroupID WorkerThreadPool::_add_group_task(const Callable &p_callable, void (*p_func)(void *, uint32_t), void *p_userdata, BaseTemplateUserdata *p_template_userdata, int p_elements, int p_tasks, bool p_high_priority, const String &p_description) {
ERR_FAIL_COND_V(p_elements < 0, INVALID_TASK_ID);
if (p_tasks < 0) {
p_tasks = threads.size();
p_tasks = MAX(1u, threads.size());
}

task_mutex.lock();
Expand Down
10 changes: 6 additions & 4 deletions core/os/os.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -295,12 +295,14 @@ Error OS::shell_open(String p_uri) {
}

Error OS::shell_show_in_file_manager(String p_path, bool p_open_folder) {
if (!p_path.begins_with("file://")) {
p_path = String("file://") + p_path;
}
if (!p_path.ends_with("/")) {
p_path = p_path.trim_prefix("file://");

if (!DirAccess::dir_exists_absolute(p_path)) {
p_path = p_path.get_base_dir();
}

p_path = String("file://") + p_path;

return shell_open(p_path);
}
// implement these with the canvas?
Expand Down
9 changes: 5 additions & 4 deletions core/string/ustring.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -4281,12 +4281,13 @@ String String::pad_zeros(int p_digits) const {
begin++;
}

if (begin >= end) {
int zeros_to_add = p_digits - (end - begin);

if (zeros_to_add <= 0) {
return s;
} else {
return s.insert(begin, String("0").repeat(zeros_to_add));
}

int zeros_to_add = p_digits - (end - begin);
return s.insert(begin, String("0").repeat(zeros_to_add));
}

String String::trim_prefix(const String &p_prefix) const {
Expand Down
22 changes: 22 additions & 0 deletions core/variant/callable_bind.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -144,6 +144,18 @@ void CallableCustomBind::call(const Variant **p_arguments, int p_argcount, Varia
callable.callp(args, p_argcount + binds.size(), r_return_value, r_call_error);
}

Error CallableCustomBind::rpc(int p_peer_id, const Variant **p_arguments, int p_argcount, Callable::CallError &r_call_error) const {
const Variant **args = (const Variant **)alloca(sizeof(const Variant **) * (binds.size() + p_argcount));
for (int i = 0; i < p_argcount; i++) {
args[i] = (const Variant *)p_arguments[i];
}
for (int i = 0; i < binds.size(); i++) {
args[i + p_argcount] = (const Variant *)&binds[i];
}

return callable.rpcp(p_peer_id, args, p_argcount + binds.size(), r_call_error);
}

CallableCustomBind::CallableCustomBind(const Callable &p_callable, const Vector<Variant> &p_binds) {
callable = p_callable;
binds = p_binds;
Expand Down Expand Up @@ -242,6 +254,16 @@ void CallableCustomUnbind::call(const Variant **p_arguments, int p_argcount, Var
callable.callp(p_arguments, p_argcount - argcount, r_return_value, r_call_error);
}

Error CallableCustomUnbind::rpc(int p_peer_id, const Variant **p_arguments, int p_argcount, Callable::CallError &r_call_error) const {
if (argcount > p_argcount) {
r_call_error.error = Callable::CallError::CALL_ERROR_TOO_FEW_ARGUMENTS;
r_call_error.argument = 0;
r_call_error.expected = argcount;
return ERR_UNCONFIGURED;
}
return callable.rpcp(p_peer_id, p_arguments, p_argcount - argcount, r_call_error);
}

CallableCustomUnbind::CallableCustomUnbind(const Callable &p_callable, int p_argcount) {
callable = p_callable;
argcount = p_argcount;
Expand Down
2 changes: 2 additions & 0 deletions core/variant/callable_bind.h
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ class CallableCustomBind : public CallableCustom {
virtual StringName get_method() const override;
virtual ObjectID get_object() const override;
virtual void call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, Callable::CallError &r_call_error) const override;
virtual Error rpc(int p_peer_id, const Variant **p_arguments, int p_argcount, Callable::CallError &r_call_error) const override;
virtual const Callable *get_base_comparator() const override;
virtual int get_bound_arguments_count() const override;
virtual void get_bound_arguments(Vector<Variant> &r_arguments, int &r_argcount) const override;
Expand Down Expand Up @@ -78,6 +79,7 @@ class CallableCustomUnbind : public CallableCustom {
virtual StringName get_method() const override;
virtual ObjectID get_object() const override;
virtual void call(const Variant **p_arguments, int p_argcount, Variant &r_return_value, Callable::CallError &r_call_error) const override;
virtual Error rpc(int p_peer_id, const Variant **p_arguments, int p_argcount, Callable::CallError &r_call_error) const override;
virtual const Callable *get_base_comparator() const override;
virtual int get_bound_arguments_count() const override;
virtual void get_bound_arguments(Vector<Variant> &r_arguments, int &r_argcount) const override;
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/AnimationNodeAdd3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Blends two of three animations additively inside of an [AnimationNodeBlendTree].
</brief_description>
<description>
A resource to add to an [AnimationNodeBlendTree]. Blends two animations out of three additively out of three based on the amounmt value.
A resource to add to an [AnimationNodeBlendTree]. Blends two animations out of three additively out of three based on the amount value.
This animation node has three inputs:
- The base animation to add to
- A "-add" animation to blend with when the blend amount is negative
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/AnimationNodeBlend3.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
Blends two of three animations linearly inside of an [AnimationNodeBlendTree].
</brief_description>
<description>
A resource to add to an [AnimationNodeBlendTree]. Blends two animations out of three linearly out of three based on the amounmt value.
A resource to add to an [AnimationNodeBlendTree]. Blends two animations out of three linearly out of three based on the amount value.
This animation node has three inputs:
- The base animation to blend with
- A "-blend" animation to blend with when the blend amount is negative value
Expand Down
2 changes: 1 addition & 1 deletion doc/classes/BoneAttachment3D.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
<return type="void" />
<param index="0" name="use_external_skeleton" type="bool" />
<description>
Sets whether the BoneAttachment3D node will use an extenral [Skeleton3D] node rather than attenpting to use its parent node as the [Skeleton3D]. When set to [code]true[/code], the BoneAttachment3D node will use the external [Skeleton3D] node set in [method set_external_skeleton].
Sets whether the BoneAttachment3D node will use an external [Skeleton3D] node rather than attempting to use its parent node as the [Skeleton3D]. When set to [code]true[/code], the BoneAttachment3D node will use the external [Skeleton3D] node set in [method set_external_skeleton].
</description>
</method>
</methods>
Expand Down
Loading