From aa223c335cf389a9b7e3481c27148b7a9eb3dd59 Mon Sep 17 00:00:00 2001 From: Mark Wilson <23439518+wlsnmrk@users.noreply.github.com> Date: Sun, 8 Oct 2023 17:51:46 -0400 Subject: [PATCH 001/120] Improved style for cross-language examples. * Replaced "foo"/"bar" example values with "my value". * Changed C# public field to property and GDScript to match. * Used PascalCase for C# property. * Used camelCase for C# local variable. * Used "var" for C# local variable declarations. * Used PascalCase for GDScript class/script variable. * Improved clarity of comments documenting expected output. * Eliminated horizontal scroll in C# code example. * Fixed a comma splice in the page text. * Removed an out-of-date warning block. --- .../scripting/cross_language_scripting.rst | 74 +++++++++++-------- 1 file changed, 43 insertions(+), 31 deletions(-) diff --git a/tutorials/scripting/cross_language_scripting.rst b/tutorials/scripting/cross_language_scripting.rst index 8b193e1b86c..fd9f5bb5537 100644 --- a/tutorials/scripting/cross_language_scripting.rst +++ b/tutorials/scripting/cross_language_scripting.rst @@ -16,7 +16,11 @@ The following two scripts will be used as references throughout this page. extends Node - var my_field: String = "foo" + var my_property: String = "my gdscript value": + get: + return my_property + set(value): + my_property = value signal my_signal @@ -40,7 +44,7 @@ The following two scripts will be used as references throughout this page. public partial class MyCSharpNode : Node { - public string myField = "bar"; + public string MyProperty { get; set; } = "my c# value"; [Signal] public delegate void MySignalEventHandler(); @@ -86,8 +90,8 @@ with :ref:`new() `. .. code-block:: gdscript - var my_csharp_script = load("res://Path/To/MyCSharpNode.cs") - var my_csharp_node = my_csharp_script.new() + var MyCSharpScript = load("res://Path/To/MyCSharpNode.cs") + var my_csharp_node = MyCSharpScript.new() .. warning:: @@ -112,8 +116,8 @@ be instantiated with :ref:`GDScript.New() `. .. code-block:: csharp - GDScript MyGDScript = GD.Load("res://path/to/my_gd_script.gd"); - GodotObject myGDScriptNode = (GodotObject)MyGDScript.New(); // This is a GodotObject. + var myGDScript = GD.Load("res://path/to/my_gd_script.gd"); + var myGDScriptNode = (GodotObject)myGDScript.New(); // This is a GodotObject. Here we are using an :ref:`class_Object`, but you can use type conversion like explained in :ref:`doc_c_sharp_features_type_conversion_and_casting`. @@ -129,22 +133,26 @@ anything to worry about. .. code-block:: gdscript - print(my_csharp_node.myField) # bar - my_csharp_node.myField = "BAR" - print(my_csharp_node.myField) # BAR + # Output: "my c# value". + print(my_csharp_node.MyProperty) + my_csharp_node.MyProperty = "MY C# VALUE" + # Output: "MY C# VALUE". + print(my_csharp_node.MyProperty) Accessing GDScript fields from C# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ As C# is statically typed, accessing GDScript from C# is a bit more -convoluted, you will have to use :ref:`GodotObject.Get() ` +convoluted. You will have to use :ref:`GodotObject.Get() ` and :ref:`GodotObject.Set() `. The first argument is the name of the field you want to access. .. code-block:: csharp - GD.Print(myGDScriptNode.Get("my_field")); // foo - myGDScriptNode.Set("my_field", "FOO"); - GD.Print(myGDScriptNode.Get("my_field")); // FOO + // Output: "my gdscript value". + GD.Print(myGDScriptNode.Get("my_property")); + myGDScriptNode.Set("my_property", "MY GDSCRIPT VALUE"); + // Output: "MY GDSCRIPT VALUE". + GD.Print(myGDScriptNode.Get("my_property")); Keep in mind that when setting a field value you should only use types the GDScript side knows about. @@ -163,13 +171,18 @@ If that's impossible, you'll see the following error: ``Invalid call. Nonexisten .. code-block:: gdscript - my_csharp_node.PrintNodeName(self) # myGDScriptNode - # my_csharp_node.PrintNodeName() # This line will fail. + # Output: "my_gd_script_node" (or name of node where this code is placed). + my_csharp_node.PrintNodeName(self) + # This line will fail. + # my_csharp_node.PrintNodeName() - my_csharp_node.PrintNTimes("Hello there!", 2) # Hello there! Hello there! + # Outputs "Hello there!" twice, once per line. + my_csharp_node.PrintNTimes("Hello there!", 2) - my_csharp_node.PrintArray(["a", "b", "c"]) # a, b, c - my_csharp_node.PrintArray([1, 2, 3]) # 1, 2, 3 + # Output: "a", "b", "c" (one per line). + my_csharp_node.PrintArray(["a", "b", "c"]) + # Output: "1", "2", "3" (one per line). + my_csharp_node.PrintArray([1, 2, 3]) Calling GDScript methods from C# ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ @@ -181,22 +194,21 @@ to said method. .. code-block:: csharp - myGDScriptNode.Call("print_node_name", this); // my_csharp_node - // myGDScriptNode.Call("print_node_name"); // This line will fail silently and won't error out. + // Output: "MyCSharpNode" (or name of node where this code is placed). + myGDScriptNode.Call("print_node_name", this); + // This line will fail silently and won't error out. + // myGDScriptNode.Call("print_node_name"); - myGDScriptNode.Call("print_n_times", "Hello there!", 2); // Hello there! Hello there! + // Outputs "Hello there!" twice, once per line. + myGDScriptNode.Call("print_n_times", "Hello there!", 2); string[] arr = new string[] { "a", "b", "c" }; - myGDScriptNode.Call("print_array", arr); // a, b, c - myGDScriptNode.Call("print_array", new int[] { 1, 2, 3 }); // 1, 2, 3 - // Note how the type of each array entry does not matter as long as it can be handled by the marshaller. - -.. warning:: - - As you can see, if the first argument of the called method is an array, - you'll need to cast it as ``object``. - Otherwise, each element of your array will be treated as a single argument - and the function signature won't match. + // Output: "a", "b", "c" (one per line). + myGDScriptNode.Call("print_array", arr); + // Output: "1", "2", "3" (one per line). + myGDScriptNode.Call("print_array", new int[] { 1, 2, 3 }); + // Note how the type of each array entry does not matter + // as long as it can be handled by the marshaller. .. _connecting_to_signals_cross_language: From d3e8abd7101a9360c6f2e4f4c6f4716371efeedb Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Filipe=20Jos=C3=A9?= <52170617+fmnjose@users.noreply.github.com> Date: Wed, 15 May 2024 23:15:51 +0100 Subject: [PATCH 002/120] Change misleading comment in 'Your first 3D game' On the collision processing code (Chapter 6 - Jumping and squashing monsters) there is a misleading comment saying that the collision.get_collider() == null has the purpose of checking for a collision with the ground. This addresses the following open issue: https://github.com/godotengine/godot-docs/issues/9355 --- getting_started/first_3d_game/06.jump_and_squash.rst | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/getting_started/first_3d_game/06.jump_and_squash.rst b/getting_started/first_3d_game/06.jump_and_squash.rst index 1e22476e8ee..0ffd6377d87 100644 --- a/getting_started/first_3d_game/06.jump_and_squash.rst +++ b/getting_started/first_3d_game/06.jump_and_squash.rst @@ -241,7 +241,11 @@ With this code, if no collisions occurred on a given frame, the loop won't run. # We get one of the collisions with the player var collision = get_slide_collision(index) - # If the collision is with ground + # If there are duplicate collisions with a mob in a single frame + # the mob will be deleted after the first collision, and a second call to + # get_collider will return null, leading to a null pointer when calling + # collision.get_collider().is_in_group("mob"). + # This block of code prevents processing duplicate collisions. if collision.get_collider() == null: continue From b6f87336efb485a576f373e48c2e3cdb4d06e0e2 Mon Sep 17 00:00:00 2001 From: Zach Coleman Date: Thu, 15 Aug 2024 12:19:10 -0700 Subject: [PATCH 003/120] Update handling_quit_requests.rst --- tutorials/inputs/handling_quit_requests.rst | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tutorials/inputs/handling_quit_requests.rst b/tutorials/inputs/handling_quit_requests.rst index fae7f3cde32..e470e5f3f55 100644 --- a/tutorials/inputs/handling_quit_requests.rst +++ b/tutorials/inputs/handling_quit_requests.rst @@ -60,8 +60,10 @@ at any time by either the user or the OS. A way to plan ahead for this possibility is to utilize ``NOTIFICATION_APPLICATION_PAUSED`` in order to perform any needed actions as the app is being suspended. +.. note:: On iOS, you only have approximately 5 seconds to finish a task started by this signal. If you go over this allotment, iOS will kill the app instead of pausing it. + On Android, pressing the Back button will exit the application if -**Application > Config > Quit** On Go Back is checked in the Project Settings +**Application > Config > Quit On Go Back** is checked in the Project Settings (which is the default). This will fire ``NOTIFICATION_WM_GO_BACK_REQUEST``. From 06d9bcd36e6f222ef530fb5a90f2f701551423b7 Mon Sep 17 00:00:00 2001 From: HolonProduction Date: Sat, 31 Aug 2024 16:34:29 +0200 Subject: [PATCH 004/120] Document sub plugins --- .../editor/img/sub_plugin_creation.webp | Bin 0 -> 15264 bytes .../plugins/editor/img/sub_plugin_moved.webp | Bin 0 -> 15274 bytes tutorials/plugins/editor/making_plugins.rst | 69 +++++++++++++----- 3 files changed, 52 insertions(+), 17 deletions(-) create mode 100644 tutorials/plugins/editor/img/sub_plugin_creation.webp create mode 100644 tutorials/plugins/editor/img/sub_plugin_moved.webp diff --git a/tutorials/plugins/editor/img/sub_plugin_creation.webp b/tutorials/plugins/editor/img/sub_plugin_creation.webp new file mode 100644 index 0000000000000000000000000000000000000000..85bcfb3ce4b2647b80dc72351a062cc78e3b146b GIT binary patch literal 15264 zcmeHu1zTLpwr%5(;1UShSRi=g*0=_D2n1-Lai?*YV1Wb=7BslKI|L1y1PC4^KyZfu z{hI8(&$;h?_rCW7-YLH7HP);#XU!T_wLTVIXe!FdrHTLmda_dLy6S@Zj{pDw8={gR z0e&F?6s4urbC40Y0OTBda|bt62>`&s5$38XF9p;$cnQSV24Dhc05|{^02jpE%~?`i zUHO6i-zp#c^Dx!)KNzZab-YMN`O2-5ugH42LJ(P0C#{5z#aet zup_RH2#Xs)6VWd9KlqdX@mEK9nIXJv0Okk}8GsYO0RZ{q4|tdZ1P4+6t*x6S5BDDv z61EfofVK>WpE3df7>NMDT^t<#I~NYW%L4#V76E{6$A9}fAY7OMc2A$+6|=kd)p8yxZX2kavGTTTl=hJ zi|9snrfiHeGw>R&yBtLAc36Oz>*H$1LzH=*cCvc~BMRSyW0sn$993OR^1n!&s>KYEXgnPje<&5YW?^NxyYccRM zd=HLhH9-S_; z7%Mx~u&&Lv*j~}^1O(n?^mEl*Pngow{RN@CA@-dyKJ67o9mFg26kzn}!C8ycU zu|ykR7Iz9omtYx_^C<)2eM+am##|A%IV5|t0em8$X%3@Xd37^Z{%d;srL2qkA8HDu zm<%(-`S~@uZhZxDu9u_)DW-9mF_yZ-v7&ETue^E-K#J#L-atK& z%)08q_;(pu!RAoV!P!8MUaxBNV+UeIIDf-w~4N;!+3-{Lr4mmApS)5>Y- z^j}^56yA*LnBkrKX~$)E1;dU~M5=61PB;NP4QS*8(pn4GTfSpfrHiip&P`59JxKM{ zq*tqCb9N*DvmVj4Pbc}AwD!rRpi`;@xten$a_9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J-q01mfo9;sX86(1p6XA(qxds6YFQ4)`FvFd}z^f{=$*hj9HfB4KG)C%yu65+h42bO*trEDW_*@V0RetNMACoxyE$3HJRz=7Nh^dj2n7&J z>(5gO$oxn0=l}3Lt)UNkA~ay<5@hEA{n3D5m<#l`2AqieIUlz2Uqj*iKS%ke?Z0gM yf9Qy3$pie?qe%?-pYk6C{-eNu6!?z<|54yS3jF`4z`tK^ppJ;&bUYESF8>P_X}I(N literal 0 HcmV?d00001 diff --git a/tutorials/plugins/editor/img/sub_plugin_moved.webp b/tutorials/plugins/editor/img/sub_plugin_moved.webp new file mode 100644 index 0000000000000000000000000000000000000000..142be3c6f5ab3395b4445b022766dcc59366358e GIT binary patch literal 15274 zcmeHu1zTLpwr%6?5ZpDmySuwPG!mT9xLeTR1PdD6B{)F>BtU@R?he6%JN=sMz0bMt zefPfi1KugV>NQr?n6qY$s#;Aq6HNtK*-t_MfS!z`x~@9EJ~99RV1`sYD8L~UKtW1M zJs%o!3xLjd1Ui9W#Q^{(XLmPEIY|nA149ageE=eW9DoL31h88GL9P<&>dG(d|Gr$$ z0-#=crdVEl{r8;zu@%kA8UzFYpeP^=aiFW4I|Q3UFt3-p>kH0+U|irE3o8h&f?#Gh zNPrML|I%*x7e0Eywtw)SN#VL_Yf3@ph6`z@u>CLC^1oo<8#gBiha1A7v2t>T_=nd2 z3tPQl{}=4!=mClCPkEUks0J97L^f>?9-X$LZ;J<>jC;q#QCJz9>2nPU~`~Tf$ znGOK7L;?T=3$7M!7JtTpfxJT7*Z=_Mr2qh$0RVtA4geq<{iPeE@1-A5I0pb|L$p#J z1pqR$0025$h;QTnVcv)kgMaDvf93qGA7tlJpfUjf>=l3jRp+wq}vJG-9wyg_wfzB{fepOm>OH?i$g7t@UHZ$XC79VbxtCR1A@2-$r1 zwR)?;q|AX)WCmu9d060;pxx(*2LbzjZ`=EUEw4+aP& zd$Tby`k*rJ%Drdvu1tTe``T;r-+71NAI}&57QXm5F570UV$;vCkCk`b7i)tqr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dGTWf@xyP;#mCRh z#|Igm1LDVuo0rAXLO_7U5-7mU%Vonaz`@B&MPUULlyz})vVbg^os)&FHJg{Ur7IQ1 zi?o6g>Ix!MoUD-1{@kiNTDaRlxFS@_cFrE&f46GeIazDDTf8X8!Nd*P2qIeNr5E45?L5r7N2QmFKBS9%QYYTT5H*FUeM-i%joyouY zR3K-<%EH}3+QQu$;_F{WRQsPJ%EZno$o`i!f+{Xnb~Zl$FY3!F{Ij0&b|A>GK7XGm zNDA=Z$kC4C&wduP0R9yx$imawit6u1$Uk{F+gd};Ib^T>MYH>F))Q!H$<52n4rJjM z07CWyFE2L>KR3`4vZz)-AY^HHdHEng|78zyv2pjZaI==Mg-8QY0J63IJe4RI{z(4% zAD-76>lZyC8nCeQvv6_ztpPX3-x{z%;%9p~%70CT?f;zRpT7Tc?Ej%do+U5vUymkH oivN`VDDWQz{-eNu6!?z<|54!oKL!5%;l|n-@|%tqV!Z literal 0 HcmV?d00001 diff --git a/tutorials/plugins/editor/making_plugins.rst b/tutorials/plugins/editor/making_plugins.rst index e9bdd9eb27e..9801e75da38 100644 --- a/tutorials/plugins/editor/making_plugins.rst +++ b/tutorials/plugins/editor/making_plugins.rst @@ -282,7 +282,7 @@ click the button, you can see some text in the console: .. image:: img/making_plugins-custom_node_console.webp A custom dock -^^^^^^^^^^^^^ +~~~~~~~~~~~~~ Sometimes, you need to extend the editor and add tools that are always available. An easy way to do it is to add a new dock with a plugin. Docks are just scenes @@ -413,18 +413,6 @@ the settings window. You should now have a custom dock: .. image:: img/making_plugins-custom_dock.webp -Going beyond -~~~~~~~~~~~~ - -Now that you've learned how to make basic plugins, you can extend the editor in -several ways. Lots of functionality can be added to the editor with GDScript; -it is a powerful way to create specialized editors without having to delve into -C++ modules. - -You can make your own plugins to help yourself and share them in the -`Asset Library `_ so that people -can benefit from your work. - .. _doc_making_plugins_autoload: Registering autoloads/singletons in plugins @@ -450,12 +438,12 @@ Use the following code to register a singleton from an editor plugin: const AUTOLOAD_NAME = "SomeAutoload" - func _enter_tree(): + func _enable_plugin(): # The autoload can be a scene or script file. add_autoload_singleton(AUTOLOAD_NAME, "res://addons/my_addon/some_autoload.tscn") - func _exit_tree(): + func _disable_plugin(): remove_autoload_singleton(AUTOLOAD_NAME) .. code-tab:: csharp @@ -469,15 +457,62 @@ Use the following code to register a singleton from an editor plugin: // Replace this value with a PascalCase autoload name. private const string AutoloadName = "SomeAutoload"; - public override void _EnterTree() + public override void _EnablePlugin() { // The autoload can be a scene or script file. AddAutoloadSingleton(AutoloadName, "res://addons/MyAddon/SomeAutoload.tscn"); } - public override void _ExitTree() + public override void _DisablePlugin() { RemoveAutoloadSingleton(AutoloadName); } } #endif + +Using sub-plugins +~~~~~~~~~~~~~~~~~ + +Often a plugin adds multiple things, for example a custom node and a panel. +In those cases it might be easier to have a separate plugin script for each of those features. +Sub-plugins can be used for this. + +First create all plugins and sub plugins as normal plugins: + +.. image:: img/sub_plugin_creation.webp + +Then move the sub plugins into the main plugin folder: + +.. image:: img/sub_plugin_moved.webp + +Godot will hide sub-plugins from the plugin list, so that a user can't enable or disable them. +Instead the main plugin script should enable and disable sub-plugins like this: + +.. tabs:: + .. code-tab:: gdscript GDScript + + @tool + extends EditorPlugin + + # The main plugin is located at res://addons/my_plugin/ + const PLUGIN_NAME = "my_plugin" + + func _enable_plugin(): + EditorInterface.set_plugin_enabled(PLUGIN_NAME + "/node", true) + EditorInterface.set_plugin_enabled(PLUGIN_NAME + "/panel", true) + + func _disable_plugin(): + EditorInterface.set_plugin_enabled(PLUGIN_NAME + "/node", false) + EditorInterface.set_plugin_enabled(PLUGIN_NAME + "/panel", false) + +Going beyond +~~~~~~~~~~~~ + +Now that you've learned how to make basic plugins, you can extend the editor in +several ways. Lots of functionality can be added to the editor with GDScript; +it is a powerful way to create specialized editors without having to delve into +C++ modules. + +You can make your own plugins to help yourself and share them in the +`Asset Library `_ so that people +can benefit from your work. From c0f0a58695937bbe403aef829caa8bf5e6dae15b Mon Sep 17 00:00:00 2001 From: Furkan Calik <70354160+furkanCalik7@users.noreply.github.com> Date: Sun, 6 Oct 2024 20:23:39 +0300 Subject: [PATCH 005/120] Update using_transforms.rst to clarify rotate_local() axis usage --- tutorials/3d/using_transforms.rst | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tutorials/3d/using_transforms.rst b/tutorials/3d/using_transforms.rst index c3e9f113638..1041109ae3e 100644 --- a/tutorials/3d/using_transforms.rst +++ b/tutorials/3d/using_transforms.rst @@ -201,6 +201,8 @@ To rotate relative to object space (the node's own transform), use the following // Rotate around the object's local X axis by 0.1 radians. RotateObjectLocal(new Vector3(1, 0, 0), 0.1f); +The axis should be defined in the local coordinate system of the object. For example, to rotate around the object's local X, Y, or Z axes, use ``Vector3.RIGHT`` for the X-axis, ``Vector3.UP`` for the Y-axis, and ``Vector3.FORWARD`` for the Z-axis. + Precision errors ================ From b36471725180f33c205b8a3b2ef091d4d085bc46 Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Thu, 17 Oct 2024 11:29:42 +0200 Subject: [PATCH 006/120] Tweak animation file names to be less confusing in Creating the player scene It's more verbose, but it's easier to understand and doesn't rely on the reader knowing how to interpret the `[1/2]` part. --- getting_started/first_2d_game/02.player_scene.rst | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/getting_started/first_2d_game/02.player_scene.rst b/getting_started/first_2d_game/02.player_scene.rst index 20799618811..de845e6faa6 100644 --- a/getting_started/first_2d_game/02.player_scene.rst +++ b/getting_started/first_2d_game/02.player_scene.rst @@ -69,11 +69,12 @@ Click on the ``SpriteFrames`` you just created to open the "SpriteFrames" panel: .. image:: img/spriteframes_panel.webp -On the left is a list of animations. Click the "default" one and rename it to -"walk". Then click the "Add Animation" button to create a second animation named -"up". Find the player images in the "FileSystem" tab - they're in the ``art`` +On the left is a list of animations. Click the ``default`` one and rename it to +``walk``. Then click the "Add Animation" button to create a second animation named +``up``. Find the player images in the FileSystem dock - they're in the ``art`` folder you unzipped earlier. Drag the two images for each animation, named -``playerGrey_walk[1/2]`` and ``playerGrey_walk[2/2]``, into the "Animation Frames" +``playerGrey_walk1``, ``playerGrey_walk2`` (for ``walk``), +``playerGrey_up1``, and ``playerGrey_up2`` (for ``up``) to the **Animation Frames** side of the panel for the corresponding animation: .. image:: img/spriteframes_panel2.webp From 87659396b5fd8888f3a04b221e4d1f843509c351 Mon Sep 17 00:00:00 2001 From: Austin Almond Date: Fri, 18 Oct 2024 13:45:24 -0400 Subject: [PATCH 007/120] Rephrase tutorial items for targeting with a Navigation Agent The `path_desired_distance`, `target_desired_distance`, and `path_max_distance` documentation was a bit ambiguous. I tried to make it a little more clear without making it too long, since the properties are also documented at the [NavigationAgent3D](https://docs.godotengine.org/en/stable/classes/class_navigationagent3d.html) page. --- .../navigation/navigation_using_navigationagents.rst | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tutorials/navigation/navigation_using_navigationagents.rst b/tutorials/navigation/navigation_using_navigationagents.rst index 2a96bc7ae53..4f479526031 100644 --- a/tutorials/navigation/navigation_using_navigationagents.rst +++ b/tutorials/navigation/navigation_using_navigationagents.rst @@ -56,11 +56,11 @@ The function should not be called after the target position or path end has been as it can make the agent jitter in place due to the repeated path updates. Always check very early in script with ``is_navigation_finished()`` if the path is already finished. -The following properties influence the path following behavior. +The following distance properties influence the path following behavior. -- The ``path_desired_distance`` defines the distance at which the agent advances its internal path index to the next path position. -- The ``target_desired_distance`` defines the distance at which the agent considers the target position to be reached and the path at its end. -- The ``path_max_distance`` defines when an agent requests a new path cause it was moved too far away from the current path point segment. +- At ``path_desired_distance`` from the next path position, the agent advances its internal path index to the subsequent next path position. +- At ``target_desired_distance`` from the target path position, the agent considers the target position to be reached and the path at its end. +- At ``path_max_distance`` from the ideal path to the next path position, the agent requests a new path because it was pushed too far off. The important updates are all triggered with the ``get_next_path_position()`` function when called in ``_physics_process()``. From e7c07d2908c9e49b250f33ccac36e3b33952d2fa Mon Sep 17 00:00:00 2001 From: tetrapod00 <145553014+tetrapod00@users.noreply.github.com> Date: Sun, 13 Oct 2024 21:27:06 -0700 Subject: [PATCH 008/120] Add section on manual style to Writing Guidelines Specifies when to link to the class reference. Specifies how to style various kinds of text. --- .../documentation/docs_writing_guidelines.rst | 160 ++++++++++++++++++ 1 file changed, 160 insertions(+) diff --git a/contributing/documentation/docs_writing_guidelines.rst b/contributing/documentation/docs_writing_guidelines.rst index cab1b797178..9206c156e8d 100644 --- a/contributing/documentation/docs_writing_guidelines.rst +++ b/contributing/documentation/docs_writing_guidelines.rst @@ -507,6 +507,166 @@ examples with the ``:kbd:`` tag left as-is for better visibility: - Press ``:kbd:`Space``` and hold the left mouse button to pan in the 2D editor. - Press ``:kbd:`Shift + Up Arrow``` to move the node upwards by 8 pixels. + +Manual style guidelines +----------------------- + +Follow these formatting and style guidelines when writing the manual. + +Use your best judgement. If you can write more clearly by breaking one of these +guidelines, please do! But remember that the guidelines exist for a reason. + +.. note:: In many cases, the manual does not follow these guidelines. If you are + already making changes to a paragraph or section of the docs, update it to + follow these standards. Avoid making unrelated changes that *only* update style, + since every change will require the paragraph to be re-translated. + +Text styles +~~~~~~~~~~~ + +There are a few styles that the manual uses. + ++---------------------+--------------------------+------------------------------------------------------------------------+ +| Style | RST formatting | Typical usage | ++=====================+==========================+========================================================================+ +| Plaintext | ``text`` | Used for most text. | ++---------------------+--------------------------+------------------------------------------------------------------------+ +| *Italics* | ``*text*`` | Used for emphasis. Used for introducing new terms. | ++---------------------+--------------------------+------------------------------------------------------------------------+ +| **Bold** | ``**text**`` | Used for emphasis, and for editor UI like menus and windows. | +| | | | ++---------------------+--------------------------+------------------------------------------------------------------------+ +| ``Code`` | `` text `` | Used for variable names, literal values, and code snippets. ``code`` is| +| | | used in many cases where you would use "quoted plaintext" in typical | +| | | English. | ++---------------------+--------------------------+------------------------------------------------------------------------+ +| "Quotes" | ``"text"`` | Used for some literal or quoted values. In many cases, another | +| | | style is preferred. | ++---------------------+--------------------------+------------------------------------------------------------------------+ + +Emphasis +~~~~~~~~ + +Use either **bold style** or *italic style* to emphasize words or sentences. +In most cases, either **bold** or *italics* is fine. Use whichever seems best, +or whatever the page already uses. + +Prefer using **bold style** for simple emphasis. + + - Do **not** close the window without saving first. + +Use *italic style* or to emphasize one word in the context of a sentence. + + - You can *add* a node to the scene (but you can't connect one). + - You can add a *node* to the scene (but you can't add a resource). + - You can add a node to the *scene* (but you can't add one to a resource). + +Use *italic style* when introducing new technical terms. **Bold style** +is fine too. + + - Godot uses *nodes* with *scripts* in a *scene tree*. + - Godot uses **nodes** with **scripts** in a **scene tree**. + +Literals +~~~~~~~~ + +Use ``code style`` for literal values. Literals include: + + - Integer or ``int`` literals like ``0``, ``-2``, or ``100`` + - Float literals like ``0.0``, ``0.5``, ``-2.0``, or ``100.0`` + - Vector literals like ``(0.0, 0.0)``, ``(0.5, -0.5, 0.5)``, or ``(1.0, 2.0, 3.0, 4.0)``. + +Classes, properties, and methods +~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + +Link to classes the first time that you mention them in a page. After the first +mention, use ``code style``. For common classes, like ``Node``, ``Control``, or +``Viewport``, you can also use plaintext. + +Link to class members (properties, methods, enums, and constants) the first time +that you mention them in a page. After the first mention, use ``code style``. If +the class member is very common, like a Node2D's ``position``, you don't have to +link. + +When discussing properties in the context of the inspector, use **bold style** +instead. + +Editor UI +~~~~~~~~~ + +Use **bold style** for editor UI, including window titles, menus, buttons, input +fields, inspector properties, and inspector sections. Use the exact +capitalization that the editor uses. + + - Open the **Editor Settings** window. + - Press the **Confirm** button. + - Change the node's **Transform > Position** property to ``(0, 0)``. + - In the **Project Settings** window, enable the **Advanced Settings** toggle. + +Use **Bold > With > Separators** when describing sequence of menus that the +reader must navigate. Use ``>`` as a separator. You can omit ellipses in menu names. + + - In **Project > Project Settings > Input Map**, add a new input action. + - Select **Scene > Export As... > MeshLibrary...**. + - Select **Scene > Export As > MeshLibrary**. + +.. note:: Sometimes, ``->`` or ``→`` is used as a separator. This is nonstandard. + Replace it with ``>`` if you are already making changes to a section. + +Project settings +~~~~~~~~~~~~~~~~ + +Link to individual project settings. Either include the section and subsection +in the link itself, or include the section and subsection separately from the +link. Since long links are not split into multiple lines when the page is +rendered, prefer splitting the setting name and the section when the link is long. + + - Set the :ref:`Application > Run > Max FPS` setting to ``60``. + - In the project settings under **Application > Run**, set :ref:`Max FPS` to ``60``. + - In **Project Settings > Application > Run**, set :ref:`Max FPS` to ``60``. + +Manually wrapping lines +~~~~~~~~~~~~~~~~~~~~~~~ + +In the manual, lines must be manually wrapped to no more than 80-100 characters +per line. However, links must not be split into multiple lines, and can exceed +100 characters. Tables can also exceed 100 characters. + +When making small changes, you don't need to manually re-wrap the whole paragraph, +as long as the lines don't exceed 100 characters. + +**Bad:** Line length exceeds 100 characters: + +.. code-block:: + + The best thing to do is to wrap lines to under 80 characters per line. Wrapping to around 80-90 characters per line is also fine. + If your lines exceed 100 characters, you definitely need to add a newline! Don't forget to remove trailing whitespace when you do. + +**Good:** Lines are wrapped to 80-90 characters: + +.. code-block:: + + The best thing to do is to wrap lines to under 80 characters per line. Wrapping to + around 80-90 characters per line is also fine. If your lines exceed 100 characters, you + definitely need to add a newline! Don't forget to remove trailing whitespace when you do. + +**Best:** Lines are wrapped to under 80 characters: + +.. code-block:: + + The best thing to do is to wrap lines to under 80 characters per line. Wrapping + to around 80-90 characters per line is also fine. If your lines exceed 100 + characters, you definitely need to add a newline! Don't forget to remove + trailing whitespace when you do. + +.. tip:: In most text editors, you can add a vertical guide or "ruler" at 80 + characters. For example, in Visual Studio Code, you can add the following to + your ``settings.json`` to add rulers at 80 and 100 characters: + + .. code:: json + + "editor.rulers": [80,100], + When to refer to a specific Godot version ----------------------------------------- From 6ef6ad8a4c4561d0aabf51a622a1c4e1b8aeaddc Mon Sep 17 00:00:00 2001 From: 0stam Date: Sat, 17 Aug 2024 23:27:18 +0200 Subject: [PATCH 009/120] Use the newly introduced ``is not`` operator --- tutorials/scripting/gdscript/static_typing.rst | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/tutorials/scripting/gdscript/static_typing.rst b/tutorials/scripting/gdscript/static_typing.rst index 5cfd0b0720c..fd1dc3ffea8 100644 --- a/tutorials/scripting/gdscript/static_typing.rst +++ b/tutorials/scripting/gdscript/static_typing.rst @@ -269,7 +269,12 @@ get full autocompletion on the player variable thanks to that cast. player.damage() - or ``assert()`` statement:: + You can also simplify the code by using the ``is not`` operator:: + + if body is not PlayerController: + push_error("Bug: body is not PlayerController") + + Alternatively, you can use the ``assert()`` statement:: assert(body is PlayerController, "Bug: body is not PlayerController.") @@ -279,6 +284,7 @@ get full autocompletion on the player variable thanks to that cast. player.damage() + .. note:: If you try to cast with a built-in type and it fails, Godot will throw an error. @@ -407,10 +413,10 @@ that has a script attached with ``class_name MyScript`` and that ``extends Node2D``. If we have a reference to the object as a ``Node2D`` (for instance, as it was passed to us by the physics system), we can first check if the property and method exist and then set and call them if they do:: - + if "some_property" in node_2d: node_2d.some_property = 20 # Produces UNSAFE_PROPERTY_ACCESS warning. - + if node_2d.has_method("some_function"): node_2d.some_function() # Produces UNSAFE_METHOD_ACCESS warning. @@ -420,7 +426,7 @@ in the referenced type - in this case a ``Node2D``. To make these operations safe, you can first check if the object is of type ``MyScript`` using the ``is`` keyword and then declare a variable with the type ``MyScript`` on which you can set its properties and call its methods:: - + if node_2d is MyScript: var my_script: MyScript = node_2d my_script.some_property = 20 @@ -443,7 +449,7 @@ collision area to show the area's name. Once the object enters the collision area, the physics system sends a signal with a ``Node2D`` object, and the most straightforward (but not statically typed) solution to do what we want could be achieved like this:: - + func _on_body_entered(body: Node2D) -> void: body.label.text = name # Produces UNSAFE_PROPERTY_ACCESS warning. From bebd5b86c48874abb27bce0d3d4ab697730283fc Mon Sep 17 00:00:00 2001 From: Hugo Locurcio Date: Thu, 10 Oct 2024 15:27:47 +0200 Subject: [PATCH 010/120] Add color constants reference to BBCode in RichTextLabel This reference is already present in the Color class reference, but this embeds it directly in the page to save users a click. --- tutorials/ui/bbcode_in_richtextlabel.rst | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tutorials/ui/bbcode_in_richtextlabel.rst b/tutorials/ui/bbcode_in_richtextlabel.rst index 24b1a4c93c1..68d3d0992f1 100644 --- a/tutorials/ui/bbcode_in_richtextlabel.rst +++ b/tutorials/ui/bbcode_in_richtextlabel.rst @@ -812,11 +812,17 @@ Font options Named colors ~~~~~~~~~~~~ -For tags that allow specifying a color by name you can use names of the constants from +For tags that allow specifying a color by name, you can use names of the constants from the built-in :ref:`class_Color` class. Named classes can be specified in a number of styles using different casings: ``DARK_RED``, ``DarkRed``, and ``darkred`` will give the same exact result. +See this image for a list of color constants: + +.. image:: /img/color_constants.png + +`View at full size `__ + .. _doc_bbcode_in_richtextlabel_hex_colors: Hexadecimal color codes From 6919723ae2ff2a18062d4e057a0812a1260b6a6d Mon Sep 17 00:00:00 2001 From: tetrapod00 <145553014+tetrapod00@users.noreply.github.com> Date: Wed, 13 Nov 2024 14:11:11 -0800 Subject: [PATCH 011/120] Clarify VERTEX and other shader built-ins --- .../shader_reference/spatial_shader.rst | 32 +++++++++++++------ 1 file changed, 22 insertions(+), 10 deletions(-) diff --git a/tutorials/shaders/shader_reference/spatial_shader.rst b/tutorials/shaders/shader_reference/spatial_shader.rst index 1b6f2cc27fe..f7bef93a752 100644 --- a/tutorials/shaders/shader_reference/spatial_shader.rst +++ b/tutorials/shaders/shader_reference/spatial_shader.rst @@ -59,9 +59,11 @@ For visual examples of these render modes, see :ref:`Standard Material 3D and OR +-------------------------------+------------------------------------------------------------------------------------------------------+ | **specular_disabled** | Disable specular. | +-------------------------------+------------------------------------------------------------------------------------------------------+ -| **skip_vertex_transform** | ``VERTEX``/``NORMAL``/etc. need to be transformed manually in the ``vertex()`` function. | +| **skip_vertex_transform** | ``VERTEX``, ``NORMAL``, ``TANGENT``, and ``BITANGENT`` | +| | need to be transformed manually in the ``vertex()`` function. | +-------------------------------+------------------------------------------------------------------------------------------------------+ -| **world_vertex_coords** | ``VERTEX``/``NORMAL``/etc. are modified in world space instead of model space. | +| **world_vertex_coords** | ``VERTEX``, ``NORMAL``, ``TANGENT``, and ``BITANGENT`` | +| | are modified in world space instead of model space. | +-------------------------------+------------------------------------------------------------------------------------------------------+ | **ensure_correct_normals** | Use when non-uniform scale is applied to mesh. | +-------------------------------+------------------------------------------------------------------------------------------------------+ @@ -126,9 +128,9 @@ Global built-ins are available everywhere, including custom functions. Vertex built-ins ^^^^^^^^^^^^^^^^ -Vertex data (``VERTEX``, ``NORMAL``, ``TANGENT``, ``BITANGENT``) are presented in model space +Vertex data (``VERTEX``, ``NORMAL``, ``TANGENT``, and ``BITANGENT``) are presented in model space (also called local space). If not written to, these values will not be modified and be -passed through as they came. +passed through as they came, then transformed into view space to be used in ``fragment()``. They can optionally be presented in world space by using the ``world_vertex_coords`` render mode. @@ -203,17 +205,22 @@ shader, this value can be used as desired. | in vec3 **EYE_OFFSET** | Position offset for the eye being rendered. | | | Only applicable for multiview rendering. | +----------------------------------------+--------------------------------------------------------+ -| inout vec3 **VERTEX** | Vertex position in model space. | +| inout vec3 **VERTEX** | Position of the vertex, in model space. | +| | In world space if ``world_vertex_coords`` is used. | +----------------------------------------+--------------------------------------------------------+ | in int **VERTEX_ID** | The index of the current vertex in the vertex buffer. | +----------------------------------------+--------------------------------------------------------+ | inout vec3 **NORMAL** | Normal in model space. | +| | In world space if ``world_vertex_coords`` is used. | +----------------------------------------+--------------------------------------------------------+ | inout vec3 **TANGENT** | Tangent in model space. | +| | In world space if ``world_vertex_coords`` is used. | +----------------------------------------+--------------------------------------------------------+ | inout vec3 **BINORMAL** | Binormal in model space. | +| | In world space if ``world_vertex_coords`` is used. | +----------------------------------------+--------------------------------------------------------+ -| out vec4 **POSITION** | If written to, overrides final vertex position. | +| out vec4 **POSITION** | If written to, overrides final vertex position in clip | +| | space. | +----------------------------------------+--------------------------------------------------------+ | inout vec2 **UV** | UV main channel. | +----------------------------------------+--------------------------------------------------------+ @@ -311,7 +318,9 @@ these properties, and if you don't write to them, Godot will optimize away the c +----------------------------------------+--------------------------------------------------------------------------------------------------+ | in uint **CAMERA_VISIBLE_LAYERS** | Cull layers of the camera rendering the current pass. | +----------------------------------------+--------------------------------------------------------------------------------------------------+ -| in vec3 **VERTEX** | Vertex position that comes from the ``vertex()`` function (default, in view space). | +| in vec3 **VERTEX** | Position of the fragment (pixel), in view space. It is the ``VERTEX`` value from ``vertex()`` | +| | interpolated between the face's vertices and transformed into view space. | +| | If ``skip_vertex_transform`` is enabled, it may not be in view space. | +----------------------------------------+--------------------------------------------------------------------------------------------------+ | inout vec3 **LIGHT_VERTEX** | A writable version of ``VERTEX`` that can be used to alter light and shadows. Writing to this | | | will not change the position of the fragment. | @@ -336,11 +345,14 @@ these properties, and if you don't write to them, Godot will optimize away the c | | branch, then you are responsible for setting the ``DEPTH`` for **all** other branches. | | | Otherwise, the graphics API will leave them uninitialized. | +----------------------------------------+--------------------------------------------------------------------------------------------------+ -| inout vec3 **NORMAL** | Normal that comes from the ``vertex()`` function (default, in view space). | +| inout vec3 **NORMAL** | Normal that comes from the ``vertex()`` function, in view space. | +| | If ``skip_vertex_transform`` is enabled, it may not be in view space. | +----------------------------------------+--------------------------------------------------------------------------------------------------+ -| inout vec3 **TANGENT** | Tangent that comes from the ``vertex()`` function (default, in view space). | +| inout vec3 **TANGENT** | Tangent that comes from the ``vertex()`` function, in view space. | +| | If ``skip_vertex_transform`` is enabled, it may not be in view space. | +----------------------------------------+--------------------------------------------------------------------------------------------------+ -| inout vec3 **BINORMAL** | Binormal that comes from the ``vertex()`` function (default, in view space). | +| inout vec3 **BINORMAL** | Binormal that comes from the ``vertex()`` function, in view space. | +| | If ``skip_vertex_transform`` is enabled, it may not be in view space. | +----------------------------------------+--------------------------------------------------------------------------------------------------+ | out vec3 **NORMAL_MAP** | Set normal here if reading normal from a texture instead of ``NORMAL``. | +----------------------------------------+--------------------------------------------------------------------------------------------------+ From f70686cdbec9fcd5aad9ba93ae86373fefadb9ca Mon Sep 17 00:00:00 2001 From: Thaddeus Crews Date: Thu, 14 Nov 2024 13:54:08 -0600 Subject: [PATCH 012/120] CI: Integrate `pre-commit` for style checks --- .github/workflows/ci.yml | 16 ++----- .pre-commit-config.yaml | 18 ++++++++ _tools/format.sh | 42 ------------------- classes/index.rst | 1 - contributing/how_to_contribute.rst | 1 - .../introduction/first_look_at_the_editor.rst | 1 - pyproject.toml | 8 ++++ .../assets_pipeline/escn_exporter/index.rst | 1 - tutorials/editor/external_editor.rst | 1 - .../navigation_using_navigationmeshes.rst | 1 - .../gdextension/gdextension_file.rst | 1 - tutorials/xr/xr_action_map.rst | 1 - 12 files changed, 30 insertions(+), 62 deletions(-) create mode 100644 .pre-commit-config.yaml delete mode 100755 _tools/format.sh create mode 100644 pyproject.toml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8126cac375d..ff08ec8ccca 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -15,19 +15,11 @@ jobs: - name: Checkout uses: actions/checkout@v4 - - name: Install dependencies - run: | - # Install tools used by `_tools/format.sh`. - sudo apt-get -qq update - sudo apt-get -qq install dos2unix recode - sudo pip3 install -r requirements.txt - sudo pip3 install codespell - - - name: Linter checks - run: | - bash _tools/format.sh + - name: Style checks via pre-commit + uses: pre-commit/action@v3.0.1 - codespell -D- -D _tools/codespell-dict.txt -I _tools/codespell-ignore.txt -x _tools/codespell-ignore-lines.txt -S tutorials/i18n/locales.rst {about,community,contributing,getting_started,tutorials}/{*.rst,**/*.rst,**/**/*.rst,**/**/**/*.rst} + - name: Install dependencies + run: sudo pip3 install -r requirements.txt # Use dummy builder to improve performance as we don't need the generated HTML in this workflow. - name: Sphinx build diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml new file mode 100644 index 00000000000..2d6e79cd0c5 --- /dev/null +++ b/.pre-commit-config.yaml @@ -0,0 +1,18 @@ +default_language_version: + python: python3 + +repos: + - repo: https://github.com/codespell-project/codespell + rev: v2.3.0 + hooks: + - id: codespell + files: ^(about|community|contributing|getting_started|tutorials)/.*\.rst$ + additional_dependencies: [tomli] + + - repo: https://github.com/pre-commit/pre-commit-hooks + rev: v5.0.0 + hooks: + - id: end-of-file-fixer + - id: fix-byte-order-marker + - id: mixed-line-ending + args: ['--fix=lf'] diff --git a/_tools/format.sh b/_tools/format.sh deleted file mode 100755 index 1b0e22f0be3..00000000000 --- a/_tools/format.sh +++ /dev/null @@ -1,42 +0,0 @@ -#!/usr/bin/env bash - -set -uo pipefail -IFS=$'\n\t' - -# Loops through all text files tracked by Git. -git grep -zIl '' | -while IFS= read -rd '' f; do - # Exclude csproj and hdr files. - if [[ "$f" == *"csproj" ]]; then - continue - elif [[ "$f" == *"hdr" ]]; then - continue - fi - # Ensures that files are UTF-8 formatted. - recode UTF-8 "$f" 2> /dev/null - # Ensures that files have LF line endings. - dos2unix "$f" 2> /dev/null - # Ensures that files do not contain a BOM. - sed -i '1s/^\xEF\xBB\xBF//' "$f" - # Ensures that files end with newline characters. - tail -c1 < "$f" | read -r _ || echo >> "$f"; -done - -git diff > patch.patch -FILESIZE="$(stat -c%s patch.patch)" -MAXSIZE=5 - -# If no patch has been generated all is OK, clean up, and exit. -if (( FILESIZE < MAXSIZE )); then - printf "Files in this commit comply with the formatting rules.\n" - rm -f patch.patch - exit 0 -fi - -# A patch has been created, notify the user, clean up, and exit. -printf "\n*** The following differences were found between the code " -printf "and the formatting rules:\n\n" -cat patch.patch -printf "\n*** Aborting, please fix your commit(s) with 'git commit --amend' or 'git rebase -i '\n" -rm -f patch.patch -exit 1 diff --git a/classes/index.rst b/classes/index.rst index b2e89e02839..0a571ab3213 100644 --- a/classes/index.rst +++ b/classes/index.rst @@ -1085,4 +1085,3 @@ Variant types class_vector3i class_vector4 class_vector4i - diff --git a/contributing/how_to_contribute.rst b/contributing/how_to_contribute.rst index 47733956731..00328b9a96a 100644 --- a/contributing/how_to_contribute.rst +++ b/contributing/how_to_contribute.rst @@ -108,4 +108,3 @@ Community support Chances are you looked for learning materials outside of what the documentation provides. Without content creators covering the game development process, there would not be this big of a community today. Therefore it seemed only right to mention them in a page about important contributions to the project. - diff --git a/getting_started/introduction/first_look_at_the_editor.rst b/getting_started/introduction/first_look_at_the_editor.rst index c74b81311a2..da08400a783 100644 --- a/getting_started/introduction/first_look_at_the_editor.rst +++ b/getting_started/introduction/first_look_at_the_editor.rst @@ -181,4 +181,3 @@ Alternatively, or built-in variable in the script editor. * Right-clicking on nodes and choosing **Open Documentation** or choosing **Lookup Symbol** for elements in script editor will directly open their documentation. - diff --git a/pyproject.toml b/pyproject.toml new file mode 100644 index 00000000000..0797f2a0766 --- /dev/null +++ b/pyproject.toml @@ -0,0 +1,8 @@ +[tool.ruff] +line-length = 120 + +[tool.codespell] +dictionary = ["_tools/codespell-dict.txt", "-"] +ignore-words = "_tools/codespell-ignore.txt" +exclude-file = "_tools/codespell-ignore-lines.txt" +skip = "tutorials/i18n/locales.rst" diff --git a/tutorials/assets_pipeline/escn_exporter/index.rst b/tutorials/assets_pipeline/escn_exporter/index.rst index f607745ba7e..b9f8a0af7d8 100644 --- a/tutorials/assets_pipeline/escn_exporter/index.rst +++ b/tutorials/assets_pipeline/escn_exporter/index.rst @@ -11,4 +11,3 @@ is not maintained or supported in Godot 4.x. While not officially supported, the partially work for some Godot and Blender versions, particularly before Blender version 4.0. For complete docs on the Blender exporter, see the `previous version of this page `__. - diff --git a/tutorials/editor/external_editor.rst b/tutorials/editor/external_editor.rst index f9ed4300e31..aa2cc4b48a9 100644 --- a/tutorials/editor/external_editor.rst +++ b/tutorials/editor/external_editor.rst @@ -119,4 +119,3 @@ Emacs ^^^^^ Check the official instructions to configure `LSP `_, and `DAP `_. - diff --git a/tutorials/navigation/navigation_using_navigationmeshes.rst b/tutorials/navigation/navigation_using_navigationmeshes.rst index 7a98cba9f65..8964e80e85f 100644 --- a/tutorials/navigation/navigation_using_navigationmeshes.rst +++ b/tutorials/navigation/navigation_using_navigationmeshes.rst @@ -694,4 +694,3 @@ The following script uses the NavigationServer to update a navigation region wit NavigationServer3D.RegionSetNavigationMesh(_regionRid, _navigationMesh); } } - diff --git a/tutorials/scripting/gdextension/gdextension_file.rst b/tutorials/scripting/gdextension/gdextension_file.rst index 68e05611b44..0ccacfc2915 100644 --- a/tutorials/scripting/gdextension/gdextension_file.rst +++ b/tutorials/scripting/gdextension/gdextension_file.rst @@ -182,4 +182,3 @@ If no path is supplied Godot will move the libraries into the same directory as "res://bin/libdependency.linux.template_release.arm64.so" : "", "res://bin/libdependency.linux.template_release.rv64.so" : "" } - diff --git a/tutorials/xr/xr_action_map.rst b/tutorials/xr/xr_action_map.rst index 47e7a6a4eb7..082046de282 100644 --- a/tutorials/xr/xr_action_map.rst +++ b/tutorials/xr/xr_action_map.rst @@ -385,4 +385,3 @@ This is why many XR runtimes only use it as a last resort and will attempt to us This is our advice as well: limit your action map to the interaction profiles for devices you have actually tested your game with. The Oculus Touch controller is widely used as a fallback controller by many runtimes. If you are able to test your game using a Meta Rift or Quest and add this profile there is a high probability your game will work with other headsets. - From e0dc2b106ab0abf0c5ae50b1c274b42418d5c33d Mon Sep 17 00:00:00 2001 From: Godot Organization Date: Sat, 16 Nov 2024 03:22:28 +0000 Subject: [PATCH 013/120] classref: Sync with current master branch (6c05ec3) --- classes/class_@gdscript.rst | 15 +- classes/class_@globalscope.rst | 8 +- classes/class_aabb.rst | 4 +- classes/class_animatedsprite2d.rst | 2 +- classes/class_animatedsprite3d.rst | 2 +- classes/class_animationnodeanimation.rst | 21 + ...ss_animationnodestatemachinetransition.rst | 4 +- classes/class_area2d.rst | 4 +- classes/class_area3d.rst | 4 +- classes/class_astar2d.rst | 2 +- classes/class_audioeffectspectrumanalyzer.rst | 2 +- ...ss_audioeffectspectrumanalyzerinstance.rst | 2 +- classes/class_audiostreaminteractive.rst | 2 +- .../class_audiostreamplaybackpolyphonic.rst | 2 +- classes/class_basematerial3d.rst | 4 +- classes/class_basis.rst | 4 +- classes/class_button.rst | 20 +- classes/class_callable.rst | 30 +- classes/class_callbacktweener.rst | 2 +- classes/class_cameraattributes.rst | 6 +- classes/class_canvasitem.rst | 6 +- classes/class_characterbody2d.rst | 2 +- classes/class_charfxtransform.rst | 2 - classes/class_color.rst | 90 ++- classes/class_control.rst | 50 +- classes/class_cpuparticles2d.rst | 2 +- classes/class_cubemap.rst | 30 +- classes/class_diraccess.rst | 16 +- classes/class_displayserver.rst | 2 +- classes/class_editorexportplatformandroid.rst | 70 ++ classes/class_editorexportplatformweb.rst | 8 +- classes/class_editorexportplugin.rst | 18 +- ...itorfilesystemimportformatsupportquery.rst | 2 +- classes/class_editorimportplugin.rst | 2 +- classes/class_editorinterface.rst | 28 + classes/class_editornode3dgizmoplugin.rst | 2 +- classes/class_editorplugin.rst | 2 +- classes/class_editorproperty.rst | 12 + classes/class_editorresourcepreview.rst | 4 +- .../class_editorresourcepreviewgenerator.rst | 2 +- classes/class_editorscenepostimport.rst | 2 +- classes/class_editorscenepostimportplugin.rst | 6 +- classes/class_editorscript.rst | 2 +- classes/class_editorsettings.rst | 84 +- classes/class_editortoaster.rst | 101 +++ .../class_editortranslationparserplugin.rst | 18 +- classes/class_editorundoredomanager.rst | 2 +- classes/class_environment.rst | 4 +- classes/class_fastnoiselite.rst | 2 +- classes/class_fileaccess.rst | 226 +++--- classes/class_gdscript.rst | 4 +- classes/class_geometryinstance3d.rst | 33 + classes/class_gltfaccessor.rst | 6 +- classes/class_gltfanimation.rst | 2 +- classes/class_gltfbufferview.rst | 4 +- classes/class_gltfcamera.rst | 6 +- classes/class_gltfdocument.rst | 2 +- classes/class_gltfdocumentextension.rst | 8 +- classes/class_gltfmesh.rst | 2 +- classes/class_gltfnode.rst | 4 +- classes/class_gltfobjectmodelproperty.rst | 2 +- classes/class_gltfstate.rst | 10 +- classes/class_gpuparticles2d.rst | 2 +- classes/class_gpuparticles3d.rst | 4 +- classes/class_gpuparticlescollision3d.rst | 4 +- classes/class_graphnode.rst | 2 +- classes/class_hboxcontainer.rst | 2 +- classes/class_httpclient.rst | 10 +- classes/class_httprequest.rst | 6 +- classes/class_image.rst | 6 +- classes/class_itemlist.rst | 2 +- classes/class_label.rst | 2 +- classes/class_label3d.rst | 2 +- classes/class_labelsettings.rst | 2 +- classes/class_lightmapgi.rst | 4 +- classes/class_lookatmodifier3d.rst | 739 ++++++++++++++++++ classes/class_mainloop.rst | 2 +- classes/class_meshinstance3d.rst | 2 +- classes/class_multiplayerapi.rst | 2 +- classes/class_multiplayerapiextension.rst | 10 +- classes/class_multiplayerpeer.rst | 2 +- classes/class_multiplayersynchronizer.rst | 4 +- classes/class_navigationserver2d.rst | 8 +- classes/class_navigationserver3d.rst | 12 +- classes/class_node.rst | 4 +- classes/class_nodepath.rst | 2 +- classes/class_object.rst | 10 +- classes/class_openxrcompositionlayer.rst | 2 +- .../class_openxrextensionwrapperextension.rst | 2 +- classes/class_os.rst | 144 +++- classes/class_packedscene.rst | 4 +- classes/class_packetpeerudp.rst | 31 +- classes/class_pckpacker.rst | 20 +- classes/class_physicalbone3d.rst | 66 +- classes/class_popupmenu.rst | 6 +- classes/class_primitivemesh.rst | 4 +- classes/class_projection.rst | 4 +- classes/class_projectsettings.rst | 28 +- classes/class_quaternion.rst | 2 + classes/class_range.rst | 2 +- classes/class_rdpipelinedepthstencilstate.rst | 6 +- classes/class_rdtextureformat.rst | 8 +- classes/class_rdtextureview.rst | 2 +- classes/class_regex.rst | 4 +- classes/class_renderdata.rst | 2 +- classes/class_renderingserver.rst | 42 +- classes/class_renderscenebuffersrd.rst | 10 +- classes/class_resource.rst | 2 +- classes/class_resourceformatloader.rst | 4 +- classes/class_resourceimportermp3.rst | 6 +- classes/class_resourceimporteroggvorbis.rst | 6 +- classes/class_resourceimportertexture.rst | 10 +- classes/class_resourceloader.rst | 18 +- classes/class_richtextlabel.rst | 8 +- classes/class_rigidbody2d.rst | 6 +- classes/class_rigidbody3d.rst | 6 +- classes/class_shader.rst | 4 +- classes/class_skeletonik3d.rst | 2 +- .../class_skeletonmodification2dtwoboneik.rst | 2 +- classes/class_skeletonmodifier3d.rst | 2 +- classes/class_slider.rst | 4 +- classes/class_splitcontainer.rst | 2 +- classes/class_string.rst | 16 +- classes/class_stringname.rst | 47 +- classes/class_styleboxtexture.rst | 6 +- classes/class_surfacetool.rst | 2 +- classes/class_syntaxhighlighter.rst | 10 +- classes/class_textedit.rst | 8 +- classes/class_textmesh.rst | 2 +- classes/class_textparagraph.rst | 19 + classes/class_tilemap.rst | 4 +- classes/class_tilemaplayer.rst | 34 +- classes/class_tileset.rst | 34 +- classes/class_timer.rst | 2 + classes/class_touchscreenbutton.rst | 2 +- classes/class_transform2d.rst | 2 + classes/class_transform3d.rst | 4 +- classes/class_treeitem.rst | 6 +- classes/class_tween.rst | 40 +- classes/class_videostreamplayback.rst | 6 +- classes/class_viewport.rst | 10 +- classes/class_visualshadernodecompare.rst | 4 +- classes/class_websocketmultiplayerpeer.rst | 4 +- classes/class_websocketpeer.rst | 25 +- classes/class_window.rst | 6 +- classes/class_xrcamera3d.rst | 2 +- classes/class_xrcontroller3d.rst | 4 +- classes/class_xrnode3d.rst | 2 +- classes/index.rst | 3 + 149 files changed, 2125 insertions(+), 515 deletions(-) create mode 100644 classes/class_editortoaster.rst create mode 100644 classes/class_lookatmodifier3d.rst diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index 5afb97a6ed6..7772c35b32e 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -705,7 +705,20 @@ See also :ref:`@GlobalScope.PROPERTY_USAGE_SUBGROUP` **PROPERTY_USAGE_SCRIPT_VARIABLE** = ``4096`` -The property is a script variable which should be serialized and saved in the scene file. +The property is a script variable. :ref:`PROPERTY_USAGE_SCRIPT_VARIABLE` can be used to distinguish between exported script variables from built-in variables (which don't have this usage flag). By default, :ref:`PROPERTY_USAGE_SCRIPT_VARIABLE` is **not** applied to variables that are created by overriding :ref:`Object._get_property_list` in a script. .. _class_@GlobalScope_constant_PROPERTY_USAGE_STORE_IF_NULL: @@ -4021,7 +4021,7 @@ If this property is modified, all inspector fields will be refreshed. :ref:`PropertyUsageFlags` **PROPERTY_USAGE_CLASS_IS_ENUM** = ``65536`` -The property is an enum, i.e. it only takes named integer constants from its associated enumeration. +The property is a variable of enum type, i.e. it only takes named integer constants from its associated enumeration. .. _class_@GlobalScope_constant_PROPERTY_USAGE_NIL_IS_VARIANT: @@ -6698,8 +6698,8 @@ Given a ``seed``, returns a :ref:`PackedInt64Array` of s var a = rand_from_seed(4) - print(a[0]) # Prints 2879024997 - print(a[1]) # Prints 4 + print(a[0]) # Prints 2879024997 + print(a[1]) # Prints 4 .. rst-class:: classref-item-separator diff --git a/classes/class_aabb.rst b/classes/class_aabb.rst index b9e0bb902a9..16261e2cf9b 100644 --- a/classes/class_aabb.rst +++ b/classes/class_aabb.rst @@ -692,7 +692,7 @@ The segment begins at ``from`` and ends at ``to``. :ref:`bool` **is_equal_approx**\ (\ aabb\: :ref:`AABB`\ ) |const| :ref:`🔗` -Returns ``true`` if this bounding box and ``aabb`` are approximately equal, by calling :ref:`Vector2.is_equal_approx` on the :ref:`position` and the :ref:`size`. +Returns ``true`` if this bounding box and ``aabb`` are approximately equal, by calling :ref:`Vector3.is_equal_approx` on the :ref:`position` and the :ref:`size`. .. rst-class:: classref-item-separator @@ -704,7 +704,7 @@ Returns ``true`` if this bounding box and ``aabb`` are approximately equal, by c :ref:`bool` **is_finite**\ (\ ) |const| :ref:`🔗` -Returns ``true`` if this bounding box's values are finite, by calling :ref:`Vector2.is_finite` on the :ref:`position` and the :ref:`size`. +Returns ``true`` if this bounding box's values are finite, by calling :ref:`Vector3.is_finite` on the :ref:`position` and the :ref:`size`. .. rst-class:: classref-item-separator diff --git a/classes/class_animatedsprite2d.rst b/classes/class_animatedsprite2d.rst index 21402452fe8..dc63037b2c0 100644 --- a/classes/class_animatedsprite2d.rst +++ b/classes/class_animatedsprite2d.rst @@ -415,7 +415,7 @@ This method is a shorthand for :ref:`play` w Sets :ref:`frame` the :ref:`frame_progress` to the given values. Unlike setting :ref:`frame`, this method does not reset the :ref:`frame_progress` to ``0.0`` implicitly. -\ **Example:** Change the animation while keeping the same :ref:`frame` and :ref:`frame_progress`. +\ **Example:** Change the animation while keeping the same :ref:`frame` and :ref:`frame_progress`: .. tabs:: diff --git a/classes/class_animatedsprite3d.rst b/classes/class_animatedsprite3d.rst index 100e061fe44..744c7ff23bb 100644 --- a/classes/class_animatedsprite3d.rst +++ b/classes/class_animatedsprite3d.rst @@ -335,7 +335,7 @@ This method is a shorthand for :ref:`play` w Sets :ref:`frame` the :ref:`frame_progress` to the given values. Unlike setting :ref:`frame`, this method does not reset the :ref:`frame_progress` to ``0.0`` implicitly. -\ **Example:** Change the animation while keeping the same :ref:`frame` and :ref:`frame_progress`. +\ **Example:** Change the animation while keeping the same :ref:`frame` and :ref:`frame_progress`: .. tabs:: diff --git a/classes/class_animationnodeanimation.rst b/classes/class_animationnodeanimation.rst index d7b220ae231..7f25c8bfb4d 100644 --- a/classes/class_animationnodeanimation.rst +++ b/classes/class_animationnodeanimation.rst @@ -40,6 +40,8 @@ Properties .. table:: :widths: auto + +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ + | :ref:`bool` | :ref:`advance_on_start` | ``false`` | +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ | :ref:`StringName` | :ref:`animation` | ``&""`` | +-------------------------------------------------------+---------------------------------------------------------------------------------------+-----------+ @@ -96,6 +98,25 @@ Plays animation in backward direction. Property Descriptions --------------------- +.. _class_AnimationNodeAnimation_property_advance_on_start: + +.. rst-class:: classref-property + +:ref:`bool` **advance_on_start** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_advance_on_start**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **is_advance_on_start**\ (\ ) + +If ``true``, on receiving a request to play an animation from the start, the first frame is not drawn, but only processed, and playback starts from the next frame. + +See also the notes of :ref:`AnimationPlayer.play`. + +.. rst-class:: classref-item-separator + +---- + .. _class_AnimationNodeAnimation_property_animation: .. rst-class:: classref-property diff --git a/classes/class_animationnodestatemachinetransition.rst b/classes/class_animationnodestatemachinetransition.rst index 1a4973608e7..3bc8ed56d4e 100644 --- a/classes/class_animationnodestatemachinetransition.rst +++ b/classes/class_animationnodestatemachinetransition.rst @@ -146,7 +146,7 @@ Only use this transition during :ref:`AnimationNodeStateMachinePlayback.travel` **ADVANCE_MODE_AUTO** = ``2`` -Automatically use this transition if the :ref:`advance_condition` and :ref:`advance_expression` checks are true (if assigned). +Automatically use this transition if the :ref:`advance_condition` and :ref:`advance_expression` checks are ``true`` (if assigned). .. rst-class:: classref-section-separator @@ -215,7 +215,7 @@ Use an expression as a condition for state machine transitions. It is possible t - |void| **set_advance_mode**\ (\ value\: :ref:`AdvanceMode`\ ) - :ref:`AdvanceMode` **get_advance_mode**\ (\ ) -Determines whether the transition should disabled, enabled when using :ref:`AnimationNodeStateMachinePlayback.travel`, or traversed automatically if the :ref:`advance_condition` and :ref:`advance_expression` checks are true (if assigned). +Determines whether the transition should be disabled, enabled when using :ref:`AnimationNodeStateMachinePlayback.travel`, or traversed automatically if the :ref:`advance_condition` and :ref:`advance_expression` checks are ``true`` (if assigned). .. rst-class:: classref-item-separator diff --git a/classes/class_area2d.rst b/classes/class_area2d.rst index a47df40ffed..e06699e42d5 100644 --- a/classes/class_area2d.rst +++ b/classes/class_area2d.rst @@ -146,7 +146,7 @@ Emitted when a :ref:`Shape2D` of the received ``area`` enters a s \ ``local_shape_index`` and ``area_shape_index`` contain indices of the interacting shapes from this area and the other area, respectively. ``area_rid`` contains the :ref:`RID` of the other area. These values can be used with the :ref:`PhysicsServer2D`. -\ **Example of getting the** :ref:`CollisionShape2D` **node from the shape index:**\ +\ **Example:** Get the :ref:`CollisionShape2D` node from the shape index: .. tabs:: @@ -213,7 +213,7 @@ Emitted when a :ref:`Shape2D` of the received ``body`` enters a s \ ``local_shape_index`` and ``body_shape_index`` contain indices of the interacting shapes from this area and the interacting body, respectively. ``body_rid`` contains the :ref:`RID` of the body. These values can be used with the :ref:`PhysicsServer2D`. -\ **Example of getting the** :ref:`CollisionShape2D` **node from the shape index:**\ +\ **Example:** Get the :ref:`CollisionShape2D` node from the shape index: .. tabs:: diff --git a/classes/class_area3d.rst b/classes/class_area3d.rst index 67d979f8775..9c0b2aaf80c 100644 --- a/classes/class_area3d.rst +++ b/classes/class_area3d.rst @@ -160,7 +160,7 @@ Emitted when a :ref:`Shape3D` of the received ``area`` enters a s \ ``local_shape_index`` and ``area_shape_index`` contain indices of the interacting shapes from this area and the other area, respectively. ``area_rid`` contains the :ref:`RID` of the other area. These values can be used with the :ref:`PhysicsServer3D`. -\ **Example of getting the** :ref:`CollisionShape3D` **node from the shape index:**\ +\ **Example:** Get the :ref:`CollisionShape3D` node from the shape index: .. tabs:: @@ -227,7 +227,7 @@ Emitted when a :ref:`Shape3D` of the received ``body`` enters a s \ ``local_shape_index`` and ``body_shape_index`` contain indices of the interacting shapes from this area and the interacting body, respectively. ``body_rid`` contains the :ref:`RID` of the body. These values can be used with the :ref:`PhysicsServer3D`. -\ **Example of getting the** :ref:`CollisionShape3D` **node from the shape index:**\ +\ **Example:** Get the :ref:`CollisionShape3D` node from the shape index: .. tabs:: diff --git a/classes/class_astar2d.rst b/classes/class_astar2d.rst index 0127c90824a..0d09e9b4711 100644 --- a/classes/class_astar2d.rst +++ b/classes/class_astar2d.rst @@ -494,7 +494,7 @@ Removes the point associated with the given ``id`` from the points pool. |void| **reserve_space**\ (\ num_nodes\: :ref:`int`\ ) :ref:`🔗` -Reserves space internally for ``num_nodes`` points, useful if you're adding a known large number of points at once, such as points on a grid. New capacity must be greater or equals to old capacity. +Reserves space internally for ``num_nodes`` points. Useful if you're adding a known large number of points at once, such as points on a grid. The new capacity must be greater or equal to the old capacity. .. rst-class:: classref-item-separator diff --git a/classes/class_audioeffectspectrumanalyzer.rst b/classes/class_audioeffectspectrumanalyzer.rst index 2a862c5c0f3..4e01dc5d26d 100644 --- a/classes/class_audioeffectspectrumanalyzer.rst +++ b/classes/class_audioeffectspectrumanalyzer.rst @@ -21,7 +21,7 @@ Description This audio effect does not affect sound output, but can be used for real-time audio visualizations. -This resource configures an :ref:`AudioEffectSpectrumAnalyzerInstance`, which performs the actual analysis at runtime. An instance can be acquired with :ref:`AudioServer.get_bus_effect_instance`. +This resource configures an :ref:`AudioEffectSpectrumAnalyzerInstance`, which performs the actual analysis at runtime. An instance can be obtained with :ref:`AudioServer.get_bus_effect_instance`. See also :ref:`AudioStreamGenerator` for procedurally generating sounds. diff --git a/classes/class_audioeffectspectrumanalyzerinstance.rst b/classes/class_audioeffectspectrumanalyzerinstance.rst index 68c533dcf73..00f953b3935 100644 --- a/classes/class_audioeffectspectrumanalyzerinstance.rst +++ b/classes/class_audioeffectspectrumanalyzerinstance.rst @@ -21,7 +21,7 @@ Description The runtime part of an :ref:`AudioEffectSpectrumAnalyzer`, which can be used to query the magnitude of a frequency range on its host bus. -An instance of this class can be acquired with :ref:`AudioServer.get_bus_effect_instance`. +An instance of this class can be obtained with :ref:`AudioServer.get_bus_effect_instance`. .. rst-class:: classref-introduction-group diff --git a/classes/class_audiostreaminteractive.rst b/classes/class_audiostreaminteractive.rst index e5aa52ec1f2..544b64695f4 100644 --- a/classes/class_audiostreaminteractive.rst +++ b/classes/class_audiostreaminteractive.rst @@ -471,7 +471,7 @@ Return the destination time position for a transition (see :ref:`add_transition< :ref:`bool` **has_transition**\ (\ from_clip\: :ref:`int`, to_clip\: :ref:`int`\ ) |const| :ref:`🔗` -Return true if a given transition exists (was added via :ref:`add_transition`). +Returns ``true`` if a given transition exists (was added via :ref:`add_transition`). .. rst-class:: classref-item-separator diff --git a/classes/class_audiostreamplaybackpolyphonic.rst b/classes/class_audiostreamplaybackpolyphonic.rst index c6d5c216ea8..7ca1d3ce91a 100644 --- a/classes/class_audiostreamplaybackpolyphonic.rst +++ b/classes/class_audiostreamplaybackpolyphonic.rst @@ -73,7 +73,7 @@ Method Descriptions :ref:`bool` **is_stream_playing**\ (\ stream\: :ref:`int`\ ) |const| :ref:`🔗` -Return true whether the stream associated with an integer ID is still playing. Check :ref:`play_stream` for information on when this ID becomes invalid. +Returns ``true`` if the stream associated with the given integer ID is still playing. Check :ref:`play_stream` for information on when this ID becomes invalid. .. rst-class:: classref-item-separator diff --git a/classes/class_basematerial3d.rst b/classes/class_basematerial3d.rst index 02634ebaf45..fd7161937ec 100644 --- a/classes/class_basematerial3d.rst +++ b/classes/class_basematerial3d.rst @@ -645,7 +645,7 @@ The object will be shaded per pixel. Useful for realistic shading effects. :ref:`ShadingMode` **SHADING_MODE_PER_VERTEX** = ``2`` -The object will be shaded per vertex. Useful when you want cheaper shaders and do not care about visual quality. Not implemented yet (this mode will act like :ref:`SHADING_MODE_PER_PIXEL`). +The object will be shaded per vertex. Useful when you want cheaper shaders and do not care about visual quality. .. _class_BaseMaterial3D_constant_SHADING_MODE_MAX: @@ -2929,8 +2929,6 @@ Specifies the channel of the :ref:`roughness_texture`. +\ **Note:** In C#, this constructs a **Basis** with all of its components set to :ref:`Vector3.ZERO`. + .. rst-class:: classref-item-separator ---- @@ -716,7 +718,7 @@ The basis matrix's rows are multiplied by ``scale``'s components. This operation Performs a spherical-linear interpolation with the ``to`` basis, given a ``weight``. Both this basis and ``to`` should represent a rotation. -\ **Example:** Smoothly rotate a :ref:`Node3D` to the target basis over time, with a :ref:`Tween`. +\ **Example:** Smoothly rotate a :ref:`Node3D` to the target basis over time, with a :ref:`Tween`: :: diff --git a/classes/class_button.rst b/classes/class_button.rst index 6d617ac223f..477654634be 100644 --- a/classes/class_button.rst +++ b/classes/class_button.rst @@ -23,7 +23,7 @@ Description **Button** is the standard themed button. It can contain text and an icon, and it will display them according to the current :ref:`Theme`. -\ **Example of creating a button and assigning an action when pressed by code:**\ +\ **Example:** Create a button and connect a method that will be called when the button is pressed: .. tabs:: @@ -33,7 +33,7 @@ Description func _ready(): var button = Button.new() button.text = "Click me" - button.pressed.connect(self._button_pressed) + button.pressed.connect(_button_pressed) add_child(button) func _button_pressed(): @@ -58,7 +58,7 @@ Description See also :ref:`BaseButton` which contains common properties and methods associated with this node. -\ **Note:** Buttons do not interpret touch input and therefore don't support multitouch, since mouse emulation can only press one button at a given time. Use :ref:`TouchScreenButton` for buttons that trigger gameplay movement or actions. +\ **Note:** Buttons do not detect touch input and therefore don't support multitouch, since mouse emulation can only press one button at a given time. Use :ref:`TouchScreenButton` for buttons that trigger gameplay movement or actions. .. rst-class:: classref-introduction-group @@ -144,6 +144,8 @@ Theme Properties +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`icon_max_width` | ``0`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ + | :ref:`int` | :ref:`line_spacing` | ``0`` | + +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`int` | :ref:`outline_size` | ``0`` | +-----------------------------------+-----------------------------------------------------------------------------------------+-------------------------------------+ | :ref:`Font` | :ref:`font` | | @@ -587,6 +589,18 @@ The maximum allowed width of the **Button**'s icon. This limit is applied on top ---- +.. _class_Button_theme_constant_line_spacing: + +.. rst-class:: classref-themeproperty + +:ref:`int` **line_spacing** = ``0`` :ref:`🔗` + +Additional vertical spacing between lines (in pixels), spacing is added to line descent. This value can be negative. + +.. rst-class:: classref-item-separator + +---- + .. _class_Button_theme_constant_outline_size: .. rst-class:: classref-themeproperty diff --git a/classes/class_callable.rst b/classes/class_callable.rst index e5de02ea433..4e6bcfbd1ad 100644 --- a/classes/class_callable.rst +++ b/classes/class_callable.rst @@ -139,6 +139,8 @@ Methods +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`get_object_id`\ (\ ) |const| | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_unbound_arguments_count`\ (\ ) |const| | + +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`hash`\ (\ ) |const| | +-------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_custom`\ (\ ) |const| | @@ -335,7 +337,15 @@ Returns the total number of arguments this **Callable** should take, including o :ref:`Array` **get_bound_arguments**\ (\ ) |const| :ref:`🔗` -Return the bound arguments (as long as :ref:`get_bound_arguments_count` is greater than zero), or empty (if :ref:`get_bound_arguments_count` is less than or equal to zero). +Returns the array of arguments bound via successive :ref:`bind` or :ref:`unbind` calls. These arguments will be added *after* the arguments passed to the call, from which :ref:`get_unbound_arguments_count` arguments on the right have been previously excluded. + +:: + + func get_effective_arguments(callable, call_args): + assert(call_args.size() - callable.get_unbound_arguments_count() >= 0) + var result = call_args.slice(0, call_args.size() - callable.get_unbound_arguments_count()) + result.append_array(callable.get_bound_arguments()) + return result .. rst-class:: classref-item-separator @@ -347,7 +357,9 @@ Return the bound arguments (as long as :ref:`get_bound_arguments_count` **get_bound_arguments_count**\ (\ ) |const| :ref:`🔗` -Returns the total amount of arguments bound (or unbound) via successive :ref:`bind` or :ref:`unbind` calls. If the amount of arguments unbound is greater than the ones bound, this function returns a value less than zero. +Returns the total amount of arguments bound via successive :ref:`bind` or :ref:`unbind` calls. This is the same as the size of the array returned by :ref:`get_bound_arguments`. See :ref:`get_bound_arguments` for details. + +\ **Note:** The :ref:`get_bound_arguments_count` and :ref:`get_unbound_arguments_count` methods can both return positive values. .. rst-class:: classref-item-separator @@ -389,6 +401,20 @@ Returns the ID of this **Callable**'s object (see :ref:`Object.get_instance_id` **get_unbound_arguments_count**\ (\ ) |const| :ref:`🔗` + +Returns the total amount of arguments unbound via successive :ref:`bind` or :ref:`unbind` calls. See :ref:`get_bound_arguments` for details. + +\ **Note:** The :ref:`get_bound_arguments_count` and :ref:`get_unbound_arguments_count` methods can both return positive values. + +.. rst-class:: classref-item-separator + +---- + .. _class_Callable_method_hash: .. rst-class:: classref-method diff --git a/classes/class_callbacktweener.rst b/classes/class_callbacktweener.rst index 2256e8ab3ae..b65c79a4565 100644 --- a/classes/class_callbacktweener.rst +++ b/classes/class_callbacktweener.rst @@ -54,7 +54,7 @@ Method Descriptions Makes the callback call delayed by given time in seconds. -\ **Example:** Call :ref:`Node.queue_free` after 2 seconds. +\ **Example:** Call :ref:`Node.queue_free` after 2 seconds: :: diff --git a/classes/class_cameraattributes.rst b/classes/class_cameraattributes.rst index 2bbe852e8b0..386753ab34e 100644 --- a/classes/class_cameraattributes.rst +++ b/classes/class_cameraattributes.rst @@ -137,7 +137,11 @@ Multiplier for the exposure amount. A higher value results in a brighter image. - |void| **set_exposure_sensitivity**\ (\ value\: :ref:`float`\ ) - :ref:`float` **get_exposure_sensitivity**\ (\ ) -Sensitivity of camera sensors, measured in ISO. A higher sensitivity results in a brighter image. Only available when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units` is enabled. When :ref:`auto_exposure_enabled` this can be used as a method of exposure compensation, doubling the value will increase the exposure value (measured in EV100) by 1 stop. +Sensitivity of camera sensors, measured in ISO. A higher sensitivity results in a brighter image. + +If :ref:`auto_exposure_enabled` is ``true``, this can be used as a method of exposure compensation, doubling the value will increase the exposure value (measured in EV100) by 1 stop. + +\ **Note:** Only available when :ref:`ProjectSettings.rendering/lights_and_shadows/use_physical_light_units` is enabled. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index 4ce59f3b7a3..64e59fcab6b 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -529,6 +529,8 @@ Property Descriptions Allows the current node to clip child nodes, essentially acting as a mask. +\ **Note:** Clipping nodes cannot be nested or placed within :ref:`CanvasGroup`\ s. If an ancestor of this node clips its children or is a :ref:`CanvasGroup`, then this node's clip mode should be set to :ref:`CLIP_CHILDREN_DISABLED` to avoid unexpected behavior. + .. rst-class:: classref-item-separator ---- @@ -737,7 +739,7 @@ If ``true``, this **CanvasItem** may be drawn. Whether this **CanvasItem** is ac If ``true``, this and child **CanvasItem** nodes with a higher Y position are rendered in front of nodes with a lower Y position. If ``false``, this and child **CanvasItem** nodes are rendered normally in scene tree order. -With Y-sorting enabled on a parent node ('A') but disabled on a child node ('B'), the child node ('B') is sorted but its children ('C1', 'C2', etc) render together on the same Y position as the child node ('B'). This allows you to organize the render order of a scene without changing the scene tree. +With Y-sorting enabled on a parent node ('A') but disabled on a child node ('B'), the child node ('B') is sorted but its children ('C1', 'C2', etc.) render together on the same Y position as the child node ('B'). This allows you to organize the render order of a scene without changing the scene tree. Nodes sort relative to each other only if they are on the same :ref:`z_index`. @@ -1155,7 +1157,7 @@ Sets a custom transform for drawing via matrix. Anything drawn afterwards will b Draws ``text`` using the specified ``font`` at the ``pos`` (bottom-left corner using the baseline of the font). The text will have its color multiplied by ``modulate``. If ``width`` is greater than or equal to 0, the text will be clipped if it exceeds the specified width. -\ **Example using the default project font:**\ +\ **Example:** Draw "Hello world", using the project's default font: .. tabs:: diff --git a/classes/class_characterbody2d.rst b/classes/class_characterbody2d.rst index ea56c53059b..078c9009f22 100644 --- a/classes/class_characterbody2d.rst +++ b/classes/class_characterbody2d.rst @@ -574,7 +574,7 @@ Returns the current real velocity since the last call to :ref:`move_and_slide`, which contains information about a collision that occurred during the last call to :ref:`move_and_slide`. Since the body can collide several times in a single call to :ref:`move_and_slide`, you must specify the index of the collision in the range 0 to (:ref:`get_slide_collision_count` - 1). -\ **Example usage:**\ +\ **Example:** Iterate through the collisions with a ``for`` loop: .. tabs:: diff --git a/classes/class_charfxtransform.rst b/classes/class_charfxtransform.rst index 25c6eebf6fd..fc3d18859e5 100644 --- a/classes/class_charfxtransform.rst +++ b/classes/class_charfxtransform.rst @@ -28,8 +28,6 @@ Tutorials - :doc:`BBCode in RichTextLabel <../tutorials/ui/bbcode_in_richtextlabel>` -- `RichTextEffect test project (third-party) `__ - .. rst-class:: classref-reftable-group Properties diff --git a/classes/class_color.rst b/classes/class_color.rst index 08a71e5faf2..8c5b5ffbf9f 100644 --- a/classes/class_color.rst +++ b/classes/class_color.rst @@ -48,29 +48,35 @@ Properties .. table:: :widths: auto - +---------------------------+------------------------------------+---------+ - | :ref:`float` | :ref:`a` | ``1.0`` | - +---------------------------+------------------------------------+---------+ - | :ref:`int` | :ref:`a8` | ``255`` | - +---------------------------+------------------------------------+---------+ - | :ref:`float` | :ref:`b` | ``0.0`` | - +---------------------------+------------------------------------+---------+ - | :ref:`int` | :ref:`b8` | ``0`` | - +---------------------------+------------------------------------+---------+ - | :ref:`float` | :ref:`g` | ``0.0`` | - +---------------------------+------------------------------------+---------+ - | :ref:`int` | :ref:`g8` | ``0`` | - +---------------------------+------------------------------------+---------+ - | :ref:`float` | :ref:`h` | ``0.0`` | - +---------------------------+------------------------------------+---------+ - | :ref:`float` | :ref:`r` | ``0.0`` | - +---------------------------+------------------------------------+---------+ - | :ref:`int` | :ref:`r8` | ``0`` | - +---------------------------+------------------------------------+---------+ - | :ref:`float` | :ref:`s` | ``0.0`` | - +---------------------------+------------------------------------+---------+ - | :ref:`float` | :ref:`v` | ``0.0`` | - +---------------------------+------------------------------------+---------+ + +---------------------------+------------------------------------------------+---------+ + | :ref:`float` | :ref:`a` | ``1.0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`int` | :ref:`a8` | ``255`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`float` | :ref:`b` | ``0.0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`int` | :ref:`b8` | ``0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`float` | :ref:`g` | ``0.0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`int` | :ref:`g8` | ``0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`float` | :ref:`h` | ``0.0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`float` | :ref:`ok_hsl_h` | ``0.0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`float` | :ref:`ok_hsl_l` | ``0.0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`float` | :ref:`ok_hsl_s` | ``0.0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`float` | :ref:`r` | ``0.0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`int` | :ref:`r8` | ``0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`float` | :ref:`s` | ``0.0`` | + +---------------------------+------------------------------------------------+---------+ + | :ref:`float` | :ref:`v` | ``0.0`` | + +---------------------------+------------------------------------------------+---------+ .. rst-class:: classref-reftable-group @@ -1462,6 +1468,42 @@ The HSV hue of this color, on the range 0 to 1. ---- +.. _class_Color_property_ok_hsl_h: + +.. rst-class:: classref-property + +:ref:`float` **ok_hsl_h** = ``0.0`` :ref:`🔗` + +The OKHSL hue of this color, on the range 0 to 1. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Color_property_ok_hsl_l: + +.. rst-class:: classref-property + +:ref:`float` **ok_hsl_l** = ``0.0`` :ref:`🔗` + +The OKHSL lightness of this color, on the range 0 to 1. + +.. rst-class:: classref-item-separator + +---- + +.. _class_Color_property_ok_hsl_s: + +.. rst-class:: classref-property + +:ref:`float` **ok_hsl_s** = ``0.0`` :ref:`🔗` + +The OKHSL saturation of this color, on the range 0 to 1. + +.. rst-class:: classref-item-separator + +---- + .. _class_Color_property_r: .. rst-class:: classref-property @@ -1523,7 +1565,7 @@ Constructor Descriptions Constructs a default **Color** from opaque black. This is the same as :ref:`BLACK`. -\ **Note:** in C#, constructs an empty color with all of its components set to ``0.0`` (transparent black). +\ **Note:** In C#, this constructs a **Color** with all of its components set to ``0.0`` (transparent black). .. rst-class:: classref-item-separator diff --git a/classes/class_control.rst b/classes/class_control.rst index 4032c1c58a6..52429b732b9 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -1611,10 +1611,12 @@ Controls whether the control will be able to receive mouse button input events t - |void| **set_force_pass_scroll_events**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_force_pass_scroll_events**\ (\ ) -When enabled, scroll wheel events processed by :ref:`_gui_input` will be passed to the parent control even if :ref:`mouse_filter` is set to :ref:`MOUSE_FILTER_STOP`. As it defaults to true, this allows nested scrollable containers to work out of the box. +When enabled, scroll wheel events processed by :ref:`_gui_input` will be passed to the parent control even if :ref:`mouse_filter` is set to :ref:`MOUSE_FILTER_STOP`. You should disable it on the root of your UI if you do not want scroll events to go to the :ref:`Node._unhandled_input` processing. +\ **Note:** Because this property defaults to ``true``, this allows nested scrollable containers to work out of the box. + .. rst-class:: classref-item-separator ---- @@ -2122,9 +2124,9 @@ Virtual method to be implemented by the user. Returns the tooltip text for the p |void| **_gui_input**\ (\ event\: :ref:`InputEvent`\ ) |virtual| :ref:`🔗` -Virtual method to be implemented by the user. Use this method to process and accept inputs on UI elements. See :ref:`accept_event`. +Virtual method to be implemented by the user. Override this method to handle and accept inputs on UI elements. See also :ref:`accept_event`. -\ **Example usage for clicking a control:**\ +\ **Example:** Click on the control to print a message: .. tabs:: @@ -2151,19 +2153,19 @@ Virtual method to be implemented by the user. Use this method to process and acc -The event won't trigger if: +If the ``event`` inherits :ref:`InputEventMouse`, this method will **not** be called when: -\* clicking outside the control (see :ref:`_has_point`); +- the control's :ref:`mouse_filter` is set to :ref:`MOUSE_FILTER_IGNORE`; -\* control has :ref:`mouse_filter` set to :ref:`MOUSE_FILTER_IGNORE`; +- the control is obstructed by another control on top, that doesn't have :ref:`mouse_filter` set to :ref:`MOUSE_FILTER_IGNORE`; -\* control is obstructed by another **Control** on top of it, which doesn't have :ref:`mouse_filter` set to :ref:`MOUSE_FILTER_IGNORE`; +- the control's parent has :ref:`mouse_filter` set to :ref:`MOUSE_FILTER_STOP` or has accepted the event; -\* control's parent has :ref:`mouse_filter` set to :ref:`MOUSE_FILTER_STOP` or has accepted the event; +- the control's parent has :ref:`clip_contents` enabled and the ``event``'s position is outside the parent's rectangle; -\* it happens outside the parent's rectangle and the parent has either :ref:`clip_contents` enabled. +- the ``event``'s position is outside the control (see :ref:`_has_point`). -\ **Note:** Event position is relative to the control origin. +\ **Note:** The ``event``'s position is relative to this control's origin. .. rst-class:: classref-item-separator @@ -2199,9 +2201,9 @@ The returned node will be added as child to a :ref:`PopupPanel \ **Note:** The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its :ref:`custom_minimum_size` to some non-zero value. -\ **Note:** The node (and any relevant children) should be :ref:`CanvasItem.visible` when returned, otherwise, the viewport that instantiates it will not be able to calculate its minimum size reliably. +\ **Note:** The node (and any relevant children) should have their :ref:`CanvasItem.visible` set to ``true`` when returned, otherwise, the viewport that instantiates it will not be able to calculate its minimum size reliably. -\ **Example of usage with a custom-constructed node:**\ +\ **Example:** Use a constructed node as a tooltip: .. tabs:: @@ -2224,7 +2226,7 @@ The returned node will be added as child to a :ref:`PopupPanel -\ **Example of usage with a custom scene instance:**\ +\ **Example:** Usa a scene instance as a tooltip: .. tabs:: @@ -2289,7 +2291,7 @@ Creates a local override for a theme :ref:`Color` with the specifie See also :ref:`get_theme_color`. -\ **Example of overriding a label's color and resetting it later:**\ +\ **Example:** Override a :ref:`Label`'s color and reset it later: .. tabs:: @@ -2384,14 +2386,14 @@ Creates a local override for a theme :ref:`StyleBox` with the sp See also :ref:`get_theme_stylebox`. -\ **Example of modifying a property in a StyleBox by duplicating it:**\ +\ **Example:** Modify a property in a :ref:`StyleBox` by duplicating it: .. tabs:: .. code-tab:: gdscript - # The snippet below assumes the child node MyButton has a StyleBoxFlat assigned. + # The snippet below assumes the child node "MyButton" has a StyleBoxFlat assigned. # Resources are shared across instances, so we need to duplicate it # to avoid modifying the appearance of all other buttons. var new_stylebox_normal = $MyButton.get_theme_stylebox("normal").duplicate() @@ -2403,7 +2405,7 @@ See also :ref:`get_theme_stylebox`. .. code-tab:: csharp - // The snippet below assumes the child node MyButton has a StyleBoxFlat assigned. + // The snippet below assumes the child node "MyButton" has a StyleBoxFlat assigned. // Resources are shared across instances, so we need to duplicate it // to avoid modifying the appearance of all other buttons. StyleBoxFlat newStyleboxNormal = GetNode