diff --git a/classes/class_@gdscript.rst b/classes/class_@gdscript.rst index 1fdf78d65..6a2b2d5e5 100644 --- a/classes/class_@gdscript.rst +++ b/classes/class_@gdscript.rst @@ -133,27 +133,27 @@ Mark the following property as exported (editable in the Inspector dock and save :: extends Node - + enum Direction {LEFT, RIGHT, UP, DOWN} - + # Built-in types. @export var string = "" @export var int_number = 5 @export var float_number: float = 5 - + # Enums. @export var type: Variant.Type @export var format: Image.Format @export var direction: Direction - + # Resources. @export var image: Image @export var custom_resource: CustomResource - + # Nodes. @export var node: Node @export var custom_node: CustomNode - + # Typed arrays. @export var int_array: Array[int] @export var direction_array: Array[Direction] @@ -261,7 +261,7 @@ See also :ref:`@GlobalScope.PROPERTY_HINT_ENUM`-derived class exists i type_exists("NonExistentClass") # Returns false .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_@globalscope.rst b/classes/class_@globalscope.rst index f715c3b30..4be110e46 100644 --- a/classes/class_@globalscope.rst +++ b/classes/class_@globalscope.rst @@ -3052,7 +3052,7 @@ Since :ref:`OK` has value ``0``, and all other e var error = method_that_returns_error() if error != OK: printerr("Failure!") - + # Or, alternatively: if error: printerr("Still failing!") @@ -3715,7 +3715,7 @@ If a property is :ref:`Dictionary`, hints the editor how to sh hint_string = "%d/%d:Zero,One,Three:3,Six:6" % [TYPE_INT, PROPERTY_HINT_ENUM] # Array of integers (an enum). hint_string = "%d/%d:*.png" % [TYPE_STRING, PROPERTY_HINT_FILE] # Array of strings (file paths). hint_string = "%d/%d:Texture2D" % [TYPE_OBJECT, PROPERTY_HINT_RESOURCE_TYPE] # Array of textures. - + hint_string = "%d:%d:" % [TYPE_ARRAY, TYPE_FLOAT] # Two-dimensional array of floats. hint_string = "%d:%d/%d:" % [TYPE_ARRAY, TYPE_STRING, PROPERTY_HINT_MULTILINE_TEXT] # Two-dimensional array of multiline strings. hint_string = "%d:%d/%d:-1,1,0.1" % [TYPE_ARRAY, TYPE_FLOAT, PROPERTY_HINT_RANGE] # Two-dimensional array of floats (in range from -1 to 1). @@ -3728,7 +3728,7 @@ If a property is :ref:`Dictionary`, hints the editor how to sh hintString = $"{Variant.Type.Int:D}/{PropertyHint.Enum:D}:Zero,One,Three:3,Six:6"; // Array of integers (an enum). hintString = $"{Variant.Type.String:D}/{PropertyHint.File:D}:*.png"; // Array of strings (file paths). hintString = $"{Variant.Type.Object:D}/{PropertyHint.ResourceType:D}:Texture2D"; // Array of textures. - + hintString = $"{Variant.Type.Array:D}:{Variant.Type.Float:D}:"; // Two-dimensional array of floats. hintString = $"{Variant.Type.Array:D}:{Variant.Type.String:D}/{PropertyHint.MultilineText:D}:"; // Two-dimensional array of multiline strings. hintString = $"{Variant.Type.Array:D}:{Variant.Type.Float:D}/{PropertyHint.Range:D}:-1,1,0.1"; // Two-dimensional array of floats (in range from -1 to 1). @@ -5289,19 +5289,19 @@ Returns the absolute value of a :ref:`Variant` parameter ``x`` (i var a = abs(-1) # a is 1 - + var b = abs(-1.2) # b is 1.2 - + var c = abs(Vector2(-3.5, -4)) # c is (3.5, 4) - + var d = abs(Vector2i(-5, -6)) # d is (5, 6) - + var e = abs(Vector3(-7, 8.5, -3.8)) # e is (7, 8.5, 3.8) - + var f = abs(Vector3i(-7, -8, -9)) # f is (7, 8, 9) @@ -5374,7 +5374,7 @@ Returns the hyperbolic arc (also called inverse) cosine of ``x``, returning a va var a = acosh(2) # Returns 1.31695789692482 cosh(a) # Returns 2 - + var b = acosh(-1) # Returns 0 .. rst-class:: classref-item-separator @@ -5479,7 +5479,7 @@ In mathematics, the inverse hyperbolic tangent is only defined for -1 < ``x`` < var a = atanh(0.9) # Returns 1.47221948958322 tanh(a) # Returns 0.9 - + var b = atanh(-2) # Returns -inf tanh(b) # Returns -1 @@ -5600,7 +5600,7 @@ Clamps the ``value``, returning a :ref:`Variant` not less than `` var a = clamp(-10, -1, 5) # a is -1 - + var b = clamp(8.1, 0.9, 5.5) # b is 5.5 @@ -5624,7 +5624,7 @@ Clamps the ``value``, returning a :ref:`float` not less than ``min` var speed = 42.1 var a = clampf(speed, 1.0, 20.5) # a is 20.5 - + speed = -10.0 var b = clampf(speed, -1.0, 1.0) # b is -1.0 @@ -5644,7 +5644,7 @@ Clamps the ``value``, returning an :ref:`int` not less than ``min`` a var speed = 42 var a = clampi(speed, 1, 20) # a is 20 - + speed = -10 var b = clampi(speed, -1, 1) # b is -1 @@ -5971,7 +5971,7 @@ Returns the :ref:`Object` that corresponds to ``instance_id``. All .. code-tab:: gdscript var drink = "water" - + func _ready(): var id = get_instance_id() var instance = instance_from_id(id) @@ -5982,7 +5982,7 @@ Returns the :ref:`Object` that corresponds to ``instance_id``. All public partial class MyNode : Node { public string Drink { get; set; } = "water"; - + public override void _Ready() { ulong id = GetInstanceId(); @@ -6010,7 +6010,7 @@ Returns an interpolation or extrapolation factor considering the range specified # The interpolation ratio in the `lerp()` call below is 0.75. var middle = lerp(20, 30, 0.75) # middle is now 27.5. - + # Now, we pretend to have forgotten the original ratio and want to get it back. var ratio = inverse_lerp(20, 30, 27.5) # ratio is now 0.75. @@ -6114,7 +6114,7 @@ Returns ``true``, for value types, if ``a`` and ``b`` share the same value. Retu is_same(vec2_a, vec2_a) # true is_same(vec2_a, vec2_b) # true is_same(vec2_a, vec2_c) # false - + # Array is a reference type var arr_a = [] var arr_b = [] @@ -6385,7 +6385,7 @@ Returns the smallest integer power of 2 that is greater than or equal to ``value nearest_po2(3) # Returns 4 nearest_po2(4) # Returns 4 nearest_po2(5) # Returns 8 - + nearest_po2(0) # Returns 0 (this may not be expected) nearest_po2(-1) # Returns 0 (this may not be expected) @@ -6528,8 +6528,6 @@ When printing to standard output, the supported subset of BBCode is converted to \ **Note:** Consider using :ref:`push_error()` and :ref:`push_warning()` to print error and warning messages instead of :ref:`print()` or :ref:`print_rich()`. This distinguishes them from print messages used for debugging purposes, while also displaying a stack trace when an error or warning is printed. -\ **Note:** On Windows, only Windows 10 and later correctly displays ANSI escape codes in standard output. - \ **Note:** Output displayed in the editor supports clickable ``[url=address]text[/url]`` tags. The ``[url]`` tag's ``address`` value is handled by :ref:`OS.shell_open()` when clicked. .. rst-class:: classref-item-separator @@ -6739,7 +6737,7 @@ 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 @@ -7046,7 +7044,7 @@ Supported types: :ref:`int`, :ref:`float`, :ref:`Vector2 sign(0.0) # Returns 0 sign(6.0) # Returns 1 sign(NAN) # Returns 0 - + sign(Vector3(-6.0, 0.0, 6.0)) # Returns (-1, 0, 1) \ **Note:** For better type safety, use :ref:`signf()`, :ref:`signi()`, :ref:`Vector2.sign()`, :ref:`Vector2i.sign()`, :ref:`Vector3.sign()`, :ref:`Vector3i.sign()`, :ref:`Vector4.sign()`, or :ref:`Vector4i.sign()`. @@ -7171,7 +7169,7 @@ The returned value is the same type of :ref:`Variant` as ``step`` snapped(100, 32) # Returns 96 snapped(3.14159, 0.01) # Returns 3.14 - + snapped(Vector2(34, 70), Vector2(8, 8)) # Returns (32, 72) See also :ref:`ceil()`, :ref:`floor()`, and :ref:`round()`. @@ -7495,18 +7493,18 @@ A weak reference to an object is not enough to keep the object alive: when the o :ref:`Variant` **wrap**\ (\ value\: :ref:`Variant`, min\: :ref:`Variant`, max\: :ref:`Variant`\ ) :ref:`🔗` -Wraps the :ref:`Variant` ``value`` between ``min`` and ``max``. Can be used for creating loop-alike behavior or infinite surfaces. +Wraps the :ref:`Variant` ``value`` between ``min`` and ``max``. ``min`` is *inclusive* while ``max`` is *exclusive*. This can be used for creating loop-like behavior or infinite surfaces. -Variant types :ref:`int` and :ref:`float` are supported. If any of the arguments is :ref:`float` this function returns a :ref:`float`, otherwise it returns an :ref:`int`. +Variant types :ref:`int` and :ref:`float` are supported. If any of the arguments is :ref:`float`, this function returns a :ref:`float`, otherwise it returns an :ref:`int`. :: var a = wrap(4, 5, 10) # a is 9 (int) - + var a = wrap(7, 5, 10) # a is 7 (int) - + var a = wrap(10.5, 5, 10) # a is 5.5 (float) @@ -7520,7 +7518,7 @@ Variant types :ref:`int` and :ref:`float` are supported. :ref:`float` **wrapf**\ (\ value\: :ref:`float`, min\: :ref:`float`, max\: :ref:`float`\ ) :ref:`🔗` -Wraps the float ``value`` between ``min`` and ``max``. Can be used for creating loop-alike behavior or infinite surfaces. +Wraps the float ``value`` between ``min`` and ``max``. ``min`` is *inclusive* while ``max`` is *exclusive*. This can be used for creating loop-like behavior or infinite surfaces. :: @@ -7537,9 +7535,7 @@ Wraps the float ``value`` between ``min`` and ``max``. Can be used for creating # Infinite rotation (in radians) angle = wrapf(angle + 0.1, -PI, PI) -\ **Note:** If ``min`` is ``0``, this is equivalent to :ref:`fposmod()`, so prefer using that instead. - -\ :ref:`wrapf()` is more flexible than using the :ref:`fposmod()` approach by giving the user control over the minimum value. +\ **Note:** If ``min`` is ``0``, this is equivalent to :ref:`fposmod()`, so prefer using that instead. :ref:`wrapf()` is more flexible than using the :ref:`fposmod()` approach by giving the user control over the minimum value. .. rst-class:: classref-item-separator @@ -7551,7 +7547,7 @@ Wraps the float ``value`` between ``min`` and ``max``. Can be used for creating :ref:`int` **wrapi**\ (\ value\: :ref:`int`, min\: :ref:`int`, max\: :ref:`int`\ ) :ref:`🔗` -Wraps the integer ``value`` between ``min`` and ``max``. Can be used for creating loop-alike behavior or infinite surfaces. +Wraps the integer ``value`` between ``min`` and ``max``. ``min`` is *inclusive* while ``max`` is *exclusive*. This can be used for creating loop-like behavior or infinite surfaces. :: @@ -7564,6 +7560,7 @@ Wraps the integer ``value`` between ``min`` and ``max``. Can be used for creatin var result = wrapi(-6, -5, -1) .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_aabb.rst b/classes/class_aabb.rst index cff1cd256..f431b2378 100644 --- a/classes/class_aabb.rst +++ b/classes/class_aabb.rst @@ -286,7 +286,7 @@ Returns ``true`` if this bounding box *completely* encloses the ``with`` box. Th var a = AABB(Vector3(0, 0, 0), Vector3(4, 4, 4)) var b = AABB(Vector3(1, 1, 1), Vector3(3, 3, 3)) var c = AABB(Vector3(2, 2, 2), Vector3(8, 8, 8)) - + print(a.encloses(a)) # Prints true print(a.encloses(b)) # Prints true print(a.encloses(c)) # Prints false @@ -296,7 +296,7 @@ Returns ``true`` if this bounding box *completely* encloses the ``with`` box. Th var a = new Aabb(new Vector3(0, 0, 0), new Vector3(4, 4, 4)); var b = new Aabb(new Vector3(1, 1, 1), new Vector3(3, 3, 3)); var c = new Aabb(new Vector3(2, 2, 2), new Vector3(8, 8, 8)); - + GD.Print(a.Encloses(a)); // Prints True GD.Print(a.Encloses(b)); // Prints True GD.Print(a.Encloses(c)); // Prints False @@ -321,11 +321,11 @@ Returns a copy of this bounding box expanded to align the edges with the given ` .. code-tab:: gdscript var box = AABB(Vector3(0, 0, 0), Vector3(5, 2, 5)) - + box = box.expand(Vector3(10, 0, 0)) print(box.position) # Prints (0.0, 0.0, 0.0) print(box.size) # Prints (10.0, 2.0, 5.0) - + box = box.expand(Vector3(-5, 0, 5)) print(box.position) # Prints (-5.0, 0.0, 0.0) print(box.size) # Prints (15.0, 2.0, 5.0) @@ -333,11 +333,11 @@ Returns a copy of this bounding box expanded to align the edges with the given ` .. code-tab:: csharp var box = new Aabb(new Vector3(0, 0, 0), new Vector3(5, 2, 5)); - + box = box.Expand(new Vector3(10, 0, 0)); GD.Print(box.Position); // Prints (0, 0, 0) GD.Print(box.Size); // Prints (10, 2, 5) - + box = box.Expand(new Vector3(-5, 0, 5)); GD.Print(box.Position); // Prints (-5, 0, 0) GD.Print(box.Size); // Prints (15, 2, 5) @@ -386,7 +386,7 @@ Returns the longest normalized axis of this bounding box's :ref:`size` and :ref: \ **Note:** Due to floating-point precision errors, consider using :ref:`is_equal_approx()` instead, which is more reliable. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_acceptdialog.rst b/classes/class_acceptdialog.rst index 7f27ae044..33f021c10 100644 --- a/classes/class_acceptdialog.rst +++ b/classes/class_acceptdialog.rst @@ -373,6 +373,7 @@ The size of the vertical space between the dialog's content and the button row. The panel that fills the background of the window. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_aescontext.rst b/classes/class_aescontext.rst index 3e43943df..49ee1e150 100644 --- a/classes/class_aescontext.rst +++ b/classes/class_aescontext.rst @@ -27,9 +27,9 @@ This class holds the context information required for encryption and decryption .. code-tab:: gdscript extends Node - + var aes = AESContext.new() - + func _ready(): var key = "My secret key!!!" # Key must be either 16 or 32 bytes. var data = "My secret text!!" # Data size must be multiple of 16 bytes, apply padding if needed. @@ -43,7 +43,7 @@ This class holds the context information required for encryption and decryption aes.finish() # Check ECB assert(decrypted == data.to_utf8_buffer()) - + var iv = "My secret iv!!!!" # IV must be of exactly 16 bytes. # Encrypt CBC aes.start(AESContext.MODE_CBC_ENCRYPT, key.to_utf8_buffer(), iv.to_utf8_buffer()) @@ -60,11 +60,11 @@ This class holds the context information required for encryption and decryption using Godot; using System.Diagnostics; - + public partial class MyNode : Node { private AesContext _aes = new AesContext(); - + public override void _Ready() { string key = "My secret key!!!"; // Key must be either 16 or 32 bytes. @@ -79,7 +79,7 @@ This class holds the context information required for encryption and decryption _aes.Finish(); // Check ECB Debug.Assert(decrypted == data.ToUtf8Buffer()); - + string iv = "My secret iv!!!!"; // IV must be of exactly 16 bytes. // Encrypt CBC _aes.Start(AesContext.Mode.EcbEncrypt, key.ToUtf8Buffer(), iv.ToUtf8Buffer()); @@ -227,6 +227,7 @@ Run the desired operation for this AES context. Will return a :ref:`PackedByteAr \ **Note:** The size of ``src`` must be a multiple of 16. Apply some padding if needed. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_aimmodifier3d.rst b/classes/class_aimmodifier3d.rst new file mode 100644 index 000000000..07ca7f602 --- /dev/null +++ b/classes/class_aimmodifier3d.rst @@ -0,0 +1,197 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/AimModifier3D.xml. + +.. _class_AimModifier3D: + +AimModifier3D +============= + +**Inherits:** :ref:`BoneConstraint3D` **<** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +The **AimModifier3D** rotates a bone to look at a reference bone. + +.. rst-class:: classref-introduction-group + +Description +----------- + +This is a simple version of :ref:`LookAtModifier3D` that only allows bone to the reference without advanced options such as angle limitation or time-based interpolation. + +The feature is simplified, but instead it is implemented with smooth tracking without euler, see :ref:`set_use_euler()`. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------+------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`setting_count` | ``0`` | + +-----------------------+------------------------------------------------------------------+-------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`BoneAxis` | :ref:`get_forward_axis`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Axis` | :ref:`get_primary_rotation_axis`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_using_euler`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_using_secondary_rotation`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_forward_axis`\ (\ index\: :ref:`int`, axis\: :ref:`BoneAxis`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_primary_rotation_axis`\ (\ index\: :ref:`int`, axis\: :ref:`Axis`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_use_euler`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_use_secondary_rotation`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +---------------------------------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_AimModifier3D_property_setting_count: + +.. rst-class:: classref-property + +:ref:`int` **setting_count** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_setting_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_setting_count**\ (\ ) + +The number of settings in the modifier. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_AimModifier3D_method_get_forward_axis: + +.. rst-class:: classref-method + +:ref:`BoneAxis` **get_forward_axis**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the forward axis of the bone. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AimModifier3D_method_get_primary_rotation_axis: + +.. rst-class:: classref-method + +:ref:`Axis` **get_primary_rotation_axis**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the axis of the first rotation. It is enabled only if :ref:`is_using_euler()` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AimModifier3D_method_is_using_euler: + +.. rst-class:: classref-method + +:ref:`bool` **is_using_euler**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if it provides rotation with using euler. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AimModifier3D_method_is_using_secondary_rotation: + +.. rst-class:: classref-method + +:ref:`bool` **is_using_secondary_rotation**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if it provides rotation by two axes. It is enabled only if :ref:`is_using_euler()` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AimModifier3D_method_set_forward_axis: + +.. rst-class:: classref-method + +|void| **set_forward_axis**\ (\ index\: :ref:`int`, axis\: :ref:`BoneAxis`\ ) :ref:`🔗` + +Sets the forward axis of the bone. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AimModifier3D_method_set_primary_rotation_axis: + +.. rst-class:: classref-method + +|void| **set_primary_rotation_axis**\ (\ index\: :ref:`int`, axis\: :ref:`Axis`\ ) :ref:`🔗` + +Sets the axis of the first rotation. It is enabled only if :ref:`is_using_euler()` is ``true``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AimModifier3D_method_set_use_euler: + +.. rst-class:: classref-method + +|void| **set_use_euler**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If sets ``enabled`` to ``true``, it provides rotation with using euler. + +If sets ``enabled`` to ``false``, it provides rotation with using rotation by arc generated from the forward axis vector and the vector toward the reference. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AimModifier3D_method_set_use_secondary_rotation: + +.. rst-class:: classref-method + +|void| **set_use_secondary_rotation**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If sets ``enabled`` to ``true``, it provides rotation by two axes. It is enabled only if :ref:`is_using_euler()` is ``true``. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_animatablebody2d.rst b/classes/class_animatablebody2d.rst index fb68cf93d..348d034ec 100644 --- a/classes/class_animatablebody2d.rst +++ b/classes/class_animatablebody2d.rst @@ -58,6 +58,7 @@ Property Descriptions If ``true``, the body's movement will be synchronized to the physics frame. This is useful when animating movement via :ref:`AnimationPlayer`, for example on moving platforms. Do **not** use together with :ref:`PhysicsBody2D.move_and_collide()`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animatablebody3d.rst b/classes/class_animatablebody3d.rst index d96fc1efa..a50d1deef 100644 --- a/classes/class_animatablebody3d.rst +++ b/classes/class_animatablebody3d.rst @@ -69,6 +69,7 @@ Property Descriptions If ``true``, the body's movement will be synchronized to the physics frame. This is useful when animating movement via :ref:`AnimationPlayer`, for example on moving platforms. Do **not** use together with :ref:`PhysicsBody3D.move_and_collide()`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animatedsprite2d.rst b/classes/class_animatedsprite2d.rst index 1cb414289..6843d94c9 100644 --- a/classes/class_animatedsprite2d.rst +++ b/classes/class_animatedsprite2d.rst @@ -442,6 +442,7 @@ Sets :ref:`frame` and :ref:`frame_progres Stops the currently playing animation. The animation position is reset to ``0`` and the ``custom_speed`` is reset to ``1.0``. See also :ref:`pause()`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animatedsprite3d.rst b/classes/class_animatedsprite3d.rst index 3941da0fb..9e2d066f4 100644 --- a/classes/class_animatedsprite3d.rst +++ b/classes/class_animatedsprite3d.rst @@ -362,6 +362,7 @@ Sets :ref:`frame` and :ref:`frame_progres Stops the currently playing animation. The animation position is reset to ``0`` and the ``custom_speed`` is reset to ``1.0``. See also :ref:`pause()`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animatedtexture.rst b/classes/class_animatedtexture.rst index 0ec02d591..7a8e812f0 100644 --- a/classes/class_animatedtexture.rst +++ b/classes/class_animatedtexture.rst @@ -234,6 +234,7 @@ Assigns a :ref:`Texture2D` to the given frame. Frame IDs start You can define any number of textures up to :ref:`MAX_FRAMES`, but keep in mind that only frames from 0 to :ref:`frames` - 1 will be part of the animation. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animation.rst b/classes/class_animation.rst index b747ad2ef..aa36fd777 100644 --- a/classes/class_animation.rst +++ b/classes/class_animation.rst @@ -1553,9 +1553,10 @@ A ``backward`` mainly affects the direction of key retrieval of the track with : |void| **value_track_set_update_mode**\ (\ track_idx\: :ref:`int`, mode\: :ref:`UpdateMode`\ ) :ref:`🔗` -Sets the update mode (see :ref:`UpdateMode`) of a value track. +Sets the update mode of a value track. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationlibrary.rst b/classes/class_animationlibrary.rst index 3967684b2..73d3860bf 100644 --- a/classes/class_animationlibrary.rst +++ b/classes/class_animationlibrary.rst @@ -197,6 +197,7 @@ Removes the :ref:`Animation` with the key ``name``. Changes the key of the :ref:`Animation` associated with the key ``name`` to ``newname``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationmixer.rst b/classes/class_animationmixer.rst index cef4a8a03..1d2d7e393 100644 --- a/classes/class_animationmixer.rst +++ b/classes/class_animationmixer.rst @@ -55,7 +55,7 @@ Properties +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ | :ref:`bool` | :ref:`reset_on_save` | ``true`` | +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ - | :ref:`bool` | :ref:`root_motion_local` | | + | :ref:`bool` | :ref:`root_motion_local` | ``false`` | +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ | :ref:`NodePath` | :ref:`root_motion_track` | ``NodePath("")`` | +-----------------------------------------------------------------------------------------+-------------------------------------------------------------------------------------+--------------------+ @@ -480,7 +480,7 @@ This makes it more convenient to preview and edit animations in the editor, as c .. rst-class:: classref-property -:ref:`bool` **root_motion_local** :ref:`🔗` +:ref:`bool` **root_motion_local** = ``false`` :ref:`🔗` .. rst-class:: classref-property-setget @@ -704,7 +704,7 @@ The most basic example is applying position to :ref:`CharacterBody3D` associated with the Moves the :ref:`AnimationLibrary` associated with the key ``name`` to the key ``newname``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnode.rst b/classes/class_animationnode.rst index 81dc029d2..04bd61362 100644 --- a/classes/class_animationnode.rst +++ b/classes/class_animationnode.rst @@ -349,9 +349,9 @@ Adds an input to the animation node. This is only useful for animation nodes cre |void| **blend_animation**\ (\ animation\: :ref:`StringName`, time\: :ref:`float`, delta\: :ref:`float`, seeked\: :ref:`bool`, is_external_seeking\: :ref:`bool`, blend\: :ref:`float`, looped_flag\: :ref:`LoopedFlag` = 0\ ) :ref:`🔗` -Blend an animation by ``blend`` amount (name must be valid in the linked :ref:`AnimationPlayer`). A ``time`` and ``delta`` may be passed, as well as whether ``seeked`` happened. +Blends an animation by ``blend`` amount (name must be valid in the linked :ref:`AnimationPlayer`). A ``time`` and ``delta`` may be passed, as well as whether ``seeked`` happened. -A ``looped_flag`` is used by internal processing immediately after the loop. See also :ref:`LoopedFlag`. +A ``looped_flag`` is used by internal processing immediately after the loop. .. rst-class:: classref-item-separator @@ -363,7 +363,7 @@ A ``looped_flag`` is used by internal processing immediately after the loop. See :ref:`float` **blend_input**\ (\ input_index\: :ref:`int`, time\: :ref:`float`, seek\: :ref:`bool`, is_external_seeking\: :ref:`bool`, blend\: :ref:`float`, filter\: :ref:`FilterAction` = 0, sync\: :ref:`bool` = true, test_only\: :ref:`bool` = false\ ) :ref:`🔗` -Blend an input. This is only useful for animation nodes created for an :ref:`AnimationNodeBlendTree`. The ``time`` parameter is a relative delta, unless ``seek`` is ``true``, in which case it is absolute. A filter mode may be optionally passed (see :ref:`FilterAction` for options). +Blends an input. This is only useful for animation nodes created for an :ref:`AnimationNodeBlendTree`. The ``time`` parameter is a relative delta, unless ``seek`` is ``true``, in which case it is absolute. A filter mode may be optionally passed. .. rst-class:: classref-item-separator @@ -512,6 +512,7 @@ Sets the name of the input at the given ``input`` index. If the setting fails, r Sets a custom parameter. These are used as local memory, because resources can be reused across the tree or scenes. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodeadd2.rst b/classes/class_animationnodeadd2.rst index c23b86a53..4b4a28365 100644 --- a/classes/class_animationnodeadd2.rst +++ b/classes/class_animationnodeadd2.rst @@ -33,6 +33,7 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodeadd3.rst b/classes/class_animationnodeadd3.rst index f77b8f847..05c5c9c05 100644 --- a/classes/class_animationnodeadd3.rst +++ b/classes/class_animationnodeadd3.rst @@ -41,6 +41,7 @@ Tutorials - `Third Person Shooter (TPS) Demo `__ .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodeanimation.rst b/classes/class_animationnodeanimation.rst index 2d14e3dbd..e0fa3591c 100644 --- a/classes/class_animationnodeanimation.rst +++ b/classes/class_animationnodeanimation.rst @@ -241,6 +241,7 @@ If :ref:`use_custom_timeline` provides an animation based on the :ref:`Animation` resource with some parameters adjusted. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodeblend2.rst b/classes/class_animationnodeblend2.rst index 53a14c547..4affaacd9 100644 --- a/classes/class_animationnodeblend2.rst +++ b/classes/class_animationnodeblend2.rst @@ -35,6 +35,7 @@ Tutorials - `Third Person Shooter (TPS) Demo `__ .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodeblend3.rst b/classes/class_animationnodeblend3.rst index 4b7837d7e..c8f86ae6f 100644 --- a/classes/class_animationnodeblend3.rst +++ b/classes/class_animationnodeblend3.rst @@ -39,6 +39,7 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodeblendspace1d.rst b/classes/class_animationnodeblendspace1d.rst index e302b7582..85157dd62 100644 --- a/classes/class_animationnodeblendspace1d.rst +++ b/classes/class_animationnodeblendspace1d.rst @@ -137,7 +137,7 @@ Property Descriptions - |void| **set_blend_mode**\ (\ value\: :ref:`BlendMode`\ ) - :ref:`BlendMode` **get_blend_mode**\ (\ ) -Controls the interpolation between animations. See :ref:`BlendMode` constants. +Controls the interpolation between animations. .. rst-class:: classref-item-separator @@ -316,6 +316,7 @@ Changes the :ref:`AnimationNode` referenced by the point at Updates the position of the point at index ``point`` on the blend axis. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodeblendspace2d.rst b/classes/class_animationnodeblendspace2d.rst index f555b0367..12bdec3c7 100644 --- a/classes/class_animationnodeblendspace2d.rst +++ b/classes/class_animationnodeblendspace2d.rst @@ -185,7 +185,7 @@ If ``true``, the blend space is triangulated automatically. The mesh updates eve - |void| **set_blend_mode**\ (\ value\: :ref:`BlendMode`\ ) - :ref:`BlendMode` **get_blend_mode**\ (\ ) -Controls the interpolation between animations. See :ref:`BlendMode` constants. +Controls the interpolation between animations. .. rst-class:: classref-item-separator @@ -429,6 +429,7 @@ Changes the :ref:`AnimationNode` referenced by the point at Updates the position of the point at index ``point`` in the blend space. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodeblendtree.rst b/classes/class_animationnodeblendtree.rst index fb34d4cee..eb4c125b7 100644 --- a/classes/class_animationnodeblendtree.rst +++ b/classes/class_animationnodeblendtree.rst @@ -294,6 +294,7 @@ Changes the name of a sub animation node. Modifies the position of a sub animation node. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodeextension.rst b/classes/class_animationnodeextension.rst index 3bb6932ae..f07792dfc 100644 --- a/classes/class_animationnodeextension.rst +++ b/classes/class_animationnodeextension.rst @@ -31,13 +31,13 @@ Methods .. table:: :widths: auto - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedFloat32Array` | :ref:`_process_animation_node`\ (\ playback_info\: :ref:`PackedFloat64Array`, test_only\: :ref:`bool`\ ) |virtual| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_remaining_time`\ (\ node_info\: :ref:`PackedFloat32Array`, break_loop\: :ref:`bool`\ ) |static| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_looping`\ (\ node_info\: :ref:`PackedFloat32Array`\ ) |static| | - +-----------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedFloat32Array` | :ref:`_process_animation_node`\ (\ playback_info\: :ref:`PackedFloat64Array`, test_only\: :ref:`bool`\ ) |virtual| |required| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_remaining_time`\ (\ node_info\: :ref:`PackedFloat32Array`, break_loop\: :ref:`bool`\ ) |static| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_looping`\ (\ node_info\: :ref:`PackedFloat32Array`\ ) |static| | + +-----------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -52,7 +52,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`PackedFloat32Array` **_process_animation_node**\ (\ playback_info\: :ref:`PackedFloat64Array`, test_only\: :ref:`bool`\ ) |virtual| :ref:`🔗` +:ref:`PackedFloat32Array` **_process_animation_node**\ (\ playback_info\: :ref:`PackedFloat64Array`, test_only\: :ref:`bool`\ ) |virtual| |required| :ref:`🔗` A version of the :ref:`AnimationNode._process()` method that is meant to be overridden by custom nodes. It returns a :ref:`PackedFloat32Array` with the processed animation data. @@ -85,6 +85,7 @@ Returns the animation's remaining time for the given node info. For looping anim Returns ``true`` if the animation for the given ``node_info`` is looping. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodeoneshot.rst b/classes/class_animationnodeoneshot.rst index 270018bf9..97b8e1ce9 100644 --- a/classes/class_animationnodeoneshot.rst +++ b/classes/class_animationnodeoneshot.rst @@ -32,22 +32,22 @@ After setting the request and changing the animation playback, the one-shot node animation_tree.set("parameters/OneShot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE) # Alternative syntax (same result as above). animation_tree["parameters/OneShot/request"] = AnimationNodeOneShot.ONE_SHOT_REQUEST_FIRE - + # Abort child animation connected to "shot" port. animation_tree.set("parameters/OneShot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_ABORT) # Alternative syntax (same result as above). animation_tree["parameters/OneShot/request"] = AnimationNodeOneShot.ONE_SHOT_REQUEST_ABORT - + # Abort child animation with fading out connected to "shot" port. animation_tree.set("parameters/OneShot/request", AnimationNodeOneShot.ONE_SHOT_REQUEST_FADE_OUT) # Alternative syntax (same result as above). animation_tree["parameters/OneShot/request"] = AnimationNodeOneShot.ONE_SHOT_REQUEST_FADE_OUT - + # Get current state (read-only). animation_tree.get("parameters/OneShot/active") # Alternative syntax (same result as above). animation_tree["parameters/OneShot/active"] - + # Get current internal state (read-only). animation_tree.get("parameters/OneShot/internal_active") # Alternative syntax (same result as above). @@ -57,16 +57,16 @@ After setting the request and changing the animation playback, the one-shot node // Play child animation connected to "shot" port. animationTree.Set("parameters/OneShot/request", (int)AnimationNodeOneShot.OneShotRequest.Fire); - + // Abort child animation connected to "shot" port. animationTree.Set("parameters/OneShot/request", (int)AnimationNodeOneShot.OneShotRequest.Abort); - + // Abort child animation with fading out connected to "shot" port. animationTree.Set("parameters/OneShot/request", (int)AnimationNodeOneShot.OneShotRequest.FadeOut); - + // Get current state (read-only). animationTree.Get("parameters/OneShot/active"); - + // Get current internal state (read-only). animationTree.Get("parameters/OneShot/internal_active"); @@ -347,6 +347,7 @@ The fade-out duration. For example, setting this to ``1.0`` for a 5 second lengt The blend type. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodeoutput.rst b/classes/class_animationnodeoutput.rst index 17f6be4d6..36c14f1c8 100644 --- a/classes/class_animationnodeoutput.rst +++ b/classes/class_animationnodeoutput.rst @@ -33,6 +33,7 @@ Tutorials - `Third Person Shooter (TPS) Demo `__ .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodestatemachine.rst b/classes/class_animationnodestatemachine.rst index abf6e5abb..3724360ee 100644 --- a/classes/class_animationnodestatemachine.rst +++ b/classes/class_animationnodestatemachine.rst @@ -452,6 +452,7 @@ Sets the draw offset of the graph. Used for display in the editor. Sets the animation node's coordinates. Used for display in the editor. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodestatemachineplayback.rst b/classes/class_animationnodestatemachineplayback.rst index c1490a096..0755e0614 100644 --- a/classes/class_animationnodestatemachineplayback.rst +++ b/classes/class_animationnodestatemachineplayback.rst @@ -91,6 +91,37 @@ Methods .. rst-class:: classref-descriptions-group +Signals +------- + +.. _class_AnimationNodeStateMachinePlayback_signal_state_finished: + +.. rst-class:: classref-signal + +**state_finished**\ (\ state\: :ref:`StringName`\ ) :ref:`🔗` + +Emitted when the ``state`` finishes playback. If ``state`` is a state machine set to grouped mode, its signals are passed through with its name prefixed. + +If there is a crossfade, this will be fired when the influence of the :ref:`get_fading_from_node()` animation is no longer present. + +.. rst-class:: classref-item-separator + +---- + +.. _class_AnimationNodeStateMachinePlayback_signal_state_started: + +.. rst-class:: classref-signal + +**state_started**\ (\ state\: :ref:`StringName`\ ) :ref:`🔗` + +Emitted when the ``state`` starts playback. If ``state`` is a state machine set to grouped mode, its signals are passed through with its name prefixed. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + Method Descriptions ------------------- @@ -221,6 +252,7 @@ If the path does not connect from the current state, the animation will play aft If ``reset_on_teleport`` is ``true``, the animation is played from the beginning when the travel cause a teleportation. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodestatemachinetransition.rst b/classes/class_animationnodestatemachinetransition.rst index 140a4a06c..b80c84889 100644 --- a/classes/class_animationnodestatemachinetransition.rst +++ b/classes/class_animationnodestatemachinetransition.rst @@ -322,6 +322,7 @@ The time to cross-fade between this state and the next. \ **Note:** :ref:`AnimationNodeStateMachine` transitions the current state immediately after the start of the fading. The precise remaining time can only be inferred from the main animation. When :ref:`AnimationNodeOutput` is considered as the most upstream, so the :ref:`xfade_time` is not scaled depending on the downstream delta. See also :ref:`AnimationNodeOneShot.fadeout_time`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodesub2.rst b/classes/class_animationnodesub2.rst index 8a62e6d44..e627557c4 100644 --- a/classes/class_animationnodesub2.rst +++ b/classes/class_animationnodesub2.rst @@ -35,6 +35,7 @@ Tutorials - :doc:`AnimationTree <../tutorials/animation/animation_tree>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodesync.rst b/classes/class_animationnodesync.rst index bbe20f0a3..5de060b0f 100644 --- a/classes/class_animationnodesync.rst +++ b/classes/class_animationnodesync.rst @@ -67,6 +67,7 @@ If ``false``, the blended animations' frame are stopped when the blend value is If ``true``, forcing the blended animations to advance frame. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodetimescale.rst b/classes/class_animationnodetimescale.rst index 7d19d1419..6c865f463 100644 --- a/classes/class_animationnodetimescale.rst +++ b/classes/class_animationnodetimescale.rst @@ -31,6 +31,7 @@ Tutorials - `3D Platformer Demo `__ .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodetimeseek.rst b/classes/class_animationnodetimeseek.rst index a6c98704e..0d7c2fe2d 100644 --- a/classes/class_animationnodetimeseek.rst +++ b/classes/class_animationnodetimeseek.rst @@ -32,7 +32,7 @@ After setting the time and changing the animation playback, the time seek node a animation_tree.set("parameters/TimeSeek/seek_request", 0.0) # Alternative syntax (same result as above). animation_tree["parameters/TimeSeek/seek_request"] = 0.0 - + # Play child animation from 12 second timestamp. animation_tree.set("parameters/TimeSeek/seek_request", 12.0) # Alternative syntax (same result as above). @@ -42,7 +42,7 @@ After setting the time and changing the animation playback, the time seek node a // Play child animation from the start. animationTree.Set("parameters/TimeSeek/seek_request", 0.0); - + // Play child animation from 12 second timestamp. animationTree.Set("parameters/TimeSeek/seek_request", 12.0); @@ -90,6 +90,7 @@ Property Descriptions If ``true``, some processes are executed to handle keys between seeks, such as calculating root motion and finding the nearest discrete key. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationnodetransition.rst b/classes/class_animationnodetransition.rst index 8b42fc024..719de4008 100644 --- a/classes/class_animationnodetransition.rst +++ b/classes/class_animationnodetransition.rst @@ -34,12 +34,12 @@ After setting the request and changing the animation playback, the transition no animation_tree.set("parameters/Transition/transition_request", "state_2") # Alternative syntax (same result as above). animation_tree["parameters/Transition/transition_request"] = "state_2" - + # Get current state name (read-only). animation_tree.get("parameters/Transition/current_state") # Alternative syntax (same result as above). animation_tree["parameters/Transition/current_state"] - + # Get current state index (read-only). animation_tree.get("parameters/Transition/current_index") # Alternative syntax (same result as above). @@ -49,10 +49,10 @@ After setting the request and changing the animation playback, the transition no // Play child animation connected to "state_2" port. animationTree.Set("parameters/Transition/transition_request", "state_2"); - + // Get current state name (read-only). animationTree.Get("parameters/Transition/current_state"); - + // Get current state index (read-only). animationTree.Get("parameters/Transition/current_index"); @@ -262,6 +262,7 @@ If ``true``, breaks the loop at the end of the loop cycle for transition, even i If ``true``, the destination animation is restarted when the animation transitions. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationplayer.rst b/classes/class_animationplayer.rst index 990c32290..70012e0b1 100644 --- a/classes/class_animationplayer.rst +++ b/classes/class_animationplayer.rst @@ -902,6 +902,7 @@ If ``keep_state`` is ``true``, the animation state is not updated visually. \ **Note:** The method / audio / animation playback tracks will not be processed by this method. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationrootnode.rst b/classes/class_animationrootnode.rst index 8281adc15..20aea2e58 100644 --- a/classes/class_animationrootnode.rst +++ b/classes/class_animationrootnode.rst @@ -33,6 +33,7 @@ Tutorials - :doc:`Using AnimationTree <../tutorials/animation/animation_tree>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_animationtree.rst b/classes/class_animationtree.rst index ed8653c44..096f6de96 100644 --- a/classes/class_animationtree.rst +++ b/classes/class_animationtree.rst @@ -218,6 +218,7 @@ Returns the process notification in which to update animations. Sets the process notification in which to update animations. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_area2d.rst b/classes/class_area2d.rst index e06699e42..47248ca99 100644 --- a/classes/class_area2d.rst +++ b/classes/class_area2d.rst @@ -155,7 +155,7 @@ Emitted when a :ref:`Shape2D` of the received ``area`` enters a s var other_shape_owner = area.shape_find_owner(area_shape_index) var other_shape_node = area.shape_owner_get_owner(other_shape_owner) - + var local_shape_owner = shape_find_owner(local_shape_index) var local_shape_node = shape_owner_get_owner(local_shape_owner) @@ -222,7 +222,7 @@ Emitted when a :ref:`Shape2D` of the received ``body`` enters a s var body_shape_owner = body.shape_find_owner(body_shape_index) var body_shape_node = body.shape_owner_get_owner(body_shape_owner) - + var local_shape_owner = shape_find_owner(local_shape_index) var local_shape_node = shape_owner_get_owner(local_shape_owner) @@ -336,7 +336,7 @@ See :ref:`ProjectSettings.physics/2d/default_angular_damp`\ ) - :ref:`SpaceOverride` **get_angular_damp_space_override_mode**\ (\ ) -Override mode for angular damping calculations within this area. See :ref:`SpaceOverride` for possible values. +Override mode for angular damping calculations within this area. .. rst-class:: classref-item-separator @@ -474,7 +474,7 @@ The above is true only when the unit distance is a positive number. When this is - |void| **set_gravity_space_override_mode**\ (\ value\: :ref:`SpaceOverride`\ ) - :ref:`SpaceOverride` **get_gravity_space_override_mode**\ (\ ) -Override mode for gravity calculations within this area. See :ref:`SpaceOverride` for possible values. +Override mode for gravity calculations within this area. .. rst-class:: classref-item-separator @@ -510,7 +510,7 @@ See :ref:`ProjectSettings.physics/2d/default_linear_damp`\ ) - :ref:`SpaceOverride` **get_linear_damp_space_override_mode**\ (\ ) -Override mode for linear damping calculations within this area. See :ref:`SpaceOverride` for possible values. +Override mode for linear damping calculations within this area. .. rst-class:: classref-item-separator @@ -655,6 +655,7 @@ Returns ``true`` if the given physics body intersects or overlaps this **Area2D* The ``body`` argument can either be a :ref:`PhysicsBody2D` or a :ref:`TileMap` instance. While TileMaps are not physics bodies themselves, they register their tiles with collision shapes as a virtual physics body. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_area3d.rst b/classes/class_area3d.rst index 9c0b2aaf8..93590202c 100644 --- a/classes/class_area3d.rst +++ b/classes/class_area3d.rst @@ -169,7 +169,7 @@ Emitted when a :ref:`Shape3D` of the received ``area`` enters a s var other_shape_owner = area.shape_find_owner(area_shape_index) var other_shape_node = area.shape_owner_get_owner(other_shape_owner) - + var local_shape_owner = shape_find_owner(local_shape_index) var local_shape_node = shape_owner_get_owner(local_shape_owner) @@ -236,7 +236,7 @@ Emitted when a :ref:`Shape3D` of the received ``body`` enters a s var body_shape_owner = body.shape_find_owner(body_shape_index) var body_shape_node = body.shape_owner_get_owner(body_shape_owner) - + var local_shape_owner = shape_find_owner(local_shape_index) var local_shape_node = shape_owner_get_owner(local_shape_owner) @@ -350,7 +350,7 @@ See :ref:`ProjectSettings.physics/3d/default_angular_damp`\ ) - :ref:`SpaceOverride` **get_angular_damp_space_override_mode**\ (\ ) -Override mode for angular damping calculations within this area. See :ref:`SpaceOverride` for possible values. +Override mode for angular damping calculations within this area. .. rst-class:: classref-item-separator @@ -488,7 +488,7 @@ The above is true only when the unit distance is a positive number. When this is - |void| **set_gravity_space_override_mode**\ (\ value\: :ref:`SpaceOverride`\ ) - :ref:`SpaceOverride` **get_gravity_space_override_mode**\ (\ ) -Override mode for gravity calculations within this area. See :ref:`SpaceOverride` for possible values. +Override mode for gravity calculations within this area. .. rst-class:: classref-item-separator @@ -524,7 +524,7 @@ See :ref:`ProjectSettings.physics/3d/default_linear_damp`\ ) - :ref:`SpaceOverride` **get_linear_damp_space_override_mode**\ (\ ) -Override mode for linear damping calculations within this area. See :ref:`SpaceOverride` for possible values. +Override mode for linear damping calculations within this area. .. rst-class:: classref-item-separator @@ -794,6 +794,7 @@ Returns ``true`` if the given physics body intersects or overlaps this **Area3D* The ``body`` argument can either be a :ref:`PhysicsBody3D` or a :ref:`GridMap` instance. While GridMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_array.rst b/classes/class_array.rst index baa17248f..f4d542826 100644 --- a/classes/class_array.rst +++ b/classes/class_array.rst @@ -28,7 +28,7 @@ An array data structure that can contain a sequence of elements of any :ref:`Var print(array[0]) # Prints "First" print(array[2]) # Prints 3 print(array[-1]) # Prints "Last" - + array[1] = "Second" print(array[1]) # Prints "Second" print(array[-3]) # Prints "Second" @@ -39,7 +39,7 @@ An array data structure that can contain a sequence of elements of any :ref:`Var GD.Print(array[0]); // Prints "First" GD.Print(array[2]); // Prints 3 GD.Print(array[^1]); // Prints "Last" - + array[1] = "Second"; GD.Print(array[1]); // Prints "Second" GD.Print(array[^3]); // Prints "Second" @@ -269,10 +269,10 @@ If ``type`` is not :ref:`@GlobalScope.TYPE_OBJECT` parameter (the curr func greater_than_5(number): return number > 5 - + func _ready(): print([6, 10, 6].all(greater_than_5)) # Prints true (3/3 elements evaluate to true). print([4, 10, 4].all(greater_than_5)) # Prints false (1/3 elements evaluate to true). print([4, 4, 4].all(greater_than_5)) # Prints false (0/3 elements evaluate to true). print([].all(greater_than_5)) # Prints true (0/0 elements evaluate to true). - + # Same as the first line above, but using a lambda function. print([6, 10, 6].all(func(element): return element > 5)) # Prints true @@ -443,7 +443,7 @@ The ``method`` should take one :ref:`Variant` parameter (the curr { return number > 5; } - + public override void _Ready() { // Prints True (3/3 elements evaluate to true). @@ -454,7 +454,7 @@ The ``method`` should take one :ref:`Variant` parameter (the curr GD.Print(new Godot.Collections.Array>int< { 4, 4, 4 }.All(GreaterThan5)); // Prints True (0/0 elements evaluate to true). GD.Print(new Godot.Collections.Array>int< { }.All(GreaterThan5)); - + // Same as the first line above, but using a lambda function. GD.Print(new Godot.Collections.Array>int< { 6, 10, 6 }.All(element => element > 5)); // Prints True } @@ -485,13 +485,13 @@ The ``method`` should take one :ref:`Variant` parameter (the curr func greater_than_5(number): return number > 5 - + func _ready(): print([6, 10, 6].any(greater_than_5)) # Prints true (3 elements evaluate to true). print([4, 10, 4].any(greater_than_5)) # Prints true (1 elements evaluate to true). print([4, 4, 4].any(greater_than_5)) # Prints false (0 elements evaluate to true). print([].any(greater_than_5)) # Prints false (0 elements evaluate to true). - + # Same as the first line above, but using a lambda function. print([6, 10, 6].any(func(number): return number > 5)) # Prints true @@ -576,10 +576,10 @@ If ``before`` is ``true`` (as by default), the returned index comes before all e var numbers = [2, 4, 8, 10] var idx = numbers.bsearch(7) - + numbers.insert(idx, 7) print(numbers) # Prints [2, 4, 7, 8, 10] - + var fruits = ["Apple", "Lemon", "Lemon", "Orange"] print(fruits.bsearch("Lemon", true)) # Prints 1, points at the first "Lemon". print(fruits.bsearch("Lemon", false)) # Prints 3, points at "Orange". @@ -608,18 +608,18 @@ If ``before`` is ``true`` (as by default), the returned index comes before all e if a[1] < b[1]: return true return false - + func _ready(): var my_items = [["Tomato", 2], ["Kiwi", 5], ["Rice", 9]] - + var apple = ["Apple", 5] # "Apple" is inserted before "Kiwi". my_items.insert(my_items.bsearch_custom(apple, sort_by_amount, true), apple) - + var banana = ["Banana", 5] # "Banana" is inserted after "Kiwi". my_items.insert(my_items.bsearch_custom(banana, sort_by_amount, false), banana) - + # Prints [["Tomato", 2], ["Apple", 5], ["Kiwi", 5], ["Banana", 5], ["Rice", 9]] print(my_items) @@ -750,10 +750,10 @@ The ``method`` receives one of the array elements as an argument, and should ret func is_even(number): return number % 2 == 0 - + func _ready(): print([1, 4, 5, 8].filter(is_even)) # Prints [4, 8] - + # Same as above, but using a lambda function. print([1, 4, 5, 8].filter(func(number): return number % 2 == 0)) @@ -798,7 +798,7 @@ Returns the index of the **first** element in the array that causes ``method`` t func is_even(number): return number % 2 == 0 - + func _ready(): print([1, 3, 4, 7].find_custom(is_even.bind())) # Prints 2 @@ -828,7 +828,9 @@ Returns the first element of the array. If the array is empty, fails and returns :ref:`Variant` **get**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` -Returns the element at the given ``index`` in the array. This is the same as using the ``[]`` operator (``array[index]``). +Returns the element at the given ``index`` in the array. If ``index`` out-of-bounds or negative, this method fails and returns ``null``. + +This method is similar (but not identical) to the ``[]`` operator. Most notably, when this method fails, it doesn't pause project execution if run from the editor. .. rst-class:: classref-item-separator @@ -1027,10 +1029,10 @@ The ``method`` should take one :ref:`Variant` parameter (the curr func double(number): return number * 2 - + func _ready(): print([1, 2, 3].map(double)) # Prints [2, 4, 6] - + # Same as above, but using a lambda function. print([1, 2, 3].map(func(element): return element * 2)) @@ -1175,11 +1177,11 @@ The ``method`` takes two arguments: the current value of ``accum`` and the curre func sum(accum, number): return accum + number - + func _ready(): print([1, 2, 3].reduce(sum, 0)) # Prints 6 print([1, 2, 3].reduce(sum, 10)) # Prints 16 - + # Same as above, but using a lambda function. print([1, 2, 3].reduce(func(accum, number): return accum + number, 10)) @@ -1189,10 +1191,10 @@ If :ref:`max()` is not desirable, this method may also b func _ready(): var arr = [Vector2i(5, 0), Vector2i(3, 4), Vector2i(1, 2)] - + var longest_vec = arr.reduce(func(max, vec): return vec if is_length_greater(vec, max) else max) print(longest_vec) # Prints (3, 4) - + func is_length_greater(a, b): return a.length() > b.length() @@ -1202,7 +1204,7 @@ This method can also be used to count how many elements in an array satisfy a ce func is_even(number): return number % 2 == 0 - + func _ready(): var arr = [1, 2, 3, 4, 5] # If the current element is even, increment count, otherwise leave count the same. @@ -1335,16 +1337,16 @@ If either ``begin`` or ``end`` are negative, their value is relative to the end If ``step`` is negative, this method iterates through the array in reverse, returning a slice ordered backwards. For this to work, ``begin`` must be greater than ``end``. -If ``deep`` is ``true``, all nested **Array** and :ref:`Dictionary` elements in the slice are duplicated from the original, recursively. See also :ref:`duplicate()`). +If ``deep`` is ``true``, all nested **Array** and :ref:`Dictionary` elements in the slice are duplicated from the original, recursively. See also :ref:`duplicate()`. :: var letters = ["A", "B", "C", "D", "E", "F"] - + print(letters.slice(0, 2)) # Prints ["A", "B"] print(letters.slice(2, -2)) # Prints ["C", "D"] print(letters.slice(-2, 6)) # Prints ["E", "F"] - + print(letters.slice(0, 6, 2)) # Prints ["A", "C", "E"] print(letters.slice(4, 1, -1)) # Prints ["E", "D", "C"] @@ -1399,12 +1401,12 @@ Sorts the array using a custom :ref:`Callable`. if a[1] < b[1]: return true return false - + func _ready(): var my_items = [["Tomato", 5], ["Apple", 9], ["Rice", 4]] my_items.sort_custom(sort_ascending) print(my_items) # Prints [["Rice", 4], ["Tomato", 5], ["Apple", 9]] - + # Sort descending, using a lambda function. my_items.sort_custom(func(a, b): return a[1] > b[1]) print(my_items) # Prints [["Apple", 9], ["Tomato", 5], ["Rice", 4]] @@ -1553,6 +1555,7 @@ If all searched elements are equal, returns ``true`` if this array's size is gre Returns the :ref:`Variant` element at the specified ``index``. Arrays start at index 0. If ``index`` is greater or equal to ``0``, the element is fetched starting from the beginning of the array. If ``index`` is a negative value, the element is fetched starting from the end. Accessing an array out-of-bounds will cause a run-time error, pausing the project execution if run from the editor. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_arraymesh.rst b/classes/class_arraymesh.rst index 933c78db6..ff27ab5bb 100644 --- a/classes/class_arraymesh.rst +++ b/classes/class_arraymesh.rst @@ -32,13 +32,13 @@ The most basic example is the creation of a single triangle: vertices.push_back(Vector3(0, 1, 0)) vertices.push_back(Vector3(1, 0, 0)) vertices.push_back(Vector3(0, 0, 1)) - + # Initialize the ArrayMesh. var arr_mesh = ArrayMesh.new() var arrays = [] arrays.resize(Mesh.ARRAY_MAX) arrays[Mesh.ARRAY_VERTEX] = vertices - + # Create the Mesh. arr_mesh.add_surface_from_arrays(Mesh.PRIMITIVE_TRIANGLES, arrays) var m = MeshInstance3D.new() @@ -52,13 +52,13 @@ The most basic example is the creation of a single triangle: new Vector3(1, 0, 0), new Vector3(0, 0, 1), ]; - + // Initialize the ArrayMesh. var arrMesh = new ArrayMesh(); Godot.Collections.Array arrays = []; arrays.Resize((int)Mesh.ArrayType.Max); arrays[(int)Mesh.ArrayType.Vertex] = vertices; - + // Create the Mesh. arrMesh.AddSurfaceFromArrays(Mesh.PrimitiveType.Triangles, arrays); var m = new MeshInstance3D(); @@ -165,7 +165,7 @@ Property Descriptions - |void| **set_blend_shape_mode**\ (\ value\: :ref:`BlendShapeMode`\ ) - :ref:`BlendShapeMode` **get_blend_shape_mode**\ (\ ) -Sets the blend shape mode to one of :ref:`BlendShapeMode`. +The blend shape mode. .. rst-class:: classref-item-separator @@ -467,6 +467,7 @@ Sets a name for a given surface. There is currently no description for this method. Please help us by :ref:`contributing one `! .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_arrayoccluder3d.rst b/classes/class_arrayoccluder3d.rst index dc12f90d6..24daff738 100644 --- a/classes/class_arrayoccluder3d.rst +++ b/classes/class_arrayoccluder3d.rst @@ -121,6 +121,7 @@ Method Descriptions Sets :ref:`indices` and :ref:`vertices`, while updating the final occluder only once after both values are set. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_aspectratiocontainer.rst b/classes/class_aspectratiocontainer.rst index c9e5b02c1..d606f09ad 100644 --- a/classes/class_aspectratiocontainer.rst +++ b/classes/class_aspectratiocontainer.rst @@ -203,6 +203,7 @@ The aspect ratio to enforce on child controls. This is the width divided by the The stretch mode used to align child controls. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_astar2d.rst b/classes/class_astar2d.rst index 15de0c0e4..9588d6965 100644 --- a/classes/class_astar2d.rst +++ b/classes/class_astar2d.rst @@ -23,6 +23,13 @@ An implementation of the A\* algorithm, used to find the shortest path between t See :ref:`AStar3D` for a more thorough explanation on how to use this class. **AStar2D** is a wrapper for :ref:`AStar3D` that enforces 2D coordinates. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- `Grid-based Navigation with AStarGrid2D Demo `__ + .. rst-class:: classref-reftable-group Methods @@ -301,12 +308,12 @@ If there is no valid path to the target, and ``allow_partial_path`` is ``true``, astar.add_point(2, Vector2(0, 1), 1) # Default weight is 1 astar.add_point(3, Vector2(1, 1)) astar.add_point(4, Vector2(2, 0)) - + astar.connect_points(1, 2, false) astar.connect_points(2, 3, false) astar.connect_points(4, 3, false) astar.connect_points(1, 4, false) - + var res = astar.get_id_path(1, 3) # Returns [1, 2, 3] .. code-tab:: csharp @@ -316,7 +323,7 @@ If there is no valid path to the target, and ``allow_partial_path`` is ``true``, astar.AddPoint(2, new Vector2(0, 1), 1); // Default weight is 1 astar.AddPoint(3, new Vector2(1, 1)); astar.AddPoint(4, new Vector2(2, 0)); - + astar.ConnectPoints(1, 2, false); astar.ConnectPoints(2, 3, false); astar.ConnectPoints(4, 3, false); @@ -361,10 +368,10 @@ Returns an array with the IDs of the points that form the connection with the gi astar.add_point(2, Vector2(0, 1)) astar.add_point(3, Vector2(1, 1)) astar.add_point(4, Vector2(2, 0)) - + astar.connect_points(1, 2, true) astar.connect_points(1, 3, true) - + var neighbors = astar.get_point_connections(1) # Returns [2, 3] .. code-tab:: csharp @@ -374,10 +381,10 @@ Returns an array with the IDs of the points that form the connection with the gi astar.AddPoint(2, new Vector2(0, 1)); astar.AddPoint(3, new Vector2(1, 1)); astar.AddPoint(4, new Vector2(2, 0)); - + astar.ConnectPoints(1, 2, true); astar.ConnectPoints(1, 3, true); - + long[] neighbors = astar.GetPointConnections(1); // Returns [2, 3] @@ -533,6 +540,7 @@ Sets the ``position`` for the point with the given ``id``. Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost()` when determining the overall cost of traveling across a segment from a neighboring point to this point. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_astar3d.rst b/classes/class_astar3d.rst index 863dab275..6b10fe03f 100644 --- a/classes/class_astar3d.rst +++ b/classes/class_astar3d.rst @@ -34,12 +34,12 @@ It is also possible to use non-Euclidean distances. To do so, create a script th class_name MyAStar3D extends AStar3D - + func _compute_cost(u, v): var u_pos = get_point_position(u) var v_pos = get_point_position(v) return abs(u_pos.x - v_pos.x) + abs(u_pos.y - v_pos.y) + abs(u_pos.z - v_pos.z) - + func _estimate_cost(u, v): var u_pos = get_point_position(u) var v_pos = get_point_position(v) @@ -48,7 +48,7 @@ It is also possible to use non-Euclidean distances. To do so, create a script th .. code-tab:: csharp using Godot; - + [GlobalClass] public partial class MyAStar3D : AStar3D { @@ -56,10 +56,10 @@ It is also possible to use non-Euclidean distances. To do so, create a script th { Vector3 fromPoint = GetPointPosition(fromId); Vector3 toPoint = GetPointPosition(toId); - + return Mathf.Abs(fromPoint.X - toPoint.X) + Mathf.Abs(fromPoint.Y - toPoint.Y) + Mathf.Abs(fromPoint.Z - toPoint.Z); } - + public override float _EstimateCost(long fromId, long toId) { Vector3 fromPoint = GetPointPosition(fromId); @@ -352,12 +352,12 @@ If there is no valid path to the target, and ``allow_partial_path`` is ``true``, astar.add_point(2, Vector3(0, 1, 0), 1) # Default weight is 1 astar.add_point(3, Vector3(1, 1, 0)) astar.add_point(4, Vector3(2, 0, 0)) - + astar.connect_points(1, 2, false) astar.connect_points(2, 3, false) astar.connect_points(4, 3, false) astar.connect_points(1, 4, false) - + var res = astar.get_id_path(1, 3) # Returns [1, 2, 3] .. code-tab:: csharp @@ -411,10 +411,10 @@ Returns an array with the IDs of the points that form the connection with the gi astar.add_point(2, Vector3(0, 1, 0)) astar.add_point(3, Vector3(1, 1, 0)) astar.add_point(4, Vector3(2, 0, 0)) - + astar.connect_points(1, 2, true) astar.connect_points(1, 3, true) - + var neighbors = astar.get_point_connections(1) # Returns [2, 3] .. code-tab:: csharp @@ -426,7 +426,7 @@ Returns an array with the IDs of the points that form the connection with the gi astar.AddPoint(4, new Vector3(2, 0, 0)); astar.ConnectPoints(1, 2, true); astar.ConnectPoints(1, 3, true); - + long[] neighbors = astar.GetPointConnections(1); // Returns [2, 3] @@ -582,6 +582,7 @@ Sets the ``position`` for the point with the given ``id``. Sets the ``weight_scale`` for the point with the given ``id``. The ``weight_scale`` is multiplied by the result of :ref:`_compute_cost()` when determining the overall cost of traveling across a segment from a neighboring point to this point. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_astargrid2d.rst b/classes/class_astargrid2d.rst index 1f39894da..8faf51d3c 100644 --- a/classes/class_astargrid2d.rst +++ b/classes/class_astargrid2d.rst @@ -48,6 +48,13 @@ To use **AStarGrid2D**, you only need to set the :ref:`region`. +.. rst-class:: classref-introduction-group + +Tutorials +--------- + +- `Grid-based Navigation with AStarGrid2D Demo `__ + .. rst-class:: classref-reftable-group Properties @@ -692,6 +699,7 @@ Updates the internal state of the grid according to the parameters to prepare it \ **Note:** All point data (solidity and weight scale) will be cleared. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_atlastexture.rst b/classes/class_atlastexture.rst index ff3384aa7..9dc025ebf 100644 --- a/classes/class_atlastexture.rst +++ b/classes/class_atlastexture.rst @@ -119,6 +119,7 @@ The margin around the :ref:`region`. Useful The region used to draw the :ref:`atlas`. If either dimension of the region's size is ``0``, the value from :ref:`atlas` size will be used for that axis instead. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiobuslayout.rst b/classes/class_audiobuslayout.rst index 80fe120f2..9ad3ccbf1 100644 --- a/classes/class_audiobuslayout.rst +++ b/classes/class_audiobuslayout.rst @@ -22,6 +22,7 @@ Description Stores position, muting, solo, bypass, effects, effect position, volume, and the connections between buses. See :ref:`AudioServer` for usage. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffect.rst b/classes/class_audioeffect.rst index 37e650c80..fc5631d53 100644 --- a/classes/class_audioeffect.rst +++ b/classes/class_audioeffect.rst @@ -42,9 +42,9 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------+------------------------------------------------------------------------------------+ - | :ref:`AudioEffectInstance` | :ref:`_instantiate`\ (\ ) |virtual| | - +-------------------------------------------------------+------------------------------------------------------------------------------------+ + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------+ + | :ref:`AudioEffectInstance` | :ref:`_instantiate`\ (\ ) |virtual| |required| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -59,25 +59,26 @@ Method Descriptions .. rst-class:: classref-method -:ref:`AudioEffectInstance` **_instantiate**\ (\ ) |virtual| :ref:`🔗` +:ref:`AudioEffectInstance` **_instantiate**\ (\ ) |virtual| |required| :ref:`🔗` Override this method to customize the :ref:`AudioEffectInstance` created when this effect is applied on a bus in the editor's Audio panel, or through :ref:`AudioServer.add_bus_effect()`. :: extends AudioEffect - + @export var strength = 4.0 - + func _instantiate(): var effect = CustomAudioEffectInstance.new() effect.base = self - + return effect \ **Note:** It is recommended to keep a reference to the original **AudioEffect** in the new instance. Depending on the implementation this allows the effect instance to listen for changes at run-time and be modified accordingly. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectamplify.rst b/classes/class_audioeffectamplify.rst index d34dc304d..764c65e23 100644 --- a/classes/class_audioeffectamplify.rst +++ b/classes/class_audioeffectamplify.rst @@ -84,6 +84,7 @@ Amount of amplification as a linear value. \ **Note:** This member modifies :ref:`volume_db` for convenience. The returned value is equivalent to the result of :ref:`@GlobalScope.db_to_linear()` on :ref:`volume_db`. Setting this member is equivalent to setting :ref:`volume_db` to the result of :ref:`@GlobalScope.linear_to_db()` on a value. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectbandlimitfilter.rst b/classes/class_audioeffectbandlimitfilter.rst index 031ef9750..1fdfe5753 100644 --- a/classes/class_audioeffectbandlimitfilter.rst +++ b/classes/class_audioeffectbandlimitfilter.rst @@ -29,6 +29,7 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectbandpassfilter.rst b/classes/class_audioeffectbandpassfilter.rst index 186024ed7..1647ea0cd 100644 --- a/classes/class_audioeffectbandpassfilter.rst +++ b/classes/class_audioeffectbandpassfilter.rst @@ -29,6 +29,7 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectcapture.rst b/classes/class_audioeffectcapture.rst index 0bf82ded8..e4ce9269a 100644 --- a/classes/class_audioeffectcapture.rst +++ b/classes/class_audioeffectcapture.rst @@ -186,6 +186,7 @@ Returns the number of frames available to read using :ref:`get_buffer()`! .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectcompressor.rst b/classes/class_audioeffectcompressor.rst index 9df4dc5cb..77abbe9c6 100644 --- a/classes/class_audioeffectcompressor.rst +++ b/classes/class_audioeffectcompressor.rst @@ -25,7 +25,7 @@ Dynamic range compressor reduces the level of the sound when the amplitude goes Compressor has many uses in the mix: -- In the Master bus to compress the whole output (although an :ref:`AudioEffectLimiter` is probably better). +- In the Master bus to compress the whole output (although an :ref:`AudioEffectHardLimiter` is probably better). - In voice channels to ensure they sound as balanced as possible. @@ -189,6 +189,7 @@ Reduce the sound level using another audio bus for threshold detection. The level above which compression is applied to the audio. Value can range from -60 to 0. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectdelay.rst b/classes/class_audioeffectdelay.rst index 3356f6032..3bdebd7b4 100644 --- a/classes/class_audioeffectdelay.rst +++ b/classes/class_audioeffectdelay.rst @@ -293,6 +293,7 @@ Sound level for the second tap. Pan position for the second tap. Value can range from -1 (fully left) to 1 (fully right). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectdistortion.rst b/classes/class_audioeffectdistortion.rst index ef3dd1235..9724fae5d 100644 --- a/classes/class_audioeffectdistortion.rst +++ b/classes/class_audioeffectdistortion.rst @@ -202,6 +202,7 @@ Increases or decreases the volume after the effect, in decibels. Value can range Increases or decreases the volume before the effect, in decibels. Value can range from -60 to 60. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffecteq.rst b/classes/class_audioeffecteq.rst index 1200927b7..b2d3eb110 100644 --- a/classes/class_audioeffecteq.rst +++ b/classes/class_audioeffecteq.rst @@ -90,6 +90,7 @@ Returns the band's gain at the specified index, in dB. Sets band's gain at the specified index, in dB. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffecteq10.rst b/classes/class_audioeffecteq10.rst index fe6ec7273..fab663d26 100644 --- a/classes/class_audioeffecteq10.rst +++ b/classes/class_audioeffecteq10.rst @@ -53,6 +53,7 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffecteq21.rst b/classes/class_audioeffecteq21.rst index d7dcd58ee..403e88699 100644 --- a/classes/class_audioeffecteq21.rst +++ b/classes/class_audioeffecteq21.rst @@ -75,6 +75,7 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffecteq6.rst b/classes/class_audioeffecteq6.rst index 139c4c25c..a0c8de1cc 100644 --- a/classes/class_audioeffecteq6.rst +++ b/classes/class_audioeffecteq6.rst @@ -45,6 +45,7 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectfilter.rst b/classes/class_audioeffectfilter.rst index 11e939b66..0f1773358 100644 --- a/classes/class_audioeffectfilter.rst +++ b/classes/class_audioeffectfilter.rst @@ -169,6 +169,7 @@ Gain amount of the frequencies after the filter. Amount of boost in the frequency range near the cutoff frequency. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffecthardlimiter.rst b/classes/class_audioeffecthardlimiter.rst index d576bce82..3620fdd79 100644 --- a/classes/class_audioeffecthardlimiter.rst +++ b/classes/class_audioeffecthardlimiter.rst @@ -103,6 +103,7 @@ Gain to apply before limiting, in decibels. Time it takes in seconds for the gain reduction to fully release. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffecthighpassfilter.rst b/classes/class_audioeffecthighpassfilter.rst index 3d5763b3d..8c480cb82 100644 --- a/classes/class_audioeffecthighpassfilter.rst +++ b/classes/class_audioeffecthighpassfilter.rst @@ -29,6 +29,7 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffecthighshelffilter.rst b/classes/class_audioeffecthighshelffilter.rst index 11dc41768..7c7e01d55 100644 --- a/classes/class_audioeffecthighshelffilter.rst +++ b/classes/class_audioeffecthighshelffilter.rst @@ -29,6 +29,7 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectinstance.rst b/classes/class_audioeffectinstance.rst index 663b8cfdf..6d55bf362 100644 --- a/classes/class_audioeffectinstance.rst +++ b/classes/class_audioeffectinstance.rst @@ -38,11 +38,11 @@ Methods .. table:: :widths: auto - +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_process`\ (\ src_buffer\: ``const void*``, dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int`\ ) |virtual| | - +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_process_silence`\ (\ ) |virtual| |const| | - +-------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_process`\ (\ src_buffer\: ``const void*``, dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int`\ ) |virtual| |required| | + +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_process_silence`\ (\ ) |virtual| |const| | + +-------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -57,7 +57,7 @@ Method Descriptions .. rst-class:: classref-method -|void| **_process**\ (\ src_buffer\: ``const void*``, dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int`\ ) |virtual| :ref:`🔗` +|void| **_process**\ (\ src_buffer\: ``const void*``, dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int`\ ) |virtual| |required| :ref:`🔗` Called by the :ref:`AudioServer` to process this effect. When :ref:`_process_silence()` is not overridden or it returns ``false``, this method is called only when the bus is active. @@ -78,6 +78,7 @@ Override this method to customize the processing behavior of this effect instanc Should return ``true`` to force the :ref:`AudioServer` to always call :ref:`_process()`, even if the bus has been muted or cannot otherwise be heard. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectlimiter.rst b/classes/class_audioeffectlimiter.rst index 5eeae4ec3..0a9b64b54 100644 --- a/classes/class_audioeffectlimiter.rst +++ b/classes/class_audioeffectlimiter.rst @@ -126,6 +126,7 @@ Applies a gain to the limited waves, in decibels. Value can range from 0 to 6. Threshold from which the limiter begins to be active, in decibels. Value can range from -30 to 0. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectlowpassfilter.rst b/classes/class_audioeffectlowpassfilter.rst index bcf0160b8..6975557b2 100644 --- a/classes/class_audioeffectlowpassfilter.rst +++ b/classes/class_audioeffectlowpassfilter.rst @@ -29,6 +29,7 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectlowshelffilter.rst b/classes/class_audioeffectlowshelffilter.rst index f42fcbdf4..33e2b5653 100644 --- a/classes/class_audioeffectlowshelffilter.rst +++ b/classes/class_audioeffectlowshelffilter.rst @@ -29,6 +29,7 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectnotchfilter.rst b/classes/class_audioeffectnotchfilter.rst index d7d6847e5..d701c1b46 100644 --- a/classes/class_audioeffectnotchfilter.rst +++ b/classes/class_audioeffectnotchfilter.rst @@ -29,6 +29,7 @@ Tutorials - :doc:`Audio buses <../tutorials/audio/audio_buses>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectpanner.rst b/classes/class_audioeffectpanner.rst index 7638e38ab..6927fb5b8 100644 --- a/classes/class_audioeffectpanner.rst +++ b/classes/class_audioeffectpanner.rst @@ -63,6 +63,7 @@ Property Descriptions Pan position. Value can range from -1 (fully left) to 1 (fully right). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectphaser.rst b/classes/class_audioeffectphaser.rst index 6007591ff..9f696b69b 100644 --- a/classes/class_audioeffectphaser.rst +++ b/classes/class_audioeffectphaser.rst @@ -141,6 +141,7 @@ Determines the minimum frequency affected by the LFO modulations, in Hz. Value c Adjusts the rate in Hz at which the effect sweeps up and down across the frequency range. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectpitchshift.rst b/classes/class_audioeffectpitchshift.rst index 9ba21b4ae..bde396a61 100644 --- a/classes/class_audioeffectpitchshift.rst +++ b/classes/class_audioeffectpitchshift.rst @@ -166,6 +166,7 @@ The oversampling factor to use. Higher values result in better quality, but are The pitch scale to use. ``1.0`` is the default pitch and plays sounds unaffected. :ref:`pitch_scale` can range from ``0.0`` (infinitely low pitch, inaudible) to ``16`` (16 times higher than the initial pitch). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectrecord.rst b/classes/class_audioeffectrecord.rst index c1e2646fd..cb5eccc69 100644 --- a/classes/class_audioeffectrecord.rst +++ b/classes/class_audioeffectrecord.rst @@ -84,7 +84,7 @@ Property Descriptions - |void| **set_format**\ (\ value\: :ref:`Format`\ ) - :ref:`Format` **get_format**\ (\ ) -Specifies the format in which the sample will be recorded. See :ref:`Format` for available formats. +Specifies the format in which the sample will be recorded. .. rst-class:: classref-section-separator @@ -128,6 +128,7 @@ Returns whether the recording is active or not. If ``true``, the sound will be recorded. Note that restarting the recording will remove the previously recorded sample. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectreverb.rst b/classes/class_audioeffectreverb.rst index 86c999fd9..7b82e1f92 100644 --- a/classes/class_audioeffectreverb.rst +++ b/classes/class_audioeffectreverb.rst @@ -198,6 +198,7 @@ Widens or narrows the stereo image of the reverb tail. 1 means fully widens. Val Output percent of modified sound. At 0, only original sound is outputted. Value can range from 0 to 1. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectspectrumanalyzer.rst b/classes/class_audioeffectspectrumanalyzer.rst index c2a69ce0e..165c49caf 100644 --- a/classes/class_audioeffectspectrumanalyzer.rst +++ b/classes/class_audioeffectspectrumanalyzer.rst @@ -170,6 +170,7 @@ The size of the `Fast Fourier transform `! .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectspectrumanalyzerinstance.rst b/classes/class_audioeffectspectrumanalyzerinstance.rst index 2fd45adc7..bcabc2220 100644 --- a/classes/class_audioeffectspectrumanalyzerinstance.rst +++ b/classes/class_audioeffectspectrumanalyzerinstance.rst @@ -90,9 +90,10 @@ Method Descriptions Returns the magnitude of the frequencies from ``from_hz`` to ``to_hz`` in linear energy as a Vector2. The ``x`` component of the return value represents the left stereo channel, and ``y`` represents the right channel. -\ ``mode`` determines how the frequency range will be processed. See :ref:`MagnitudeMode`. +\ ``mode`` determines how the frequency range will be processed. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audioeffectstereoenhance.rst b/classes/class_audioeffectstereoenhance.rst index 2b4b2015e..7d492e9ca 100644 --- a/classes/class_audioeffectstereoenhance.rst +++ b/classes/class_audioeffectstereoenhance.rst @@ -101,6 +101,7 @@ Widens sound stage through phase shifting in conjunction with :ref:`time_pullout Widens sound stage through phase shifting in conjunction with :ref:`surround`. Just delays the right channel if :ref:`surround` is 0. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiolistener2d.rst b/classes/class_audiolistener2d.rst index 4f058e447..1d9d0da1d 100644 --- a/classes/class_audiolistener2d.rst +++ b/classes/class_audiolistener2d.rst @@ -86,6 +86,7 @@ Makes the **AudioListener2D** active, setting it as the hearing point for the so This method will have no effect if the **AudioListener2D** is not added to :ref:`SceneTree`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiolistener3d.rst b/classes/class_audiolistener3d.rst index c38a44640..3792808e6 100644 --- a/classes/class_audiolistener3d.rst +++ b/classes/class_audiolistener3d.rst @@ -98,6 +98,7 @@ Returns ``true`` if the listener was made current using :ref:`make_current()` | :ref:`_get_stream_name`\ (\ ) |virtual| |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ + | :ref:`Dictionary` | :ref:`_get_tags`\ (\ ) |virtual| |const| | + +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_has_loop`\ (\ ) |virtual| |const| | +------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------+ | :ref:`AudioStreamPlayback` | :ref:`_instantiate_playback`\ (\ ) |virtual| |const| | @@ -178,6 +180,20 @@ Override this method to customize the name assigned to this audio stream. Unused ---- +.. _class_AudioStream_private_method__get_tags: + +.. rst-class:: classref-method + +:ref:`Dictionary` **_get_tags**\ (\ ) |virtual| |const| :ref:`🔗` + +Override this method to customize the tags for this audio stream. Should return a :ref:`Dictionary` of strings with the tag as the key and its content as the value. + +Commonly used tags include ``title``, ``artist``, ``album``, ``tracknumber``, and ``date``. + +.. rst-class:: classref-item-separator + +---- + .. _class_AudioStream_private_method__has_loop: .. rst-class:: classref-method @@ -287,6 +303,7 @@ Returns ``true`` if the stream is a collection of other streams, ``false`` other Returns ``true`` if this audio stream only supports one channel (*monophony*), or ``false`` if the audio stream supports two or more channels (*polyphony*). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamgenerator.rst b/classes/class_audiostreamgenerator.rst index 06fb9b4f3..6cd9e6adc 100644 --- a/classes/class_audiostreamgenerator.rst +++ b/classes/class_audiostreamgenerator.rst @@ -32,16 +32,16 @@ Here's a sample on how to use it to generate a sine wave: @onready var sample_hz = $AudioStreamPlayer.stream.mix_rate var pulse_hz = 440.0 # The frequency of the sound wave. var phase = 0.0 - + func _ready(): $AudioStreamPlayer.play() playback = $AudioStreamPlayer.get_stream_playback() fill_buffer() - + func fill_buffer(): var increment = pulse_hz / sample_hz var frames_available = playback.get_frames_available() - + for i in range(frames_available): playback.push_frame(Vector2.ONE * sin(phase * TAU)) phase = fmod(phase + increment, 1.0) @@ -49,12 +49,12 @@ Here's a sample on how to use it to generate a sine wave: .. code-tab:: csharp [Export] public AudioStreamPlayer Player { get; set; } - + private AudioStreamGeneratorPlayback _playback; // Will hold the AudioStreamGeneratorPlayback. private float _sampleHz; private float _pulseHz = 440.0f; // The frequency of the sound wave. private double phase = 0.0; - + public override void _Ready() { if (Player.Stream is AudioStreamGenerator generator) // Type as a generator to access MixRate. @@ -65,12 +65,12 @@ Here's a sample on how to use it to generate a sine wave: FillBuffer(); } } - + public void FillBuffer() { float increment = _pulseHz / _sampleHz; int framesAvailable = _playback.GetFramesAvailable(); - + for (int i = 0; i < framesAvailable; i++) { _playback.PushFrame(Vector2.One * (float)Mathf.Sin(phase * Mathf.Tau)); @@ -221,6 +221,7 @@ According to the `Nyquist-Shannon sampling theorem `, :ref:`mix_rate` is used, otherwise current :ref:`AudioServer` mixing rate is used. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamgeneratorplayback.rst b/classes/class_audiostreamgeneratorplayback.rst index 872605bb1..17314378a 100644 --- a/classes/class_audiostreamgeneratorplayback.rst +++ b/classes/class_audiostreamgeneratorplayback.rst @@ -130,6 +130,7 @@ Pushes several audio data frames to the buffer. This is usually more efficient t Pushes a single audio data frame to the buffer. This is usually less efficient than :ref:`push_buffer()` in C# and compiled languages via GDExtension, but :ref:`push_frame()` may be *more* efficient in GDScript. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreaminteractive.rst b/classes/class_audiostreaminteractive.rst index 0c4d5248b..371782ef6 100644 --- a/classes/class_audiostreaminteractive.rst +++ b/classes/class_audiostreaminteractive.rst @@ -546,6 +546,7 @@ Set the name of the current clip (for easier identification). Set the :ref:`AudioStream` associated with the current clip. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreammicrophone.rst b/classes/class_audiostreammicrophone.rst index c90316ec6..8c6a4c040 100644 --- a/classes/class_audiostreammicrophone.rst +++ b/classes/class_audiostreammicrophone.rst @@ -33,6 +33,7 @@ Tutorials - `Audio Mic Record Demo `__ .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreammp3.rst b/classes/class_audiostreammp3.rst index cb9fb5f9f..a7a016823 100644 --- a/classes/class_audiostreammp3.rst +++ b/classes/class_audiostreammp3.rst @@ -229,6 +229,7 @@ Creates a new **AudioStreamMP3** instance from the given buffer. The buffer must Creates a new **AudioStreamMP3** instance from the given file path. The file must be in MP3 format. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamoggvorbis.rst b/classes/class_audiostreamoggvorbis.rst index 9d4bc19a7..a28750514 100644 --- a/classes/class_audiostreamoggvorbis.rst +++ b/classes/class_audiostreamoggvorbis.rst @@ -49,6 +49,8 @@ Properties +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ | :ref:`OggPacketSequence` | :ref:`packet_sequence` | | +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ + | :ref:`Dictionary` | :ref:`tags` | ``{}`` | + +---------------------------------------------------+-----------------------------------------------------------------------------+-----------+ .. rst-class:: classref-reftable-group @@ -177,6 +179,27 @@ Time in seconds at which the stream starts after being looped. Contains the raw Ogg data for this stream. +.. rst-class:: classref-item-separator + +---- + +.. _class_AudioStreamOggVorbis_property_tags: + +.. rst-class:: classref-property + +:ref:`Dictionary` **tags** = ``{}`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_tags**\ (\ value\: :ref:`Dictionary`\ ) +- :ref:`Dictionary` **get_tags**\ (\ ) + +Contains user-defined tags if found in the Ogg Vorbis data. + +Commonly used tags include ``title``, ``artist``, ``album``, ``tracknumber``, and ``date`` (``date`` does not have a standard date format). + +\ **Note:** No tag is *guaranteed* to be present in every file, so make sure to account for the keys not always existing. + .. rst-class:: classref-section-separator ---- @@ -207,6 +230,7 @@ Creates a new **AudioStreamOggVorbis** instance from the given buffer. The buffe Creates a new **AudioStreamOggVorbis** instance from the given file path. The file must be in Ogg Vorbis format. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamplayback.rst b/classes/class_audiostreamplayback.rst index 3c2d25c59..c368a9629 100644 --- a/classes/class_audiostreamplayback.rst +++ b/classes/class_audiostreamplayback.rst @@ -38,45 +38,45 @@ Methods .. table:: :widths: auto - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_loop_count`\ (\ ) |virtual| |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Variant` | :ref:`_get_parameter`\ (\ name\: :ref:`StringName`\ ) |virtual| |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_playback_position`\ (\ ) |virtual| |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_playing`\ (\ ) |virtual| |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_mix`\ (\ buffer\: ``AudioFrame*``, rate_scale\: :ref:`float`, frames\: :ref:`int`\ ) |virtual| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_seek`\ (\ position\: :ref:`float`\ ) |virtual| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_set_parameter`\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) |virtual| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_start`\ (\ from_pos\: :ref:`float`\ ) |virtual| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_stop`\ (\ ) |virtual| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`_tag_used_streams`\ (\ ) |virtual| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`get_loop_count`\ (\ ) |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`get_playback_position`\ (\ ) |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`AudioSamplePlayback` | :ref:`get_sample_playback`\ (\ ) |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`is_playing`\ (\ ) |const| | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedVector2Array` | :ref:`mix_audio`\ (\ rate_scale\: :ref:`float`, frames\: :ref:`int`\ ) | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`seek`\ (\ time\: :ref:`float` = 0.0\ ) | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_sample_playback`\ (\ playback_sample\: :ref:`AudioSamplePlayback`\ ) | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`start`\ (\ from_pos\: :ref:`float` = 0.0\ ) | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`stop`\ (\ ) | - +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_get_loop_count`\ (\ ) |virtual| |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Variant` | :ref:`_get_parameter`\ (\ name\: :ref:`StringName`\ ) |virtual| |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_playback_position`\ (\ ) |virtual| |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_playing`\ (\ ) |virtual| |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_mix`\ (\ buffer\: ``AudioFrame*``, rate_scale\: :ref:`float`, frames\: :ref:`int`\ ) |virtual| |required| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_seek`\ (\ position\: :ref:`float`\ ) |virtual| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_set_parameter`\ (\ name\: :ref:`StringName`, value\: :ref:`Variant`\ ) |virtual| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_start`\ (\ from_pos\: :ref:`float`\ ) |virtual| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_stop`\ (\ ) |virtual| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`_tag_used_streams`\ (\ ) |virtual| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_loop_count`\ (\ ) |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_playback_position`\ (\ ) |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`AudioSamplePlayback` | :ref:`get_sample_playback`\ (\ ) |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_playing`\ (\ ) |const| | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedVector2Array` | :ref:`mix_audio`\ (\ rate_scale\: :ref:`float`, frames\: :ref:`int`\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`seek`\ (\ time\: :ref:`float` = 0.0\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_sample_playback`\ (\ playback_sample\: :ref:`AudioSamplePlayback`\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`start`\ (\ from_pos\: :ref:`float` = 0.0\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`stop`\ (\ ) | + +-------------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -139,7 +139,7 @@ Overridable method. Should return ``true`` if this playback is active and playin .. rst-class:: classref-method -:ref:`int` **_mix**\ (\ buffer\: ``AudioFrame*``, rate_scale\: :ref:`float`, frames\: :ref:`int`\ ) |virtual| :ref:`🔗` +:ref:`int` **_mix**\ (\ buffer\: ``AudioFrame*``, rate_scale\: :ref:`float`, frames\: :ref:`int`\ ) |virtual| |required| :ref:`🔗` Override this method to customize how the audio stream is mixed. This method is called even if the playback is not active. @@ -322,6 +322,7 @@ Starts the stream from the given ``from_pos``, in seconds. Stops the stream. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamplaybackinteractive.rst b/classes/class_audiostreamplaybackinteractive.rst index 31d606266..c80a3e690 100644 --- a/classes/class_audiostreamplaybackinteractive.rst +++ b/classes/class_audiostreamplaybackinteractive.rst @@ -90,6 +90,7 @@ Switch to a clip (by index). Switch to a clip (by name). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamplaybackoggvorbis.rst b/classes/class_audiostreamplaybackoggvorbis.rst index dc0f2c757..e89c61e18 100644 --- a/classes/class_audiostreamplaybackoggvorbis.rst +++ b/classes/class_audiostreamplaybackoggvorbis.rst @@ -17,6 +17,7 @@ AudioStreamPlaybackOggVorbis There is currently no description for this class. Please help us by :ref:`contributing one `! .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamplaybackplaylist.rst b/classes/class_audiostreamplaybackplaylist.rst index 6c5a3c836..dbc521cd2 100644 --- a/classes/class_audiostreamplaybackplaylist.rst +++ b/classes/class_audiostreamplaybackplaylist.rst @@ -15,6 +15,7 @@ AudioStreamPlaybackPlaylist Playback class used for :ref:`AudioStreamPlaylist`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamplaybackpolyphonic.rst b/classes/class_audiostreamplaybackpolyphonic.rst index 0bdeaf1d7..6575a1a77 100644 --- a/classes/class_audiostreamplaybackpolyphonic.rst +++ b/classes/class_audiostreamplaybackpolyphonic.rst @@ -130,6 +130,7 @@ Change the stream volume (in db). The ``stream`` argument is an integer ID retur Stop a stream. The ``stream`` argument is an integer ID returned by :ref:`play_stream()`, which becomes invalid after calling this function. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamplaybackresampled.rst b/classes/class_audiostreamplaybackresampled.rst index 6577e73be..9fcafec2c 100644 --- a/classes/class_audiostreamplaybackresampled.rst +++ b/classes/class_audiostreamplaybackresampled.rst @@ -26,13 +26,13 @@ Methods .. table:: :widths: auto - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`float` | :ref:`_get_stream_sampling_rate`\ (\ ) |virtual| |const| | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_mix_resampled`\ (\ dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int`\ ) |virtual| | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`begin_resample`\ (\ ) | - +---------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`_get_stream_sampling_rate`\ (\ ) |virtual| |required| |const| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`_mix_resampled`\ (\ dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int`\ ) |virtual| |required| | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`begin_resample`\ (\ ) | + +---------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -47,7 +47,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`float` **_get_stream_sampling_rate**\ (\ ) |virtual| |const| :ref:`🔗` +:ref:`float` **_get_stream_sampling_rate**\ (\ ) |virtual| |required| |const| :ref:`🔗` .. container:: contribute @@ -61,7 +61,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`int` **_mix_resampled**\ (\ dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int`\ ) |virtual| :ref:`🔗` +:ref:`int` **_mix_resampled**\ (\ dst_buffer\: ``AudioFrame*``, frame_count\: :ref:`int`\ ) |virtual| |required| :ref:`🔗` .. container:: contribute @@ -82,6 +82,7 @@ Method Descriptions There is currently no description for this method. Please help us by :ref:`contributing one `! .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamplaybacksynchronized.rst b/classes/class_audiostreamplaybacksynchronized.rst index d0703335a..4f3977235 100644 --- a/classes/class_audiostreamplaybacksynchronized.rst +++ b/classes/class_audiostreamplaybacksynchronized.rst @@ -17,6 +17,7 @@ AudioStreamPlaybackSynchronized There is currently no description for this class. Please help us by :ref:`contributing one `! .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamplayer.rst b/classes/class_audiostreamplayer.rst index 8cd8f769f..ed301a532 100644 --- a/classes/class_audiostreamplayer.rst +++ b/classes/class_audiostreamplayer.rst @@ -228,7 +228,7 @@ The maximum number of sounds this node can play at the same time. Calling :ref:` - |void| **set_mix_target**\ (\ value\: :ref:`MixTarget`\ ) - :ref:`MixTarget` **get_mix_target**\ (\ ) -The mix target channels, as one of the :ref:`MixTarget` constants. Has no effect when two speakers or less are detected (see :ref:`SpeakerMode`). +The mix target channels. Has no effect when two speakers or less are detected (see :ref:`SpeakerMode`). .. rst-class:: classref-item-separator @@ -439,6 +439,7 @@ Restarts all sounds to be played from the given ``to_position``, in seconds. Doe Stops all sounds from this node. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamplayer2d.rst b/classes/class_audiostreamplayer2d.rst index 49a8cbd79..08b9b80e5 100644 --- a/classes/class_audiostreamplayer2d.rst +++ b/classes/class_audiostreamplayer2d.rst @@ -441,6 +441,7 @@ Sets the position from which audio will be played, in seconds. Stops the audio. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamplayer3d.rst b/classes/class_audiostreamplayer3d.rst index 8ecb45b84..236c393cc 100644 --- a/classes/class_audiostreamplayer3d.rst +++ b/classes/class_audiostreamplayer3d.rst @@ -678,6 +678,7 @@ Sets the position from which audio will be played, in seconds. Stops the audio. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamplaylist.rst b/classes/class_audiostreamplaylist.rst index 9eb37b087..35766913c 100644 --- a/classes/class_audiostreamplaylist.rst +++ b/classes/class_audiostreamplaylist.rst @@ -180,6 +180,7 @@ Returns the stream at playback position index. Sets the stream at playback position index. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreampolyphonic.rst b/classes/class_audiostreampolyphonic.rst index e71345027..47ff2136a 100644 --- a/classes/class_audiostreampolyphonic.rst +++ b/classes/class_audiostreampolyphonic.rst @@ -58,6 +58,7 @@ Property Descriptions Maximum amount of simultaneous streams that can be played. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamrandomizer.rst b/classes/class_audiostreamrandomizer.rst index afa65b751..f5237f730 100644 --- a/classes/class_audiostreamrandomizer.rst +++ b/classes/class_audiostreamrandomizer.rst @@ -265,6 +265,7 @@ Set the AudioStream at the specified index. Set the probability weight of the stream at the specified index. The higher this value, the more likely that the randomizer will choose this stream during random playback modes. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamsynchronized.rst b/classes/class_audiostreamsynchronized.rst index 6b6a9cd5c..f23f12b95 100644 --- a/classes/class_audiostreamsynchronized.rst +++ b/classes/class_audiostreamsynchronized.rst @@ -144,6 +144,7 @@ Set one of the synchronized streams, by index. Set the volume of one of the synchronized streams, by index. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_audiostreamwav.rst b/classes/class_audiostreamwav.rst index dacce63ef..ee54b00a1 100644 --- a/classes/class_audiostreamwav.rst +++ b/classes/class_audiostreamwav.rst @@ -53,6 +53,8 @@ Properties +-----------------------------------------------+-------------------------------------------------------------+-----------------------+ | :ref:`bool` | :ref:`stereo` | ``false`` | +-----------------------------------------------+-------------------------------------------------------------+-----------------------+ + | :ref:`Dictionary` | :ref:`tags` | ``{}`` | + +-----------------------------------------------+-------------------------------------------------------------+-----------------------+ .. rst-class:: classref-reftable-group @@ -202,7 +204,7 @@ Contains the audio data in bytes. - |void| **set_format**\ (\ value\: :ref:`Format`\ ) - :ref:`Format` **get_format**\ (\ ) -Audio format. See :ref:`Format` constants for values. +Audio format. .. rst-class:: classref-item-separator @@ -253,7 +255,7 @@ The loop end point (in number of samples, relative to the beginning of the strea - |void| **set_loop_mode**\ (\ value\: :ref:`LoopMode`\ ) - :ref:`LoopMode` **get_loop_mode**\ (\ ) -The loop mode. See :ref:`LoopMode` constants for values. +The loop mode. .. rst-class:: classref-item-separator @@ -293,6 +295,29 @@ According to the `Nyquist-Shannon sampling theorem ` **tags** = ``{}`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_tags**\ (\ value\: :ref:`Dictionary`\ ) +- :ref:`Dictionary` **get_tags**\ (\ ) + +Contains user-defined tags if found in the WAV data. + +Commonly used tags include ``title``, ``artist``, ``album``, ``tracknumber``, and ``date`` (``date`` does not have a standard date format). + +\ **Note:** No tag is *guaranteed* to be present in every file, so make sure to account for the keys not always existing. + +\ **Note:** Only WAV files using a ``LIST`` chunk with an identifier of ``INFO`` to encode the tags are currently supported. + .. rst-class:: classref-section-separator ---- @@ -331,10 +356,10 @@ The keys and values of ``options`` match the properties of :ref:`ResourceImporte :: @onready var audio_player = $AudioStreamPlayer - + func _ready(): get_window().files_dropped.connect(_on_files_dropped) - + func _on_files_dropped(files): if files[0].get_extension() == "wav": audio_player.stream = AudioStreamWAV.load_from_file(files[0], { @@ -358,6 +383,7 @@ Saves the AudioStreamWAV as a WAV file to ``path``. Samples with IMA ADPCM or Qu \ **Note:** A ``.wav`` extension is automatically appended to ``path`` if it is missing. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_backbuffercopy.rst b/classes/class_backbuffercopy.rst index 2e5e43249..79a9ef70a 100644 --- a/classes/class_backbuffercopy.rst +++ b/classes/class_backbuffercopy.rst @@ -103,7 +103,7 @@ Property Descriptions - |void| **set_copy_mode**\ (\ value\: :ref:`CopyMode`\ ) - :ref:`CopyMode` **get_copy_mode**\ (\ ) -Buffer mode. See :ref:`CopyMode` constants. +Buffer mode. .. rst-class:: classref-item-separator @@ -123,6 +123,7 @@ Buffer mode. See :ref:`CopyMode` constants. The area covered by the **BackBufferCopy**. Only used if :ref:`copy_mode` is :ref:`COPY_MODE_RECT`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_basebutton.rst b/classes/class_basebutton.rst index f7bd067ae..e762a1a5c 100644 --- a/classes/class_basebutton.rst +++ b/classes/class_basebutton.rst @@ -231,7 +231,7 @@ Property Descriptions - |void| **set_action_mode**\ (\ value\: :ref:`ActionMode`\ ) - :ref:`ActionMode` **get_action_mode**\ (\ ) -Determines when the button is considered clicked, one of the :ref:`ActionMode` constants. +Determines when the button is considered clicked. .. rst-class:: classref-item-separator @@ -464,6 +464,7 @@ Changes the :ref:`button_pressed` stat \ **Note:** This method doesn't unpress other buttons in :ref:`button_group`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_basematerial3d.rst b/classes/class_basematerial3d.rst index 958510f7a..973596759 100644 --- a/classes/class_basematerial3d.rst +++ b/classes/class_basematerial3d.rst @@ -1526,7 +1526,7 @@ Threshold at which antialiasing will be applied on the alpha channel. - |void| **set_alpha_antialiasing**\ (\ value\: :ref:`AlphaAntiAliasing`\ ) - :ref:`AlphaAntiAliasing` **get_alpha_antialiasing**\ (\ ) -The type of alpha antialiasing to apply. See :ref:`AlphaAntiAliasing`. +The type of alpha antialiasing to apply. .. rst-class:: classref-item-separator @@ -1827,7 +1827,7 @@ If ``true``, the shader will keep the scale set for the mesh. Otherwise, the sca - |void| **set_billboard_mode**\ (\ value\: :ref:`BillboardMode`\ ) - :ref:`BillboardMode` **get_billboard_mode**\ (\ ) -Controls how the object faces the camera. See :ref:`BillboardMode`. +Controls how the object faces the camera. \ **Note:** Billboard mode is not suitable for VR because the left-right vector of the camera is not horizontal when the screen is attached to your head instead of on the table. See `GitHub issue #41567 `__ for details. @@ -1848,7 +1848,7 @@ Controls how the object faces the camera. See :ref:`BillboardMode`. +\ **Note:** Values other than ``Mix`` force the object into the transparent pipeline. .. rst-class:: classref-item-separator @@ -1935,7 +1935,7 @@ Texture that defines the strength of the clearcoat effect and the glossiness of - |void| **set_cull_mode**\ (\ value\: :ref:`CullMode`\ ) - :ref:`CullMode` **get_cull_mode**\ (\ ) -Determines which side of the triangle to cull depending on whether the triangle faces towards or away from the camera. See :ref:`CullMode`. +Determines which side of the triangle to cull depending on whether the triangle faces towards or away from the camera. .. rst-class:: classref-item-separator @@ -1952,7 +1952,7 @@ Determines which side of the triangle to cull depending on whether the triangle - |void| **set_depth_draw_mode**\ (\ value\: :ref:`DepthDrawMode`\ ) - :ref:`DepthDrawMode` **get_depth_draw_mode**\ (\ ) -Determines when depth rendering takes place. See :ref:`DepthDrawMode`. See also :ref:`transparency`. +Determines when depth rendering takes place. See also :ref:`transparency`. .. rst-class:: classref-item-separator @@ -1988,7 +1988,7 @@ Texture that specifies the color of the detail overlay. :ref:`detail_albedo`\ ) - :ref:`BlendMode` **get_detail_blend_mode**\ (\ ) -Specifies how the :ref:`detail_albedo` should blend with the current ``ALBEDO``. See :ref:`BlendMode` for options. +Specifies how the :ref:`detail_albedo` should blend with the current ``ALBEDO``. .. rst-class:: classref-item-separator @@ -2058,7 +2058,7 @@ Texture that specifies the per-pixel normal of the detail overlay. The :ref:`det - |void| **set_detail_uv**\ (\ value\: :ref:`DetailUV`\ ) - :ref:`DetailUV` **get_detail_uv**\ (\ ) -Specifies whether to use ``UV`` or ``UV2`` for the detail layer. See :ref:`DetailUV` for options. +Specifies whether to use ``UV`` or ``UV2`` for the detail layer. .. rst-class:: classref-item-separator @@ -2075,7 +2075,7 @@ Specifies whether to use ``UV`` or ``UV2`` for the detail layer. See :ref:`Detai - |void| **set_diffuse_mode**\ (\ value\: :ref:`DiffuseMode`\ ) - :ref:`DiffuseMode` **get_diffuse_mode**\ (\ ) -The algorithm used for diffuse light scattering. See :ref:`DiffuseMode`. +The algorithm used for diffuse light scattering. .. rst-class:: classref-item-separator @@ -2300,7 +2300,7 @@ Use ``UV2`` to read from the :ref:`emission_texture`\ ) - :ref:`EmissionOperator` **get_emission_operator**\ (\ ) -Sets how :ref:`emission` interacts with :ref:`emission_texture`. Can either add or multiply. See :ref:`EmissionOperator` for options. +Sets how :ref:`emission` interacts with :ref:`emission_texture`. Can either add or multiply. .. rst-class:: classref-item-separator @@ -3095,7 +3095,7 @@ If ``true``, enables the "shadow to opacity" render mode where lighting modifies - |void| **set_specular_mode**\ (\ value\: :ref:`SpecularMode`\ ) - :ref:`SpecularMode` **get_specular_mode**\ (\ ) -The method for rendering the specular blob. See :ref:`SpecularMode`. +The method for rendering the specular blob. \ **Note:** :ref:`specular_mode` only applies to the specular blob. It does not affect specular reflections from the sky, screen-space reflections, :ref:`VoxelGI`, SDFGI or :ref:`ReflectionProbe`\ s. To disable reflections from these sources as well, set :ref:`metallic_specular` to ``0.0`` instead. @@ -3267,7 +3267,7 @@ The texture to use for multiplying the intensity of the subsurface scattering tr - |void| **set_texture_filter**\ (\ value\: :ref:`TextureFilter`\ ) - :ref:`TextureFilter` **get_texture_filter**\ (\ ) -Filter flags for the texture. See :ref:`TextureFilter` for options. +Filter flags for the texture. \ **Note:** :ref:`heightmap_texture` is always sampled with linear filtering, even if nearest-neighbor filtering is selected here. This is to ensure the heightmap effect looks as intended. If you need sharper height transitions between pixels, resize the heightmap texture in an image editor with nearest-neighbor filtering. @@ -3286,7 +3286,7 @@ Filter flags for the texture. See :ref:`TextureFilter`, enable\: :ref:`bool`\ ) - :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| -Repeat flags for the texture. See :ref:`TextureFilter` for options. +If ``true``, the texture repeats when exceeding the texture's size. See :ref:`FLAG_USE_TEXTURE_REPEAT`. .. rst-class:: classref-item-separator @@ -3629,7 +3629,7 @@ Returns ``true``, if the specified :ref:`Feature` i :ref:`bool` **get_flag**\ (\ flag\: :ref:`Flags`\ ) |const| :ref:`🔗` -Returns ``true``, if the specified flag is enabled. See :ref:`Flags` enumerator for options. +Returns ``true`` if the specified flag is enabled. .. rst-class:: classref-item-separator @@ -3665,7 +3665,7 @@ If ``true``, enables the specified :ref:`Feature`. |void| **set_flag**\ (\ flag\: :ref:`Flags`, enable\: :ref:`bool`\ ) :ref:`🔗` -If ``true``, enables the specified flag. Flags are optional behavior that can be turned on and off. Only one flag can be enabled at a time with this function, the flag enumerators cannot be bit-masked together to enable or disable multiple flags at once. Flags can also be enabled by setting the corresponding member to ``true``. See :ref:`Flags` enumerator for options. +If ``true``, enables the specified flag. Flags are optional behavior that can be turned on and off. Only one flag can be enabled at a time with this function, the flag enumerators cannot be bit-masked together to enable or disable multiple flags at once. Flags can also be enabled by setting the corresponding member to ``true``. .. rst-class:: classref-item-separator @@ -3677,9 +3677,10 @@ If ``true``, enables the specified flag. Flags are optional behavior that can be |void| **set_texture**\ (\ param\: :ref:`TextureParam`, texture\: :ref:`Texture2D`\ ) :ref:`🔗` -Sets the texture for the slot specified by ``param``. See :ref:`TextureParam` for available slots. +Sets the texture for the slot specified by ``param``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_basis.rst b/classes/class_basis.rst index 1ab97291e..80217ef8a 100644 --- a/classes/class_basis.rst +++ b/classes/class_basis.rst @@ -402,14 +402,14 @@ Constructs a new **Basis** that only represents rotation from the given :ref:`Ve # Creates a Basis whose z axis points down. var my_basis = Basis.from_euler(Vector3(TAU / 4, 0, 0)) - + print(my_basis.z) # Prints (0.0, -1.0, 0.0) .. code-tab:: csharp // Creates a Basis whose z axis points down. var myBasis = Basis.FromEuler(new Vector3(Mathf.Tau / 4.0f, 0.0f, 0.0f)); - + GD.Print(myBasis.Z); // Prints (0, -1, 0) @@ -434,7 +434,7 @@ Constructs a new **Basis** that only represents scale, with no rotation or shear .. code-tab:: gdscript var my_basis = Basis.from_scale(Vector3(2, 4, 8)) - + print(my_basis.x) # Prints (2.0, 0.0, 0.0) print(my_basis.y) # Prints (0.0, 4.0, 0.0) print(my_basis.z) # Prints (0.0, 0.0, 8.0) @@ -442,7 +442,7 @@ Constructs a new **Basis** that only represents scale, with no rotation or shear .. code-tab:: csharp var myBasis = Basis.FromScale(new Vector3(2.0f, 4.0f, 8.0f)); - + GD.Print(myBasis.X); // Prints (2, 0, 0) GD.Print(myBasis.Y); // Prints (0, 4, 0) GD.Print(myBasis.Z); // Prints (0, 0, 8) @@ -516,7 +516,7 @@ Returns the length of each axis of this basis, as a :ref:`Vector3 # Rotating the Basis in any way preserves its scale. my_basis = my_basis.rotated(Vector3.UP, TAU / 2) my_basis = my_basis.rotated(Vector3.RIGHT, TAU / 4) - + print(my_basis.get_scale()) # Prints (2.0, 4.0, 8.0) .. code-tab:: csharp @@ -529,7 +529,7 @@ Returns the length of each axis of this basis, as a :ref:`Vector3 // Rotating the Basis in any way preserves its scale. myBasis = myBasis.Rotated(Vector3.Up, Mathf.Tau / 2.0f); myBasis = myBasis.Rotated(Vector3.Right, Mathf.Tau / 4.0f); - + GD.Print(myBasis.Scale); // Prints (2, 4, 8) @@ -625,7 +625,6 @@ It is often useful to call this method to avoid rounding errors on a rotating ba func _process(delta): basis = basis.rotated(Vector3.UP, TAU * delta) basis = basis.rotated(Vector3.RIGHT, TAU * delta) - basis = basis.orthonormalized() .. code-tab:: csharp @@ -634,8 +633,8 @@ It is often useful to call this method to avoid rounding errors on a rotating ba public override void _Process(double delta) { Basis = Basis.Rotated(Vector3.Up, Mathf.Tau * (float)delta) - .Rotated(Vector3.Right, Mathf.Tau * (float)delta) - .Orthonormalized(); + .Rotated(Vector3.Right, Mathf.Tau * (float)delta) + .Orthonormalized(); } @@ -661,7 +660,7 @@ The ``axis`` must be a normalized vector (see :ref:`Vector3.normalized()` | :ref:`bone_idx` | ``-1`` | - +---------------------------------------------------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`bone_name` | ``""`` | - +---------------------------------------------------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`override_pose` | ``false`` | - +---------------------------------------------------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------+ - | :ref:`PhysicsInterpolationMode` | physics_interpolation_mode | ``2`` (overrides :ref:`Node`) | - +---------------------------------------------------------------------+---------------------------------------------------------------------+-------------------------------------------------------------------------------+ + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`bone_idx` | ``-1`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`bone_name` | ``""`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`NodePath` | :ref:`external_skeleton` | | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`override_pose` | ``false`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`PhysicsInterpolationMode` | physics_interpolation_mode | ``2`` (overrides :ref:`Node`) | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`use_external_skeleton` | ``false`` | + +---------------------------------------------------------------------+-------------------------------------------------------------------------------------+-------------------------------------------------------------------------------+ .. rst-class:: classref-reftable-group @@ -50,19 +54,11 @@ Methods .. table:: :widths: auto - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`NodePath` | :ref:`get_external_skeleton`\ (\ ) |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Skeleton3D` | :ref:`get_skeleton`\ (\ ) | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`get_use_external_skeleton`\ (\ ) |const| | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`on_skeleton_update`\ (\ ) | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_external_skeleton`\ (\ external_skeleton\: :ref:`NodePath`\ ) | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ - | |void| | :ref:`set_use_external_skeleton`\ (\ use_external_skeleton\: :ref:`bool`\ ) | - +-------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------+ + +-------------------------------------+-----------------------------------------------------------------------------------+ + | :ref:`Skeleton3D` | :ref:`get_skeleton`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------+ + | |void| | :ref:`on_skeleton_update`\ (\ ) | + +-------------------------------------+-----------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -107,6 +103,23 @@ The name of the attached bone. ---- +.. _class_BoneAttachment3D_property_external_skeleton: + +.. rst-class:: classref-property + +:ref:`NodePath` **external_skeleton** :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_external_skeleton**\ (\ value\: :ref:`NodePath`\ ) +- :ref:`NodePath` **get_external_skeleton**\ (\ ) + +The :ref:`NodePath` to the external :ref:`Skeleton3D` node. + +.. rst-class:: classref-item-separator + +---- + .. _class_BoneAttachment3D_property_override_pose: .. rst-class:: classref-property @@ -118,10 +131,27 @@ The name of the attached bone. - |void| **set_override_pose**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **get_override_pose**\ (\ ) -Whether the BoneAttachment3D node will override the bone pose of the bone it is attached to. When set to ``true``, the BoneAttachment3D node can change the pose of the bone. When set to ``false``, the BoneAttachment3D will always be set to the bone's transform. +Whether the **BoneAttachment3D** node will override the bone pose of the bone it is attached to. When set to ``true``, the **BoneAttachment3D** node can change the pose of the bone. When set to ``false``, the **BoneAttachment3D** will always be set to the bone's transform. \ **Note:** This override performs interruptively in the skeleton update process using signals due to the old design. It may cause unintended behavior when used at the same time with :ref:`SkeletonModifier3D`. +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneAttachment3D_property_use_external_skeleton: + +.. rst-class:: classref-property + +:ref:`bool` **use_external_skeleton** = ``false`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_use_external_skeleton**\ (\ value\: :ref:`bool`\ ) +- :ref:`bool` **get_use_external_skeleton**\ (\ ) + +Whether the **BoneAttachment3D** node will use an external :ref:`Skeleton3D` node rather than attempting to use its parent node as the :ref:`Skeleton3D`. When set to ``true``, the **BoneAttachment3D** node will use the external :ref:`Skeleton3D` node set in :ref:`external_skeleton`. + .. rst-class:: classref-section-separator ---- @@ -131,18 +161,6 @@ Whether the BoneAttachment3D node will override the bone pose of the bone it is Method Descriptions ------------------- -.. _class_BoneAttachment3D_method_get_external_skeleton: - -.. rst-class:: classref-method - -:ref:`NodePath` **get_external_skeleton**\ (\ ) |const| :ref:`🔗` - -Returns the :ref:`NodePath` to the external :ref:`Skeleton3D` node, if one has been set. - -.. rst-class:: classref-item-separator - ----- - .. _class_BoneAttachment3D_method_get_skeleton: .. rst-class:: classref-method @@ -155,18 +173,6 @@ Returns the parent or external :ref:`Skeleton3D` node if it ex ---- -.. _class_BoneAttachment3D_method_get_use_external_skeleton: - -.. rst-class:: classref-method - -:ref:`bool` **get_use_external_skeleton**\ (\ ) |const| :ref:`🔗` - -Returns whether the BoneAttachment3D node is using an external :ref:`Skeleton3D` rather than attempting to use its parent node as the :ref:`Skeleton3D`. - -.. rst-class:: classref-item-separator - ----- - .. _class_BoneAttachment3D_method_on_skeleton_update: .. rst-class:: classref-method @@ -175,31 +181,8 @@ Returns whether the BoneAttachment3D node is using an external :ref:`Skeleton3D< A function that is called automatically when the :ref:`Skeleton3D` is updated. This function is where the **BoneAttachment3D** node updates its position so it is correctly bound when it is *not* set to override the bone pose. -.. rst-class:: classref-item-separator - ----- - -.. _class_BoneAttachment3D_method_set_external_skeleton: - -.. rst-class:: classref-method - -|void| **set_external_skeleton**\ (\ external_skeleton\: :ref:`NodePath`\ ) :ref:`🔗` - -Sets the :ref:`NodePath` to the external skeleton that the BoneAttachment3D node should use. See :ref:`set_use_external_skeleton()` to enable the external :ref:`Skeleton3D` node. - -.. rst-class:: classref-item-separator - ----- - -.. _class_BoneAttachment3D_method_set_use_external_skeleton: - -.. rst-class:: classref-method - -|void| **set_use_external_skeleton**\ (\ use_external_skeleton\: :ref:`bool`\ ) :ref:`🔗` - -Sets whether the BoneAttachment3D node will use an external :ref:`Skeleton3D` node rather than attempting to use its parent node as the :ref:`Skeleton3D`. When set to ``true``, the BoneAttachment3D node will use the external :ref:`Skeleton3D` node set in :ref:`set_external_skeleton()`. - .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_boneconstraint3d.rst b/classes/class_boneconstraint3d.rst new file mode 100644 index 000000000..95c4d77ab --- /dev/null +++ b/classes/class_boneconstraint3d.rst @@ -0,0 +1,239 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/BoneConstraint3D.xml. + +.. _class_BoneConstraint3D: + +BoneConstraint3D +================ + +**Inherits:** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +**Inherited By:** :ref:`AimModifier3D`, :ref:`ConvertTransformModifier3D`, :ref:`CopyTransformModifier3D` + +A node that may modify Skeleton3D's bone with associating the two bones. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Base class of :ref:`SkeletonModifier3D` that modifies the bone set in :ref:`set_apply_bone()` based on the transform of the bone retrieved by :ref:`get_reference_bone()`. + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`clear_setting`\ (\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_amount`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_apply_bone`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_apply_bone_name`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_reference_bone`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`String` | :ref:`get_reference_bone_name`\ (\ index\: :ref:`int`\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`get_setting_count`\ (\ ) |const| | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_amount`\ (\ index\: :ref:`int`, amount\: :ref:`float`\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_apply_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_apply_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_reference_bone`\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_reference_bone_name`\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_setting_count`\ (\ count\: :ref:`int`\ ) | + +-----------------------------+---------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_BoneConstraint3D_method_clear_setting: + +.. rst-class:: classref-method + +|void| **clear_setting**\ (\ ) :ref:`🔗` + +Clear all settings. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_get_amount: + +.. rst-class:: classref-method + +:ref:`float` **get_amount**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the apply amount of the setting at ``index``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_get_apply_bone: + +.. rst-class:: classref-method + +:ref:`int` **get_apply_bone**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the apply bone of the setting at ``index``. This bone will be modified. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_get_apply_bone_name: + +.. rst-class:: classref-method + +:ref:`String` **get_apply_bone_name**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the apply bone name of the setting at ``index``. This bone will be modified. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_get_reference_bone: + +.. rst-class:: classref-method + +:ref:`int` **get_reference_bone**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the reference bone of the setting at ``index``. + +This bone will be only referenced and not modified by this modifier. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_get_reference_bone_name: + +.. rst-class:: classref-method + +:ref:`String` **get_reference_bone_name**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the reference bone name of the setting at ``index``. + +This bone will be only referenced and not modified by this modifier. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_get_setting_count: + +.. rst-class:: classref-method + +:ref:`int` **get_setting_count**\ (\ ) |const| :ref:`🔗` + +Returns the number of settings in the modifier. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_set_amount: + +.. rst-class:: classref-method + +|void| **set_amount**\ (\ index\: :ref:`int`, amount\: :ref:`float`\ ) :ref:`🔗` + +Sets the apply amount of the setting at ``index`` to ``amount``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_set_apply_bone: + +.. rst-class:: classref-method + +|void| **set_apply_bone**\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) :ref:`🔗` + +Sets the apply bone of the setting at ``index`` to ``bone``. This bone will be modified. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_set_apply_bone_name: + +.. rst-class:: classref-method + +|void| **set_apply_bone_name**\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) :ref:`🔗` + +Sets the apply bone of the setting at ``index`` to ``bone_name``. This bone will be modified. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_set_reference_bone: + +.. rst-class:: classref-method + +|void| **set_reference_bone**\ (\ index\: :ref:`int`, bone\: :ref:`int`\ ) :ref:`🔗` + +Sets the reference bone of the setting at ``index`` to ``bone``. + +This bone will be only referenced and not modified by this modifier. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_set_reference_bone_name: + +.. rst-class:: classref-method + +|void| **set_reference_bone_name**\ (\ index\: :ref:`int`, bone_name\: :ref:`String`\ ) :ref:`🔗` + +Sets the reference bone of the setting at ``index`` to ``bone_name``. + +This bone will be only referenced and not modified by this modifier. + +.. rst-class:: classref-item-separator + +---- + +.. _class_BoneConstraint3D_method_set_setting_count: + +.. rst-class:: classref-method + +|void| **set_setting_count**\ (\ count\: :ref:`int`\ ) :ref:`🔗` + +Sets the number of settings in the modifier. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_bonemap.rst b/classes/class_bonemap.rst index 800791503..c359e3aac 100644 --- a/classes/class_bonemap.rst +++ b/classes/class_bonemap.rst @@ -157,6 +157,7 @@ Maps a skeleton bone name to ``profile_bone_name``. In the retargeting process, the setting bone name is the bone name of the source skeleton. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_bool.rst b/classes/class_bool.rst index 1fc69b312..19d783fef 100644 --- a/classes/class_bool.rst +++ b/classes/class_bool.rst @@ -51,7 +51,7 @@ Booleans can be combined with the logical operators ``and``, ``or``, ``not`` to if bullets > 0 and not is_reloading(): launch_bullet() - + if bullets == 0 or is_reloading(): play_clack_sound() @@ -61,7 +61,7 @@ Booleans can be combined with the logical operators ``and``, ``or``, ``not`` to { LaunchBullet(); } - + if (bullets == 0 || IsReloading()) { PlayClackSound(); @@ -210,6 +210,7 @@ Returns ``true`` if the two booleans are equal. That is, both are ``true`` or bo Returns ``true`` if the left operand is ``true`` and the right operand is ``false``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_boxcontainer.rst b/classes/class_boxcontainer.rst index fe99b7b74..99dac8ba9 100644 --- a/classes/class_boxcontainer.rst +++ b/classes/class_boxcontainer.rst @@ -183,6 +183,7 @@ Theme Property Descriptions The space between the **BoxContainer**'s elements, in pixels. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_boxmesh.rst b/classes/class_boxmesh.rst index 2e0f04fb3..7c9c8c44b 100644 --- a/classes/class_boxmesh.rst +++ b/classes/class_boxmesh.rst @@ -117,6 +117,7 @@ Number of extra edge loops inserted along the Y axis. Number of extra edge loops inserted along the X axis. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_boxoccluder3d.rst b/classes/class_boxoccluder3d.rst index bf941c41e..6bb59fc0b 100644 --- a/classes/class_boxoccluder3d.rst +++ b/classes/class_boxoccluder3d.rst @@ -65,6 +65,7 @@ Property Descriptions The box's size in 3D units. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_boxshape3d.rst b/classes/class_boxshape3d.rst index 07a369ddb..7e4eacc12 100644 --- a/classes/class_boxshape3d.rst +++ b/classes/class_boxshape3d.rst @@ -69,6 +69,7 @@ Property Descriptions The box's width, height and depth. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_button.rst b/classes/class_button.rst index 90a2fe6a9..ac36fa9c3 100644 --- a/classes/class_button.rst +++ b/classes/class_button.rst @@ -35,7 +35,7 @@ Description button.text = "Click me" button.pressed.connect(_button_pressed) add_child(button) - + func _button_pressed(): print("Hello world!") @@ -48,7 +48,7 @@ Description button.Pressed += ButtonPressed; AddChild(button); } - + private void ButtonPressed() { GD.Print("Hello world!"); @@ -199,7 +199,7 @@ Property Descriptions - |void| **set_text_alignment**\ (\ value\: :ref:`HorizontalAlignment`\ ) - :ref:`HorizontalAlignment` **get_text_alignment**\ (\ ) -Text alignment policy for the button's text, use one of the :ref:`HorizontalAlignment` constants. +Text alignment policy for the button's text. .. rst-class:: classref-item-separator @@ -388,7 +388,7 @@ Base text writing direction. - |void| **set_text_overrun_behavior**\ (\ value\: :ref:`OverrunBehavior`\ ) - :ref:`OverrunBehavior` **get_text_overrun_behavior**\ (\ ) -Sets the clipping behavior when the text exceeds the node's bounding rectangle. See :ref:`OverrunBehavior` for a description of all modes. +Sets the clipping behavior when the text exceeds the node's bounding rectangle. .. rst-class:: classref-item-separator @@ -799,6 +799,7 @@ Default :ref:`StyleBox` for the **Button** (for right-to-left la :ref:`StyleBox` used when the **Button** is being pressed (for right-to-left layouts). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_buttongroup.rst b/classes/class_buttongroup.rst index dee45a489..cd4a0bc6c 100644 --- a/classes/class_buttongroup.rst +++ b/classes/class_buttongroup.rst @@ -120,6 +120,7 @@ Returns an :ref:`Array` of :ref:`Button`\ s who have Returns the current pressed button. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_callable.rst b/classes/class_callable.rst index 077d514ff..6aef3fbe7 100644 --- a/classes/class_callable.rst +++ b/classes/class_callable.rst @@ -26,7 +26,7 @@ Description func print_args(arg1, arg2, arg3 = ""): prints(arg1, arg2, arg3) - + func test(): var callable = Callable(self, "print_args") callable.call("hello", "world") # Prints "hello world ". @@ -40,7 +40,7 @@ Description { GD.PrintS(arg1, arg2, arg3); } - + public void Test() { // Invalid calls fail silently. @@ -59,10 +59,10 @@ In GDScript, it's possible to create lambda functions within a method. Lambda fu func _init(): var my_lambda = func (message): print(message) - + # Prints "Hello everyone!" my_lambda.call("Hello everyone!") - + # Prints "Attack!", when the button_pressed signal is emitted. button_pressed.connect(func(): print("Attack!")) @@ -79,10 +79,10 @@ In GDScript, you can access methods and global functions as **Callable**\ s: :: var dictionary = {"hello": "world"} - + # This will not work, `clear` is treated as a key. tween.tween_callback(dictionary.clear) - + # This will work. tween.tween_callback(Callable.create(dictionary, "clear")) @@ -557,6 +557,7 @@ Returns ``true`` if both **Callable**\ s invoke different targets. Returns ``true`` if both **Callable**\ s invoke the same custom target. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_callbacktweener.rst b/classes/class_callbacktweener.rst index 78a138fb1..ce57848a5 100644 --- a/classes/class_callbacktweener.rst +++ b/classes/class_callbacktweener.rst @@ -62,6 +62,7 @@ Makes the callback call delayed by given time in seconds. tween.tween_callback(queue_free).set_delay(2) .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_camera2d.rst b/classes/class_camera2d.rst index 0a3034894..ef8d99ed9 100644 --- a/classes/class_camera2d.rst +++ b/classes/class_camera2d.rst @@ -25,7 +25,7 @@ Cameras register themselves in the nearest :ref:`Viewport` node This node is intended to be a simple helper to get things going quickly, but more functionality may be desired to change how the camera works. To make your own custom camera node, inherit it from :ref:`Node2D` and change the transform of the canvas by setting :ref:`Viewport.canvas_transform` in :ref:`Viewport` (you can obtain the current :ref:`Viewport` by using :ref:`Node.get_viewport()`). -Note that the **Camera2D** node's ``position`` doesn't represent the actual position of the screen, which may differ due to applied smoothing or limits. You can use :ref:`get_screen_center_position()` to get the real position. +Note that the **Camera2D** node's :ref:`Node2D.global_position` doesn't represent the actual position of the screen, which may differ due to applied smoothing or limits. You can use :ref:`get_screen_center_position()` to get the real position. Same for the node's :ref:`Node2D.global_rotation` which may be different due to applied rotation smoothing. You can use :ref:`get_screen_rotation()` to get the current rotation of the screen. .. rst-class:: classref-introduction-group @@ -121,6 +121,8 @@ Methods +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_screen_center_position`\ (\ ) |const| | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_screen_rotation`\ (\ ) |const| | + +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Vector2` | :ref:`get_target_position`\ (\ ) |const| | +-------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`is_current`\ (\ ) |const| | @@ -211,7 +213,7 @@ Property Descriptions - |void| **set_anchor_mode**\ (\ value\: :ref:`AnchorMode`\ ) - :ref:`AnchorMode` **get_anchor_mode**\ (\ ) -The Camera2D's anchor point. See :ref:`AnchorMode` constants. +The Camera2D's anchor point. .. rst-class:: classref-item-separator @@ -629,7 +631,7 @@ Speed in pixels per second of the camera's smoothing effect when :ref:`position_ - |void| **set_process_callback**\ (\ value\: :ref:`Camera2DProcessCallback`\ ) - :ref:`Camera2DProcessCallback` **get_process_callback**\ (\ ) -The camera's process callback. See :ref:`Camera2DProcessCallback`. +The camera's process callback. .. rst-class:: classref-item-separator @@ -682,7 +684,7 @@ The angular, asymptotic speed of the camera's rotation smoothing effect when :re - |void| **set_zoom**\ (\ value\: :ref:`Vector2`\ ) - :ref:`Vector2` **get_zoom**\ (\ ) -The camera's zoom. A zoom of ``Vector(2, 2)`` doubles the size seen in the viewport. A zoom of ``Vector(0.5, 0.5)`` halves the size seen in the viewport. +The camera's zoom. Higher values are more zoomed in. For example, a zoom of ``Vector2(2.0, 2.0)`` will be twice as zoomed in on each axis (the view covers an area four times smaller). In contrast, a zoom of ``Vector2(0.5, 0.5)`` will be twice as zoomed out on each axis (the view covers an area four times larger). The X and Y components should generally always be set to the same value, unless you wish to stretch the camera view. \ **Note:** :ref:`FontFile.oversampling` does *not* take **Camera2D** zoom into account. This means that zooming in/out will cause bitmap fonts and rasterized (non-MSDF) dynamic fonts to appear blurry or pixelated unless the font is part of a :ref:`CanvasLayer` that makes it ignore camera zoom. To ensure text remains crisp regardless of zoom, you can enable MSDF font rendering by enabling :ref:`ProjectSettings.gui/theme/default_font_multichannel_signed_distance_field` (applies to the default project font only), or enabling **Multichannel Signed Distance Field** in the import options of a DynamicFont for custom fonts. On system fonts, :ref:`SystemFont.multichannel_signed_distance_field` can be enabled in the inspector. @@ -757,6 +759,20 @@ Returns the center of the screen from this camera's point of view, in global coo ---- +.. _class_Camera2D_method_get_screen_rotation: + +.. rst-class:: classref-method + +:ref:`float` **get_screen_rotation**\ (\ ) |const| :ref:`🔗` + +Returns the current screen rotation from this camera's point of view. + +\ **Note:** The screen rotation can be different from :ref:`Node2D.global_rotation` if the camera is rotating smoothly due to :ref:`rotation_smoothing_enabled`. + +.. rst-class:: classref-item-separator + +---- + .. _class_Camera2D_method_get_target_position: .. rst-class:: classref-method @@ -830,6 +846,7 @@ Sets the specified :ref:`Side`'s margin. See also :ref:` Sets the camera limit for the specified :ref:`Side`. See also :ref:`limit_bottom`, :ref:`limit_top`, :ref:`limit_left`, and :ref:`limit_right`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_camera3d.rst b/classes/class_camera3d.rst index 011a4ff2f..6694105f7 100644 --- a/classes/class_camera3d.rst +++ b/classes/class_camera3d.rst @@ -313,7 +313,7 @@ If multiple cameras are in the scene, one will always be made current. For examp - |void| **set_doppler_tracking**\ (\ value\: :ref:`DopplerTracking`\ ) - :ref:`DopplerTracking` **get_doppler_tracking**\ (\ ) -If not :ref:`DOPPLER_TRACKING_DISABLED`, this camera will simulate the `Doppler effect `__ for objects changed in particular ``_process`` methods. See :ref:`DopplerTracking` for possible values. +If not :ref:`DOPPLER_TRACKING_DISABLED`, this camera will simulate the `Doppler effect `__ for objects changed in particular ``_process`` methods. .. rst-class:: classref-item-separator @@ -742,6 +742,7 @@ Returns the 2D coordinate in the :ref:`Viewport` rectangle that control.position = get_viewport().get_camera_3d().unproject_position(global_transform.origin) .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_cameraattributes.rst b/classes/class_cameraattributes.rst index 386753ab3..09f3c6dbf 100644 --- a/classes/class_cameraattributes.rst +++ b/classes/class_cameraattributes.rst @@ -144,6 +144,7 @@ If :ref:`auto_exposure_enabled` is enabled. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_cameraattributesphysical.rst b/classes/class_cameraattributesphysical.rst index 89be06443..9aee1d44a 100644 --- a/classes/class_cameraattributesphysical.rst +++ b/classes/class_cameraattributesphysical.rst @@ -235,6 +235,7 @@ Method Descriptions Returns the vertical field of view that corresponds to the :ref:`frustum_focal_length`. This value is calculated internally whenever :ref:`frustum_focal_length` is changed. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_cameraattributespractical.rst b/classes/class_cameraattributespractical.rst index 4165ce5fa..353445209 100644 --- a/classes/class_cameraattributespractical.rst +++ b/classes/class_cameraattributespractical.rst @@ -214,6 +214,7 @@ Enables depth of field blur for objects closer than :ref:`dof_blur_near_distance When positive, distance over which blur effect will scale from 0 to :ref:`dof_blur_amount`, ending at :ref:`dof_blur_near_distance`. When negative, uses physically-based scaling so depth of field effect will scale from 0 at :ref:`dof_blur_near_distance` and will increase in a physically accurate way as objects get closer to the :ref:`Camera3D`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_camerafeed.rst b/classes/class_camerafeed.rst index 5d7119c70..f38950ce6 100644 --- a/classes/class_camerafeed.rst +++ b/classes/class_camerafeed.rst @@ -23,7 +23,7 @@ A camera feed gives you access to a single physical camera attached to your devi \ **Note:** Many cameras will return YCbCr images which are split into two textures and need to be combined in a shader. Godot does this automatically for you if you set the environment to show the camera image in the background. -\ **Note:** This class is currently only implemented on Linux, macOS, and iOS. On other platforms no **CameraFeed**\ s will be available. To get a **CameraFeed** on iOS, the camera plugin from `godot-ios-plugins `__ is required. +\ **Note:** This class is currently only implemented on Linux, Android, macOS, and iOS. On other platforms no **CameraFeed**\ s will be available. To get a **CameraFeed** on iOS, the camera plugin from `godot-ios-plugins `__ is required. .. rst-class:: classref-reftable-group @@ -418,6 +418,7 @@ Sets RGB image for this feed. Sets YCbCr image for this feed. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_cameraserver.rst b/classes/class_cameraserver.rst index 520781bc2..77d6a7e0c 100644 --- a/classes/class_cameraserver.rst +++ b/classes/class_cameraserver.rst @@ -23,7 +23,7 @@ The **CameraServer** keeps track of different cameras accessible in Godot. These It is notably used to provide AR modules with a video feed from the camera. -\ **Note:** This class is currently only implemented on Linux, macOS, and iOS. On other platforms no :ref:`CameraFeed`\ s will be available. To get a :ref:`CameraFeed` on iOS, the camera plugin from `godot-ios-plugins `__ is required. +\ **Note:** This class is currently only implemented on Linux, Android, macOS, and iOS. On other platforms no :ref:`CameraFeed`\ s will be available. To get a :ref:`CameraFeed` on iOS, the camera plugin from `godot-ios-plugins `__ is required. .. rst-class:: classref-reftable-group @@ -223,6 +223,7 @@ Returns the number of :ref:`CameraFeed`\ s registered. Removes the specified camera ``feed``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_cameratexture.rst b/classes/class_cameratexture.rst index 64fd3ee57..74291b04c 100644 --- a/classes/class_cameratexture.rst +++ b/classes/class_cameratexture.rst @@ -98,6 +98,7 @@ Convenience property that gives access to the active property of the :ref:`Camer Which image within the :ref:`CameraFeed` we want access to, important if the camera image is split in a Y and CbCr component. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_canvasgroup.rst b/classes/class_canvasgroup.rst index 54b8f53ba..950c94569 100644 --- a/classes/class_canvasgroup.rst +++ b/classes/class_canvasgroup.rst @@ -27,16 +27,16 @@ Child :ref:`CanvasItem` nodes of a **CanvasGroup** are drawn a shader_type canvas_item; render_mode unshaded; - + uniform sampler2D screen_texture : hint_screen_texture, repeat_disable, filter_nearest; - + void fragment() { vec4 c = textureLod(screen_texture, SCREEN_UV, 0.0); - + if (c.a > 0.0001) { c.rgb /= c.a; } - + COLOR *= c; } @@ -115,6 +115,7 @@ Sets the size of a margin used to expand the drawable rect of this **CanvasGroup If ``true``, calculates mipmaps for the backbuffer before drawing the **CanvasGroup** so that mipmaps can be used in a custom :ref:`ShaderMaterial` attached to the **CanvasGroup**. Generating mipmaps has a performance cost so this should not be enabled unless required. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_canvasitem.rst b/classes/class_canvasitem.rst index bb6b914e3..badcb92f0 100644 --- a/classes/class_canvasitem.rst +++ b/classes/class_canvasitem.rst @@ -1637,6 +1637,7 @@ Show the **CanvasItem** if it's currently hidden. This is equivalent to setting \ **Note:** For controls that inherit :ref:`Popup`, the correct way to make them visible is to call one of the multiple ``popup*()`` functions instead. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_canvasitemmaterial.rst b/classes/class_canvasitemmaterial.rst index 0fadbe027..39d8b0a79 100644 --- a/classes/class_canvasitemmaterial.rst +++ b/classes/class_canvasitemmaterial.rst @@ -248,6 +248,7 @@ If ``true``, enable spritesheet-based animation features when assigned to :ref:` This property (and other ``particles_anim_*`` properties that depend on it) has no effect on other types of nodes. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_canvaslayer.rst b/classes/class_canvaslayer.rst index 5e11feaf2..81144a77d 100644 --- a/classes/class_canvaslayer.rst +++ b/classes/class_canvaslayer.rst @@ -180,6 +180,8 @@ Layer index for draw order. Lower values are drawn behind higher values. \ **Note:** If multiple CanvasLayers have the same layer index, :ref:`CanvasItem` children of one CanvasLayer are drawn behind the :ref:`CanvasItem` children of the other CanvasLayer. Which CanvasLayer is drawn in front is non-deterministic. +\ **Note:** The layer index should be between :ref:`RenderingServer.CANVAS_LAYER_MIN` and :ref:`RenderingServer.CANVAS_LAYER_MAX` (inclusive). Any other value will wrap around. + .. rst-class:: classref-item-separator ---- @@ -321,6 +323,7 @@ Hides any :ref:`CanvasItem` under this **CanvasLayer**. This i Shows any :ref:`CanvasItem` under this **CanvasLayer**. This is equivalent to setting :ref:`visible` to ``true``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_canvasmodulate.rst b/classes/class_canvasmodulate.rst index 42a739cb1..56d421640 100644 --- a/classes/class_canvasmodulate.rst +++ b/classes/class_canvasmodulate.rst @@ -66,6 +66,7 @@ Property Descriptions The tint color to apply. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_canvastexture.rst b/classes/class_canvastexture.rst index b9e28e5a2..f387c6583 100644 --- a/classes/class_canvastexture.rst +++ b/classes/class_canvastexture.rst @@ -183,6 +183,7 @@ The texture filtering mode to use when drawing this **CanvasTexture**. The texture repeat mode to use when drawing this **CanvasTexture**. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_capsulemesh.rst b/classes/class_capsulemesh.rst index 344e76e78..6938c9ad0 100644 --- a/classes/class_capsulemesh.rst +++ b/classes/class_capsulemesh.rst @@ -113,6 +113,7 @@ Radius of the capsule mesh. Number of rings along the height of the capsule. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_capsuleshape2d.rst b/classes/class_capsuleshape2d.rst index 43f337a21..e75713b73 100644 --- a/classes/class_capsuleshape2d.rst +++ b/classes/class_capsuleshape2d.rst @@ -96,6 +96,7 @@ The capsule's height, excluding the semicircles. This is the height of the centr The capsule's radius. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_capsuleshape3d.rst b/classes/class_capsuleshape3d.rst index d253ce142..d89715943 100644 --- a/classes/class_capsuleshape3d.rst +++ b/classes/class_capsuleshape3d.rst @@ -103,6 +103,7 @@ The capsule's height, excluding the hemispheres. This is the height of the centr The capsule's radius. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_centercontainer.rst b/classes/class_centercontainer.rst index 01b05d183..a4139a5ef 100644 --- a/classes/class_centercontainer.rst +++ b/classes/class_centercontainer.rst @@ -63,6 +63,7 @@ Property Descriptions If ``true``, centers children relative to the **CenterContainer**'s top left corner. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_characterbody2d.rst b/classes/class_characterbody2d.rst index 13fa22f4a..f191a9d3b 100644 --- a/classes/class_characterbody2d.rst +++ b/classes/class_characterbody2d.rst @@ -315,7 +315,7 @@ Maximum number of times the body can change direction before it stops when calli - |void| **set_motion_mode**\ (\ value\: :ref:`MotionMode`\ ) - :ref:`MotionMode` **get_motion_mode**\ (\ ) -Sets the motion mode which defines the behavior of :ref:`move_and_slide()`. See :ref:`MotionMode` constants for available modes. +Sets the motion mode which defines the behavior of :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -349,7 +349,7 @@ Collision layers that will be included for detecting floor bodies that will act - |void| **set_platform_on_leave**\ (\ value\: :ref:`PlatformOnLeave`\ ) - :ref:`PlatformOnLeave` **get_platform_on_leave**\ (\ ) -Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See :ref:`PlatformOnLeave` constants for available behavior. +Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. .. rst-class:: classref-item-separator @@ -714,6 +714,7 @@ The general behavior and available properties change according to the :ref:`moti Returns ``true`` if the body collided, otherwise, returns ``false``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_characterbody3d.rst b/classes/class_characterbody3d.rst index 19fe1f70d..ee09e256a 100644 --- a/classes/class_characterbody3d.rst +++ b/classes/class_characterbody3d.rst @@ -319,7 +319,7 @@ Maximum number of times the body can change direction before it stops when calli - |void| **set_motion_mode**\ (\ value\: :ref:`MotionMode`\ ) - :ref:`MotionMode` **get_motion_mode**\ (\ ) -Sets the motion mode which defines the behavior of :ref:`move_and_slide()`. See :ref:`MotionMode` constants for available modes. +Sets the motion mode which defines the behavior of :ref:`move_and_slide()`. .. rst-class:: classref-item-separator @@ -353,7 +353,7 @@ Collision layers that will be included for detecting floor bodies that will act - |void| **set_platform_on_leave**\ (\ value\: :ref:`PlatformOnLeave`\ ) - :ref:`PlatformOnLeave` **get_platform_on_leave**\ (\ ) -Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. See :ref:`PlatformOnLeave` constants for available behavior. +Sets the behavior to apply when you leave a moving platform. By default, to be physically accurate, when you leave the last platform velocity is applied. .. rst-class:: classref-item-separator @@ -707,6 +707,7 @@ When the body touches a moving platform, the platform's velocity is automaticall Returns ``true`` if the body collided, otherwise, returns ``false``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_charfxtransform.rst b/classes/class_charfxtransform.rst index 5e26548f6..90c31ea4d 100644 --- a/classes/class_charfxtransform.rst +++ b/classes/class_charfxtransform.rst @@ -311,6 +311,7 @@ The current transform of the current glyph. It can be overridden (for example, b If ``true``, the character will be drawn. If ``false``, the character will be hidden. Characters around hidden characters will reflow to take the space of hidden characters. If this is not desired, set their :ref:`color` to ``Color(1, 1, 1, 0)`` instead. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_checkbox.rst b/classes/class_checkbox.rst index e274cd54c..74019676d 100644 --- a/classes/class_checkbox.rst +++ b/classes/class_checkbox.rst @@ -209,6 +209,7 @@ The check icon to display when the **CheckBox** is unchecked. The check icon to display when the **CheckBox** is unchecked and is disabled. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_checkbutton.rst b/classes/class_checkbutton.rst index 2d1de710d..4a6d0fc92 100644 --- a/classes/class_checkbutton.rst +++ b/classes/class_checkbutton.rst @@ -207,6 +207,7 @@ The icon to display when the **CheckButton** is unchecked and disabled (for righ The icon to display when the **CheckButton** is unchecked (for right-to-left layouts). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_circleshape2d.rst b/classes/class_circleshape2d.rst index 16f52a3f1..9f329d073 100644 --- a/classes/class_circleshape2d.rst +++ b/classes/class_circleshape2d.rst @@ -58,6 +58,7 @@ Property Descriptions The circle's radius. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_classdb.rst b/classes/class_classdb.rst index 350e85d51..d222acbc9 100644 --- a/classes/class_classdb.rst +++ b/classes/class_classdb.rst @@ -197,7 +197,7 @@ Returns whether the specified ``class`` is available or not. :ref:`APIType` **class_get_api_type**\ (\ class\: :ref:`StringName`\ ) |const| :ref:`🔗` -Returns the API type of ``class``. See :ref:`APIType`. +Returns the API type of the specified ``class``. .. rst-class:: classref-item-separator @@ -514,6 +514,7 @@ Returns whether ``class`` (or its ancestor classes if ``no_inheritance`` is ``fa Returns whether ``inherits`` is an ancestor of ``class`` or not. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_codeedit.rst b/classes/class_codeedit.rst index a60ff6d88..1687fa37f 100644 --- a/classes/class_codeedit.rst +++ b/classes/class_codeedit.rst @@ -2084,6 +2084,7 @@ Sets a custom :ref:`Texture2D` to draw at the end of a folded l :ref:`StyleBox` for the code completion popup. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_codehighlighter.rst b/classes/class_codehighlighter.rst index 3d2e87393..88147fd27 100644 --- a/classes/class_codehighlighter.rst +++ b/classes/class_codehighlighter.rst @@ -389,6 +389,7 @@ Removes the keyword. Removes the member keyword. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_collisionobject2d.rst b/classes/class_collisionobject2d.rst index 35be627b2..f17ca4c4d 100644 --- a/classes/class_collisionobject2d.rst +++ b/classes/class_collisionobject2d.rst @@ -300,7 +300,7 @@ The priority used to solve colliding when occurring penetration. The higher the - |void| **set_disable_mode**\ (\ value\: :ref:`DisableMode`\ ) - :ref:`DisableMode` **get_disable_mode**\ (\ ) -Defines the behavior in physics when :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`. See :ref:`DisableMode` for more details about the different modes. +Defines the behavior in physics when :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`. .. rst-class:: classref-item-separator @@ -675,6 +675,7 @@ Sets the ``one_way_collision_margin`` of the shape owner identified by given ``o Sets the :ref:`Transform2D` of the given shape owner. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_collisionobject3d.rst b/classes/class_collisionobject3d.rst index c5ded0020..2760df168 100644 --- a/classes/class_collisionobject3d.rst +++ b/classes/class_collisionobject3d.rst @@ -266,7 +266,7 @@ The priority used to solve colliding when occurring penetration. The higher the - |void| **set_disable_mode**\ (\ value\: :ref:`DisableMode`\ ) - :ref:`DisableMode` **get_disable_mode**\ (\ ) -Defines the behavior in physics when :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`. See :ref:`DisableMode` for more details about the different modes. +Defines the behavior in physics when :ref:`Node.process_mode` is set to :ref:`Node.PROCESS_MODE_DISABLED`. .. rst-class:: classref-item-separator @@ -586,6 +586,7 @@ If ``true``, disables the given shape owner. Sets the :ref:`Transform3D` of the given shape owner. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_collisionpolygon2d.rst b/classes/class_collisionpolygon2d.rst index e42414e5f..a2c2a365c 100644 --- a/classes/class_collisionpolygon2d.rst +++ b/classes/class_collisionpolygon2d.rst @@ -94,7 +94,7 @@ Property Descriptions - |void| **set_build_mode**\ (\ value\: :ref:`BuildMode`\ ) - :ref:`BuildMode` **get_build_mode**\ (\ ) -Collision build mode. Use one of the :ref:`BuildMode` constants. +Collision build mode. .. rst-class:: classref-item-separator @@ -111,7 +111,7 @@ Collision build mode. Use one of the :ref:`BuildMode`\ ) - :ref:`bool` **is_disabled**\ (\ ) -If ``true``, no collisions will be detected. +If ``true``, no collisions will be detected. This property should be changed with :ref:`Object.set_deferred()`. .. rst-class:: classref-item-separator @@ -171,6 +171,7 @@ The polygon's list of vertices. Each point will be connected to the next, and th **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_collisionpolygon3d.rst b/classes/class_collisionpolygon3d.rst index 4d853ce91..42caaaafc 100644 --- a/classes/class_collisionpolygon3d.rst +++ b/classes/class_collisionpolygon3d.rst @@ -118,7 +118,7 @@ Length that the resulting collision extends in either direction perpendicular to - |void| **set_disabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_disabled**\ (\ ) -If ``true``, no collision will be produced. +If ``true``, no collision will be produced. This property should be changed with :ref:`Object.set_deferred()`. .. rst-class:: classref-item-separator @@ -157,6 +157,7 @@ Array of vertices which define the 2D polygon in the local XY plane. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_collisionshape2d.rst b/classes/class_collisionshape2d.rst index 7affb6366..8a790e331 100644 --- a/classes/class_collisionshape2d.rst +++ b/classes/class_collisionshape2d.rst @@ -149,6 +149,7 @@ The margin used for one-way collision (in pixels). Higher values will make the s The actual shape owned by this collision shape. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_collisionshape3d.rst b/classes/class_collisionshape3d.rst index 59d16881e..fd5726c14 100644 --- a/classes/class_collisionshape3d.rst +++ b/classes/class_collisionshape3d.rst @@ -124,7 +124,7 @@ If ``true``, when the shape is displayed, it will show a solid fill color in add - |void| **set_disabled**\ (\ value\: :ref:`bool`\ ) - :ref:`bool` **is_disabled**\ (\ ) -A disabled collision shape has no effect in the world. +A disabled collision shape has no effect in the world. This property should be changed with :ref:`Object.set_deferred()`. .. rst-class:: classref-item-separator @@ -175,6 +175,7 @@ Sets the collision shape's shape to the addition of all its convexed :ref:`MeshI This method does nothing. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_color.rst b/classes/class_color.rst index 9469f34b5..41af72a4c 100644 --- a/classes/class_color.rst +++ b/classes/class_color.rst @@ -1954,7 +1954,7 @@ Returns ``true`` if ``color`` is a valid HTML hexadecimal color string. The stri Color.html_is_valid("#55AAFF20") # Returns true Color.html_is_valid("55AAFF") # Returns true Color.html_is_valid("#F2C") # Returns true - + Color.html_is_valid("#AABBC") # Returns false Color.html_is_valid("#55aaFF5") # Returns false @@ -1964,7 +1964,7 @@ Returns ``true`` if ``color`` is a valid HTML hexadecimal color string. The stri Color.HtmlIsValid("#55AAFF20"); // Returns true Color.HtmlIsValid("55AAFF"); // Returns true Color.HtmlIsValid("#F2C"); // Returns true - + Color.HtmlIsValid("#AABBC"); // Returns false Color.HtmlIsValid("#55aaFF5"); // Returns false @@ -2030,7 +2030,7 @@ Returns the linear interpolation between this color's components and ``to``'s co var red = Color(1.0, 0.0, 0.0) var aqua = Color(0.0, 1.0, 0.8) - + red.lerp(aqua, 0.2) # Returns Color(0.8, 0.2, 0.16) red.lerp(aqua, 0.5) # Returns Color(0.5, 0.5, 0.4) red.lerp(aqua, 1.0) # Returns Color(0.0, 1.0, 0.8) @@ -2039,7 +2039,7 @@ Returns the linear interpolation between this color's components and ``to``'s co var red = new Color(1.0f, 0.0f, 0.0f); var aqua = new Color(0.0f, 1.0f, 0.8f); - + red.Lerp(aqua, 0.2f); // Returns Color(0.8f, 0.2f, 0.16f) red.Lerp(aqua, 0.5f); // Returns Color(0.5f, 0.5f, 0.4f) red.Lerp(aqua, 1.0f); // Returns Color(0.0f, 1.0f, 0.8f) @@ -2460,6 +2460,7 @@ Returns the same value as if the ``+`` was not there. Unary ``+`` does nothing, Inverts the given color. This is equivalent to ``Color.WHITE - c`` or ``Color(1 - c.r, 1 - c.g, 1 - c.b, 1 - c.a)``. Unlike with :ref:`inverted()`, the :ref:`a` component is inverted, too. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_colorpalette.rst b/classes/class_colorpalette.rst index 8a72dc72e..fcffacd9b 100644 --- a/classes/class_colorpalette.rst +++ b/classes/class_colorpalette.rst @@ -58,6 +58,7 @@ A :ref:`PackedColorArray` containing the colors in the p **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedColorArray` for more details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_colorpicker.rst b/classes/class_colorpicker.rst index fd0a0809a..8f190656a 100644 --- a/classes/class_colorpicker.rst +++ b/classes/class_colorpicker.rst @@ -354,7 +354,7 @@ The currently selected color. - |void| **set_color_mode**\ (\ value\: :ref:`ColorModeType`\ ) - :ref:`ColorModeType` **get_color_mode**\ (\ ) -The currently selected color mode. See :ref:`ColorModeType`. +The currently selected color mode. .. rst-class:: classref-item-separator @@ -456,7 +456,7 @@ If ``true``, the hex color code input field is visible. - |void| **set_picker_shape**\ (\ value\: :ref:`PickerShapeType`\ ) - :ref:`PickerShapeType` **get_picker_shape**\ (\ ) -The shape of the color space view. See :ref:`PickerShapeType`. +The shape of the color space view. .. rst-class:: classref-item-separator @@ -908,6 +908,7 @@ The :ref:`StyleBox` used when the rectangle-shaped part of the p The :ref:`StyleBox` used for the old color sample part when it is focused. Displayed *over* the sample, so a partially transparent :ref:`StyleBox` should be used to ensure the picker shape remains visible. A :ref:`StyleBox` that represents an outline or an underline works well for this purpose. To disable the focus visual effect, assign a :ref:`StyleBoxEmpty` resource. Note that disabling the focus visual effect will harm keyboard/controller navigation usability, so this is not recommended for accessibility reasons. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_colorpickerbutton.rst b/classes/class_colorpickerbutton.rst index 9f41d6fe8..bc8f4e532 100644 --- a/classes/class_colorpickerbutton.rst +++ b/classes/class_colorpickerbutton.rst @@ -226,6 +226,7 @@ Theme Property Descriptions The background of the color preview rect on the button. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_colorrect.rst b/classes/class_colorrect.rst index fcfcb2ef0..aa2994f9b 100644 --- a/classes/class_colorrect.rst +++ b/classes/class_colorrect.rst @@ -63,6 +63,7 @@ Property Descriptions The fill color of the rectangle. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_compositor.rst b/classes/class_compositor.rst index 31533f286..17c99c06e 100644 --- a/classes/class_compositor.rst +++ b/classes/class_compositor.rst @@ -65,6 +65,7 @@ Property Descriptions The custom :ref:`CompositorEffect`\ s that are applied during rendering of viewports using this compositor. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_compositoreffect.rst b/classes/class_compositoreffect.rst index 06ff40bea..8a28c0520 100644 --- a/classes/class_compositoreffect.rst +++ b/classes/class_compositoreffect.rst @@ -312,6 +312,7 @@ Method Descriptions Implement this function with your custom rendering code. ``effect_callback_type`` should always match the effect callback type you've specified in :ref:`effect_callback_type`. ``render_data`` provides access to the rendering state, it is only valid during rendering and should not be stored. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_compressedcubemap.rst b/classes/class_compressedcubemap.rst index 8efe7d06a..499f85aa7 100644 --- a/classes/class_compressedcubemap.rst +++ b/classes/class_compressedcubemap.rst @@ -38,6 +38,7 @@ Using **VRAM Compressed** also improves loading times, as VRAM-compressed textur See :ref:`Cubemap` for a general description of cubemaps. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_compressedcubemaparray.rst b/classes/class_compressedcubemaparray.rst index 71b3fd5fc..59df932dc 100644 --- a/classes/class_compressedcubemaparray.rst +++ b/classes/class_compressedcubemaparray.rst @@ -38,6 +38,7 @@ Using **VRAM Compressed** also improves loading times, as VRAM-compressed textur See :ref:`CubemapArray` for a general description of cubemap arrays. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_compressedtexture2d.rst b/classes/class_compressedtexture2d.rst index 85975f8ee..7f8356fff 100644 --- a/classes/class_compressedtexture2d.rst +++ b/classes/class_compressedtexture2d.rst @@ -101,6 +101,7 @@ Method Descriptions Loads the texture from the specified ``path``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_compressedtexture2darray.rst b/classes/class_compressedtexture2darray.rst index 7ea9a4de6..2142a4ded 100644 --- a/classes/class_compressedtexture2darray.rst +++ b/classes/class_compressedtexture2darray.rst @@ -38,6 +38,7 @@ Using **VRAM Compressed** also improves loading times, as VRAM-compressed textur See :ref:`Texture2DArray` for a general description of texture arrays. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_compressedtexture3d.rst b/classes/class_compressedtexture3d.rst index 304660acf..32c06648e 100644 --- a/classes/class_compressedtexture3d.rst +++ b/classes/class_compressedtexture3d.rst @@ -89,6 +89,7 @@ Method Descriptions Loads the texture from the specified ``path``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_compressedtexturelayered.rst b/classes/class_compressedtexturelayered.rst index 992116fb0..463666444 100644 --- a/classes/class_compressedtexturelayered.rst +++ b/classes/class_compressedtexturelayered.rst @@ -87,6 +87,7 @@ Method Descriptions Loads the texture at ``path``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_concavepolygonshape2d.rst b/classes/class_concavepolygonshape2d.rst index e319eb403..354a22c88 100644 --- a/classes/class_concavepolygonshape2d.rst +++ b/classes/class_concavepolygonshape2d.rst @@ -66,6 +66,7 @@ The array of points that make up the **ConcavePolygonShape2D**'s line segments. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector2Array` for more details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_concavepolygonshape3d.rst b/classes/class_concavepolygonshape3d.rst index c5ac1eecf..e4d871439 100644 --- a/classes/class_concavepolygonshape3d.rst +++ b/classes/class_concavepolygonshape3d.rst @@ -114,6 +114,7 @@ Returns the faces of the trimesh shape as an array of vertices. The array (of le Sets the faces of the trimesh shape from an array of vertices. The ``faces`` array should be composed of triples such that each triple of vertices defines a triangle. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_conetwistjoint3d.rst b/classes/class_conetwistjoint3d.rst index 6949d6c13..044a00bb9 100644 --- a/classes/class_conetwistjoint3d.rst +++ b/classes/class_conetwistjoint3d.rst @@ -258,6 +258,7 @@ Returns the value of the specified parameter. Sets the value of the specified parameter. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_configfile.rst b/classes/class_configfile.rst index be80c75a6..5925b35cc 100644 --- a/classes/class_configfile.rst +++ b/classes/class_configfile.rst @@ -39,13 +39,13 @@ The following example shows how to create a simple **ConfigFile** and save it on # Create new ConfigFile object. var config = ConfigFile.new() - + # Store some values. config.set_value("Player1", "player_name", "Steve") config.set_value("Player1", "best_score", 10) config.set_value("Player2", "player_name", "V3geta") config.set_value("Player2", "best_score", 9001) - + # Save it to a file (overwrite if already exists). config.save("user://scores.cfg") @@ -53,13 +53,13 @@ The following example shows how to create a simple **ConfigFile** and save it on // Create new ConfigFile object. var config = new ConfigFile(); - + // Store some values. config.SetValue("Player1", "player_name", "Steve"); config.SetValue("Player1", "best_score", 10); config.SetValue("Player2", "player_name", "V3geta"); config.SetValue("Player2", "best_score", 9001); - + // Save it to a file (overwrite if already exists). config.Save("user://scores.cfg"); @@ -74,14 +74,14 @@ This example shows how the above file could be loaded: var score_data = {} var config = ConfigFile.new() - + # Load data from a file. var err = config.load("user://scores.cfg") - + # If the file didn't load, ignore it. if err != OK: return - + # Iterate over all sections. for player in config.get_sections(): # Fetch the data for each section. @@ -93,16 +93,16 @@ This example shows how the above file could be loaded: var score_data = new Godot.Collections.Dictionary(); var config = new ConfigFile(); - + // Load data from a file. Error err = config.Load("user://scores.cfg"); - + // If the file didn't load, ignore it. if (err != Error.Ok) { return; } - + // Iterate over all sections. foreach (String player in config.GetSections()) { @@ -390,6 +390,7 @@ Returns :ref:`@GlobalScope.OK` on success, or on Assigns a value to the specified key of the specified section. If either the section or the key do not exist, they are created. Passing a ``null`` value deletes the specified key if it exists, and deletes the section if it ends up empty once the key has been removed. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_confirmationdialog.rst b/classes/class_confirmationdialog.rst index 9e47bbe24..cc06c41a2 100644 --- a/classes/class_confirmationdialog.rst +++ b/classes/class_confirmationdialog.rst @@ -110,6 +110,7 @@ Returns the cancel button. \ **Warning:** This is a required internal node, removing and freeing it may cause a crash. If you wish to hide it or any of its children, use their :ref:`CanvasItem.visible` property. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_container.rst b/classes/class_container.rst index 0453c7282..7aa4d8353 100644 --- a/classes/class_container.rst +++ b/classes/class_container.rst @@ -172,6 +172,7 @@ Fit a child control in a given rect. This is mainly a helper for creating custom Queue resort of the contained children. This is called automatically anyway, but can be called upon request. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_control.rst b/classes/class_control.rst index 1d11a7926..d741ba6e9 100644 --- a/classes/class_control.rst +++ b/classes/class_control.rst @@ -2175,7 +2175,7 @@ Godot calls this method to pass you the ``data`` from a control's :ref:`_get_dra func _can_drop_data(position, data): return typeof(data) == TYPE_DICTIONARY and data.has("color") - + func _drop_data(position, data): var color = data["color"] @@ -2185,7 +2185,7 @@ Godot calls this method to pass you the ``data`` from a control's :ref:`_get_dra { return data.VariantType == Variant.Type.Dictionary && data.AsGodotDictionary().ContainsKey("color"); } - + public override void _DropData(Vector2 atPosition, Variant data) { Color color = data.AsGodotDictionary()["color"].AsColor(); @@ -2711,7 +2711,7 @@ Returns combined minimum size from :ref:`custom_minimum_size` **get_cursor_shape**\ (\ position\: :ref:`Vector2` = Vector2(0, 0)\ ) |const| :ref:`🔗` -Returns the mouse cursor shape for this control when hovered over ``position`` in local coordinates. For most controls, this is the same as :ref:`mouse_default_cursor_shape`, but some built-in controls implement more complex logic. See :ref:`CursorShape`. +Returns the mouse cursor shape for this control when hovered over ``position`` in local coordinates. For most controls, this is the same as :ref:`mouse_default_cursor_shape`, but some built-in controls implement more complex logic. .. rst-class:: classref-item-separator @@ -3479,7 +3479,7 @@ Shows the given control at the mouse pointer. A good time to call this method is .. code-tab:: gdscript @export var color = Color(1, 0, 0, 1) - + func _get_drag_data(position): # Use a control that is not in the tree var cpb = ColorPickerButton.new() @@ -3492,7 +3492,7 @@ Shows the given control at the mouse pointer. A good time to call this method is [Export] private Color _color = new Color(1, 0, 0, 1); - + public override Variant _GetDragData(Vector2 atPosition) { // Use a control that is not in the tree @@ -3626,6 +3626,7 @@ Moves the mouse cursor to ``position``, relative to :ref:`position` is only supported on Windows, macOS and Linux. It has no effect on Android, iOS and Web. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_converttransformmodifier3d.rst b/classes/class_converttransformmodifier3d.rst new file mode 100644 index 000000000..dc29c033b --- /dev/null +++ b/classes/class_converttransformmodifier3d.rst @@ -0,0 +1,426 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/ConvertTransformModifier3D.xml. + +.. _class_ConvertTransformModifier3D: + +ConvertTransformModifier3D +========================== + +**Inherits:** :ref:`BoneConstraint3D` **<** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +A :ref:`SkeletonModifier3D` that apply transform to the bone which converted from reference. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Apply the copied transform of the bone set by :ref:`BoneConstraint3D.set_reference_bone()` to the bone set by :ref:`BoneConstraint3D.set_apply_bone()` about the specific axis with remapping it with some options. + +There are 4 ways to apply the transform, depending on the combination of :ref:`set_relative()` and :ref:`set_additive()`. + +\ **Relative + Additive:**\ + +- Extract reference pose relative to the rest and add it to the apply bone's pose. + +\ **Relative + Not Additive:**\ + +- Extract reference pose relative to the rest and add it to the apply bone's rest. + +\ **Not Relative + Additive:**\ + +- Extract reference pose absolutely and add it to the apply bone's pose. + +\ **Not Relative + Not Additive:**\ + +- Extract reference pose absolutely and the apply bone's pose is replaced with it. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------+-------------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`setting_count` | ``0`` | + +-----------------------+-------------------------------------------------------------------------------+-------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Axis` | :ref:`get_apply_axis`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_apply_range_max`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_apply_range_min`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TransformMode` | :ref:`get_apply_transform_mode`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Axis` | :ref:`get_reference_axis`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_reference_range_max`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`float` | :ref:`get_reference_range_min`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`TransformMode` | :ref:`get_reference_transform_mode`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_additive`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_relative`\ (\ index\: :ref:`int`\ ) |const| | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_additive`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_apply_axis`\ (\ index\: :ref:`int`, axis\: :ref:`Axis`\ ) | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_apply_range_max`\ (\ index\: :ref:`int`, range_max\: :ref:`float`\ ) | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_apply_range_min`\ (\ index\: :ref:`int`, range_min\: :ref:`float`\ ) | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_apply_transform_mode`\ (\ index\: :ref:`int`, transform_mode\: :ref:`TransformMode`\ ) | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_reference_axis`\ (\ index\: :ref:`int`, axis\: :ref:`Axis`\ ) | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_reference_range_max`\ (\ index\: :ref:`int`, range_max\: :ref:`float`\ ) | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_reference_range_min`\ (\ index\: :ref:`int`, range_min\: :ref:`float`\ ) | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_reference_transform_mode`\ (\ index\: :ref:`int`, transform_mode\: :ref:`TransformMode`\ ) | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_relative`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +---------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_ConvertTransformModifier3D_TransformMode: + +.. rst-class:: classref-enumeration + +enum **TransformMode**: :ref:`🔗` + +.. _class_ConvertTransformModifier3D_constant_TRANSFORM_MODE_POSITION: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransformMode` **TRANSFORM_MODE_POSITION** = ``0`` + +Convert with position. Transfer the difference. + +.. _class_ConvertTransformModifier3D_constant_TRANSFORM_MODE_ROTATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransformMode` **TRANSFORM_MODE_ROTATION** = ``1`` + +Convert with rotation. The angle is the roll for the specified axis. + +.. _class_ConvertTransformModifier3D_constant_TRANSFORM_MODE_SCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransformMode` **TRANSFORM_MODE_SCALE** = ``2`` + +Convert with scale. Transfers the ratio, not the difference. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_ConvertTransformModifier3D_property_setting_count: + +.. rst-class:: classref-property + +:ref:`int` **setting_count** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_setting_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_setting_count**\ (\ ) + +The number of settings in the modifier. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_ConvertTransformModifier3D_method_get_apply_axis: + +.. rst-class:: classref-method + +:ref:`Axis` **get_apply_axis**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the axis of the remapping destination transform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_get_apply_range_max: + +.. rst-class:: classref-method + +:ref:`float` **get_apply_range_max**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the maximum value of the remapping destination range. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_get_apply_range_min: + +.. rst-class:: classref-method + +:ref:`float` **get_apply_range_min**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the minimum value of the remapping destination range. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_get_apply_transform_mode: + +.. rst-class:: classref-method + +:ref:`TransformMode` **get_apply_transform_mode**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the operation of the remapping destination transform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_get_reference_axis: + +.. rst-class:: classref-method + +:ref:`Axis` **get_reference_axis**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the axis of the remapping source transform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_get_reference_range_max: + +.. rst-class:: classref-method + +:ref:`float` **get_reference_range_max**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the maximum value of the remapping source range. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_get_reference_range_min: + +.. rst-class:: classref-method + +:ref:`float` **get_reference_range_min**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the minimum value of the remapping source range. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_get_reference_transform_mode: + +.. rst-class:: classref-method + +:ref:`TransformMode` **get_reference_transform_mode**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the operation of the remapping source transform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_is_additive: + +.. rst-class:: classref-method + +:ref:`bool` **is_additive**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the additive option is enabled in the setting at ``index``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_is_relative: + +.. rst-class:: classref-method + +:ref:`bool` **is_relative**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the relative option is enabled in the setting at ``index``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_set_additive: + +.. rst-class:: classref-method + +|void| **set_additive**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +Sets additive option in the setting at ``index`` to ``enabled``. This mainly affects the process of applying transform to the :ref:`BoneConstraint3D.set_apply_bone()`. + +If sets ``enabled`` to ``true``, the processed transform is added to the pose of the current apply bone. + +If sets ``enabled`` to ``false``, the pose of the current apply bone is replaced with the processed transform. However, if set :ref:`set_relative()` to ``true``, the transform is relative to rest. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_set_apply_axis: + +.. rst-class:: classref-method + +|void| **set_apply_axis**\ (\ index\: :ref:`int`, axis\: :ref:`Axis`\ ) :ref:`🔗` + +Sets the axis of the remapping destination transform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_set_apply_range_max: + +.. rst-class:: classref-method + +|void| **set_apply_range_max**\ (\ index\: :ref:`int`, range_max\: :ref:`float`\ ) :ref:`🔗` + +Sets the maximum value of the remapping destination range. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_set_apply_range_min: + +.. rst-class:: classref-method + +|void| **set_apply_range_min**\ (\ index\: :ref:`int`, range_min\: :ref:`float`\ ) :ref:`🔗` + +Sets the minimum value of the remapping destination range. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_set_apply_transform_mode: + +.. rst-class:: classref-method + +|void| **set_apply_transform_mode**\ (\ index\: :ref:`int`, transform_mode\: :ref:`TransformMode`\ ) :ref:`🔗` + +Sets the operation of the remapping destination transform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_set_reference_axis: + +.. rst-class:: classref-method + +|void| **set_reference_axis**\ (\ index\: :ref:`int`, axis\: :ref:`Axis`\ ) :ref:`🔗` + +Sets the axis of the remapping source transform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_set_reference_range_max: + +.. rst-class:: classref-method + +|void| **set_reference_range_max**\ (\ index\: :ref:`int`, range_max\: :ref:`float`\ ) :ref:`🔗` + +Sets the maximum value of the remapping source range. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_set_reference_range_min: + +.. rst-class:: classref-method + +|void| **set_reference_range_min**\ (\ index\: :ref:`int`, range_min\: :ref:`float`\ ) :ref:`🔗` + +Sets the minimum value of the remapping source range. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_set_reference_transform_mode: + +.. rst-class:: classref-method + +|void| **set_reference_transform_mode**\ (\ index\: :ref:`int`, transform_mode\: :ref:`TransformMode`\ ) :ref:`🔗` + +Sets the operation of the remapping source transform. + +.. rst-class:: classref-item-separator + +---- + +.. _class_ConvertTransformModifier3D_method_set_relative: + +.. rst-class:: classref-method + +|void| **set_relative**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +Sets relative option in the setting at ``index`` to ``enabled``. + +If sets ``enabled`` to ``true``, the extracted and applying transform is relative to the rest. + +If sets ``enabled`` to ``false``, the extracted transform is absolute. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_convexpolygonshape2d.rst b/classes/class_convexpolygonshape2d.rst index 13789a04c..a71ac4bd6 100644 --- a/classes/class_convexpolygonshape2d.rst +++ b/classes/class_convexpolygonshape2d.rst @@ -95,6 +95,7 @@ Method Descriptions Based on the set of points provided, this assigns the :ref:`points` property using the convex hull algorithm, removing all unneeded points. See :ref:`Geometry2D.convex_hull()` for details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_convexpolygonshape3d.rst b/classes/class_convexpolygonshape3d.rst index af9dea705..5e89f47e8 100644 --- a/classes/class_convexpolygonshape3d.rst +++ b/classes/class_convexpolygonshape3d.rst @@ -71,6 +71,7 @@ The list of 3D points forming the convex polygon shape. **Note:** The returned array is *copied* and any changes to it will not update the original property value. See :ref:`PackedVector3Array` for more details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_copytransformmodifier3d.rst b/classes/class_copytransformmodifier3d.rst new file mode 100644 index 000000000..2304a8646 --- /dev/null +++ b/classes/class_copytransformmodifier3d.rst @@ -0,0 +1,594 @@ +:github_url: hide + +.. DO NOT EDIT THIS FILE!!! +.. Generated automatically from Godot engine sources. +.. Generator: https://github.com/godotengine/godot/tree/master/doc/tools/make_rst.py. +.. XML source: https://github.com/godotengine/godot/tree/master/doc/classes/CopyTransformModifier3D.xml. + +.. _class_CopyTransformModifier3D: + +CopyTransformModifier3D +======================= + +**Inherits:** :ref:`BoneConstraint3D` **<** :ref:`SkeletonModifier3D` **<** :ref:`Node3D` **<** :ref:`Node` **<** :ref:`Object` + +A :ref:`SkeletonModifier3D` that apply transform to the bone which copied from reference. + +.. rst-class:: classref-introduction-group + +Description +----------- + +Apply the copied transform of the bone set by :ref:`BoneConstraint3D.set_reference_bone()` to the bone set by :ref:`BoneConstraint3D.set_apply_bone()` with processing it with some masks and options. + +There are 4 ways to apply the transform, depending on the combination of :ref:`set_relative()` and :ref:`set_additive()`. + +\ **Relative + Additive:**\ + +- Extract reference pose relative to the rest and add it to the apply bone's pose. + +\ **Relative + Not Additive:**\ + +- Extract reference pose relative to the rest and add it to the apply bone's rest. + +\ **Not Relative + Additive:**\ + +- Extract reference pose absolutely and add it to the apply bone's pose. + +\ **Not Relative + Not Additive:**\ + +- Extract reference pose absolutely and the apply bone's pose is replaced with it. + +.. rst-class:: classref-reftable-group + +Properties +---------- + +.. table:: + :widths: auto + + +-----------------------+----------------------------------------------------------------------------+-------+ + | :ref:`int` | :ref:`setting_count` | ``0`` | + +-----------------------+----------------------------------------------------------------------------+-------+ + +.. rst-class:: classref-reftable-group + +Methods +------- + +.. table:: + :widths: auto + + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`AxisFlag`\] | :ref:`get_axis_flags`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`TransformFlag`\] | :ref:`get_copy_flags`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |bitfield|\[:ref:`AxisFlag`\] | :ref:`get_invert_flags`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_additive`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_axis_x_enabled`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_axis_x_inverted`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_axis_y_enabled`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_axis_y_inverted`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_axis_z_enabled`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_axis_z_inverted`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_position_copying`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_relative`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_rotation_copying`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`is_scale_copying`\ (\ index\: :ref:`int`\ ) |const| | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_additive`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_axis_flags`\ (\ index\: :ref:`int`, axis_flags\: |bitfield|\[:ref:`AxisFlag`\]\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_axis_x_enabled`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_axis_x_inverted`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_axis_y_enabled`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_axis_y_inverted`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_axis_z_enabled`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_axis_z_inverted`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_copy_flags`\ (\ index\: :ref:`int`, copy_flags\: |bitfield|\[:ref:`TransformFlag`\]\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_copy_position`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_copy_rotation`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_copy_scale`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_invert_flags`\ (\ index\: :ref:`int`, axis_flags\: |bitfield|\[:ref:`AxisFlag`\]\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | |void| | :ref:`set_relative`\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) | + +--------------------------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Enumerations +------------ + +.. _enum_CopyTransformModifier3D_TransformFlag: + +.. rst-class:: classref-enumeration + +flags **TransformFlag**: :ref:`🔗` + +.. _class_CopyTransformModifier3D_constant_TRANSFORM_FLAG_POSITION: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransformFlag` **TRANSFORM_FLAG_POSITION** = ``1`` + +If set, allows to copy the position. + +.. _class_CopyTransformModifier3D_constant_TRANSFORM_FLAG_ROTATION: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransformFlag` **TRANSFORM_FLAG_ROTATION** = ``2`` + +If set, allows to copy the rotation. + +.. _class_CopyTransformModifier3D_constant_TRANSFORM_FLAG_SCALE: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransformFlag` **TRANSFORM_FLAG_SCALE** = ``4`` + +If set, allows to copy the scale. + +.. _class_CopyTransformModifier3D_constant_TRANSFORM_FLAG_ALL: + +.. rst-class:: classref-enumeration-constant + +:ref:`TransformFlag` **TRANSFORM_FLAG_ALL** = ``7`` + +If set, allows to copy the position/rotation/scale. + +.. rst-class:: classref-item-separator + +---- + +.. _enum_CopyTransformModifier3D_AxisFlag: + +.. rst-class:: classref-enumeration + +flags **AxisFlag**: :ref:`🔗` + +.. _class_CopyTransformModifier3D_constant_AXIS_FLAG_X: + +.. rst-class:: classref-enumeration-constant + +:ref:`AxisFlag` **AXIS_FLAG_X** = ``1`` + +If set, allows to process the X-axis. + +.. _class_CopyTransformModifier3D_constant_AXIS_FLAG_Y: + +.. rst-class:: classref-enumeration-constant + +:ref:`AxisFlag` **AXIS_FLAG_Y** = ``2`` + +If set, allows to process the Y-axis. + +.. _class_CopyTransformModifier3D_constant_AXIS_FLAG_Z: + +.. rst-class:: classref-enumeration-constant + +:ref:`AxisFlag` **AXIS_FLAG_Z** = ``4`` + +If set, allows to process the Z-axis. + +.. _class_CopyTransformModifier3D_constant_AXIS_FLAG_ALL: + +.. rst-class:: classref-enumeration-constant + +:ref:`AxisFlag` **AXIS_FLAG_ALL** = ``7`` + +If set, allows to process the all axes. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Property Descriptions +--------------------- + +.. _class_CopyTransformModifier3D_property_setting_count: + +.. rst-class:: classref-property + +:ref:`int` **setting_count** = ``0`` :ref:`🔗` + +.. rst-class:: classref-property-setget + +- |void| **set_setting_count**\ (\ value\: :ref:`int`\ ) +- :ref:`int` **get_setting_count**\ (\ ) + +The number of settings in the modifier. + +.. rst-class:: classref-section-separator + +---- + +.. rst-class:: classref-descriptions-group + +Method Descriptions +------------------- + +.. _class_CopyTransformModifier3D_method_get_axis_flags: + +.. rst-class:: classref-method + +|bitfield|\[:ref:`AxisFlag`\] **get_axis_flags**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the axis flags of the setting at ``index``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_get_copy_flags: + +.. rst-class:: classref-method + +|bitfield|\[:ref:`TransformFlag`\] **get_copy_flags**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the copy flags of the setting at ``index``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_get_invert_flags: + +.. rst-class:: classref-method + +|bitfield|\[:ref:`AxisFlag`\] **get_invert_flags**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns the invert flags of the setting at ``index``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_is_additive: + +.. rst-class:: classref-method + +:ref:`bool` **is_additive**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the additive option is enabled in the setting at ``index``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_is_axis_x_enabled: + +.. rst-class:: classref-method + +:ref:`bool` **is_axis_x_enabled**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the enable flags has the flag for the X-axis in the setting at ``index``. See also :ref:`set_axis_flags()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_is_axis_x_inverted: + +.. rst-class:: classref-method + +:ref:`bool` **is_axis_x_inverted**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the invert flags has the flag for the X-axis in the setting at ``index``. See also :ref:`set_invert_flags()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_is_axis_y_enabled: + +.. rst-class:: classref-method + +:ref:`bool` **is_axis_y_enabled**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the enable flags has the flag for the Y-axis in the setting at ``index``. See also :ref:`set_axis_flags()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_is_axis_y_inverted: + +.. rst-class:: classref-method + +:ref:`bool` **is_axis_y_inverted**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the invert flags has the flag for the Y-axis in the setting at ``index``. See also :ref:`set_invert_flags()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_is_axis_z_enabled: + +.. rst-class:: classref-method + +:ref:`bool` **is_axis_z_enabled**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the enable flags has the flag for the Z-axis in the setting at ``index``. See also :ref:`set_axis_flags()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_is_axis_z_inverted: + +.. rst-class:: classref-method + +:ref:`bool` **is_axis_z_inverted**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the invert flags has the flag for the Z-axis in the setting at ``index``. See also :ref:`set_invert_flags()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_is_position_copying: + +.. rst-class:: classref-method + +:ref:`bool` **is_position_copying**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the copy flags has the flag for the position in the setting at ``index``. See also :ref:`set_copy_flags()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_is_relative: + +.. rst-class:: classref-method + +:ref:`bool` **is_relative**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the relative option is enabled in the setting at ``index``. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_is_rotation_copying: + +.. rst-class:: classref-method + +:ref:`bool` **is_rotation_copying**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the copy flags has the flag for the rotation in the setting at ``index``. See also :ref:`set_copy_flags()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_is_scale_copying: + +.. rst-class:: classref-method + +:ref:`bool` **is_scale_copying**\ (\ index\: :ref:`int`\ ) |const| :ref:`🔗` + +Returns ``true`` if the copy flags has the flag for the scale in the setting at ``index``. See also :ref:`set_copy_flags()`. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_additive: + +.. rst-class:: classref-method + +|void| **set_additive**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +Sets additive option in the setting at ``index`` to ``enabled``. This mainly affects the process of applying transform to the :ref:`BoneConstraint3D.set_apply_bone()`. + +If sets ``enabled`` to ``true``, the processed transform is added to the pose of the current apply bone. + +If sets ``enabled`` to ``false``, the pose of the current apply bone is replaced with the processed transform. However, if set :ref:`set_relative()` to ``true``, the transform is relative to rest. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_axis_flags: + +.. rst-class:: classref-method + +|void| **set_axis_flags**\ (\ index\: :ref:`int`, axis_flags\: |bitfield|\[:ref:`AxisFlag`\]\ ) :ref:`🔗` + +Sets the flags to copy axes. If the flag is valid, the axis is copied. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_axis_x_enabled: + +.. rst-class:: classref-method + +|void| **set_axis_x_enabled**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If sets ``enabled`` to ``true``, the X-axis will be copied. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_axis_x_inverted: + +.. rst-class:: classref-method + +|void| **set_axis_x_inverted**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If sets ``enabled`` to ``true``, the X-axis will be inverted. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_axis_y_enabled: + +.. rst-class:: classref-method + +|void| **set_axis_y_enabled**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If sets ``enabled`` to ``true``, the Y-axis will be copied. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_axis_y_inverted: + +.. rst-class:: classref-method + +|void| **set_axis_y_inverted**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If sets ``enabled`` to ``true``, the Y-axis will be inverted. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_axis_z_enabled: + +.. rst-class:: classref-method + +|void| **set_axis_z_enabled**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If sets ``enabled`` to ``true``, the Z-axis will be copied. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_axis_z_inverted: + +.. rst-class:: classref-method + +|void| **set_axis_z_inverted**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If sets ``enabled`` to ``true``, the Z-axis will be inverted. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_copy_flags: + +.. rst-class:: classref-method + +|void| **set_copy_flags**\ (\ index\: :ref:`int`, copy_flags\: |bitfield|\[:ref:`TransformFlag`\]\ ) :ref:`🔗` + +Sets the flags to process the transform operations. If the flag is valid, the transform operation is processed. + +\ **Note:** If the rotation is valid for only one axis, it respects the roll of the valid axis. If the rotation is valid for two axes, it discards the roll of the invalid axis. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_copy_position: + +.. rst-class:: classref-method + +|void| **set_copy_position**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If sets ``enabled`` to ``true``, the position will be copied. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_copy_rotation: + +.. rst-class:: classref-method + +|void| **set_copy_rotation**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If sets ``enabled`` to ``true``, the rotation will be copied. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_copy_scale: + +.. rst-class:: classref-method + +|void| **set_copy_scale**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +If sets ``enabled`` to ``true``, the scale will be copied. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_invert_flags: + +.. rst-class:: classref-method + +|void| **set_invert_flags**\ (\ index\: :ref:`int`, axis_flags\: |bitfield|\[:ref:`AxisFlag`\]\ ) :ref:`🔗` + +Sets the flags to inverte axes. If the flag is valid, the axis is copied. + +\ **Note:** An inverted scale means an inverse number, not a negative scale. For example, inverting ``2.0`` means ``0.5``. + +\ **Note:** An inverted rotation flips the elements of the quaternion. For example, a two-axis inversion will flip the roll of each axis, and a three-axis inversion will flip the final orientation. However, be aware that flipping only one axis may cause unintended rotation by the unflipped axes, due to the characteristics of the quaternion. + +.. rst-class:: classref-item-separator + +---- + +.. _class_CopyTransformModifier3D_method_set_relative: + +.. rst-class:: classref-method + +|void| **set_relative**\ (\ index\: :ref:`int`, enabled\: :ref:`bool`\ ) :ref:`🔗` + +Sets relative option in the setting at ``index`` to ``enabled``. + +If sets ``enabled`` to ``true``, the extracted and applying transform is relative to the rest. + +If sets ``enabled`` to ``false``, the extracted transform is absolute. + +.. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` +.. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` +.. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` +.. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` +.. |static| replace:: :abbr:`static (This method doesn't need an instance to be called, so it can be called directly using the class name.)` +.. |operator| replace:: :abbr:`operator (This method describes a valid operator to use with this type as left-hand operand.)` +.. |bitfield| replace:: :abbr:`BitField (This value is an integer composed as a bitmask of the following flags.)` +.. |void| replace:: :abbr:`void (No return value.)` diff --git a/classes/class_cpuparticles2d.rst b/classes/class_cpuparticles2d.rst index 1c4f90b7d..ee765feaa 100644 --- a/classes/class_cpuparticles2d.rst +++ b/classes/class_cpuparticles2d.rst @@ -840,7 +840,7 @@ Unit vector specifying the particles' emission direction. - |void| **set_draw_order**\ (\ value\: :ref:`DrawOrder`\ ) - :ref:`DrawOrder` **get_draw_order**\ (\ ) -Particle draw order. Uses :ref:`DrawOrder` values. +Particle draw order. .. rst-class:: classref-item-separator @@ -931,7 +931,7 @@ The rectangle's extents if :ref:`emission_shape`\ ) - :ref:`EmissionShape` **get_emission_shape**\ (\ ) -Particles will be emitted inside this region. See :ref:`EmissionShape` for possible values. +Particles will be emitted inside this region. .. rst-class:: classref-item-separator @@ -1697,7 +1697,7 @@ Returns the minimum value range for the given parameter. :ref:`bool` **get_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`\ ) |const| :ref:`🔗` -Returns the enabled state of the given particle flag (see :ref:`ParticleFlags` for options). +Returns the enabled state of the given particle flag. .. rst-class:: classref-item-separator @@ -1773,9 +1773,10 @@ Sets the minimum value for the given parameter. |void| **set_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`, enable\: :ref:`bool`\ ) :ref:`🔗` -Enables or disables the given flag (see :ref:`ParticleFlags` for options). +Enables or disables the given flag. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_cpuparticles3d.rst b/classes/class_cpuparticles3d.rst index 6f19a3d19..9f2786d24 100644 --- a/classes/class_cpuparticles3d.rst +++ b/classes/class_cpuparticles3d.rst @@ -880,7 +880,7 @@ Unit vector specifying the particles' emission direction. - |void| **set_draw_order**\ (\ value\: :ref:`DrawOrder`\ ) - :ref:`DrawOrder` **get_draw_order**\ (\ ) -Particle draw order. Uses :ref:`DrawOrder` values. +Particle draw order. .. rst-class:: classref-item-separator @@ -1060,7 +1060,7 @@ The radius of the ring when using the emitter :ref:`EMISSION_SHAPE_RING`\ ) - :ref:`EmissionShape` **get_emission_shape**\ (\ ) -Particles will be emitted inside this region. See :ref:`EmissionShape` for possible values. +Particles will be emitted inside this region. .. rst-class:: classref-item-separator @@ -1921,7 +1921,7 @@ Returns the minimum value range for the given parameter. :ref:`bool` **get_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`\ ) |const| :ref:`🔗` -Returns the enabled state of the given particle flag (see :ref:`ParticleFlags` for options). +Returns the enabled state of the given particle flag. .. rst-class:: classref-item-separator @@ -1997,9 +1997,10 @@ Sets the minimum value for the given parameter. |void| **set_particle_flag**\ (\ particle_flag\: :ref:`ParticleFlags`, enable\: :ref:`bool`\ ) :ref:`🔗` -Enables or disables the given particle flag (see :ref:`ParticleFlags` for options). +Enables or disables the given particle flag. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_crypto.rst b/classes/class_crypto.rst index d3596a96b..c3f6272b9 100644 --- a/classes/class_crypto.rst +++ b/classes/class_crypto.rst @@ -29,30 +29,30 @@ Currently, this includes asymmetric key encryption/decryption, signing/verificat .. code-tab:: gdscript var crypto = Crypto.new() - + # Generate new RSA key. var key = crypto.generate_rsa(4096) - + # Generate new self-signed certificate with the given key. var cert = crypto.generate_self_signed_certificate(key, "CN=mydomain.com,O=My Game Company,C=IT") - + # Save key and certificate in the user folder. key.save("user://generated.key") cert.save("user://generated.crt") - + # Encryption var data = "Some data" var encrypted = crypto.encrypt(key, data.to_utf8_buffer()) - + # Decryption var decrypted = crypto.decrypt(key, encrypted) - + # Signing var signature = crypto.sign(HashingContext.HASH_SHA256, data.sha256_buffer(), key) - + # Verifying var verified = crypto.verify(HashingContext.HASH_SHA256, data.sha256_buffer(), signature, key) - + # Checks assert(verified) assert(data.to_utf8_buffer() == decrypted) @@ -61,32 +61,32 @@ Currently, this includes asymmetric key encryption/decryption, signing/verificat using Godot; using System.Diagnostics; - + Crypto crypto = new Crypto(); - + // Generate new RSA key. CryptoKey key = crypto.GenerateRsa(4096); - + // Generate new self-signed certificate with the given key. X509Certificate cert = crypto.GenerateSelfSignedCertificate(key, "CN=mydomain.com,O=My Game Company,C=IT"); - + // Save key and certificate in the user folder. key.Save("user://generated.key"); cert.Save("user://generated.crt"); - + // Encryption string data = "Some data"; byte[] encrypted = crypto.Encrypt(key, data.ToUtf8Buffer()); - + // Decryption byte[] decrypted = crypto.Decrypt(key, encrypted); - + // Signing byte[] signature = crypto.Sign(HashingContext.HashType.Sha256, Data.Sha256Buffer(), key); - + // Verifying bool verified = crypto.Verify(HashingContext.HashType.Sha256, Data.Sha256Buffer(), signature, key); - + // Checks Debug.Assert(verified); Debug.Assert(data.ToUtf8Buffer() == decrypted); @@ -266,6 +266,7 @@ Sign a given ``hash`` of type ``hash_type`` with the provided private ``key``. Verify that a given ``signature`` for ``hash`` of type ``hash_type`` against the provided public ``key``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_cryptokey.rst b/classes/class_cryptokey.rst index 8153734aa..c869f81bd 100644 --- a/classes/class_cryptokey.rst +++ b/classes/class_cryptokey.rst @@ -120,6 +120,7 @@ Saves a key to the given ``path``. If ``public_only`` is ``true``, only the publ Returns a string containing the key in PEM format. If ``public_only`` is ``true``, only the public key will be included. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_csgbox3d.rst b/classes/class_csgbox3d.rst index a06d3d965..8eed955f6 100644 --- a/classes/class_csgbox3d.rst +++ b/classes/class_csgbox3d.rst @@ -84,6 +84,7 @@ The material used to render the box. The box's width, height and depth. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_csgcombiner3d.rst b/classes/class_csgcombiner3d.rst index f9243de08..3c0ded5de 100644 --- a/classes/class_csgcombiner3d.rst +++ b/classes/class_csgcombiner3d.rst @@ -31,6 +31,7 @@ Tutorials - :doc:`Prototyping levels with CSG <../tutorials/3d/csg_tools>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_csgcylinder3d.rst b/classes/class_csgcylinder3d.rst index 79dd0d5f1..270da5f3b 100644 --- a/classes/class_csgcylinder3d.rst +++ b/classes/class_csgcylinder3d.rst @@ -160,6 +160,7 @@ The number of sides of the cylinder, the higher this number the more detail ther If ``true`` the normals of the cylinder are set to give a smooth effect making the cylinder seem rounded. If ``false`` the cylinder will have a flat shaded look. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_csgmesh3d.rst b/classes/class_csgmesh3d.rst index 96f68bd77..8351d4550 100644 --- a/classes/class_csgmesh3d.rst +++ b/classes/class_csgmesh3d.rst @@ -90,6 +90,7 @@ The :ref:`Mesh` resource to use as a CSG shape. \ :ref:`Mesh.ARRAY_NORMAL` is only used to determine which faces require the use of flat shading. By default, CSGMesh will ignore the mesh's vertex normals, recalculate them for each vertex and use a smooth shader. If a flat shader is required for a face, ensure that all vertex normals of the face are approximately equal. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_csgpolygon3d.rst b/classes/class_csgpolygon3d.rst index 9f1438079..2f5c355bc 100644 --- a/classes/class_csgpolygon3d.rst +++ b/classes/class_csgpolygon3d.rst @@ -476,6 +476,7 @@ When :ref:`mode` is :ref:`MODE_SPIN` is :ref:`MODE_SPIN`, the number of extrusions made. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_csgprimitive3d.rst b/classes/class_csgprimitive3d.rst index 5d758d8f5..ffa9b5d14 100644 --- a/classes/class_csgprimitive3d.rst +++ b/classes/class_csgprimitive3d.rst @@ -67,6 +67,7 @@ Property Descriptions If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_csgshape3d.rst b/classes/class_csgshape3d.rst index 6f7e11327..efdbcc8df 100644 --- a/classes/class_csgshape3d.rst +++ b/classes/class_csgshape3d.rst @@ -367,6 +367,7 @@ Based on ``value``, enables or disables the specified layer in the :ref:`collisi Based on ``value``, enables or disables the specified layer in the :ref:`collision_mask`, given a ``layer_number`` between 1 and 32. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_csgsphere3d.rst b/classes/class_csgsphere3d.rst index cf5011bad..a744b9b8e 100644 --- a/classes/class_csgsphere3d.rst +++ b/classes/class_csgsphere3d.rst @@ -141,6 +141,7 @@ Number of horizontal slices for the sphere. If ``true`` the normals of the sphere are set to give a smooth effect making the sphere seem rounded. If ``false`` the sphere will have a flat shaded look. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_csgtorus3d.rst b/classes/class_csgtorus3d.rst index 010ed505b..79b6c10fa 100644 --- a/classes/class_csgtorus3d.rst +++ b/classes/class_csgtorus3d.rst @@ -160,6 +160,7 @@ The number of slices the torus is constructed of. If ``true`` the normals of the torus are set to give a smooth effect making the torus seem rounded. If ``false`` the torus will have a flat shaded look. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_csharpscript.rst b/classes/class_csharpscript.rst index ea053a096..b8c6aa2d7 100644 --- a/classes/class_csharpscript.rst +++ b/classes/class_csharpscript.rst @@ -58,6 +58,7 @@ Method Descriptions Returns a new instance of the script. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_cubemap.rst b/classes/class_cubemap.rst index ef872185d..433337010 100644 --- a/classes/class_cubemap.rst +++ b/classes/class_cubemap.rst @@ -40,10 +40,10 @@ The expected image order is X+, X-, Y+, Y-, Z+, Z- (in Godot's coordinate system .. code:: text shader_type sky; - + uniform samplerCube source_panorama : filter_linear, source_color, hint_default_black; uniform float exposure : hint_range(0, 128) = 1.0; - + void sky() { // If importing a cubemap from another engine, you may need to flip one of the `EYEDIR` components below // by replacing it with `-EYEDIR`. @@ -85,6 +85,7 @@ Method Descriptions Creates a placeholder version of this resource (:ref:`PlaceholderCubemap`). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_cubemaparray.rst b/classes/class_cubemaparray.rst index dc7960752..c903f0c76 100644 --- a/classes/class_cubemaparray.rst +++ b/classes/class_cubemaparray.rst @@ -71,6 +71,7 @@ Method Descriptions Creates a placeholder version of this resource (:ref:`PlaceholderCubemapArray`). .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_curve.rst b/classes/class_curve.rst index 847cd00d9..de49a893f 100644 --- a/classes/class_curve.rst +++ b/classes/class_curve.rst @@ -516,6 +516,7 @@ Sets the right tangent angle for the point at ``index`` to ``tangent``. Assigns the vertical position ``y`` to the point at ``index``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_curve2d.rst b/classes/class_curve2d.rst index 18e27bc57..44bf17fa3 100644 --- a/classes/class_curve2d.rst +++ b/classes/class_curve2d.rst @@ -387,6 +387,7 @@ Returns a list of points along the curve, with almost uniform density. ``max_sta \ ``tolerance_length`` controls the maximal distance between two neighboring points, before the segment has to be subdivided. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_curve3d.rst b/classes/class_curve3d.rst index a5d77ffe4..6c14848d1 100644 --- a/classes/class_curve3d.rst +++ b/classes/class_curve3d.rst @@ -490,6 +490,7 @@ Returns a list of points along the curve, with almost uniform density. ``max_sta \ ``tolerance_length`` controls the maximal distance between two neighboring points, before the segment has to be subdivided. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_curvetexture.rst b/classes/class_curvetexture.rst index 39757dc6a..86d49417c 100644 --- a/classes/class_curvetexture.rst +++ b/classes/class_curvetexture.rst @@ -129,6 +129,7 @@ The format the texture should be generated with. When passing a CurveTexture as The width of the texture (in pixels). Higher values make it possible to represent high-frequency data better (such as sudden direction changes), at the cost of increased generation time and memory usage. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_curvexyztexture.rst b/classes/class_curvexyztexture.rst index 4d675adf5..7810289bb 100644 --- a/classes/class_curvexyztexture.rst +++ b/classes/class_curvexyztexture.rst @@ -117,6 +117,7 @@ The :ref:`Curve` that is rendered onto the texture's blue channel. The width of the texture (in pixels). Higher values make it possible to represent high-frequency data better (such as sudden direction changes), at the cost of increased generation time and memory usage. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_cylindermesh.rst b/classes/class_cylindermesh.rst index 89e42b5b7..be996f226 100644 --- a/classes/class_cylindermesh.rst +++ b/classes/class_cylindermesh.rst @@ -174,6 +174,7 @@ Number of edge rings along the height of the cylinder. Changing :ref:`rings`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_cylindershape3d.rst b/classes/class_cylindershape3d.rst index bd33d1a93..9861936bd 100644 --- a/classes/class_cylindershape3d.rst +++ b/classes/class_cylindershape3d.rst @@ -90,6 +90,7 @@ The cylinder's height. The cylinder's radius. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_dampedspringjoint2d.rst b/classes/class_dampedspringjoint2d.rst index 768af8745..e29ded88e 100644 --- a/classes/class_dampedspringjoint2d.rst +++ b/classes/class_dampedspringjoint2d.rst @@ -113,6 +113,7 @@ When the bodies attached to the spring joint move they stretch or squash it. The The higher the value, the less the bodies attached to the joint will deform it. The joint applies an opposing force to the bodies, the product of the stiffness multiplied by the size difference from its resting length. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_decal.rst b/classes/class_decal.rst index 67564ad0d..cce137840 100644 --- a/classes/class_decal.rst +++ b/classes/class_decal.rst @@ -491,6 +491,7 @@ One case where this is better than accessing the texture directly is when you wa .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_dictionary.rst b/classes/class_dictionary.rst index 19e39ae56..8e934ceae 100644 --- a/classes/class_dictionary.rst +++ b/classes/class_dictionary.rst @@ -29,16 +29,16 @@ Creating a dictionary: .. code-tab:: gdscript var my_dict = {} # Creates an empty dictionary. - + var dict_variable_key = "Another key name" var dict_variable_value = "value2" var another_dict = { "Some key name": "value1", dict_variable_key: dict_variable_value, } - + var points_dict = {"White": 50, "Yellow": 75, "Orange": 100} - + # Alternative Lua-style syntax. # Doesn't require quotes around keys, but only string constants can be used as key names. # Additionally, key names must start with a letter or an underscore. @@ -82,7 +82,7 @@ You can access a dictionary's value by referencing its corresponding key. In the {"Yellow", 75}, {"Orange", 100} }; - + public override void _Ready() { int points = (int)_pointsDict[MyColor]; @@ -555,7 +555,7 @@ Returns ``true`` if the dictionary contains an entry with the given ``key``. "Godot" : 4, 210 : null, } - + print(my_dict.has("Godot")) # Prints true print(my_dict.has(210)) # Prints true print(my_dict.has(4)) # Prints false @@ -567,7 +567,7 @@ Returns ``true`` if the dictionary contains an entry with the given ``key``. { "Godot", 4 }, { 210, default }, }; - + GD.Print(myDict.ContainsKey("Godot")); // Prints True GD.Print(myDict.ContainsKey(210)); // Prints True GD.Print(myDict.ContainsKey(4)); // Prints False @@ -619,14 +619,14 @@ Returns a hashed 32-bit integer value representing the dictionary contents. var dict1 = {"A": 10, "B": 2} var dict2 = {"A": 10, "B": 2} - + print(dict1.hash() == dict2.hash()) # Prints true .. code-tab:: csharp var dict1 = new Godot.Collections.Dictionary{{"A", 10}, {"B", 2}}; var dict2 = new Godot.Collections.Dictionary{{"A", 10}, {"B", 2}}; - + // Godot.Collections.Dictionary has no Hash() method. Use GD.Hash() instead. GD.Print(GD.Hash(dict1) == GD.Hash(dict2)); // Prints True @@ -775,11 +775,11 @@ Adds entries from ``dictionary`` to this dictionary. By default, duplicate keys var dict = { "item": "sword", "quantity": 2 } var other_dict = { "quantity": 15, "color": "silver" } - + # Overwriting of existing keys is disabled by default. dict.merge(other_dict) print(dict) # { "item": "sword", "quantity": 2, "color": "silver" } - + # With overwriting of existing keys enabled. dict.merge(other_dict, true) print(dict) # { "item": "sword", "quantity": 15, "color": "silver" } @@ -791,17 +791,17 @@ Adds entries from ``dictionary`` to this dictionary. By default, duplicate keys ["item"] = "sword", ["quantity"] = 2, }; - + var otherDict = new Godot.Collections.Dictionary { ["quantity"] = 15, ["color"] = "silver", }; - + // Overwriting of existing keys is disabled by default. dict.Merge(otherDict); GD.Print(dict); // { "item": "sword", "quantity": 2, "color": "silver" } - + // With overwriting of existing keys enabled. dict.Merge(otherDict, true); GD.Print(dict); // { "item": "sword", "quantity": 15, "color": "silver" } @@ -950,6 +950,7 @@ Returns ``true`` if the two dictionaries contain the same keys and values. The o Returns the corresponding value for the given ``key`` in the dictionary. If the entry does not exist, fails and returns ``null``. For safe access, use :ref:`get()` or :ref:`has()`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_diraccess.rst b/classes/class_diraccess.rst index 660eb092d..39939320f 100644 --- a/classes/class_diraccess.rst +++ b/classes/class_diraccess.rst @@ -771,6 +771,7 @@ Returns one of the :ref:`Error` code constants (:ref:`@ Static version of :ref:`rename()`. Supports only absolute paths. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_directionallight2d.rst b/classes/class_directionallight2d.rst index cf3a13a4e..e06b7d50b 100644 --- a/classes/class_directionallight2d.rst +++ b/classes/class_directionallight2d.rst @@ -87,6 +87,7 @@ The height of the light. Used with 2D normal mapping. Ranges from 0 (parallel to The maximum distance from the camera center objects can be before their shadows are culled (in pixels). Decreasing this value can prevent objects located outside the camera from casting shadows (while also improving performance). :ref:`Camera2D.zoom` is not taken into account by :ref:`max_distance`, which means that at higher zoom values, shadows will appear to fade out sooner when zooming onto a given point. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_directionallight3d.rst b/classes/class_directionallight3d.rst index 4417533af..ddfccc24d 100644 --- a/classes/class_directionallight3d.rst +++ b/classes/class_directionallight3d.rst @@ -205,7 +205,7 @@ The maximum distance for shadow splits. Increasing this value will make directio - |void| **set_shadow_mode**\ (\ value\: :ref:`ShadowMode`\ ) - :ref:`ShadowMode` **get_shadow_mode**\ (\ ) -The light's shadow rendering algorithm. See :ref:`ShadowMode`. +The light's shadow rendering algorithm. .. rst-class:: classref-item-separator @@ -290,9 +290,10 @@ The distance from shadow split 2 to split 3. Relative to :ref:`directional_shado - |void| **set_sky_mode**\ (\ value\: :ref:`SkyMode`\ ) - :ref:`SkyMode` **get_sky_mode**\ (\ ) -Set whether this **DirectionalLight3D** is visible in the sky, in the scene, or both in the sky and in the scene. See :ref:`SkyMode` for options. +Whether this **DirectionalLight3D** is visible in the sky, in the scene, or both in the sky and in the scene. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_displayserver.rst b/classes/class_displayserver.rst index 773426e80..03032cd78 100644 --- a/classes/class_displayserver.rst +++ b/classes/class_displayserver.rst @@ -1246,19 +1246,11 @@ Tooltip element. enum **AccessibilityPopupType**: :ref:`🔗` -.. _class_DisplayServer_constant_POPUP_UNKNOWN: - -.. rst-class:: classref-enumeration-constant - -:ref:`AccessibilityPopupType` **POPUP_UNKNOWN** = ``0`` - -Other/unknown popup type. - .. _class_DisplayServer_constant_POPUP_MENU: .. rst-class:: classref-enumeration-constant -:ref:`AccessibilityPopupType` **POPUP_MENU** = ``1`` +:ref:`AccessibilityPopupType` **POPUP_MENU** = ``0`` Popup menu. @@ -1266,7 +1258,7 @@ Popup menu. .. rst-class:: classref-enumeration-constant -:ref:`AccessibilityPopupType` **POPUP_LIST** = ``2`` +:ref:`AccessibilityPopupType` **POPUP_LIST** = ``1`` Popup list. @@ -1274,7 +1266,7 @@ Popup list. .. rst-class:: classref-enumeration-constant -:ref:`AccessibilityPopupType` **POPUP_TREE** = ``3`` +:ref:`AccessibilityPopupType` **POPUP_TREE** = ``2`` Popup tree view. @@ -1282,7 +1274,7 @@ Popup tree view. .. rst-class:: classref-enumeration-constant -:ref:`AccessibilityPopupType` **POPUP_DIALOG** = ``4`` +:ref:`AccessibilityPopupType` **POPUP_DIALOG** = ``3`` Popup dialog. @@ -1304,23 +1296,11 @@ enum **AccessibilityFlags**: :ref:`🔗` Element is hidden for accessibility tools. -.. _class_DisplayServer_constant_FLAG_LINKED: - -.. rst-class:: classref-enumeration-constant - -:ref:`AccessibilityFlags` **FLAG_LINKED** = ``1`` - -.. container:: contribute - - There is currently no description for this enum. Please help us by :ref:`contributing one `! - - - .. _class_DisplayServer_constant_FLAG_MULTISELECTABLE: .. rst-class:: classref-enumeration-constant -:ref:`AccessibilityFlags` **FLAG_MULTISELECTABLE** = ``2`` +:ref:`AccessibilityFlags` **FLAG_MULTISELECTABLE** = ``1`` Element is support multiple item selection. @@ -1328,7 +1308,7 @@ Element is support multiple item selection. .. rst-class:: classref-enumeration-constant -:ref:`AccessibilityFlags` **FLAG_REQUIRED** = ``3`` +:ref:`AccessibilityFlags` **FLAG_REQUIRED** = ``2`` Element require user input. @@ -1336,7 +1316,7 @@ Element require user input. .. rst-class:: classref-enumeration-constant -:ref:`AccessibilityFlags` **FLAG_VISITED** = ``4`` +:ref:`AccessibilityFlags` **FLAG_VISITED** = ``3`` Element is a visited link. @@ -1344,7 +1324,7 @@ Element is a visited link. .. rst-class:: classref-enumeration-constant -:ref:`AccessibilityFlags` **FLAG_BUSY** = ``5`` +:ref:`AccessibilityFlags` **FLAG_BUSY** = ``4`` Element content is not ready (e.g. loading). @@ -1352,7 +1332,7 @@ Element content is not ready (e.g. loading). .. rst-class:: classref-enumeration-constant -:ref:`AccessibilityFlags` **FLAG_MODAL** = ``6`` +:ref:`AccessibilityFlags` **FLAG_MODAL** = ``5`` Element is modal window. @@ -1360,7 +1340,7 @@ Element is modal window. .. rst-class:: classref-enumeration-constant -:ref:`AccessibilityFlags` **FLAG_TOUCH_PASSTHROUGH** = ``7`` +:ref:`AccessibilityFlags` **FLAG_TOUCH_PASSTHROUGH** = ``6`` Element allows touches to be passed through when a screen reader is in touch exploration mode. @@ -1368,7 +1348,7 @@ Element allows touches to be passed through when a screen reader is in touch exp .. rst-class:: classref-enumeration-constant -:ref:`AccessibilityFlags` **FLAG_READONLY** = ``8`` +:ref:`AccessibilityFlags` **FLAG_READONLY** = ``7`` Element is text field with selectable but read-only text. @@ -1376,7 +1356,7 @@ Element is text field with selectable but read-only text. .. rst-class:: classref-enumeration-constant -:ref:`AccessibilityFlags` **FLAG_DISABLED** = ``9`` +:ref:`AccessibilityFlags` **FLAG_DISABLED** = ``8`` Element is disabled. @@ -1384,7 +1364,7 @@ Element is disabled. .. rst-class:: classref-enumeration-constant -:ref:`AccessibilityFlags` **FLAG_CLIPS_CHILDREN** = ``10`` +:ref:`AccessibilityFlags` **FLAG_CLIPS_CHILDREN** = ``9`` Element clips children. @@ -2611,6 +2591,14 @@ Utterance reached a word or sentence boundary. Constants --------- +.. _class_DisplayServer_constant_INVALID_SCREEN: + +.. rst-class:: classref-constant + +**INVALID_SCREEN** = ``-1`` :ref:`🔗` + +The ID that refers to a screen that does not exist. This is returned by some **DisplayServer** methods if no screen matches the requested result. + .. _class_DisplayServer_constant_SCREEN_WITH_MOUSE_FOCUS: .. rst-class:: classref-constant @@ -2619,7 +2607,7 @@ Constants Represents the screen containing the mouse pointer. -\ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``. +\ **Note:** On Android, iOS, Web, and Linux (Wayland), this constant always represents the screen at index ``0``. .. _class_DisplayServer_constant_SCREEN_WITH_KEYBOARD_FOCUS: @@ -2629,7 +2617,7 @@ Represents the screen containing the mouse pointer. Represents the screen containing the window with the keyboard focus. -\ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``. +\ **Note:** On Android, iOS, Web, and Linux (Wayland), this constant always represents the screen at index ``0``. .. _class_DisplayServer_constant_SCREEN_PRIMARY: @@ -2639,7 +2627,7 @@ Represents the screen containing the window with the keyboard focus. Represents the primary screen. -\ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``. +\ **Note:** On Android, iOS, Web, and Linux (Wayland), this constant always represents the screen at index ``0``. .. _class_DisplayServer_constant_SCREEN_OF_MAIN_WINDOW: @@ -2649,7 +2637,7 @@ Represents the primary screen. Represents the screen where the main window is located. This is usually the default value in functions that allow specifying one of several screens. -\ **Note:** On Linux (Wayland), this constant always represents the screen at index ``0``. +\ **Note:** On Android, iOS, Web, and Linux (Wayland), this constant always represents the screen at index ``0``. .. _class_DisplayServer_constant_MAIN_WINDOW_ID: @@ -3098,7 +3086,7 @@ Sets element accessibility extra information added to the element name. |void| **accessibility_update_set_flag**\ (\ id\: :ref:`RID`, flag\: :ref:`AccessibilityFlags`, value\: :ref:`bool`\ ) :ref:`🔗` -Sets element flag, see :ref:`AccessibilityFlags`. +Sets element flag. .. rst-class:: classref-item-separator @@ -3990,6 +3978,8 @@ Returns the unobscured area of the display where interactive controls should be Returns the index of the screen containing the window with the keyboard focus, or the primary screen if there's no focused window. +\ **Note:** This method is implemented on Linux/X11, macOS, and Windows. On other platforms, this method always returns the primary screen. + .. rst-class:: classref-item-separator ---- @@ -4016,6 +4006,8 @@ The names of built-in display servers are ``Windows``, ``macOS``, ``X11`` (Linux Returns index of the primary screen. +\ **Note:** This method is implemented on Linux/X11, macOS, and Windows. On other platforms, this method always returns ``0``. + .. rst-class:: classref-item-separator ---- @@ -4028,6 +4020,8 @@ Returns index of the primary screen. Returns the number of displays available. +\ **Note:** This method is implemented on Linux (X11 and Wayland), macOS, and Windows. On other platforms, this method always returns ``1``. + .. rst-class:: classref-item-separator ---- @@ -4038,7 +4032,7 @@ Returns the number of displays available. :ref:`int` **get_screen_from_rect**\ (\ rect\: :ref:`Rect2`\ ) |const| :ref:`🔗` -Returns the index of the screen that overlaps the most with the given rectangle. Returns ``-1`` if the rectangle doesn't overlap with any screen or has no area. +Returns the index of the screen that overlaps the most with the given rectangle. Returns :ref:`INVALID_SCREEN` if the rectangle doesn't overlap with any screen or has no area. .. rst-class:: classref-item-separator @@ -5361,7 +5355,9 @@ This can be used to prevent Godot from skipping rendering when no normal windows :ref:`int` **screen_get_dpi**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`🔗` -Returns the dots per inch density of the specified screen. If ``screen`` is :ref:`SCREEN_OF_MAIN_WINDOW` (the default value), a screen with the main window will be used. +Returns the dots per inch density of the specified screen. Returns platform specific default value if ``screen`` is invalid. + +\ **Note:** One of the following constants can be used as ``screen``: :ref:`SCREEN_OF_MAIN_WINDOW`, :ref:`SCREEN_PRIMARY`, :ref:`SCREEN_WITH_MOUSE_FOCUS`, or :ref:`SCREEN_WITH_KEYBOARD_FOCUS`. \ **Note:** On macOS, returned value is inaccurate if fractional display scaling mode is used. @@ -5376,7 +5372,7 @@ Returns the dots per inch density of the specified screen. If ``screen`` is :ref xxhdpi - 480 dpi xxxhdpi - 640 dpi -\ **Note:** This method is implemented on Android, Linux (X11/Wayland), macOS and Windows. Returns ``72`` on unsupported platforms. +\ **Note:** This method is implemented on Android, iOS, Linux (X11/Wayland), macOS, Web, and Windows. On other platforms, this method always returns ``72``. .. rst-class:: classref-item-separator @@ -5388,9 +5384,11 @@ Returns the dots per inch density of the specified screen. If ``screen`` is :ref :ref:`Image` **screen_get_image**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`🔗` -Returns a screenshot of the ``screen``. +Returns a screenshot of the ``screen``. Returns ``null`` if ``screen`` is invalid or the **DisplayServer** fails to capture screenshot. -\ **Note:** This method is implemented on Linux (X11), macOS, and Windows. +\ **Note:** One of the following constants can be used as ``screen``: :ref:`SCREEN_OF_MAIN_WINDOW`, :ref:`SCREEN_PRIMARY`, :ref:`SCREEN_WITH_MOUSE_FOCUS`, or :ref:`SCREEN_WITH_KEYBOARD_FOCUS`. + +\ **Note:** This method is implemented on Linux (X11, excluding XWayland), macOS, and Windows. On other platforms, this method always returns ``null``. \ **Note:** On macOS, this method requires the "Screen Recording" permission. If permission is not granted, this method returns a screenshot that will not include other application windows or OS elements not related to the application. @@ -5404,9 +5402,9 @@ Returns a screenshot of the ``screen``. :ref:`Image` **screen_get_image_rect**\ (\ rect\: :ref:`Rect2i`\ ) |const| :ref:`🔗` -Returns a screenshot of the screen region defined by ``rect``. +Returns a screenshot of the screen region defined by ``rect``. Returns ``null`` if ``rect`` is outside screen bounds or the **DisplayServer** fails to capture screenshot. -\ **Note:** This method is implemented on macOS and Windows. +\ **Note:** This method is implemented on macOS and Windows. On other platforms, this method always returns ``null``. \ **Note:** On macOS, this method requires the "Screen Recording" permission. If permission is not granted, this method returns a screenshot that will not include other application windows or OS elements not related to the application. @@ -5436,9 +5434,11 @@ Returns the greatest scale factor of all screens. :ref:`ScreenOrientation` **screen_get_orientation**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`🔗` -Returns the ``screen``'s current orientation. See also :ref:`screen_set_orientation()`. +Returns the ``screen``'s current orientation. See also :ref:`screen_set_orientation()`. Returns :ref:`SCREEN_LANDSCAPE` if ``screen`` is invalid. -\ **Note:** This method is implemented on Android and iOS. +\ **Note:** One of the following constants can be used as ``screen``: :ref:`SCREEN_OF_MAIN_WINDOW`, :ref:`SCREEN_PRIMARY`, :ref:`SCREEN_WITH_MOUSE_FOCUS`, or :ref:`SCREEN_WITH_KEYBOARD_FOCUS`. + +\ **Note:** This method is implemented on Android and iOS. On other platforms, this method always returns :ref:`SCREEN_LANDSCAPE`. .. rst-class:: classref-item-separator @@ -5452,9 +5452,9 @@ Returns the ``screen``'s current orientation. See also :ref:`screen_set_orientat Returns color of the display pixel at the ``position``. -\ **Note:** This method is implemented on Linux (X11), macOS, and Windows. +\ **Note:** This method is implemented on Linux (X11, excluding XWayland), macOS, and Windows. On other platforms, this method always returns :ref:`Color`. -\ **Note:** On macOS, this method requires "Screen Recording" permission, if permission is not granted it will return desktop wallpaper color. +\ **Note:** On macOS, this method requires the "Screen Recording" permission. If permission is not granted, this method returns a screenshot that will only contain the desktop wallpaper, the current application's window, and other related UI elements. .. rst-class:: classref-item-separator @@ -5466,7 +5466,7 @@ Returns color of the display pixel at the ``position``. :ref:`Vector2i` **screen_get_position**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`🔗` -Returns the screen's top-left corner position in pixels. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin may be located outside any display like this: +Returns the screen's top-left corner position in pixels. Returns :ref:`Vector2i.ZERO` if ``screen`` is invalid. On multi-monitor setups, the screen position is relative to the virtual desktop area. On multi-monitor setups with different screen resolutions or orientations, the origin might be located outside any display like this: .. code:: text @@ -5479,7 +5479,7 @@ Returns the screen's top-left corner position in pixels. On multi-monitor setups See also :ref:`screen_get_size()`. -\ **Note:** On Linux (Wayland) this method always returns ``(0, 0)``. +\ **Note:** One of the following constants can be used as ``screen``: :ref:`SCREEN_OF_MAIN_WINDOW`, :ref:`SCREEN_PRIMARY`, :ref:`SCREEN_WITH_MOUSE_FOCUS`, or :ref:`SCREEN_WITH_KEYBOARD_FOCUS`. .. rst-class:: classref-item-separator @@ -5491,9 +5491,7 @@ See also :ref:`screen_get_size()`. :ref:`float` **screen_get_refresh_rate**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`🔗` -Returns the current refresh rate of the specified screen. If ``screen`` is :ref:`SCREEN_OF_MAIN_WINDOW` (the default value), a screen with the main window will be used. - -\ **Note:** Returns ``-1.0`` if the DisplayServer fails to find the refresh rate for the specified screen. On Web, :ref:`screen_get_refresh_rate()` will always return ``-1.0`` as there is no way to retrieve the refresh rate on that platform. +Returns the current refresh rate of the specified screen. Returns ``-1.0`` if ``screen`` is invalid or the **DisplayServer** fails to find the refresh rate for the specified screen. To fallback to a default refresh rate if the method fails, try: @@ -5503,6 +5501,10 @@ To fallback to a default refresh rate if the method fails, try: if refresh_rate < 0: refresh_rate = 60.0 +\ **Note:** One of the following constants can be used as ``screen``: :ref:`SCREEN_OF_MAIN_WINDOW`, :ref:`SCREEN_PRIMARY`, :ref:`SCREEN_WITH_MOUSE_FOCUS`, or :ref:`SCREEN_WITH_KEYBOARD_FOCUS`. + +\ **Note:** This method is implemented on Android, iOS, macOS, Linux (X11 and Wayland), and Windows. On other platforms, this method always returns ``-1.0``. + .. rst-class:: classref-item-separator ---- @@ -5513,13 +5515,15 @@ To fallback to a default refresh rate if the method fails, try: :ref:`float` **screen_get_scale**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`🔗` -Returns the scale factor of the specified screen by index. +Returns the scale factor of the specified screen by index. Returns ``1.0`` if ``screen`` is invalid. + +\ **Note:** One of the following constants can be used as ``screen``: :ref:`SCREEN_OF_MAIN_WINDOW`, :ref:`SCREEN_PRIMARY`, :ref:`SCREEN_WITH_MOUSE_FOCUS`, or :ref:`SCREEN_WITH_KEYBOARD_FOCUS`. \ **Note:** On macOS, the returned value is ``2.0`` for hiDPI (Retina) screens, and ``1.0`` for all other cases. \ **Note:** On Linux (Wayland), the returned value is accurate only when ``screen`` is :ref:`SCREEN_OF_MAIN_WINDOW`. Due to API limitations, passing a direct index will return a rounded-up integer, if the screen has a fractional scale (e.g. ``1.25`` would get rounded up to ``2.0``). -\ **Note:** This method is implemented on Android, iOS, Web, macOS, and Linux (Wayland). +\ **Note:** This method is implemented on Android, iOS, Web, macOS, and Linux (Wayland). On other platforms, this method always returns ``1.0``. .. rst-class:: classref-item-separator @@ -5531,7 +5535,9 @@ Returns the scale factor of the specified screen by index. :ref:`Vector2i` **screen_get_size**\ (\ screen\: :ref:`int` = -1\ ) |const| :ref:`🔗` -Returns the screen's size in pixels. See also :ref:`screen_get_position()` and :ref:`screen_get_usable_rect()`. +Returns the screen's size in pixels. See also :ref:`screen_get_position()` and :ref:`screen_get_usable_rect()`. Returns :ref:`Vector2i.ZERO` if ``screen`` is invalid. + +\ **Note:** One of the following constants can be used as ``screen``: :ref:`SCREEN_OF_MAIN_WINDOW`, :ref:`SCREEN_PRIMARY`, :ref:`SCREEN_WITH_MOUSE_FOCUS`, or :ref:`SCREEN_WITH_KEYBOARD_FOCUS`. .. rst-class:: classref-item-separator @@ -5545,6 +5551,10 @@ Returns the screen's size in pixels. See also :ref:`screen_get_position()`. +\ **Note:** One of the following constants can be used as ``screen``: :ref:`SCREEN_OF_MAIN_WINDOW`, :ref:`SCREEN_PRIMARY`, :ref:`SCREEN_WITH_MOUSE_FOCUS`, or :ref:`SCREEN_WITH_KEYBOARD_FOCUS`. + +\ **Note:** This method is implemented on Linux/X11, macOS, and Windows. On other platforms, this method always returns ``Rect2i(screen_get_position(screen), screen_get_size(screen))``. + .. rst-class:: classref-item-separator ---- @@ -5581,6 +5591,10 @@ Sets whether the screen should never be turned off by the operating system's pow Sets the ``screen``'s ``orientation``. See also :ref:`screen_get_orientation()`. +\ **Note:** One of the following constants can be used as ``screen``: :ref:`SCREEN_OF_MAIN_WINDOW`, :ref:`SCREEN_PRIMARY`, :ref:`SCREEN_WITH_MOUSE_FOCUS`, or :ref:`SCREEN_WITH_KEYBOARD_FOCUS`. + +\ **Note:** This method is implemented on Android and iOS. + \ **Note:** On iOS, this method has no effect if :ref:`ProjectSettings.display/window/handheld/orientation` is not set to :ref:`SCREEN_SENSOR`. .. rst-class:: classref-item-separator @@ -5783,7 +5797,7 @@ Set active tablet driver name. Supported drivers: -- ``winink``: Windows Ink API, default (Windows 8.1+ required). +- ``winink``: Windows Ink API, default. - ``wintab``: Wacom Wintab API (compatible device driver required). @@ -6069,7 +6083,9 @@ Returns the :ref:`Object.get_instance_id()` :ref:`int` **window_get_current_screen**\ (\ window_id\: :ref:`int` = 0\ ) |const| :ref:`🔗` -Returns the screen the window specified by ``window_id`` is currently positioned on. If the screen overlaps multiple displays, the screen where the window's center is located is returned. See also :ref:`window_set_current_screen()`. +Returns the screen the window specified by ``window_id`` is currently positioned on. If the screen overlaps multiple displays, the screen where the window's center is located is returned. See also :ref:`window_set_current_screen()`. Returns :ref:`INVALID_SCREEN` if ``window_id`` is invalid. + +\ **Note:** This method is implemented on Linux/X11, macOS, and Windows. On other platforms, this method always returns ``0``. .. rst-class:: classref-item-separator @@ -6319,6 +6335,10 @@ Makes the window specified by ``window_id`` request attention, which is material Moves the window specified by ``window_id`` to the specified ``screen``. See also :ref:`window_get_current_screen()`. +\ **Note:** One of the following constants can be used as ``screen``: :ref:`SCREEN_OF_MAIN_WINDOW`, :ref:`SCREEN_PRIMARY`, :ref:`SCREEN_WITH_MOUSE_FOCUS`, or :ref:`SCREEN_WITH_KEYBOARD_FOCUS`. + +\ **Note:** This method is implemented on Linux/X11, macOS, and Windows. + .. rst-class:: classref-item-separator ---- @@ -6361,7 +6381,7 @@ If set to ``true``, this window will always stay on top of its parent window, pa |void| **window_set_flag**\ (\ flag\: :ref:`WindowFlags`, enabled\: :ref:`bool`, window_id\: :ref:`int` = 0\ ) :ref:`🔗` -Enables or disables the given window's given ``flag``. See :ref:`WindowFlags` for possible values and their behavior. +Enables or disables the given window's given ``flag``. .. rst-class:: classref-item-separator @@ -6459,7 +6479,7 @@ Sets the minimum size for the given window to ``min_size`` in pixels. Normally, |void| **window_set_mode**\ (\ mode\: :ref:`WindowMode`, window_id\: :ref:`int` = 0\ ) :ref:`🔗` -Sets window mode for the given window to ``mode``. See :ref:`WindowMode` for possible values and how each mode behaves. +Sets window mode for the given window to ``mode``. \ **Note:** On Android, setting it to :ref:`WINDOW_MODE_FULLSCREEN` or :ref:`WINDOW_MODE_EXCLUSIVE_FULLSCREEN` will enable immersive mode. @@ -6486,10 +6506,10 @@ Passing an empty array will disable passthrough support (all mouse events will b # Set region, using Path2D node. DisplayServer.window_set_mouse_passthrough($Path2D.curve.get_baked_points()) - + # Set region, using Polygon2D node. DisplayServer.window_set_mouse_passthrough($Polygon2D.polygon) - + # Reset region to default. DisplayServer.window_set_mouse_passthrough([]) @@ -6497,10 +6517,10 @@ Passing an empty array will disable passthrough support (all mouse events will b // Set region, using Path2D node. DisplayServer.WindowSetMousePassthrough(GetNode("Path2D").Curve.GetBakedPoints()); - + // Set region, using Polygon2D node. DisplayServer.WindowSetMousePassthrough(GetNode("Polygon2D").Polygon); - + // Reset region to default. DisplayServer.WindowSetMousePassthrough([]); @@ -6621,8 +6641,6 @@ Sets window transient parent. Transient window will be destroyed with its transi Sets the V-Sync mode of the given window. See also :ref:`ProjectSettings.display/window/vsync/vsync_mode`. -See :ref:`VSyncMode` for possible values and how they affect the behavior of your application. - Depending on the platform and used renderer, the engine will fall back to :ref:`VSYNC_ENABLED` if the desired mode is not supported. \ **Note:** V-Sync modes other than :ref:`VSYNC_ENABLED` are only supported in the Forward+ and Mobile rendering methods, not Compatibility. @@ -6684,6 +6702,7 @@ Starts an interactive resize operation on the window with the given ``window_id` \ **Note:** This method is implemented on Linux (X11/Wayland), macOS, and Windows. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_dtlsserver.rst b/classes/class_dtlsserver.rst index c5a057718..eb1e1a264 100644 --- a/classes/class_dtlsserver.rst +++ b/classes/class_dtlsserver.rst @@ -30,17 +30,17 @@ Below a small example of how to use it: # server_node.gd extends Node - + var dtls = DTLSServer.new() var server = UDPServer.new() var peers = [] - + func _ready(): server.listen(4242) var key = load("key.key") # Your private key. var cert = load("cert.crt") # Your X509 certificate. dtls.setup(TlsOptions.server(key, cert)) - + func _process(delta): while server.is_connection_available(): var peer = server.take_connection() @@ -49,7 +49,7 @@ Below a small example of how to use it: continue # It is normal that 50% of the connections fails due to cookie exchange. print("Peer connected!") peers.append(dtls_peer) - + for p in peers: p.poll() # Must poll to update the state. if p.get_status() == PacketPeerDTLS.STATUS_CONNECTED: @@ -61,13 +61,13 @@ Below a small example of how to use it: // ServerNode.cs using Godot; - + public partial class ServerNode : Node { private DtlsServer _dtls = new DtlsServer(); private UdpServer _server = new UdpServer(); private Godot.Collections.Array _peers = []; - + public override void _Ready() { _server.Listen(4242); @@ -75,7 +75,7 @@ Below a small example of how to use it: var cert = GD.Load("cert.crt"); // Your X509 certificate. _dtls.Setup(TlsOptions.Server(key, cert)); } - + public override void _Process(double delta) { while (_server.IsConnectionAvailable()) @@ -89,7 +89,7 @@ Below a small example of how to use it: GD.Print("Peer connected!"); _peers.Add(dtlsPeer); } - + foreach (var p in _peers) { p.Poll(); // Must poll to update the state. @@ -114,15 +114,15 @@ Below a small example of how to use it: # client_node.gd extends Node - + var dtls = PacketPeerDTLS.new() var udp = PacketPeerUDP.new() var connected = false - + func _ready(): udp.connect_to_host("127.0.0.1", 4242) dtls.connect_to_peer(udp, false) # Use true in production for certificate validation! - + func _process(delta): dtls.poll() if dtls.get_status() == PacketPeerDTLS.STATUS_CONNECTED: @@ -138,19 +138,19 @@ Below a small example of how to use it: // ClientNode.cs using Godot; using System.Text; - + public partial class ClientNode : Node { private PacketPeerDtls _dtls = new PacketPeerDtls(); private PacketPeerUdp _udp = new PacketPeerUdp(); private bool _connected = false; - + public override void _Ready() { _udp.ConnectToHost("127.0.0.1", 4242); _dtls.ConnectToPeer(_udp, validateCerts: false); // Use true in production for certificate validation! } - + public override void _Process(double delta) { _dtls.Poll(); @@ -218,6 +218,7 @@ Try to initiate the DTLS handshake with the given ``udp_peer`` which must be alr \ **Note:** You must check that the state of the return PacketPeerUDP is :ref:`PacketPeerDTLS.STATUS_HANDSHAKING`, as it is normal that 50% of the new connections will be invalid due to cookie exchange. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorcommandpalette.rst b/classes/class_editorcommandpalette.rst index 31dd64984..9332b04a8 100644 --- a/classes/class_editorcommandpalette.rst +++ b/classes/class_editorcommandpalette.rst @@ -110,6 +110,7 @@ Removes the custom command from EditorCommandPalette. - ``key_name``: :ref:`String` (Name of the key for a particular **Command**.) .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorcontextmenuplugin.rst b/classes/class_editorcontextmenuplugin.rst index d4707b907..4ca419a2f 100644 --- a/classes/class_editorcontextmenuplugin.rst +++ b/classes/class_editorcontextmenuplugin.rst @@ -88,7 +88,7 @@ Context menu of Script editor's script tabs. :ref:`_popup_menu()` **CONTEXT_SLOT_FILESYSTEM_CREATE** = ``3`` -The "Create..." submenu of FileSystem dock's context menu, or the "New" section of the main context menu when empty space is clicked. :ref:`_popup_menu()` and option callback will be called with list of paths of the currently selected files. When clicking the empty space, the list of paths for popup method will be empty. +The "Create..." submenu of FileSystem dock's context menu, or the "New" section of the main context menu when empty space is clicked. :ref:`_popup_menu()` and option callback will be called with the path of the currently selected folder, wrapped in a list. When clicking the empty space, the list of paths for popup method will be empty. .. _class_EditorContextMenuPlugin_constant_CONTEXT_SLOT_SCRIPT_EDITOR_CODE: @@ -180,7 +180,7 @@ Add custom option to the context menu of the plugin's specified slot. The option func _init(): add_menu_shortcut(SHORTCUT, handle) - + func _popup_menu(paths): add_context_menu_item_from_shortcut("File Custom options", SHORTCUT, ICON) @@ -203,7 +203,7 @@ Add a submenu to the context menu of the plugin's specified slot. The submenu is popup_menu.add_item("Blue") popup_menu.add_item("White") popup_menu.id_pressed.connect(_on_color_submenu_option) - + add_context_submenu_item("Set Node Color", popup_menu) .. rst-class:: classref-item-separator @@ -224,6 +224,7 @@ Registers a shortcut associated with the plugin's context menu. This method shou add_menu_shortcut(SHORTCUT, handle) .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editordebuggerplugin.rst b/classes/class_editordebuggerplugin.rst index 5e06056f1..a8630b2c3 100644 --- a/classes/class_editordebuggerplugin.rst +++ b/classes/class_editordebuggerplugin.rst @@ -34,19 +34,19 @@ You can retrieve the available :ref:`EditorDebuggerSession` cu \ **Note:** Sessions in the array may be inactive, check their state via :ref:`EditorDebuggerSession.is_active()`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editordebuggersession.rst b/classes/class_editordebuggersession.rst index 4c1066e22..7c7705dd4 100644 --- a/classes/class_editordebuggersession.rst +++ b/classes/class_editordebuggersession.rst @@ -204,6 +204,7 @@ Enables or disables a specific breakpoint based on ``enabled``, updating the Edi Toggle the given ``profiler`` on the attached remote instance, optionally passing additionally ``data``. See :ref:`EngineProfiler` for more details. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorexportplatform.rst b/classes/class_editorexportplatform.rst index 0c5870808..898a3e1eb 100644 --- a/classes/class_editorexportplatform.rst +++ b/classes/class_editorexportplatform.rst @@ -535,6 +535,7 @@ Executes specified command on the remote host via SSH protocol and returns comma Executes specified command on the remote host via SSH protocol and returns process ID (on the remote host) without waiting for command to finish. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorexportplatformandroid.rst b/classes/class_editorexportplatformandroid.rst index a19f4c72d..2fd287760 100644 --- a/classes/class_editorexportplatformandroid.rst +++ b/classes/class_editorexportplatformandroid.rst @@ -2905,6 +2905,7 @@ Application version visible to the user. Falls back to :ref:`ProjectSettings.app The extended reality (XR) mode for this application. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorexportplatformappleembedded.rst b/classes/class_editorexportplatformappleembedded.rst index 51c36681e..5da8f2891 100644 --- a/classes/class_editorexportplatformappleembedded.rst +++ b/classes/class_editorexportplatformappleembedded.rst @@ -33,6 +33,7 @@ Tutorials - :doc:`iOS plugins documentation index <../tutorials/platform/ios/index>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorexportplatformextension.rst b/classes/class_editorexportplatformextension.rst index 5295a9039..96f253463 100644 --- a/classes/class_editorexportplatformextension.rst +++ b/classes/class_editorexportplatformextension.rst @@ -40,13 +40,13 @@ Methods +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`_export_pack_patch`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, patches\: :ref:`PackedStringArray`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Error` | :ref:`_export_project`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| | + | :ref:`Error` | :ref:`_export_project`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| |required| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`_export_zip`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Error` | :ref:`_export_zip_patch`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, patches\: :ref:`PackedStringArray`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_binary_extensions`\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |const| | + | :ref:`PackedStringArray` | :ref:`_get_binary_extensions`\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |required| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_get_debug_protocol`\ (\ ) |virtual| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -58,9 +58,9 @@ Methods +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Array`\[:ref:`Dictionary`\] | :ref:`_get_export_options`\ (\ ) |virtual| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Texture2D` | :ref:`_get_logo`\ (\ ) |virtual| |const| | + | :ref:`Texture2D` | :ref:`_get_logo`\ (\ ) |virtual| |required| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_name`\ (\ ) |virtual| |const| | + | :ref:`String` | :ref:`_get_name`\ (\ ) |virtual| |required| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`ImageTexture` | :ref:`_get_option_icon`\ (\ device\: :ref:`int`\ ) |virtual| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -72,17 +72,17 @@ Methods +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_get_options_tooltip`\ (\ ) |virtual| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_os_name`\ (\ ) |virtual| |const| | + | :ref:`String` | :ref:`_get_os_name`\ (\ ) |virtual| |required| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_platform_features`\ (\ ) |virtual| |const| | + | :ref:`PackedStringArray` | :ref:`_get_platform_features`\ (\ ) |virtual| |required| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_preset_features`\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |const| | + | :ref:`PackedStringArray` | :ref:`_get_preset_features`\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |required| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Texture2D` | :ref:`_get_run_icon`\ (\ ) |virtual| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_valid_export_configuration`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`\ ) |virtual| |const| | + | :ref:`bool` | :ref:`_has_valid_export_configuration`\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`\ ) |virtual| |required| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_has_valid_project_configuration`\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |const| | + | :ref:`bool` | :ref:`_has_valid_project_configuration`\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |required| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_is_executable`\ (\ path\: :ref:`String`\ ) |virtual| |const| | +------------------------------------------------------------------+-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -116,8 +116,6 @@ Method Descriptions :ref:`bool` **_can_export**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Returns ``true``, if specified ``preset`` is valid and can be exported. Use :ref:`set_config_error()` and :ref:`set_config_missing_templates()` to set error details. Usual implementation can call :ref:`_has_valid_export_configuration()` and :ref:`_has_valid_project_configuration()` to determine if export is possible. @@ -132,8 +130,6 @@ Usual implementation can call :ref:`_has_valid_export_configuration()` -**Optional.**\ - Called by the editor before platform is unregistered. .. rst-class:: classref-item-separator @@ -146,8 +142,6 @@ Called by the editor before platform is unregistered. :ref:`Error` **_export_pack**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| :ref:`🔗` -**Optional.**\ - Creates a PCK archive at ``path`` for the specified ``preset``. This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" disabled, and PCK is selected as a file type. @@ -162,8 +156,6 @@ This method is called when "Export PCK/ZIP" button is pressed in the export dial :ref:`Error` **_export_pack_patch**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, patches\: :ref:`PackedStringArray`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| :ref:`🔗` -**Optional.**\ - Creates a patch PCK archive at ``path`` for the specified ``preset``, containing only the files that have changed since the last patch. This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" enabled, and PCK is selected as a file type. @@ -178,9 +170,7 @@ This method is called when "Export PCK/ZIP" button is pressed in the export dial .. rst-class:: classref-method -:ref:`Error` **_export_project**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| :ref:`🔗` - -**Required.**\ +:ref:`Error` **_export_project**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| |required| :ref:`🔗` Creates a full project at ``path`` for the specified ``preset``. @@ -198,8 +188,6 @@ This method implementation can call :ref:`EditorExportPlatform.save_pack()` **_export_zip**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| :ref:`🔗` -**Optional.**\ - Create a ZIP archive at ``path`` for the specified ``preset``. This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" disabled, and ZIP is selected as a file type. @@ -214,8 +202,6 @@ This method is called when "Export PCK/ZIP" button is pressed in the export dial :ref:`Error` **_export_zip_patch**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`, path\: :ref:`String`, patches\: :ref:`PackedStringArray`, flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| :ref:`🔗` -**Optional.**\ - Create a ZIP archive at ``path`` for the specified ``preset``, containing only the files that have changed since the last patch. This method is called when "Export PCK/ZIP" button is pressed in the export dialog, with "Export as Patch" enabled, and ZIP is selected as a file type. @@ -230,9 +216,7 @@ This method is called when "Export PCK/ZIP" button is pressed in the export dial .. rst-class:: classref-method -:ref:`PackedStringArray` **_get_binary_extensions**\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |const| :ref:`🔗` - -**Required.**\ +:ref:`PackedStringArray` **_get_binary_extensions**\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |required| |const| :ref:`🔗` Returns array of supported binary extensions for the full project export. @@ -246,8 +230,6 @@ Returns array of supported binary extensions for the full project export. :ref:`String` **_get_debug_protocol**\ (\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Returns protocol used for remote debugging. Default implementation return ``tcp://``. .. rst-class:: classref-item-separator @@ -260,8 +242,6 @@ Returns protocol used for remote debugging. Default implementation return ``tcp: :ref:`String` **_get_device_architecture**\ (\ device\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Returns device architecture for one-click deploy. .. rst-class:: classref-item-separator @@ -274,8 +254,6 @@ Returns device architecture for one-click deploy. :ref:`bool` **_get_export_option_visibility**\ (\ preset\: :ref:`EditorExportPreset`, option\: :ref:`String`\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Validates ``option`` and returns visibility for the specified ``preset``. Default implementation return ``true`` for all options. .. rst-class:: classref-item-separator @@ -288,8 +266,6 @@ Validates ``option`` and returns visibility for the specified ``preset``. Defaul :ref:`String` **_get_export_option_warning**\ (\ preset\: :ref:`EditorExportPreset`, option\: :ref:`StringName`\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Validates ``option`` and returns warning message for the specified ``preset``. Default implementation return empty string for all options. .. rst-class:: classref-item-separator @@ -302,8 +278,6 @@ Validates ``option`` and returns warning message for the specified ``preset``. D :ref:`Array`\[:ref:`Dictionary`\] **_get_export_options**\ (\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Returns a property list, as an :ref:`Array` of dictionaries. Each :ref:`Dictionary` must at least contain the ``name: StringName`` and ``type: Variant.Type`` entries. Additionally, the following keys are supported: @@ -332,9 +306,7 @@ See also :ref:`Object._get_property_list()` **_get_logo**\ (\ ) |virtual| |const| :ref:`🔗` - -**Required.**\ +:ref:`Texture2D` **_get_logo**\ (\ ) |virtual| |required| |const| :ref:`🔗` Returns platform logo displayed in the export dialog, logo should be 32x32 adjusted to the current editor scale, see :ref:`EditorInterface.get_editor_scale()`. @@ -346,9 +318,7 @@ Returns platform logo displayed in the export dialog, logo should be 32x32 adjus .. rst-class:: classref-method -:ref:`String` **_get_name**\ (\ ) |virtual| |const| :ref:`🔗` - -**Required.**\ +:ref:`String` **_get_name**\ (\ ) |virtual| |required| |const| :ref:`🔗` Returns export platform name. @@ -362,8 +332,6 @@ Returns export platform name. :ref:`ImageTexture` **_get_option_icon**\ (\ device\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Returns one-click deploy menu item icon for the specified ``device``, icon should be 16x16 adjusted to the current editor scale, see :ref:`EditorInterface.get_editor_scale()`. .. rst-class:: classref-item-separator @@ -376,8 +344,6 @@ Returns one-click deploy menu item icon for the specified ``device``, icon shoul :ref:`String` **_get_option_label**\ (\ device\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Returns one-click deploy menu item label for the specified ``device``. .. rst-class:: classref-item-separator @@ -390,8 +356,6 @@ Returns one-click deploy menu item label for the specified ``device``. :ref:`String` **_get_option_tooltip**\ (\ device\: :ref:`int`\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Returns one-click deploy menu item tooltip for the specified ``device``. .. rst-class:: classref-item-separator @@ -404,8 +368,6 @@ Returns one-click deploy menu item tooltip for the specified ``device``. :ref:`int` **_get_options_count**\ (\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Returns number one-click deploy devices (or other one-click option displayed in the menu). .. rst-class:: classref-item-separator @@ -418,8 +380,6 @@ Returns number one-click deploy devices (or other one-click option displayed in :ref:`String` **_get_options_tooltip**\ (\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Returns tooltip of the one-click deploy menu button. .. rst-class:: classref-item-separator @@ -430,9 +390,7 @@ Returns tooltip of the one-click deploy menu button. .. rst-class:: classref-method -:ref:`String` **_get_os_name**\ (\ ) |virtual| |const| :ref:`🔗` - -**Required.**\ +:ref:`String` **_get_os_name**\ (\ ) |virtual| |required| |const| :ref:`🔗` Returns target OS name. @@ -444,9 +402,7 @@ Returns target OS name. .. rst-class:: classref-method -:ref:`PackedStringArray` **_get_platform_features**\ (\ ) |virtual| |const| :ref:`🔗` - -**Required.**\ +:ref:`PackedStringArray` **_get_platform_features**\ (\ ) |virtual| |required| |const| :ref:`🔗` Returns array of platform specific features. @@ -458,9 +414,7 @@ Returns array of platform specific features. .. rst-class:: classref-method -:ref:`PackedStringArray` **_get_preset_features**\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |const| :ref:`🔗` - -**Required.**\ +:ref:`PackedStringArray` **_get_preset_features**\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |required| |const| :ref:`🔗` Returns array of platform specific features for the specified ``preset``. @@ -474,8 +428,6 @@ Returns array of platform specific features for the specified ``preset``. :ref:`Texture2D` **_get_run_icon**\ (\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Returns icon of the one-click deploy menu button, icon should be 16x16 adjusted to the current editor scale, see :ref:`EditorInterface.get_editor_scale()`. .. rst-class:: classref-item-separator @@ -486,9 +438,7 @@ Returns icon of the one-click deploy menu button, icon should be 16x16 adjusted .. rst-class:: classref-method -:ref:`bool` **_has_valid_export_configuration**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`\ ) |virtual| |const| :ref:`🔗` - -**Required.**\ +:ref:`bool` **_has_valid_export_configuration**\ (\ preset\: :ref:`EditorExportPreset`, debug\: :ref:`bool`\ ) |virtual| |required| |const| :ref:`🔗` Returns ``true`` if export configuration is valid. @@ -500,9 +450,7 @@ Returns ``true`` if export configuration is valid. .. rst-class:: classref-method -:ref:`bool` **_has_valid_project_configuration**\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |const| :ref:`🔗` - -**Required.**\ +:ref:`bool` **_has_valid_project_configuration**\ (\ preset\: :ref:`EditorExportPreset`\ ) |virtual| |required| |const| :ref:`🔗` Returns ``true`` if project configuration is valid. @@ -516,8 +464,6 @@ Returns ``true`` if project configuration is valid. :ref:`bool` **_is_executable**\ (\ path\: :ref:`String`\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Returns ``true`` if specified file is a valid executable (native executable or script) for the target platform. .. rst-class:: classref-item-separator @@ -530,8 +476,6 @@ Returns ``true`` if specified file is a valid executable (native executable or s :ref:`bool` **_poll_export**\ (\ ) |virtual| :ref:`🔗` -**Optional.**\ - Returns ``true`` if one-click deploy options are changed and editor interface should be updated. .. rst-class:: classref-item-separator @@ -544,8 +488,6 @@ Returns ``true`` if one-click deploy options are changed and editor interface sh :ref:`Error` **_run**\ (\ preset\: :ref:`EditorExportPreset`, device\: :ref:`int`, debug_flags\: |bitfield|\[:ref:`DebugFlags`\]\ ) |virtual| :ref:`🔗` -**Optional.**\ - This method is called when ``device`` one-click deploy menu option is selected. Implementation should export project to a temporary location, upload and run it on the specific ``device``, or perform another action associated with the menu item. @@ -560,8 +502,6 @@ Implementation should export project to a temporary location, upload and run it :ref:`bool` **_should_update_export_options**\ (\ ) |virtual| :ref:`🔗` -**Optional.**\ - Returns ``true`` if export options list is changed and presets should be updated. .. rst-class:: classref-item-separator @@ -613,6 +553,7 @@ Sets current configuration error message text. This method should be called only Set to ``true`` is export templates are missing from the current configuration. This method should be called only from the :ref:`_can_export()`, :ref:`_has_valid_export_configuration()`, or :ref:`_has_valid_project_configuration()` implementations. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorexportplatformios.rst b/classes/class_editorexportplatformios.rst index b332db5d9..ba8047c47 100644 --- a/classes/class_editorexportplatformios.rst +++ b/classes/class_editorexportplatformios.rst @@ -3453,6 +3453,7 @@ If ``true``, the app "Documents" folder can be accessed via "Files" app. See `LS If ``true``, the app "Documents" folder can be accessed via iTunes file sharing. See `UIFileSharingEnabled `__. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorexportplatformlinuxbsd.rst b/classes/class_editorexportplatformlinuxbsd.rst index bb2798a75..067d001bc 100644 --- a/classes/class_editorexportplatformlinuxbsd.rst +++ b/classes/class_editorexportplatformlinuxbsd.rst @@ -271,6 +271,7 @@ If ``true``, project textures are exported in the ETC2/ASTC format. If ``true``, project textures are exported in the S3TC/BPTC format. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorexportplatformmacos.rst b/classes/class_editorexportplatformmacos.rst index 32cc62f73..b1222d7bc 100644 --- a/classes/class_editorexportplatformmacos.rst +++ b/classes/class_editorexportplatformmacos.rst @@ -3399,6 +3399,7 @@ Xcode build number used to build application executable. Xcode version used to build application executable. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorexportplatformpc.rst b/classes/class_editorexportplatformpc.rst index ddffd7ba3..6143c02a4 100644 --- a/classes/class_editorexportplatformpc.rst +++ b/classes/class_editorexportplatformpc.rst @@ -33,6 +33,7 @@ Tutorials - :doc:`Exporting for Linux <../tutorials/export/exporting_for_linux>` .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorexportplatformvisionos.rst b/classes/class_editorexportplatformvisionos.rst index 11b20ea30..fbe2edf9e 100644 --- a/classes/class_editorexportplatformvisionos.rst +++ b/classes/class_editorexportplatformvisionos.rst @@ -2699,6 +2699,7 @@ If ``true``, the app "Documents" folder can be accessed via "Files" app. See `LS If ``true``, the app "Documents" folder can be accessed via iTunes file sharing. See `UIFileSharingEnabled `__. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorexportplatformweb.rst b/classes/class_editorexportplatformweb.rst index 753d1290c..bcbf7608a 100644 --- a/classes/class_editorexportplatformweb.rst +++ b/classes/class_editorexportplatformweb.rst @@ -75,8 +75,12 @@ Properties +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`int` | :ref:`progressive_web_app/orientation` | +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`variant/emscripten_pool_size` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`variant/extensions_support` | +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`int` | :ref:`variant/godot_pool_size` | + +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`variant/thread_support` | +-----------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`vram_texture_compression/for_desktop` | @@ -331,6 +335,20 @@ The orientation to use when the web application is run through a mobile device. ---- +.. _class_EditorExportPlatformWeb_property_variant/emscripten_pool_size: + +.. rst-class:: classref-property + +:ref:`int` **variant/emscripten_pool_size** :ref:`🔗` + +The number of threads that emscripten will allocate at startup. A smaller value will allocate fewer threads and consume fewer system resources, but you may run the risk of running out of threads in the pool and needing to allocate more threads at run time which may cause a deadlock. + +\ **Note:** Some browsers have a hard cap on the number of threads that can be allocated, so it is best to be cautious and keep this number low. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformWeb_property_variant/extensions_support: .. rst-class:: classref-property @@ -343,6 +361,20 @@ If ``true`` enables :ref:`GDExtension` support for this web b ---- +.. _class_EditorExportPlatformWeb_property_variant/godot_pool_size: + +.. rst-class:: classref-property + +:ref:`int` **variant/godot_pool_size** :ref:`🔗` + +Override for the default size of the :ref:`WorkerThreadPool`. This setting is used when :ref:`ProjectSettings.threading/worker_pool/max_threads` size is set to -1 (which it is by default). This size must be smaller than :ref:`variant/emscripten_pool_size` otherwise deadlocks may occur. + +When using threads this size needs to be large enough to accommodate features that rely on having a dedicated thread like :ref:`ProjectSettings.physics/2d/run_on_separate_thread` or :ref:`ProjectSettings.rendering/driver/threads/thread_model`. In general, it is best to ensure that this is at least 4 and is at least 2 or 3 less than :ref:`variant/emscripten_pool_size`. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorExportPlatformWeb_property_variant/thread_support: .. rst-class:: classref-property @@ -378,6 +410,7 @@ If ``true``, allows textures to be optimized for desktop through the S3TC/BPTC a If ``true`` allows textures to be optimized for mobile through the ETC2/ASTC algorithm. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorexportplatformwindows.rst b/classes/class_editorexportplatformwindows.rst index 09e069aa3..2e88873fc 100644 --- a/classes/class_editorexportplatformwindows.rst +++ b/classes/class_editorexportplatformwindows.rst @@ -606,6 +606,7 @@ If ``true``, project textures are exported in the ETC2/ASTC format. If ``true``, project textures are exported in the S3TC/BPTC format. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorexportplugin.rst b/classes/class_editorexportplugin.rst index b7afdeb7c..b8e9b7457 100644 --- a/classes/class_editorexportplugin.rst +++ b/classes/class_editorexportplugin.rst @@ -43,9 +43,9 @@ Methods +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_begin_customize_scenes`\ (\ platform\: :ref:`EditorExportPlatform`, features\: :ref:`PackedStringArray`\ ) |virtual| |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Resource` | :ref:`_customize_resource`\ (\ resource\: :ref:`Resource`, path\: :ref:`String`\ ) |virtual| | + | :ref:`Resource` | :ref:`_customize_resource`\ (\ resource\: :ref:`Resource`, path\: :ref:`String`\ ) |virtual| |required| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`Node` | :ref:`_customize_scene`\ (\ scene\: :ref:`Node`, path\: :ref:`String`\ ) |virtual| | + | :ref:`Node` | :ref:`_customize_scene`\ (\ scene\: :ref:`Node`, path\: :ref:`String`\ ) |virtual| |required| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`_end_customize_resources`\ (\ ) |virtual| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -69,7 +69,7 @@ Methods +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`String` | :ref:`_get_android_manifest_element_contents`\ (\ platform\: :ref:`EditorExportPlatform`, debug\: :ref:`bool`\ ) |virtual| |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`int` | :ref:`_get_customization_configuration_hash`\ (\ ) |virtual| |const| | + | :ref:`int` | :ref:`_get_customization_configuration_hash`\ (\ ) |virtual| |required| |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`PackedStringArray` | :ref:`_get_export_features`\ (\ platform\: :ref:`EditorExportPlatform`, debug\: :ref:`bool`\ ) |virtual| |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -81,7 +81,7 @@ Methods +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`Dictionary` | :ref:`_get_export_options_overrides`\ (\ platform\: :ref:`EditorExportPlatform`\ ) |virtual| |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`String` | :ref:`_get_name`\ (\ ) |virtual| |const| | + | :ref:`String` | :ref:`_get_name`\ (\ ) |virtual| |required| |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | :ref:`bool` | :ref:`_should_update_export_options`\ (\ platform\: :ref:`EditorExportPlatform`\ ) |virtual| |const| | +------------------------------------------------------------------+------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -175,7 +175,7 @@ When enabled, :ref:`_get_customization_configuration_hash()` **_customize_resource**\ (\ resource\: :ref:`Resource`, path\: :ref:`String`\ ) |virtual| :ref:`🔗` +:ref:`Resource` **_customize_resource**\ (\ resource\: :ref:`Resource`, path\: :ref:`String`\ ) |virtual| |required| :ref:`🔗` Customize a resource. If changes are made to it, return the same or a new resource. Otherwise, return ``null``. When a new resource is returned, ``resource`` will be replaced by a copy of the new resource. @@ -205,7 +205,7 @@ Implementing this method is required if :ref:`_begin_customize_resources()` **_customize_scene**\ (\ scene\: :ref:`Node`, path\: :ref:`String`\ ) |virtual| :ref:`🔗` +:ref:`Node` **_customize_scene**\ (\ scene\: :ref:`Node`, path\: :ref:`String`\ ) |virtual| |required| :ref:`🔗` Customize a scene. If changes are made to it, return the same or a new scene. Otherwise, return ``null``. If a new scene is returned, it is up to you to dispose of the old one. @@ -373,7 +373,7 @@ Virtual method to be overridden by the user. This is used at export time to upda .. rst-class:: classref-method -:ref:`int` **_get_customization_configuration_hash**\ (\ ) |virtual| |const| :ref:`🔗` +:ref:`int` **_get_customization_configuration_hash**\ (\ ) |virtual| |required| |const| :ref:`🔗` Return a hash based on the configuration passed (for both scenes and resources). This helps keep separate caches for separate export configurations. @@ -401,8 +401,6 @@ Return a :ref:`PackedStringArray` of additional feature :ref:`bool` **_get_export_option_visibility**\ (\ platform\: :ref:`EditorExportPlatform`, option\: :ref:`String`\ ) |virtual| |const| :ref:`🔗` -**Optional.**\ - Validates ``option`` and returns the visibility for the specified ``platform``. The default implementation returns ``true`` for all options. .. rst-class:: classref-item-separator @@ -456,13 +454,13 @@ Return a :ref:`Dictionary` of override values for export optio class MyExportPlugin extends EditorExportPlugin: func _get_name() -> String: return "MyExportPlugin" - + func _supports_platform(platform) -> bool: if platform is EditorExportPlatformPC: # Run on all desktop platforms including Windows, MacOS and Linux. return true return false - + func _get_export_options_overrides(platform) -> Dictionary: # Override "Embed PCK" to always be enabled. return { @@ -477,7 +475,7 @@ Return a :ref:`Dictionary` of override values for export optio .. rst-class:: classref-method -:ref:`String` **_get_name**\ (\ ) |virtual| |const| :ref:`🔗` +:ref:`String` **_get_name**\ (\ ) |virtual| |required| |const| :ref:`🔗` Return the name identifier of this plugin (for future identification by the exporter). The plugins are sorted by name before exporting. @@ -808,6 +806,7 @@ Returns the current value of an export option supplied by :ref:`_get_export_opti To be called inside :ref:`_export_file()`. Skips the current file, so it's not included in the export. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorexportpreset.rst b/classes/class_editorexportpreset.rst index eb14fe878..dc58a0cbd 100644 --- a/classes/class_editorexportpreset.rst +++ b/classes/class_editorexportpreset.rst @@ -568,6 +568,7 @@ Returns ``true`` if dedicated server export mode is selected in the export dialo Returns ``true`` if "Runnable" toggle is enabled in the export dialog. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorfeatureprofile.rst b/classes/class_editorfeatureprofile.rst index e22cf0311..5aa2921d7 100644 --- a/classes/class_editorfeatureprofile.rst +++ b/classes/class_editorfeatureprofile.rst @@ -292,6 +292,7 @@ If ``disable`` is ``true``, disables editing for ``property`` in the class speci If ``disable`` is ``true``, disables the editor feature specified in ``feature``. When a feature is disabled, it will disappear from the editor entirely. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorfiledialog.rst b/classes/class_editorfiledialog.rst index 4d363af0e..90d5d2412 100644 --- a/classes/class_editorfiledialog.rst +++ b/classes/class_editorfiledialog.rst @@ -393,7 +393,7 @@ The view format in which the **EditorFileDialog** displays resources to the user - |void| **set_file_mode**\ (\ value\: :ref:`FileMode`\ ) - :ref:`FileMode` **get_file_mode**\ (\ ) -The dialog's open or save mode, which affects the selection behavior. See :ref:`FileMode`. +The dialog's open or save mode, which affects the selection behavior. .. rst-class:: classref-item-separator @@ -680,6 +680,7 @@ Sets the name of the :ref:`OptionButton` or :ref:`CheckBox` with index ``option``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorfilesystem.rst b/classes/class_editorfilesystem.rst index 8f9d312ee..63eff4f6c 100644 --- a/classes/class_editorfilesystem.rst +++ b/classes/class_editorfilesystem.rst @@ -248,6 +248,7 @@ Add a file in an existing directory, or schedule file information to be updated This will not import the file. To reimport, call :ref:`reimport_files()` or :ref:`scan()` methods. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorfilesystemdirectory.rst b/classes/class_editorfilesystemdirectory.rst index 421b8d2ee..2b9acb92a 100644 --- a/classes/class_editorfilesystemdirectory.rst +++ b/classes/class_editorfilesystemdirectory.rst @@ -233,6 +233,7 @@ Returns the subdirectory at index ``idx``. Returns the number of subdirectories in this directory. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorfilesystemimportformatsupportquery.rst b/classes/class_editorfilesystemimportformatsupportquery.rst index 527bf1db2..98bbf9302 100644 --- a/classes/class_editorfilesystemimportformatsupportquery.rst +++ b/classes/class_editorfilesystemimportformatsupportquery.rst @@ -29,13 +29,13 @@ Methods .. table:: :widths: auto - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`PackedStringArray` | :ref:`_get_file_extensions`\ (\ ) |virtual| |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_is_active`\ (\ ) |virtual| |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ - | :ref:`bool` | :ref:`_query`\ (\ ) |virtual| |const| | - +---------------------------------------------------+-----------------------------------------------------------------------------------------------------------------------------------------+ + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`PackedStringArray` | :ref:`_get_file_extensions`\ (\ ) |virtual| |required| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_is_active`\ (\ ) |virtual| |required| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`bool` | :ref:`_query`\ (\ ) |virtual| |required| |const| | + +---------------------------------------------------+----------------------------------------------------------------------------------------------------------------------------------------------------+ .. rst-class:: classref-section-separator @@ -50,7 +50,7 @@ Method Descriptions .. rst-class:: classref-method -:ref:`PackedStringArray` **_get_file_extensions**\ (\ ) |virtual| |const| :ref:`🔗` +:ref:`PackedStringArray` **_get_file_extensions**\ (\ ) |virtual| |required| |const| :ref:`🔗` Return the file extensions supported. @@ -62,7 +62,7 @@ Return the file extensions supported. .. rst-class:: classref-method -:ref:`bool` **_is_active**\ (\ ) |virtual| |const| :ref:`🔗` +:ref:`bool` **_is_active**\ (\ ) |virtual| |required| |const| :ref:`🔗` Return whether this importer is active. @@ -74,11 +74,12 @@ Return whether this importer is active. .. rst-class:: classref-method -:ref:`bool` **_query**\ (\ ) |virtual| |const| :ref:`🔗` +:ref:`bool` **_query**\ (\ ) |virtual| |required| |const| :ref:`🔗` Query support. Return ``false`` if import must not continue. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorimportplugin.rst b/classes/class_editorimportplugin.rst index b5681426a..7771076a0 100644 --- a/classes/class_editorimportplugin.rst +++ b/classes/class_editorimportplugin.rst @@ -32,82 +32,82 @@ Below is an example EditorImportPlugin that imports a :ref:`Mesh` fr @tool extends EditorImportPlugin - + func _get_importer_name(): return "my.special.plugin" - + func _get_visible_name(): return "Special Mesh" - + func _get_recognized_extensions(): return ["special", "spec"] - + func _get_save_extension(): return "mesh" - + func _get_resource_type(): return "Mesh" - + func _get_preset_count(): return 1 - + func _get_preset_name(preset_index): return "Default" - + func _get_import_options(path, preset_index): return [{"name": "my_option", "default_value": false}] - + func _import(source_file, save_path, options, platform_variants, gen_files): var file = FileAccess.open(source_file, FileAccess.READ) if file == null: return FAILED var mesh = ArrayMesh.new() # Fill the Mesh with data read in "file", left as an exercise to the reader. - + var filename = save_path + "." + _get_save_extension() return ResourceSaver.save(mesh, filename) .. code-tab:: csharp using Godot; - + public partial class MySpecialPlugin : EditorImportPlugin { public override string _GetImporterName() { return "my.special.plugin"; } - + public override string _GetVisibleName() { return "Special Mesh"; } - + public override string[] _GetRecognizedExtensions() { return ["special", "spec"]; } - + public override string _GetSaveExtension() { return "mesh"; } - + public override string _GetResourceType() { return "Mesh"; } - + public override int _GetPresetCount() { return 1; } - + public override string _GetPresetName(int presetIndex) { return "Default"; } - + public override Godot.Collections.Array _GetImportOptions(string path, int presetIndex) { return @@ -119,7 +119,7 @@ Below is an example EditorImportPlugin that imports a :ref:`Mesh` fr }, ]; } - + public override Error _Import(string sourceFile, string savePath, Godot.Collections.Dictionary options, Godot.Collections.Array platformVariants, Godot.Collections.Array genFiles) { using var file = FileAccess.Open(sourceFile, FileAccess.ModeFlags.Read); @@ -127,7 +127,7 @@ Below is an example EditorImportPlugin that imports a :ref:`Mesh` fr { return Error.Failed; } - + var mesh = new ArrayMesh(); // Fill the Mesh with data read in "file", left as an exercise to the reader. string filename = $"{savePath}.{_GetSaveExtension()}"; @@ -276,7 +276,7 @@ Gets whether the import option specified by ``option_name`` should be visible in # Only show the lossy quality setting if the compression mode is set to "Lossy". if option == "compress/lossy_quality" and options.has("compress/mode"): return int(options["compress/mode"]) == COMPRESS_LOSSY # This is a constant that you set - + return true .. code-tab:: csharp @@ -288,7 +288,7 @@ Gets whether the import option specified by ``option_name`` should be visible in { return (int)options["compress/mode"] == CompressLossy; // This is a constant you set } - + return true; } @@ -409,6 +409,7 @@ This method must be overridden to do the actual importing work. See this class' This function can only be called during the :ref:`_import()` callback and it allows manually importing resources from it. This is useful when the imported file generates external resources that require importing (as example, images). Custom parameters for the ".import" file can be passed via the ``custom_options``. Additionally, in cases where multiple importers can handle a file, the ``custom_importer`` can be specified to force a specific one. This function performs a resource import and returns immediately with a success or error code. ``generator_parameters`` defines optional extra metadata which will be stored as ``generator_parameters`` in the ``remap`` section of the ``.import`` file, for example to store a md5 hash of the source data. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorinspector.rst b/classes/class_editorinspector.rst index c5c24ab46..27ff7a11d 100644 --- a/classes/class_editorinspector.rst +++ b/classes/class_editorinspector.rst @@ -238,6 +238,7 @@ Gets the path of the currently selected property. Creates a property editor that can be used by plugin UI to edit the specified property of an ``object``. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorinspectorplugin.rst b/classes/class_editorinspectorplugin.rst index 647a9e34f..c735b90b0 100644 --- a/classes/class_editorinspectorplugin.rst +++ b/classes/class_editorinspectorplugin.rst @@ -186,6 +186,7 @@ There can be multiple property editors for a property. If ``add_to_end`` is ``tr Adds an editor that allows modifying multiple properties. The ``editor`` control must extend :ref:`EditorProperty`. .. |virtual| replace:: :abbr:`virtual (This method should typically be overridden by the user to have any effect.)` +.. |required| replace:: :abbr:`required (This method is required to be overridden when extending its base class.)` .. |const| replace:: :abbr:`const (This method has no side effects. It doesn't modify any of the instance's member variables.)` .. |vararg| replace:: :abbr:`vararg (This method accepts any number of arguments after the ones described here.)` .. |constructor| replace:: :abbr:`constructor (This method is used to construct a type.)` diff --git a/classes/class_editorinterface.rst b/classes/class_editorinterface.rst index ef4a9c082..9e412ea3e 100644 --- a/classes/class_editorinterface.rst +++ b/classes/class_editorinterface.rst @@ -59,6 +59,8 @@ Methods .. table:: :widths: auto + +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ + | :ref:`Error` | :ref:`close_scene`\ (\ ) | +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ | |void| | :ref:`edit_node`\ (\ node\: :ref:`Node`\ ) | +----------------------------------------------------------------+--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ @@ -223,6 +225,18 @@ If ``true``, the Movie Maker mode is enabled in the editor. See :ref:`MovieWrite Method Descriptions ------------------- +.. _class_EditorInterface_method_close_scene: + +.. rst-class:: classref-method + +:ref:`Error` **close_scene**\ (\ ) :ref:`🔗` + +Closes the currently active scene, discarding any pending changes in the process. Returns :ref:`@GlobalScope.OK` on success or :ref:`@GlobalScope.ERR_DOES_NOT_EXIST` if there is no scene to close. + +.. rst-class:: classref-item-separator + +---- + .. _class_EditorInterface_method_edit_node: .. rst-class:: classref-method @@ -816,7 +830,7 @@ Pops up an editor dialog for selecting a :ref:`Node` from the edited func _ready(): if Engine.is_editor_hint(): EditorInterface.popup_node_selector(_on_node_selected, ["Button"]) - + func _on_node_selected(node_path): if node_path.is_empty(): print("node selection canceled") @@ -840,7 +854,7 @@ Pops up an editor dialog for selecting properties from ``object``. The ``callbac func _ready(): if Engine.is_editor_hint(): EditorInterface.popup_property_selector(this, _on_property_selected, [TYPE_INT]) - + func _on_property_selected(property_path): if property_path.is_empty(): print("property selection canceled") @@ -919,6 +933,8 @@ Saves the currently active scene. Returns either :ref:`@GlobalScope.OK