diff options
Diffstat (limited to 'doc/classes')
459 files changed, 20001 insertions, 28381 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index 66511f5845..755902c709 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -11,18 +11,14 @@ </tutorials> <methods> <method name="abs"> - <return type="Variant"> - </return> - <argument index="0" name="x" type="Variant"> - </argument> + <return type="Variant" /> + <argument index="0" name="x" type="Variant" /> <description> </description> </method> <method name="absf"> - <return type="float"> - </return> - <argument index="0" name="x" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="x" type="float" /> <description> Returns the absolute value of float parameter [code]x[/code] (i.e. positive value). [codeblock] @@ -32,10 +28,8 @@ </description> </method> <method name="absi"> - <return type="int"> - </return> - <argument index="0" name="x" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="x" type="int" /> <description> Returns the absolute value of int parameter [code]x[/code] (i.e. positive value). [codeblock] @@ -45,10 +39,8 @@ </description> </method> <method name="acos"> - <return type="float"> - </return> - <argument index="0" name="x" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="x" type="float" /> <description> Returns the arc cosine of [code]x[/code] in radians. Use to get the angle of cosine [code]x[/code]. [code]x[/code] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method acos] will return [constant @GDScript.NAN]. [codeblock] @@ -58,10 +50,8 @@ </description> </method> <method name="asin"> - <return type="float"> - </return> - <argument index="0" name="x" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="x" type="float" /> <description> Returns the arc sine of [code]x[/code] in radians. Use to get the angle of sine [code]x[/code]. [code]x[/code] must be between [code]-1.0[/code] and [code]1.0[/code] (inclusive), otherwise, [method asin] will return [constant @GDScript.NAN]. [codeblock] @@ -71,10 +61,8 @@ </description> </method> <method name="atan"> - <return type="float"> - </return> - <argument index="0" name="x" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="x" type="float" /> <description> Returns the arc tangent of [code]x[/code] in radians. Use it to get the angle from an angle's tangent in trigonometry: [code]atan(tan(angle)) == angle[/code]. The method cannot know in which quadrant the angle should fall. See [method atan2] if you have both [code]y[/code] and [code]x[/code]. @@ -84,12 +72,9 @@ </description> </method> <method name="atan2"> - <return type="float"> - </return> - <argument index="0" name="y" type="float"> - </argument> - <argument index="1" name="x" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="y" type="float" /> + <argument index="1" name="x" type="float" /> <description> Returns the arc tangent of [code]y/x[/code] in radians. Use to get the angle of tangent [code]y/x[/code]. To compute the value, the method takes into account the sign of both arguments in order to determine the quadrant. Important note: The Y coordinate comes first, by convention. @@ -99,41 +84,24 @@ </description> </method> <method name="bytes2var"> - <return type="Variant"> - </return> - <argument index="0" name="bytes" type="PackedByteArray"> - </argument> + <return type="Variant" /> + <argument index="0" name="bytes" type="PackedByteArray" /> <description> Decodes a byte array back to a [Variant] value, without decoding objects. [b]Note:[/b] If you need object deserialization, see [method bytes2var_with_objects]. </description> </method> <method name="bytes2var_with_objects"> - <return type="Variant"> - </return> - <argument index="0" name="bytes" type="PackedByteArray"> - </argument> + <return type="Variant" /> + <argument index="0" name="bytes" type="PackedByteArray" /> <description> Decodes a byte array back to a [Variant] value. Decoding objects is allowed. - [b]WARNING:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution). - </description> - </method> - <method name="cartesian2polar"> - <return type="Vector2"> - </return> - <argument index="0" name="x" type="float"> - </argument> - <argument index="1" name="y" type="float"> - </argument> - <description> - Converts a 2D point expressed in the cartesian coordinate system (X and Y axis) to the polar coordinate system (a distance from the origin and an angle). + [b]Warning:[/b] Deserialized object can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats (remote code execution). </description> </method> <method name="ceil"> - <return type="float"> - </return> - <argument index="0" name="x" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="x" type="float" /> <description> Rounds [code]x[/code] upward (towards positive infinity), returning the smallest whole number that is not less than [code]x[/code]. [codeblock] @@ -144,26 +112,18 @@ </description> </method> <method name="clamp"> - <return type="Variant"> - </return> - <argument index="0" name="value" type="Variant"> - </argument> - <argument index="1" name="min" type="Variant"> - </argument> - <argument index="2" name="max" type="Variant"> - </argument> + <return type="Variant" /> + <argument index="0" name="value" type="Variant" /> + <argument index="1" name="min" type="Variant" /> + <argument index="2" name="max" type="Variant" /> <description> </description> </method> <method name="clampf"> - <return type="float"> - </return> - <argument index="0" name="value" type="float"> - </argument> - <argument index="1" name="min" type="float"> - </argument> - <argument index="2" name="max" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="value" type="float" /> + <argument index="1" name="min" type="float" /> + <argument index="2" name="max" type="float" /> <description> Clamps the float [code]value[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code]. [codeblock] @@ -178,14 +138,10 @@ </description> </method> <method name="clampi"> - <return type="int"> - </return> - <argument index="0" name="value" type="int"> - </argument> - <argument index="1" name="min" type="int"> - </argument> - <argument index="2" name="max" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="value" type="int" /> + <argument index="1" name="min" type="int" /> + <argument index="2" name="max" type="int" /> <description> Clamps the integer [code]value[/code] and returns a value not less than [code]min[/code] and not more than [code]max[/code]. [codeblock] @@ -200,10 +156,8 @@ </description> </method> <method name="cos"> - <return type="float"> - </return> - <argument index="0" name="angle_rad" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="angle_rad" type="float" /> <description> Returns the cosine of angle [code]angle_rad[/code] in radians. [codeblock] @@ -214,10 +168,8 @@ </description> </method> <method name="cosh"> - <return type="float"> - </return> - <argument index="0" name="x" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="x" type="float" /> <description> Returns the hyperbolic cosine of [code]x[/code] in radians. [codeblock] @@ -227,36 +179,15 @@ </description> </method> <method name="db2linear"> - <return type="float"> - </return> - <argument index="0" name="db" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="db" type="float" /> <description> Converts from decibels to linear energy (audio). </description> </method> - <method name="dectime"> - <return type="float"> - </return> - <argument index="0" name="value" type="float"> - </argument> - <argument index="1" name="amount" type="float"> - </argument> - <argument index="2" name="step" type="float"> - </argument> - <description> - Returns the result of [code]value[/code] decreased by [code]step[/code] * [code]amount[/code]. - [codeblock] - # a = 59 - a = dectime(60, 10, 0.1)) - [/codeblock] - </description> - </method> <method name="deg2rad"> - <return type="float"> - </return> - <argument index="0" name="deg" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="deg" type="float" /> <description> Converts an angle expressed in degrees to radians. [codeblock] @@ -266,21 +197,23 @@ </description> </method> <method name="ease"> - <return type="float"> - </return> - <argument index="0" name="x" type="float"> - </argument> - <argument index="1" name="curve" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="x" type="float" /> + <argument index="1" name="curve" type="float" /> <description> Easing function, based on exponent. The curve values are: 0 is constant, 1 is linear, 0 to 1 is ease-in, 1+ is ease out. Negative values are in-out/out in. </description> </method> + <method name="error_string"> + <return type="String" /> + <argument index="0" name="error" type="int" /> + <description> + Returns a human-readable name for the given error code. + </description> + </method> <method name="exp"> - <return type="float"> - </return> - <argument index="0" name="x" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="x" type="float" /> <description> The natural exponential function. It raises the mathematical constant [b]e[/b] to the power of [code]x[/code] and returns it. [b]e[/b] has an approximate value of 2.71828, and can be obtained with [code]exp(1)[/code]. @@ -291,10 +224,8 @@ </description> </method> <method name="floor"> - <return type="float"> - </return> - <argument index="0" name="x" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="x" type="float" /> <description> Rounds [code]x[/code] downward (towards negative infinity), returning the largest whole number that is not more than [code]x[/code]. [codeblock] @@ -308,12 +239,9 @@ </description> </method> <method name="fmod"> - <return type="float"> - </return> - <argument index="0" name="x" type="float"> - </argument> - <argument index="1" name="y" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="x" type="float" /> + <argument index="1" name="y" type="float" /> <description> Returns the floating-point remainder of [code]x/y[/code], keeping the sign of [code]x[/code]. [codeblock] @@ -324,12 +252,9 @@ </description> </method> <method name="fposmod"> - <return type="float"> - </return> - <argument index="0" name="x" type="float"> - </argument> - <argument index="1" name="y" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="x" type="float" /> + <argument index="1" name="y" type="float" /> <description> Returns the floating-point modulus of [code]x/y[/code] that wraps equally in positive and negative. [codeblock] @@ -350,10 +275,8 @@ </description> </method> <method name="hash"> - <return type="int"> - </return> - <argument index="0" name="variable" type="Variant"> - </argument> + <return type="int" /> + <argument index="0" name="variable" type="Variant" /> <description> Returns the integer hash of the variable passed. [codeblock] @@ -362,10 +285,8 @@ </description> </method> <method name="instance_from_id"> - <return type="Object"> - </return> - <argument index="0" name="instance_id" type="int"> - </argument> + <return type="Object" /> + <argument index="0" name="instance_id" type="int" /> <description> Returns the Object that corresponds to [code]instance_id[/code]. All Objects have a unique instance ID. [codeblock] @@ -378,14 +299,10 @@ </description> </method> <method name="inverse_lerp"> - <return type="float"> - </return> - <argument index="0" name="from" type="float"> - </argument> - <argument index="1" name="to" type="float"> - </argument> - <argument index="2" name="weight" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="from" type="float" /> + <argument index="1" name="to" type="float" /> + <argument index="2" name="weight" type="float" /> <description> Returns a normalized value considering the given range. This is the opposite of [method lerp]. [codeblock] @@ -398,12 +315,9 @@ </description> </method> <method name="is_equal_approx"> - <return type="bool"> - </return> - <argument index="0" name="a" type="float"> - </argument> - <argument index="1" name="b" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="a" type="float" /> + <argument index="1" name="b" type="float" /> <description> Returns [code]true[/code] if [code]a[/code] and [code]b[/code] are approximately equal to each other. Here, approximately equal means that [code]a[/code] and [code]b[/code] are within a small internal epsilon of each other, which scales with the magnitude of the numbers. @@ -411,59 +325,45 @@ </description> </method> <method name="is_inf"> - <return type="bool"> - </return> - <argument index="0" name="x" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="x" type="float" /> <description> Returns whether [code]x[/code] is an infinity value (either positive infinity or negative infinity). </description> </method> <method name="is_instance_id_valid"> - <return type="bool"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="id" type="int" /> <description> </description> </method> <method name="is_instance_valid"> - <return type="bool"> - </return> - <argument index="0" name="instance" type="Variant"> - </argument> + <return type="bool" /> + <argument index="0" name="instance" type="Variant" /> <description> Returns whether [code]instance[/code] is a valid object (e.g. has not been deleted from memory). </description> </method> <method name="is_nan"> - <return type="bool"> - </return> - <argument index="0" name="x" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="x" type="float" /> <description> Returns whether [code]x[/code] is a NaN ("Not a Number" or invalid) value. </description> </method> <method name="is_zero_approx"> - <return type="bool"> - </return> - <argument index="0" name="x" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="x" type="float" /> <description> Returns [code]true[/code] if [code]x[/code] is zero or almost zero. This method is faster than using [method is_equal_approx] with one value as zero. </description> </method> <method name="lerp"> - <return type="float"> - </return> - <argument index="0" name="from" type="float"> - </argument> - <argument index="1" name="to" type="float"> - </argument> - <argument index="2" name="weight" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="from" type="float" /> + <argument index="1" name="to" type="float" /> + <argument index="2" name="weight" type="float" /> <description> Linearly interpolates between two values by a normalized value. This is the opposite of [method inverse_lerp]. [codeblock] @@ -472,14 +372,10 @@ </description> </method> <method name="lerp_angle"> - <return type="float"> - </return> - <argument index="0" name="from" type="float"> - </argument> - <argument index="1" name="to" type="float"> - </argument> - <argument index="2" name="weight" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="from" type="float" /> + <argument index="1" name="to" type="float" /> + <argument index="2" name="weight" type="float" /> <description> Linearly interpolates between two angles (in radians) by a normalized value. Similar to [method lerp], but interpolates correctly when the angles wrap around [constant @GDScript.TAU]. @@ -495,10 +391,8 @@ </description> </method> <method name="linear2db"> - <return type="float"> - </return> - <argument index="0" name="lin" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="lin" type="float" /> <description> Converts from linear energy to decibels (audio). This can be used to implement volume sliders that behave as expected (since volume isn't linear). Example: [codeblock] @@ -510,10 +404,8 @@ </description> </method> <method name="log"> - <return type="float"> - </return> - <argument index="0" name="x" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="x" type="float" /> <description> Natural logarithm. The amount of time needed to reach a certain level of continuous growth. [b]Note:[/b] This is not the same as the "log" function on most calculators, which uses a base 10 logarithm. @@ -524,8 +416,7 @@ </description> </method> <method name="max" qualifiers="vararg"> - <return type="Variant"> - </return> + <return type="Variant" /> <description> Returns the maximum of the given values. This method can take any number of arguments. [codeblock] @@ -534,12 +425,9 @@ </description> </method> <method name="maxf"> - <return type="float"> - </return> - <argument index="0" name="a" type="float"> - </argument> - <argument index="1" name="b" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="a" type="float" /> + <argument index="1" name="b" type="float" /> <description> Returns the maximum of two float values. [codeblock] @@ -549,12 +437,9 @@ </description> </method> <method name="maxi"> - <return type="int"> - </return> - <argument index="0" name="a" type="int"> - </argument> - <argument index="1" name="b" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="a" type="int" /> + <argument index="1" name="b" type="int" /> <description> Returns the maximum of two int values. [codeblock] @@ -564,8 +449,7 @@ </description> </method> <method name="min" qualifiers="vararg"> - <return type="Variant"> - </return> + <return type="Variant" /> <description> Returns the minimum of the given values. This method can take any number of arguments. [codeblock] @@ -574,12 +458,9 @@ </description> </method> <method name="minf"> - <return type="float"> - </return> - <argument index="0" name="a" type="float"> - </argument> - <argument index="1" name="b" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="a" type="float" /> + <argument index="1" name="b" type="float" /> <description> Returns the minimum of two float values. [codeblock] @@ -589,12 +470,9 @@ </description> </method> <method name="mini"> - <return type="int"> - </return> - <argument index="0" name="a" type="int"> - </argument> - <argument index="1" name="b" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="a" type="int" /> + <argument index="1" name="b" type="int" /> <description> Returns the minimum of two int values. [codeblock] @@ -604,14 +482,10 @@ </description> </method> <method name="move_toward"> - <return type="float"> - </return> - <argument index="0" name="from" type="float"> - </argument> - <argument index="1" name="to" type="float"> - </argument> - <argument index="2" name="delta" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="from" type="float" /> + <argument index="1" name="to" type="float" /> + <argument index="2" name="delta" type="float" /> <description> Moves [code]from[/code] toward [code]to[/code] by the [code]delta[/code] value. Use a negative [code]delta[/code] value to move away. @@ -623,10 +497,8 @@ </description> </method> <method name="nearest_po2"> - <return type="int"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="value" type="int" /> <description> Returns the nearest equal or larger power of 2 for integer [code]value[/code]. In other words, returns the smallest value [code]a[/code] where [code]a = pow(2, n)[/code] such that [code]value <= a[/code] for some non-negative integer [code]n[/code]. @@ -638,27 +510,13 @@ nearest_po2(0) # Returns 0 (this may not be what you expect) nearest_po2(-1) # Returns 0 (this may not be what you expect) [/codeblock] - [b]WARNING:[/b] Due to the way it is implemented, this function returns [code]0[/code] rather than [code]1[/code] for non-positive values of [code]value[/code] (in reality, 1 is the smallest integer power of 2). - </description> - </method> - <method name="polar2cartesian"> - <return type="Vector2"> - </return> - <argument index="0" name="r" type="float"> - </argument> - <argument index="1" name="th" type="float"> - </argument> - <description> - Converts a 2D point expressed in the polar coordinate system (a distance from the origin [code]r[/code] and an angle [code]th[/code]) to the cartesian coordinate system (X and Y axis). + [b]Warning:[/b] Due to the way it is implemented, this function returns [code]0[/code] rather than [code]1[/code] for non-positive values of [code]value[/code] (in reality, 1 is the smallest integer power of 2). </description> </method> <method name="posmod"> - <return type="int"> - </return> - <argument index="0" name="x" type="int"> - </argument> - <argument index="1" name="y" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="x" type="int" /> + <argument index="1" name="y" type="int" /> <description> Returns the integer modulus of [code]x/y[/code] that wraps equally in positive and negative. [codeblock] @@ -678,12 +536,9 @@ </description> </method> <method name="pow"> - <return type="float"> - </return> - <argument index="0" name="base" type="float"> - </argument> - <argument index="1" name="exp" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="base" type="float" /> + <argument index="1" name="exp" type="float" /> <description> Returns the result of [code]base[/code] raised to the power of [code]exp[/code]. [codeblock] @@ -754,10 +609,8 @@ </description> </method> <method name="rad2deg"> - <return type="float"> - </return> - <argument index="0" name="rad" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="rad" type="float" /> <description> Converts an angle expressed in radians to degrees. [codeblock] @@ -766,17 +619,14 @@ </description> </method> <method name="rand_from_seed"> - <return type="PackedInt64Array"> - </return> - <argument index="0" name="seed" type="int"> - </argument> + <return type="PackedInt64Array" /> + <argument index="0" name="seed" type="int" /> <description> Random from seed: pass a [code]seed[/code], and an array with both number and new seed is returned. "Seed" here refers to the internal state of the pseudo random number generator. The internal state of the current implementation is 64 bits. </description> </method> <method name="randf"> - <return type="float"> - </return> + <return type="float" /> <description> Returns a random floating point value between [code]0.0[/code] and [code]1.0[/code] (inclusive). [codeblock] @@ -785,12 +635,9 @@ </description> </method> <method name="randf_range"> - <return type="float"> - </return> - <argument index="0" name="from" type="float"> - </argument> - <argument index="1" name="to" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="from" type="float" /> + <argument index="1" name="to" type="float" /> <description> Returns a random floating point value on the interval between [code]from[/code] and [code]to[/code] (inclusive). [codeblock] @@ -799,8 +646,7 @@ </description> </method> <method name="randi"> - <return type="int"> - </return> + <return type="int" /> <description> Returns a random unsigned 32-bit integer. Use remainder to obtain a random value in the interval [code][0, N - 1][/code] (where N is smaller than 2^32). [codeblock] @@ -812,12 +658,9 @@ </description> </method> <method name="randi_range"> - <return type="int"> - </return> - <argument index="0" name="from" type="int"> - </argument> - <argument index="1" name="to" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="from" type="int" /> + <argument index="1" name="to" type="int" /> <description> Returns a random signed 32-bit integer between [code]from[/code] and [code]to[/code] (inclusive). If [code]to[/code] is lesser than [code]from[/code], they are swapped. [codeblock] @@ -833,18 +676,12 @@ </description> </method> <method name="range_lerp"> - <return type="float"> - </return> - <argument index="0" name="value" type="float"> - </argument> - <argument index="1" name="istart" type="float"> - </argument> - <argument index="2" name="istop" type="float"> - </argument> - <argument index="3" name="ostart" type="float"> - </argument> - <argument index="4" name="ostop" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="value" type="float" /> + <argument index="1" name="istart" type="float" /> + <argument index="2" name="istop" type="float" /> + <argument index="3" name="ostart" type="float" /> + <argument index="4" name="ostop" type="float" /> <description> Maps a [code]value[/code] from range [code][istart, istop][/code] to [code][ostart, ostop][/code]. [codeblock] @@ -853,18 +690,27 @@ </description> </method> <method name="range_step_decimals"> - <return type="int"> - </return> - <argument index="0" name="x" type="float"> - </argument> + <return type="int" /> + <argument index="0" name="x" type="float" /> <description> </description> </method> + <method name="rid_allocate_id"> + <return type="int" /> + <description> + Allocate a unique ID which can be used by the implementation to construct a RID. This is used mainly from native extensions to implement servers. + </description> + </method> + <method name="rid_from_int64"> + <return type="RID" /> + <argument index="0" name="base" type="int" /> + <description> + Create a RID from an int64. This is used mainly from native extensions to build servers. + </description> + </method> <method name="round"> - <return type="float"> - </return> - <argument index="0" name="x" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="x" type="float" /> <description> Rounds [code]x[/code] to the nearest whole number, with halfway cases rounded away from zero. [codeblock] @@ -874,8 +720,7 @@ </description> </method> <method name="seed"> - <argument index="0" name="base" type="int"> - </argument> + <argument index="0" name="base" type="int" /> <description> Sets seed for the random number generator. [codeblock] @@ -885,18 +730,14 @@ </description> </method> <method name="sign"> - <return type="Variant"> - </return> - <argument index="0" name="x" type="Variant"> - </argument> + <return type="Variant" /> + <argument index="0" name="x" type="Variant" /> <description> </description> </method> <method name="signf"> - <return type="float"> - </return> - <argument index="0" name="x" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="x" type="float" /> <description> Returns the sign of [code]x[/code] as a float: -1.0 or 1.0. Returns 0.0 if [code]x[/code] is 0. [codeblock] @@ -907,10 +748,8 @@ </description> </method> <method name="signi"> - <return type="int"> - </return> - <argument index="0" name="x" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="x" type="int" /> <description> Returns the sign of [code]x[/code] as an integer: -1 or 1. Returns 0 if [code]x[/code] is 0. [codeblock] @@ -921,10 +760,8 @@ </description> </method> <method name="sin"> - <return type="float"> - </return> - <argument index="0" name="angle_rad" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="angle_rad" type="float" /> <description> Returns the sine of angle [code]angle_rad[/code] in radians. [codeblock] @@ -933,10 +770,8 @@ </description> </method> <method name="sinh"> - <return type="float"> - </return> - <argument index="0" name="x" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="x" type="float" /> <description> Returns the hyperbolic sine of [code]x[/code]. [codeblock] @@ -946,14 +781,10 @@ </description> </method> <method name="smoothstep"> - <return type="float"> - </return> - <argument index="0" name="from" type="float"> - </argument> - <argument index="1" name="to" type="float"> - </argument> - <argument index="2" name="x" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="from" type="float" /> + <argument index="1" name="to" type="float" /> + <argument index="2" name="x" type="float" /> <description> Returns the result of smoothly interpolating the value of [code]x[/code] between [code]0[/code] and [code]1[/code], based on the where [code]x[/code] lies with respect to the edges [code]from[/code] and [code]to[/code]. The return value is [code]0[/code] if [code]x <= from[/code], and [code]1[/code] if [code]x >= to[/code]. If [code]x[/code] lies between [code]from[/code] and [code]to[/code], the returned value follows an S-shaped curve that maps [code]x[/code] between [code]0[/code] and [code]1[/code]. @@ -967,12 +798,9 @@ </description> </method> <method name="snapped"> - <return type="float"> - </return> - <argument index="0" name="x" type="float"> - </argument> - <argument index="1" name="step" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="x" type="float" /> + <argument index="1" name="step" type="float" /> <description> Snaps float value [code]x[/code] to a given [code]step[/code]. This can also be used to round a floating point number to an arbitrary number of decimals. [codeblock] @@ -983,10 +811,8 @@ </description> </method> <method name="sqrt"> - <return type="float"> - </return> - <argument index="0" name="x" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="x" type="float" /> <description> Returns the square root of [code]x[/code], where [code]x[/code] is a non-negative number. [codeblock] @@ -996,10 +822,8 @@ </description> </method> <method name="step_decimals"> - <return type="int"> - </return> - <argument index="0" name="x" type="float"> - </argument> + <return type="int" /> + <argument index="0" name="x" type="float" /> <description> Returns the position of the first non-zero digit, after the decimal point. Note that the maximum return value is 10, which is a design decision in the implementation. [codeblock] @@ -1013,17 +837,14 @@ </description> </method> <method name="str" qualifiers="vararg"> - <return type="String"> - </return> + <return type="String" /> <description> Converts one or more arguments of any type to string in the best way possible. </description> </method> <method name="str2var"> - <return type="Variant"> - </return> - <argument index="0" name="string" type="String"> - </argument> + <return type="Variant" /> + <argument index="0" name="string" type="String" /> <description> Converts a formatted string that was returned by [method var2str] to the original value. [codeblock] @@ -1034,10 +855,8 @@ </description> </method> <method name="tan"> - <return type="float"> - </return> - <argument index="0" name="angle_rad" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="angle_rad" type="float" /> <description> Returns the tangent of angle [code]angle_rad[/code] in radians. [codeblock] @@ -1046,10 +865,8 @@ </description> </method> <method name="tanh"> - <return type="float"> - </return> - <argument index="0" name="x" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="x" type="float" /> <description> Returns the hyperbolic tangent of [code]x[/code]. [codeblock] @@ -1059,10 +876,8 @@ </description> </method> <method name="typeof"> - <return type="int"> - </return> - <argument index="0" name="variable" type="Variant"> - </argument> + <return type="int" /> + <argument index="0" name="variable" type="Variant" /> <description> Returns the internal type of the given Variant object, using the [enum Variant.Type] values. [codeblock] @@ -1077,29 +892,23 @@ </description> </method> <method name="var2bytes"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="variable" type="Variant"> - </argument> + <return type="PackedByteArray" /> + <argument index="0" name="variable" type="Variant" /> <description> Encodes a [Variant] value to a byte array, without encoding objects. Deserialization can be done with [method bytes2var]. [b]Note:[/b] If you need object serialization, see [method var2bytes_with_objects]. </description> </method> <method name="var2bytes_with_objects"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="variable" type="Variant"> - </argument> + <return type="PackedByteArray" /> + <argument index="0" name="variable" type="Variant" /> <description> Encodes a [Variant] value to a byte array. Encoding objects is allowed (and can potentially include code). Deserialization can be done with [method bytes2var_with_objects]. </description> </method> <method name="var2str"> - <return type="String"> - </return> - <argument index="0" name="variable" type="Variant"> - </argument> + <return type="String" /> + <argument index="0" name="variable" type="Variant" /> <description> Converts a Variant [code]variable[/code] to a formatted string that can later be parsed using [method str2var]. [codeblock] @@ -1116,24 +925,18 @@ </description> </method> <method name="weakref"> - <return type="Variant"> - </return> - <argument index="0" name="obj" type="Variant"> - </argument> + <return type="Variant" /> + <argument index="0" name="obj" type="Variant" /> <description> Returns a weak reference to an object, or [code]null[/code] is the argument is invalid. A weak reference to an object is not enough to keep the object alive: when the only remaining references to a referent are weak references, garbage collection is free to destroy the referent and reuse its memory for something else. However, until the object is actually destroyed the weak reference may return the object even if there are no strong references to it. </description> </method> <method name="wrapf"> - <return type="float"> - </return> - <argument index="0" name="value" type="float"> - </argument> - <argument index="1" name="min" type="float"> - </argument> - <argument index="2" name="max" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="value" type="float" /> + <argument index="1" name="min" type="float" /> + <argument index="2" name="max" type="float" /> <description> Wraps float [code]value[/code] between [code]min[/code] and [code]max[/code]. Usable for creating loop-alike behavior or infinite surfaces. @@ -1154,14 +957,10 @@ </description> </method> <method name="wrapi"> - <return type="int"> - </return> - <argument index="0" name="value" type="int"> - </argument> - <argument index="1" name="min" type="int"> - </argument> - <argument index="2" name="max" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="value" type="int" /> + <argument index="1" name="min" type="int" /> + <argument index="2" name="max" type="int" /> <description> Wraps integer [code]value[/code] between [code]min[/code] and [code]max[/code]. Usable for creating loop-alike behavior or infinite surfaces. @@ -1259,6 +1058,8 @@ <member name="ResourceSaver" type="ResourceSaver" setter="" getter=""> The [ResourceSaver] singleton. </member> + <member name="ResourceUID" type="ResourceUID" setter="" getter=""> + </member> <member name="TextServerManager" type="TextServerManager" setter="" getter=""> The [TextServerManager] singleton. </member> @@ -1268,8 +1069,8 @@ <member name="TranslationServer" type="TranslationServer" setter="" getter=""> The [TranslationServer] singleton. </member> - <member name="VisualScriptEditor" type="VisualScriptEditor" setter="" getter=""> - The [VisualScriptEditor] singleton. + <member name="VisualScriptEditor" type="VisualScriptCustomNodes" setter="" getter=""> + The [VisualScriptCustomNodes] singleton. </member> <member name="XRServer" type="XRServer" setter="" getter=""> The [XRServer] singleton. @@ -1331,6 +1132,36 @@ <constant name="VALIGN_BOTTOM" value="2" enum="VAlign"> Vertical bottom alignment, usually for text-derived classes. </constant> + <constant name="INLINE_ALIGN_TOP_TO" value="0" enum="InlineAlign"> + Aligns the top of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGN_TO_*[/code] constant. + </constant> + <constant name="INLINE_ALIGN_CENTER_TO" value="1" enum="InlineAlign"> + Aligns the center of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGN_TO_*[/code] constant. + </constant> + <constant name="INLINE_ALIGN_BOTTOM_TO" value="2" enum="InlineAlign"> + Aligns the bottom of the inline object (e.g. image, table) to the position of the text specified by [code]INLINE_ALIGN_TO_*[/code] constant. + </constant> + <constant name="INLINE_ALIGN_TO_TOP" value="0" enum="InlineAlign"> + Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGN_*_TO[/code] constant to the top of the text. + </constant> + <constant name="INLINE_ALIGN_TO_CENTER" value="4" enum="InlineAlign"> + Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGN_*_TO[/code] constant to the center of the text. + </constant> + <constant name="INLINE_ALIGN_TO_BASELINE" value="8" enum="InlineAlign"> + Aligns the position of the inline object (e.g. image, table) specified by [code]INLINE_ALIGN_*_TO[/code] constant to the baseline of the text. + </constant> + <constant name="INLINE_ALIGN_TO_BOTTOM" value="12" enum="InlineAlign"> + Aligns inline object (e.g. image, table) to the bottom of the text. + </constant> + <constant name="INLINE_ALIGN_TOP" value="0" enum="InlineAlign"> + Aligns top of the inline object (e.g. image, table) to the top of the text. Equvalent to [code]INLINE_ALIGN_TOP_TO | INLINE_ALIGN_TO_TOP[/code]. + </constant> + <constant name="INLINE_ALIGN_CENTER" value="5" enum="InlineAlign"> + Aligns center of the inline object (e.g. image, table) to the center of the text. Equvalent to [code]INLINE_ALIGN_CENTER_TO | INLINE_ALIGN_TO_CENTER[/code]. + </constant> + <constant name="INLINE_ALIGN_BOTTOM" value="14" enum="InlineAlign"> + Aligns bottom of the inline object (e.g. image, table) to the bottom of the text. Equvalent to [code]INLINE_ALIGN_BOTTOM_TO | INLINE_ALIGN_TO_BOTTOM[/code]. + </constant> <constant name="SPKEY" value="16777216"> Keycodes with this bit applied are non-printable. </constant> @@ -2415,67 +2246,73 @@ <constant name="PROPERTY_HINT_ENUM" value="2" enum="PropertyHint"> Hints that an integer, float or string property is an enumerated value to pick in a list specified via a hint string such as [code]"Hello,Something,Else"[/code]. </constant> - <constant name="PROPERTY_HINT_EXP_EASING" value="3" enum="PropertyHint"> + <constant name="PROPERTY_HINT_ENUM_SUGGESTION" value="3" enum="PropertyHint"> + Hints that a string property is can be an enumerated value to pick in a list specified via a hint string such as [code]"Hello,Something,Else"[/code]. + Unlike [constant PROPERTY_HINT_ENUM] a property with this hint still accepts arbitrary values and can be empty. The list of values serves to suggest possible values. + </constant> + <constant name="PROPERTY_HINT_EXP_EASING" value="4" enum="PropertyHint"> Hints that a float property should be edited via an exponential easing function. The hint string can include [code]"attenuation"[/code] to flip the curve horizontally and/or [code]"inout"[/code] to also include in/out easing. </constant> - <constant name="PROPERTY_HINT_LENGTH" value="4" enum="PropertyHint"> + <constant name="PROPERTY_HINT_LENGTH" value="5" enum="PropertyHint"> Deprecated hint, unused. </constant> - <constant name="PROPERTY_HINT_KEY_ACCEL" value="5" enum="PropertyHint"> + <constant name="PROPERTY_HINT_KEY_ACCEL" value="6" enum="PropertyHint"> Deprecated hint, unused. </constant> - <constant name="PROPERTY_HINT_FLAGS" value="6" enum="PropertyHint"> + <constant name="PROPERTY_HINT_FLAGS" value="7" enum="PropertyHint"> Hints that an integer property is a bitmask with named bit flags. For example, to allow toggling bits 0, 1, 2 and 4, the hint could be something like [code]"Bit0,Bit1,Bit2,,Bit4"[/code]. </constant> - <constant name="PROPERTY_HINT_LAYERS_2D_RENDER" value="7" enum="PropertyHint"> + <constant name="PROPERTY_HINT_LAYERS_2D_RENDER" value="8" enum="PropertyHint"> Hints that an integer property is a bitmask using the optionally named 2D render layers. </constant> - <constant name="PROPERTY_HINT_LAYERS_2D_PHYSICS" value="8" enum="PropertyHint"> + <constant name="PROPERTY_HINT_LAYERS_2D_PHYSICS" value="9" enum="PropertyHint"> Hints that an integer property is a bitmask using the optionally named 2D physics layers. </constant> - <constant name="PROPERTY_HINT_LAYERS_2D_NAVIGATION" value="9" enum="PropertyHint"> + <constant name="PROPERTY_HINT_LAYERS_2D_NAVIGATION" value="10" enum="PropertyHint"> Hints that an integer property is a bitmask using the optionally named 2D navigation layers. </constant> - <constant name="PROPERTY_HINT_LAYERS_3D_RENDER" value="10" enum="PropertyHint"> + <constant name="PROPERTY_HINT_LAYERS_3D_RENDER" value="11" enum="PropertyHint"> Hints that an integer property is a bitmask using the optionally named 3D render layers. </constant> - <constant name="PROPERTY_HINT_LAYERS_3D_PHYSICS" value="11" enum="PropertyHint"> + <constant name="PROPERTY_HINT_LAYERS_3D_PHYSICS" value="12" enum="PropertyHint"> Hints that an integer property is a bitmask using the optionally named 3D physics layers. </constant> - <constant name="PROPERTY_HINT_LAYERS_3D_NAVIGATION" value="12" enum="PropertyHint"> + <constant name="PROPERTY_HINT_LAYERS_3D_NAVIGATION" value="13" enum="PropertyHint"> Hints that an integer property is a bitmask using the optionally named 2D navigation layers. </constant> - <constant name="PROPERTY_HINT_FILE" value="13" enum="PropertyHint"> + <constant name="PROPERTY_HINT_FILE" value="14" enum="PropertyHint"> Hints that a string property is a path to a file. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code]. </constant> - <constant name="PROPERTY_HINT_DIR" value="14" enum="PropertyHint"> + <constant name="PROPERTY_HINT_DIR" value="15" enum="PropertyHint"> Hints that a string property is a path to a directory. Editing it will show a file dialog for picking the path. </constant> - <constant name="PROPERTY_HINT_GLOBAL_FILE" value="15" enum="PropertyHint"> + <constant name="PROPERTY_HINT_GLOBAL_FILE" value="16" enum="PropertyHint"> Hints that a string property is an absolute path to a file outside the project folder. Editing it will show a file dialog for picking the path. The hint string can be a set of filters with wildcards like [code]"*.png,*.jpg"[/code]. </constant> - <constant name="PROPERTY_HINT_GLOBAL_DIR" value="16" enum="PropertyHint"> + <constant name="PROPERTY_HINT_GLOBAL_DIR" value="17" enum="PropertyHint"> Hints that a string property is an absolute path to a directory outside the project folder. Editing it will show a file dialog for picking the path. </constant> - <constant name="PROPERTY_HINT_RESOURCE_TYPE" value="17" enum="PropertyHint"> + <constant name="PROPERTY_HINT_RESOURCE_TYPE" value="18" enum="PropertyHint"> Hints that a property is an instance of a [Resource]-derived type, optionally specified via the hint string (e.g. [code]"Texture2D"[/code]). Editing it will show a popup menu of valid resource types to instantiate. </constant> - <constant name="PROPERTY_HINT_MULTILINE_TEXT" value="18" enum="PropertyHint"> + <constant name="PROPERTY_HINT_MULTILINE_TEXT" value="19" enum="PropertyHint"> Hints that a string property is text with line breaks. Editing it will show a text input field where line breaks can be typed. </constant> - <constant name="PROPERTY_HINT_PLACEHOLDER_TEXT" value="19" enum="PropertyHint"> + <constant name="PROPERTY_HINT_PLACEHOLDER_TEXT" value="20" enum="PropertyHint"> Hints that a string property should have a placeholder text visible on its input field, whenever the property is empty. The hint string is the placeholder text to use. </constant> - <constant name="PROPERTY_HINT_COLOR_NO_ALPHA" value="20" enum="PropertyHint"> + <constant name="PROPERTY_HINT_COLOR_NO_ALPHA" value="21" enum="PropertyHint"> Hints that a color property should be edited without changing its alpha component, i.e. only R, G and B channels are edited. </constant> - <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSY" value="21" enum="PropertyHint"> + <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSY" value="22" enum="PropertyHint"> Hints that an image is compressed using lossy compression. </constant> - <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="22" enum="PropertyHint"> + <constant name="PROPERTY_HINT_IMAGE_COMPRESS_LOSSLESS" value="23" enum="PropertyHint"> Hints that an image is compressed using lossless compression. </constant> - <constant name="PROPERTY_HINT_TYPE_STRING" value="24" enum="PropertyHint"> + <constant name="PROPERTY_HINT_OBJECT_ID" value="24" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_TYPE_STRING" value="25" enum="PropertyHint"> Hint that a property represents a particular type. If a property is [constant TYPE_STRING], allows to set a type from the create dialog. If you need to create an [Array] to contain elements of a specific type, the [code]hint_string[/code] must encode nested types using [code]":"[/code] and [code]"/"[/code] for specifying [Resource] types. For instance: [codeblock] hint_string = "%s:" % [TYPE_INT] # Array of inteters. @@ -2485,6 +2322,40 @@ [/codeblock] [b]Note:[/b] the final colon is required to specify for properly detecting built-in types. </constant> + <constant name="PROPERTY_HINT_NODE_PATH_TO_EDITED_NODE" value="26" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_METHOD_OF_VARIANT_TYPE" value="27" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_METHOD_OF_BASE_TYPE" value="28" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_METHOD_OF_INSTANCE" value="29" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_METHOD_OF_SCRIPT" value="30" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_PROPERTY_OF_VARIANT_TYPE" value="31" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_PROPERTY_OF_BASE_TYPE" value="32" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_PROPERTY_OF_INSTANCE" value="33" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_PROPERTY_OF_SCRIPT" value="34" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_OBJECT_TOO_BIG" value="35" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_NODE_PATH_VALID_TYPES" value="36" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_SAVE_FILE" value="37" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_INT_IS_OBJECTID" value="38" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_INT_IS_POINTER" value="40" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_ARRAY_TYPE" value="39" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_HINT_MAX" value="41" enum="PropertyHint"> + </constant> + <constant name="PROPERTY_USAGE_NONE" value="0" enum="PropertyUsageFlags"> + </constant> <constant name="PROPERTY_USAGE_STORAGE" value="1" enum="PropertyUsageFlags"> The property is serialized and saved in the scene file (default). </constant> @@ -2524,6 +2395,38 @@ <constant name="PROPERTY_USAGE_SCRIPT_VARIABLE" value="8192" enum="PropertyUsageFlags"> The property is a script variable which should be serialized and saved in the scene file. </constant> + <constant name="PROPERTY_USAGE_STORE_IF_NULL" value="16384" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_ANIMATE_AS_TRIGGER" value="32768" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_UPDATE_ALL_IF_MODIFIED" value="65536" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_SCRIPT_DEFAULT_VALUE" value="131072" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_CLASS_IS_ENUM" value="262144" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_NIL_IS_VARIANT" value="524288" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_INTERNAL" value="1048576" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_DO_NOT_SHARE_ON_DUPLICATE" value="2097152" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_HIGH_END_GFX" value="4194304" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_NODE_PATH_FROM_SCENE_ROOT" value="8388608" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_RESOURCE_NOT_PERSISTENT" value="16777216" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_KEYING_INCREMENTS" value="33554432" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_DEFERRED_SET_RESOURCE" value="67108864" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_EDITOR_INSTANTIATE_OBJECT" value="134217728" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_EDITOR_BASIC_SETTING" value="268435456" enum="PropertyUsageFlags"> + </constant> + <constant name="PROPERTY_USAGE_ARRAY" value="1073741824" enum="PropertyUsageFlags"> + </constant> <constant name="PROPERTY_USAGE_DEFAULT" value="7" enum="PropertyUsageFlags"> Default usage (storage, editor and network). </constant> @@ -2556,9 +2459,30 @@ </constant> <constant name="METHOD_FLAG_STATIC" value="256" enum="MethodFlags"> </constant> + <constant name="METHOD_FLAG_OBJECT_CORE" value="512" enum="MethodFlags"> + Used internally. Allows to not dump core virtuals such as [code]_notification[/code] to the JSON API. + </constant> <constant name="METHOD_FLAGS_DEFAULT" value="1" enum="MethodFlags"> Default method flags. </constant> + <constant name="RPC_MODE_DISABLED" value="0" enum="RPCMode"> + Used with [method Node.rpc_config] to disable a method or property for all RPC calls, making it unavailable. Default for all methods. + </constant> + <constant name="RPC_MODE_ANY" value="1" enum="RPCMode"> + Used with [method Node.rpc_config] to set a method to be callable remotely by any peer. Analogous to the [code]@rpc(any)[/code] annotation. Calls are accepted from all remote peers, no matter if they are node's authority or not. + </constant> + <constant name="RPC_MODE_AUTH" value="2" enum="RPCMode"> + Used with [method Node.rpc_config] to set a method to be callable remotely only by the current multiplayer authority (which is the server by default). Analogous to the [code]@rpc(auth)[/code] annotation. See [method Node.set_multiplayer_authority]. + </constant> + <constant name="TRANSFER_MODE_UNRELIABLE" value="0" enum="TransferMode"> + Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than [constant TRANSFER_MODE_ORDERED]. Use for non-critical data, and always consider whether the order matters. + </constant> + <constant name="TRANSFER_MODE_ORDERED" value="1" enum="TransferMode"> + Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than [constant TRANSFER_MODE_RELIABLE]. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data. + </constant> + <constant name="TRANSFER_MODE_RELIABLE" value="2" enum="TransferMode"> + Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially the slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly. + </constant> <constant name="TYPE_NIL" value="0" enum="Variant.Type"> Variable is [code]null[/code]. </constant> diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml index 03607661df..4bc11e7166 100644 --- a/doc/classes/AABB.xml +++ b/doc/classes/AABB.xml @@ -15,243 +15,193 @@ </tutorials> <methods> <method name="AABB" qualifiers="constructor"> - <return type="AABB"> - </return> + <return type="AABB" /> <description> Constructs a default-initialized [AABB] with default (zero) values of [member position] and [member size]. </description> </method> <method name="AABB" qualifiers="constructor"> - <return type="AABB"> - </return> - <argument index="0" name="from" type="AABB"> - </argument> + <return type="AABB" /> + <argument index="0" name="from" type="AABB" /> <description> Constructs an [AABB] as a copy of the given [AABB]. </description> </method> <method name="AABB" qualifiers="constructor"> - <return type="AABB"> - </return> - <argument index="0" name="position" type="Vector3"> - </argument> - <argument index="1" name="size" type="Vector3"> - </argument> + <return type="AABB" /> + <argument index="0" name="position" type="Vector3" /> + <argument index="1" name="size" type="Vector3" /> <description> Constructs an [AABB] from a position and size. </description> </method> <method name="abs" qualifiers="const"> - <return type="AABB"> - </return> + <return type="AABB" /> <description> Returns an AABB with equivalent position and size, modified so that the most-negative corner is the origin and the size is positive. </description> </method> <method name="encloses" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="with" type="AABB"> - </argument> + <return type="bool" /> + <argument index="0" name="with" type="AABB" /> <description> Returns [code]true[/code] if this [AABB] completely encloses another one. </description> </method> <method name="expand" qualifiers="const"> - <return type="AABB"> - </return> - <argument index="0" name="to_point" type="Vector3"> - </argument> + <return type="AABB" /> + <argument index="0" name="to_point" type="Vector3" /> <description> Returns this [AABB] expanded to include a given point. </description> </method> <method name="get_area" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the volume of the [AABB]. </description> </method> <method name="get_endpoint" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Vector3" /> + <argument index="0" name="idx" type="int" /> <description> Gets the position of the 8 endpoints of the [AABB] in space. </description> </method> <method name="get_longest_axis" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns the normalized longest axis of the [AABB]. </description> </method> <method name="get_longest_axis_index" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the index of the longest axis of the [AABB] (according to [Vector3]'s [code]AXIS_*[/code] constants). </description> </method> <method name="get_longest_axis_size" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the scalar length of the longest axis of the [AABB]. </description> </method> <method name="get_shortest_axis" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns the normalized shortest axis of the [AABB]. </description> </method> <method name="get_shortest_axis_index" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the index of the shortest axis of the [AABB] (according to [Vector3]::AXIS* enum). </description> </method> <method name="get_shortest_axis_size" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the scalar length of the shortest axis of the [AABB]. </description> </method> <method name="get_support" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="dir" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="dir" type="Vector3" /> <description> Returns the support point in a given direction. This is useful for collision detection algorithms. </description> </method> <method name="grow" qualifiers="const"> - <return type="AABB"> - </return> - <argument index="0" name="by" type="float"> - </argument> + <return type="AABB" /> + <argument index="0" name="by" type="float" /> <description> Returns a copy of the [AABB] grown a given amount of units towards all the sides. </description> </method> <method name="has_no_area" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the [AABB] is flat or empty. </description> </method> <method name="has_no_surface" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the [AABB] is empty. </description> </method> <method name="has_point" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="point" type="Vector3"> - </argument> + <return type="bool" /> + <argument index="0" name="point" type="Vector3" /> <description> Returns [code]true[/code] if the [AABB] contains a point. </description> </method> <method name="intersection" qualifiers="const"> - <return type="AABB"> - </return> - <argument index="0" name="with" type="AABB"> - </argument> + <return type="AABB" /> + <argument index="0" name="with" type="AABB" /> <description> Returns the intersection between two [AABB]. An empty AABB (size 0,0,0) is returned on failure. </description> </method> <method name="intersects" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="with" type="AABB"> - </argument> + <return type="bool" /> + <argument index="0" name="with" type="AABB" /> <description> Returns [code]true[/code] if the [AABB] overlaps with another. </description> </method> <method name="intersects_plane" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="plane" type="Plane"> - </argument> + <return type="bool" /> + <argument index="0" name="plane" type="Plane" /> <description> Returns [code]true[/code] if the [AABB] is on both sides of a plane. </description> </method> <method name="intersects_ray" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="from" type="Vector3"> - </argument> - <argument index="1" name="dir" type="Vector3"> - </argument> + <return type="Variant" /> + <argument index="0" name="from" type="Vector3" /> + <argument index="1" name="dir" type="Vector3" /> <description> </description> </method> <method name="intersects_segment" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="from" type="Vector3"> - </argument> - <argument index="1" name="to" type="Vector3"> - </argument> + <return type="Variant" /> + <argument index="0" name="from" type="Vector3" /> + <argument index="1" name="to" type="Vector3" /> <description> Returns [code]true[/code] if the [AABB] intersects the line segment between [code]from[/code] and [code]to[/code]. </description> </method> <method name="is_equal_approx" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="aabb" type="AABB"> - </argument> + <return type="bool" /> + <argument index="0" name="aabb" type="AABB" /> <description> Returns [code]true[/code] if this [AABB] and [code]aabb[/code] are approximately equal, by calling [method @GlobalScope.is_equal_approx] on each component. </description> </method> <method name="merge" qualifiers="const"> - <return type="AABB"> - </return> - <argument index="0" name="with" type="AABB"> - </argument> + <return type="AABB" /> + <argument index="0" name="with" type="AABB" /> <description> Returns a larger [AABB] that contains both this [AABB] and [code]with[/code]. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="AABB"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="AABB" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="AABB"> - </return> - <argument index="0" name="right" type="Transform3D"> - </argument> + <return type="AABB" /> + <argument index="0" name="right" type="Transform3D" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="AABB"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="AABB" /> <description> </description> </method> diff --git a/doc/classes/AESContext.xml b/doc/classes/AESContext.xml index e179c97677..847d1226a2 100644 --- a/doc/classes/AESContext.xml +++ b/doc/classes/AESContext.xml @@ -80,38 +80,30 @@ </tutorials> <methods> <method name="finish"> - <return type="void"> - </return> + <return type="void" /> <description> Close this AES context so it can be started again. See [method start]. </description> </method> <method name="get_iv_state"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> Get the current IV state for this context (IV gets updated when calling [method update]). You normally don't need this function. Note: This function only makes sense when the context is started with [constant MODE_CBC_ENCRYPT] or [constant MODE_CBC_DECRYPT]. </description> </method> <method name="start"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="mode" type="int" enum="AESContext.Mode"> - </argument> - <argument index="1" name="key" type="PackedByteArray"> - </argument> - <argument index="2" name="iv" type="PackedByteArray" default="PackedByteArray()"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="mode" type="int" enum="AESContext.Mode" /> + <argument index="1" name="key" type="PackedByteArray" /> + <argument index="2" name="iv" type="PackedByteArray" default="PackedByteArray()" /> <description> Start the AES context in the given [code]mode[/code]. A [code]key[/code] of either 16 or 32 bytes must always be provided, while an [code]iv[/code] (initialization vector) of exactly 16 bytes, is only needed when [code]mode[/code] is either [constant MODE_CBC_ENCRYPT] or [constant MODE_CBC_DECRYPT]. </description> </method> <method name="update"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="src" type="PackedByteArray"> - </argument> + <return type="PackedByteArray" /> + <argument index="0" name="src" type="PackedByteArray" /> <description> Run the desired operation for this AES context. Will return a [PackedByteArray] containing the result of encrypting (or decrypting) the given [code]src[/code]. See [method start] for mode of operation. Note: The size of [code]src[/code] must be a multiple of 16. Apply some padding if needed. diff --git a/doc/classes/AStar.xml b/doc/classes/AStar.xml index cc7f7072b9..3e91184a65 100644 --- a/doc/classes/AStar.xml +++ b/doc/classes/AStar.xml @@ -33,44 +33,34 @@ [/csharp] [/codeblocks] [method _estimate_cost] should return a lower bound of the distance, i.e. [code]_estimate_cost(u, v) <= _compute_cost(u, v)[/code]. This serves as a hint to the algorithm because the custom [code]_compute_cost[/code] might be computation-heavy. If this is not the case, make [method _estimate_cost] return the same value as [method _compute_cost] to provide the algorithm with the most accurate information. - If the default [method _estimate_cost] and [method _compute_cost] methods are used, or if the supplied [method _estimate_cost] method returns a lower bound of the cost, then the paths returned by A* will be the lowest cost paths. Here, the cost of a path equals to the sum of the [method _compute_cost] results of all segments in the path multiplied by the [code]weight_scale[/code]s of the end points of the respective segments. If the default methods are used and the [code]weight_scale[/code]s of all points are set to [code]1.0[/code], then this equals to the sum of Euclidean distances of all segments in the path. + If the default [method _estimate_cost] and [method _compute_cost] methods are used, or if the supplied [method _estimate_cost] method returns a lower bound of the cost, then the paths returned by A* will be the lowest-cost paths. Here, the cost of a path equals the sum of the [method _compute_cost] results of all segments in the path multiplied by the [code]weight_scale[/code]s of the endpoints of the respective segments. If the default methods are used and the [code]weight_scale[/code]s of all points are set to [code]1.0[/code], then this equals the sum of Euclidean distances of all segments in the path. </description> <tutorials> </tutorials> <methods> - <method name="_compute_cost" qualifiers="virtual"> - <return type="float"> - </return> - <argument index="0" name="from_id" type="int"> - </argument> - <argument index="1" name="to_id" type="int"> - </argument> + <method name="_compute_cost" qualifiers="virtual const"> + <return type="float" /> + <argument index="0" name="from_id" type="int" /> + <argument index="1" name="to_id" type="int" /> <description> Called when computing the cost between two connected points. Note that this function is hidden in the default [code]AStar[/code] class. </description> </method> - <method name="_estimate_cost" qualifiers="virtual"> - <return type="float"> - </return> - <argument index="0" name="from_id" type="int"> - </argument> - <argument index="1" name="to_id" type="int"> - </argument> + <method name="_estimate_cost" qualifiers="virtual const"> + <return type="float" /> + <argument index="0" name="from_id" type="int" /> + <argument index="1" name="to_id" type="int" /> <description> Called when estimating the cost between a point and the path's ending point. Note that this function is hidden in the default [code]AStar[/code] class. </description> </method> <method name="add_point"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="position" type="Vector3"> - </argument> - <argument index="2" name="weight_scale" type="float" default="1.0"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="position" type="Vector3" /> + <argument index="2" name="weight_scale" type="float" default="1.0" /> <description> Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger. The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [code]weight_scale[/code]s to form a path. @@ -88,34 +78,25 @@ </description> </method> <method name="are_points_connected" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="to_id" type="int"> - </argument> - <argument index="2" name="bidirectional" type="bool" default="true"> - </argument> + <return type="bool" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="to_id" type="int" /> + <argument index="2" name="bidirectional" type="bool" default="true" /> <description> Returns whether the two given points are directly connected by a segment. If [code]bidirectional[/code] is [code]false[/code], returns whether movement from [code]id[/code] to [code]to_id[/code] is possible through this segment. </description> </method> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> Clears all the points and segments. </description> </method> <method name="connect_points"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="to_id" type="int"> - </argument> - <argument index="2" name="bidirectional" type="bool" default="true"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="to_id" type="int" /> + <argument index="2" name="bidirectional" type="bool" default="true" /> <description> Creates a segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is allowed, not the reverse direction. [codeblocks] @@ -135,42 +116,32 @@ </description> </method> <method name="disconnect_points"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="to_id" type="int"> - </argument> - <argument index="2" name="bidirectional" type="bool" default="true"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="to_id" type="int" /> + <argument index="2" name="bidirectional" type="bool" default="true" /> <description> Deletes the segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is prevented, and a unidirectional segment possibly remains. </description> </method> <method name="get_available_point_id" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the next available point ID with no point associated to it. </description> </method> <method name="get_closest_point" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="to_position" type="Vector3"> - </argument> - <argument index="1" name="include_disabled" type="bool" default="false"> - </argument> + <return type="int" /> + <argument index="0" name="to_position" type="Vector3" /> + <argument index="1" name="include_disabled" type="bool" default="false" /> <description> Returns the ID of the closest point to [code]to_position[/code], optionally taking disabled points into account. Returns [code]-1[/code] if there are no points in the points pool. [b]Note:[/b] If several points are the closest to [code]to_position[/code], the one with the smallest ID will be returned, ensuring a deterministic result. </description> </method> <method name="get_closest_position_in_segment" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="to_position" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="to_position" type="Vector3" /> <description> Returns the closest position to [code]to_position[/code] that resides inside a segment between two connected points. [codeblocks] @@ -193,12 +164,9 @@ </description> </method> <method name="get_id_path"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="from_id" type="int"> - </argument> - <argument index="1" name="to_id" type="int"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="from_id" type="int" /> + <argument index="1" name="to_id" type="int" /> <description> Returns an array with the IDs of the points that form the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path. [codeblocks] @@ -233,17 +201,14 @@ </description> </method> <method name="get_point_capacity" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the capacity of the structure backing the points, useful in conjunction with [code]reserve_space[/code]. </description> </method> <method name="get_point_connections"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="id" type="int" /> <description> Returns an array with the IDs of the points that form the connection with the given point. [codeblocks] @@ -274,114 +239,88 @@ </description> </method> <method name="get_point_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of points currently in the points pool. </description> </method> <method name="get_point_path"> - <return type="PackedVector3Array"> - </return> - <argument index="0" name="from_id" type="int"> - </argument> - <argument index="1" name="to_id" type="int"> - </argument> + <return type="PackedVector3Array" /> + <argument index="0" name="from_id" type="int" /> + <argument index="1" name="to_id" type="int" /> <description> Returns an array with the points that are in the path found by AStar between the given points. The array is ordered from the starting point to the ending point of the path. [b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty [PackedVector3Array] and will print an error message. </description> </method> <method name="get_point_position" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="Vector3" /> + <argument index="0" name="id" type="int" /> <description> Returns the position of the point associated with the given [code]id[/code]. </description> </method> <method name="get_point_weight_scale" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="id" type="int" /> <description> Returns the weight scale of the point associated with the given [code]id[/code]. </description> </method> <method name="get_points"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns an array of all points. </description> </method> <method name="has_point" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="id" type="int" /> <description> Returns whether a point associated with the given [code]id[/code] exists. </description> </method> <method name="is_point_disabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="id" type="int" /> <description> Returns whether a point is disabled or not for pathfinding. By default, all points are enabled. </description> </method> <method name="remove_point"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> <description> Removes the point associated with the given [code]id[/code] from the points pool. </description> </method> <method name="reserve_space"> - <return type="void"> - </return> - <argument index="0" name="num_nodes" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="num_nodes" type="int" /> <description> Reserves space internally for [code]num_nodes[/code] points, useful if you're adding a known large number of points at once, for a grid for instance. New capacity must be greater or equals to old capacity. </description> </method> <method name="set_point_disabled"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="disabled" type="bool" default="true"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="disabled" type="bool" default="true" /> <description> Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle. </description> </method> <method name="set_point_position"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="position" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="position" type="Vector3" /> <description> Sets the [code]position[/code] for the point with the given [code]id[/code]. </description> </method> <method name="set_point_weight_scale"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="weight_scale" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="weight_scale" type="float" /> <description> Sets the [code]weight_scale[/code] for the point with the given [code]id[/code]. The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. </description> diff --git a/doc/classes/AStar2D.xml b/doc/classes/AStar2D.xml index 9edc300169..453e8b6315 100644 --- a/doc/classes/AStar2D.xml +++ b/doc/classes/AStar2D.xml @@ -9,39 +9,29 @@ <tutorials> </tutorials> <methods> - <method name="_compute_cost" qualifiers="virtual"> - <return type="float"> - </return> - <argument index="0" name="from_id" type="int"> - </argument> - <argument index="1" name="to_id" type="int"> - </argument> + <method name="_compute_cost" qualifiers="virtual const"> + <return type="float" /> + <argument index="0" name="from_id" type="int" /> + <argument index="1" name="to_id" type="int" /> <description> Called when computing the cost between two connected points. Note that this function is hidden in the default [code]AStar2D[/code] class. </description> </method> - <method name="_estimate_cost" qualifiers="virtual"> - <return type="float"> - </return> - <argument index="0" name="from_id" type="int"> - </argument> - <argument index="1" name="to_id" type="int"> - </argument> + <method name="_estimate_cost" qualifiers="virtual const"> + <return type="float" /> + <argument index="0" name="from_id" type="int" /> + <argument index="1" name="to_id" type="int" /> <description> Called when estimating the cost between a point and the path's ending point. Note that this function is hidden in the default [code]AStar2D[/code] class. </description> </method> <method name="add_point"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="position" type="Vector2"> - </argument> - <argument index="2" name="weight_scale" type="float" default="1.0"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="position" type="Vector2" /> + <argument index="2" name="weight_scale" type="float" default="1.0" /> <description> Adds a new point at the given position with the given identifier. The [code]id[/code] must be 0 or larger, and the [code]weight_scale[/code] must be 1 or larger. The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. Thus, all else being equal, the algorithm prefers points with lower [code]weight_scale[/code]s to form a path. @@ -59,32 +49,24 @@ </description> </method> <method name="are_points_connected" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="to_id" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="to_id" type="int" /> <description> Returns whether there is a connection/segment between the given points. </description> </method> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> Clears all the points and segments. </description> </method> <method name="connect_points"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="to_id" type="int"> - </argument> - <argument index="2" name="bidirectional" type="bool" default="true"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="to_id" type="int" /> + <argument index="2" name="bidirectional" type="bool" default="true" /> <description> Creates a segment between the given points. If [code]bidirectional[/code] is [code]false[/code], only movement from [code]id[/code] to [code]to_id[/code] is allowed, not the reverse direction. [codeblocks] @@ -104,40 +86,31 @@ </description> </method> <method name="disconnect_points"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="to_id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="to_id" type="int" /> <description> Deletes the segment between the given points. </description> </method> <method name="get_available_point_id" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the next available point ID with no point associated to it. </description> </method> <method name="get_closest_point" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="to_position" type="Vector2"> - </argument> - <argument index="1" name="include_disabled" type="bool" default="false"> - </argument> + <return type="int" /> + <argument index="0" name="to_position" type="Vector2" /> + <argument index="1" name="include_disabled" type="bool" default="false" /> <description> Returns the ID of the closest point to [code]to_position[/code], optionally taking disabled points into account. Returns [code]-1[/code] if there are no points in the points pool. [b]Note:[/b] If several points are the closest to [code]to_position[/code], the one with the smallest ID will be returned, ensuring a deterministic result. </description> </method> <method name="get_closest_position_in_segment" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="to_position" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="to_position" type="Vector2" /> <description> Returns the closest position to [code]to_position[/code] that resides inside a segment between two connected points. [codeblocks] @@ -160,12 +133,9 @@ </description> </method> <method name="get_id_path"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="from_id" type="int"> - </argument> - <argument index="1" name="to_id" type="int"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="from_id" type="int" /> + <argument index="1" name="to_id" type="int" /> <description> Returns an array with the IDs of the points that form the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path. [codeblocks] @@ -201,17 +171,14 @@ </description> </method> <method name="get_point_capacity" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the capacity of the structure backing the points, useful in conjunction with [code]reserve_space[/code]. </description> </method> <method name="get_point_connections"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="id" type="int" /> <description> Returns an array with the IDs of the points that form the connection with the given point. [codeblocks] @@ -243,114 +210,88 @@ </description> </method> <method name="get_point_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of points currently in the points pool. </description> </method> <method name="get_point_path"> - <return type="PackedVector2Array"> - </return> - <argument index="0" name="from_id" type="int"> - </argument> - <argument index="1" name="to_id" type="int"> - </argument> + <return type="PackedVector2Array" /> + <argument index="0" name="from_id" type="int" /> + <argument index="1" name="to_id" type="int" /> <description> Returns an array with the points that are in the path found by AStar2D between the given points. The array is ordered from the starting point to the ending point of the path. [b]Note:[/b] This method is not thread-safe. If called from a [Thread], it will return an empty [PackedVector2Array] and will print an error message. </description> </method> <method name="get_point_position" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="id" type="int" /> <description> Returns the position of the point associated with the given [code]id[/code]. </description> </method> <method name="get_point_weight_scale" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="id" type="int" /> <description> Returns the weight scale of the point associated with the given [code]id[/code]. </description> </method> <method name="get_points"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns an array of all points. </description> </method> <method name="has_point" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="id" type="int" /> <description> Returns whether a point associated with the given [code]id[/code] exists. </description> </method> <method name="is_point_disabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="id" type="int" /> <description> Returns whether a point is disabled or not for pathfinding. By default, all points are enabled. </description> </method> <method name="remove_point"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> <description> Removes the point associated with the given [code]id[/code] from the points pool. </description> </method> <method name="reserve_space"> - <return type="void"> - </return> - <argument index="0" name="num_nodes" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="num_nodes" type="int" /> <description> Reserves space internally for [code]num_nodes[/code] points, useful if you're adding a known large number of points at once, for a grid for instance. New capacity must be greater or equals to old capacity. </description> </method> <method name="set_point_disabled"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="disabled" type="bool" default="true"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="disabled" type="bool" default="true" /> <description> Disables or enables the specified point for pathfinding. Useful for making a temporary obstacle. </description> </method> <method name="set_point_position"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="position" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="position" type="Vector2" /> <description> Sets the [code]position[/code] for the point with the given [code]id[/code]. </description> </method> <method name="set_point_weight_scale"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="weight_scale" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="weight_scale" type="float" /> <description> Sets the [code]weight_scale[/code] for the point with the given [code]id[/code]. The [code]weight_scale[/code] is multiplied by the result of [method _compute_cost] when determining the overall cost of traveling across a segment from a neighboring point to this point. </description> diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml index fd1e2ba104..077c062d6b 100644 --- a/doc/classes/AcceptDialog.xml +++ b/doc/classes/AcceptDialog.xml @@ -10,14 +10,10 @@ </tutorials> <methods> <method name="add_button"> - <return type="Button"> - </return> - <argument index="0" name="text" type="String"> - </argument> - <argument index="1" name="right" type="bool" default="false"> - </argument> - <argument index="2" name="action" type="String" default=""""> - </argument> + <return type="Button" /> + <argument index="0" name="text" type="String" /> + <argument index="1" name="right" type="bool" default="false" /> + <argument index="2" name="action" type="String" default="""" /> <description> Adds a button with label [code]text[/code] and a custom [code]action[/code] to the dialog and returns the created button. [code]action[/code] will be passed to the [signal custom_action] signal when pressed. If [code]true[/code], [code]right[/code] will place the button to the right of any sibling buttons. @@ -25,43 +21,35 @@ </description> </method> <method name="add_cancel_button"> - <return type="Button"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="Button" /> + <argument index="0" name="name" type="String" /> <description> Adds a button with label [code]name[/code] and a cancel action to the dialog and returns the created button. You can use [method remove_button] method to remove a button created with this method from the dialog. </description> </method> <method name="get_label"> - <return type="Label"> - </return> + <return type="Label" /> <description> Returns the label used for built-in text. </description> </method> <method name="get_ok_button"> - <return type="Button"> - </return> + <return type="Button" /> <description> Returns the OK [Button] instance. </description> </method> <method name="register_text_enter"> - <return type="void"> - </return> - <argument index="0" name="line_edit" type="Control"> - </argument> + <return type="void" /> + <argument index="0" name="line_edit" type="Control" /> <description> Registers a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted. </description> </method> <method name="remove_button"> - <return type="void"> - </return> - <argument index="0" name="button" type="Control"> - </argument> + <return type="void" /> + <argument index="0" name="button" type="Control" /> <description> Removes the [code]button[/code] from the dialog. Does NOT free the [code]button[/code]. The [code]button[/code] must be a [Button] added with [method add_button] or [method add_cancel_button] method. After removal, pressing the [code]button[/code] will no longer emit this dialog's [signal custom_action] or [signal cancelled] signals. </description> @@ -96,8 +84,7 @@ </description> </signal> <signal name="custom_action"> - <argument index="0" name="action" type="StringName"> - </argument> + <argument index="0" name="action" type="StringName" /> <description> Emitted when a custom button is pressed. See [method add_button]. </description> @@ -105,4 +92,9 @@ </signals> <constants> </constants> + <theme_items> + <theme_item name="panel" data_type="style" type="StyleBox"> + Panel that fills up the background of the window. + </theme_item> + </theme_items> </class> diff --git a/doc/classes/AnimatableBody2D.xml b/doc/classes/AnimatableBody2D.xml new file mode 100644 index 0000000000..731c702549 --- /dev/null +++ b/doc/classes/AnimatableBody2D.xml @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="AnimatableBody2D" inherits="StaticBody2D" version="4.0"> + <brief_description> + Physics body for 2D physics which moves only by script or animation. Useful for moving platforms and doors. + </brief_description> + <description> + Animatable body for 2D physics. + An animatable body can't be moved by external forces or contacts, but can be moved by script or animation to affect other bodies in its path. It is ideal for implementing moving objects in the environment, such as moving platforms or doors. + When the body is moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to [code]physics[/code]), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false"> + If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method PhysicsBody2D.move_and_collide]. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/AnimatableBody3D.xml b/doc/classes/AnimatableBody3D.xml new file mode 100644 index 0000000000..8192f26057 --- /dev/null +++ b/doc/classes/AnimatableBody3D.xml @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="AnimatableBody3D" inherits="StaticBody3D" version="4.0"> + <brief_description> + Physics body for 3D physics which moves only by script or animation. Useful for moving platforms and doors. + </brief_description> + <description> + Animatable body for 3D physics. + An animatable body can't be moved by external forces or contacts, but can be moved by script or animation to affect other bodies in its path. It is ideal for implementing moving objects in the environment, such as moving platforms or doors. + When the body is moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to [code]physics[/code]), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). + </description> + <tutorials> + <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link> + <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> + <link title="3D Voxel Demo">https://godotengine.org/asset-library/asset/676</link> + </tutorials> + <methods> + </methods> + <members> + <member name="sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false"> + If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method PhysicsBody3D.move_and_collide]. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/AnimatedSprite2D.xml b/doc/classes/AnimatedSprite2D.xml index 7662e8368b..14e19b4c9a 100644 --- a/doc/classes/AnimatedSprite2D.xml +++ b/doc/classes/AnimatedSprite2D.xml @@ -13,26 +13,21 @@ </tutorials> <methods> <method name="is_playing" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if an animation is currently being played. </description> </method> <method name="play"> - <return type="void"> - </return> - <argument index="0" name="anim" type="StringName" default="&"""> - </argument> - <argument index="1" name="backwards" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="anim" type="StringName" default="&""" /> + <argument index="1" name="backwards" type="bool" default="false" /> <description> Plays the animation named [code]anim[/code]. If no [code]anim[/code] is provided, the current animation is played. If [code]backwards[/code] is [code]true[/code], the animation will be played in reverse. </description> </method> <method name="stop"> - <return type="void"> - </return> + <return type="void" /> <description> Stops the current animation (does not reset the frame counter). </description> diff --git a/doc/classes/AnimatedSprite3D.xml b/doc/classes/AnimatedSprite3D.xml index 39ab317b79..6b3d426cef 100644 --- a/doc/classes/AnimatedSprite3D.xml +++ b/doc/classes/AnimatedSprite3D.xml @@ -11,24 +11,20 @@ </tutorials> <methods> <method name="is_playing" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if an animation is currently being played. </description> </method> <method name="play"> - <return type="void"> - </return> - <argument index="0" name="anim" type="StringName" default="&"""> - </argument> + <return type="void" /> + <argument index="0" name="anim" type="StringName" default="&""" /> <description> Plays the animation named [code]anim[/code]. If no [code]anim[/code] is provided, the current animation is played. </description> </method> <method name="stop"> - <return type="void"> - </return> + <return type="void" /> <description> Stops the current animation (does not reset the frame counter). </description> diff --git a/doc/classes/AnimatedTexture.xml b/doc/classes/AnimatedTexture.xml index 5774842144..808b8bf053 100644 --- a/doc/classes/AnimatedTexture.xml +++ b/doc/classes/AnimatedTexture.xml @@ -13,30 +13,23 @@ </tutorials> <methods> <method name="get_frame_delay" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="frame" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="frame" type="int" /> <description> Returns the given frame's delay value. </description> </method> <method name="get_frame_texture" qualifiers="const"> - <return type="Texture2D"> - </return> - <argument index="0" name="frame" type="int"> - </argument> + <return type="Texture2D" /> + <argument index="0" name="frame" type="int" /> <description> Returns the given frame's [Texture2D]. </description> </method> <method name="set_frame_delay"> - <return type="void"> - </return> - <argument index="0" name="frame" type="int"> - </argument> - <argument index="1" name="delay" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="frame" type="int" /> + <argument index="1" name="delay" type="float" /> <description> Sets an additional delay (in seconds) between this frame and the next one, that will be added to the time interval defined by [member fps]. By default, frames have no delay defined. If a delay value is defined, the final time interval between this frame and the next will be [code]1.0 / fps + delay[/code]. For example, for an animation with 3 frames, 2 FPS and a frame delay on the second frame of 1.2, the resulting playback will be: @@ -49,12 +42,9 @@ </description> </method> <method name="set_frame_texture"> - <return type="void"> - </return> - <argument index="0" name="frame" type="int"> - </argument> - <argument index="1" name="texture" type="Texture2D"> - </argument> + <return type="void" /> + <argument index="0" name="frame" type="int" /> + <argument index="1" name="texture" type="Texture2D" /> <description> Assigns a [Texture2D] to the given frame. Frame IDs start at 0, so the first frame has ID 0, and the last frame of the animation has ID [member frames] - 1. You can define any number of textures up to [constant MAX_FRAMES], but keep in mind that only frames from 0 to [member frames] - 1 will be part of the animation. diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index 894e784397..38e02745d4 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -32,673 +32,487 @@ </tutorials> <methods> <method name="add_track"> - <return type="int"> - </return> - <argument index="0" name="type" type="int" enum="Animation.TrackType"> - </argument> - <argument index="1" name="at_position" type="int" default="-1"> - </argument> + <return type="int" /> + <argument index="0" name="type" type="int" enum="Animation.TrackType" /> + <argument index="1" name="at_position" type="int" default="-1" /> <description> Adds a track to the Animation. </description> </method> <method name="animation_track_get_key_animation" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="key_idx" type="int"> - </argument> + <return type="StringName" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="key_idx" type="int" /> <description> Returns the animation name at the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Animation Track. </description> </method> <method name="animation_track_insert_key"> - <return type="int"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="time" type="float"> - </argument> - <argument index="2" name="animation" type="StringName"> - </argument> + <return type="int" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="time" type="float" /> + <argument index="2" name="animation" type="StringName" /> <description> Inserts a key with value [code]animation[/code] at the given [code]time[/code] (in seconds). The [code]track_idx[/code] must be the index of an Animation Track. </description> </method> <method name="animation_track_set_key_animation"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="key_idx" type="int"> - </argument> - <argument index="2" name="animation" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="key_idx" type="int" /> + <argument index="2" name="animation" type="StringName" /> <description> Sets the key identified by [code]key_idx[/code] to value [code]animation[/code]. The [code]track_idx[/code] must be the index of an Animation Track. </description> </method> <method name="audio_track_get_key_end_offset" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="key_idx" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="key_idx" type="int" /> <description> Returns the end offset of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track. End offset is the number of seconds cut off at the ending of the audio stream. </description> </method> <method name="audio_track_get_key_start_offset" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="key_idx" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="key_idx" type="int" /> <description> Returns the start offset of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track. Start offset is the number of seconds cut off at the beginning of the audio stream. </description> </method> <method name="audio_track_get_key_stream" qualifiers="const"> - <return type="Resource"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="key_idx" type="int"> - </argument> + <return type="Resource" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="key_idx" type="int" /> <description> Returns the audio stream of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of an Audio Track. </description> </method> <method name="audio_track_insert_key"> - <return type="int"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="time" type="float"> - </argument> - <argument index="2" name="stream" type="Resource"> - </argument> - <argument index="3" name="start_offset" type="float" default="0"> - </argument> - <argument index="4" name="end_offset" type="float" default="0"> - </argument> + <return type="int" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="time" type="float" /> + <argument index="2" name="stream" type="Resource" /> + <argument index="3" name="start_offset" type="float" default="0" /> + <argument index="4" name="end_offset" type="float" default="0" /> <description> Inserts an Audio Track key at the given [code]time[/code] in seconds. The [code]track_idx[/code] must be the index of an Audio Track. [code]stream[/code] is the [AudioStream] resource to play. [code]start_offset[/code] is the number of seconds cut off at the beginning of the audio stream, while [code]end_offset[/code] is at the ending. </description> </method> <method name="audio_track_set_key_end_offset"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="key_idx" type="int"> - </argument> - <argument index="2" name="offset" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="key_idx" type="int" /> + <argument index="2" name="offset" type="float" /> <description> Sets the end offset of the key identified by [code]key_idx[/code] to value [code]offset[/code]. The [code]track_idx[/code] must be the index of an Audio Track. </description> </method> <method name="audio_track_set_key_start_offset"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="key_idx" type="int"> - </argument> - <argument index="2" name="offset" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="key_idx" type="int" /> + <argument index="2" name="offset" type="float" /> <description> Sets the start offset of the key identified by [code]key_idx[/code] to value [code]offset[/code]. The [code]track_idx[/code] must be the index of an Audio Track. </description> </method> <method name="audio_track_set_key_stream"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="key_idx" type="int"> - </argument> - <argument index="2" name="stream" type="Resource"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="key_idx" type="int" /> + <argument index="2" name="stream" type="Resource" /> <description> Sets the stream of the key identified by [code]key_idx[/code] to value [code]stream[/code]. The [code]track_idx[/code] must be the index of an Audio Track. </description> </method> <method name="bezier_track_get_key_in_handle" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="key_idx" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="key_idx" type="int" /> <description> Returns the in handle of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track. </description> </method> <method name="bezier_track_get_key_out_handle" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="key_idx" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="key_idx" type="int" /> <description> Returns the out handle of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track. </description> </method> <method name="bezier_track_get_key_value" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="key_idx" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="key_idx" type="int" /> <description> Returns the value of the key identified by [code]key_idx[/code]. The [code]track_idx[/code] must be the index of a Bezier Track. </description> </method> <method name="bezier_track_insert_key"> - <return type="int"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="time" type="float"> - </argument> - <argument index="2" name="value" type="float"> - </argument> - <argument index="3" name="in_handle" type="Vector2" default="Vector2(0, 0)"> - </argument> - <argument index="4" name="out_handle" type="Vector2" default="Vector2(0, 0)"> - </argument> + <return type="int" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="time" type="float" /> + <argument index="2" name="value" type="float" /> + <argument index="3" name="in_handle" type="Vector2" default="Vector2(0, 0)" /> + <argument index="4" name="out_handle" type="Vector2" default="Vector2(0, 0)" /> <description> Inserts a Bezier Track key at the given [code]time[/code] in seconds. The [code]track_idx[/code] must be the index of a Bezier Track. [code]in_handle[/code] is the left-side weight of the added Bezier curve point, [code]out_handle[/code] is the right-side one, while [code]value[/code] is the actual value at this point. </description> </method> <method name="bezier_track_interpolate" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="time" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="time" type="float" /> <description> Returns the interpolated value at the given [code]time[/code] (in seconds). The [code]track_idx[/code] must be the index of a Bezier Track. </description> </method> <method name="bezier_track_set_key_in_handle"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="key_idx" type="int"> - </argument> - <argument index="2" name="in_handle" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="key_idx" type="int" /> + <argument index="2" name="in_handle" type="Vector2" /> <description> Sets the in handle of the key identified by [code]key_idx[/code] to value [code]in_handle[/code]. The [code]track_idx[/code] must be the index of a Bezier Track. </description> </method> <method name="bezier_track_set_key_out_handle"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="key_idx" type="int"> - </argument> - <argument index="2" name="out_handle" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="key_idx" type="int" /> + <argument index="2" name="out_handle" type="Vector2" /> <description> Sets the out handle of the key identified by [code]key_idx[/code] to value [code]out_handle[/code]. The [code]track_idx[/code] must be the index of a Bezier Track. </description> </method> <method name="bezier_track_set_key_value"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="key_idx" type="int"> - </argument> - <argument index="2" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="key_idx" type="int" /> + <argument index="2" name="value" type="float" /> <description> Sets the value of the key identified by [code]key_idx[/code] to the given value. The [code]track_idx[/code] must be the index of a Bezier Track. </description> </method> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> Clear the animation (clear all tracks and reset all). </description> </method> <method name="copy_track"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="to_animation" type="Animation"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="to_animation" type="Animation" /> <description> Adds a new track that is a copy of the given track from [code]to_animation[/code]. </description> </method> <method name="find_track" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="path" type="NodePath"> - </argument> + <return type="int" /> + <argument index="0" name="path" type="NodePath" /> <description> Returns the index of the specified track. If the track is not found, return -1. </description> </method> <method name="get_track_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the amount of tracks in the animation. </description> </method> <method name="method_track_get_key_indices" qualifiers="const"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="time_sec" type="float"> - </argument> - <argument index="2" name="delta" type="float"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="time_sec" type="float" /> + <argument index="2" name="delta" type="float" /> <description> Returns all the key indices of a method track, given a position and delta time. </description> </method> <method name="method_track_get_name" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="key_idx" type="int"> - </argument> + <return type="StringName" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="key_idx" type="int" /> <description> Returns the method name of a method track. </description> </method> <method name="method_track_get_params" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="key_idx" type="int"> - </argument> + <return type="Array" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="key_idx" type="int" /> <description> Returns the arguments values to be called on a method track for a given key in a given track. </description> </method> <method name="remove_track"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> <description> Removes a track by specifying the track index. </description> </method> <method name="track_find_key" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="time" type="float"> - </argument> - <argument index="2" name="exact" type="bool" default="false"> - </argument> + <return type="int" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="time" type="float" /> + <argument index="2" name="exact" type="bool" default="false" /> <description> Finds the key index by time in a given track. Optionally, only find it if the exact time is given. </description> </method> <method name="track_get_interpolation_loop_wrap" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="track_idx" type="int" /> <description> Returns [code]true[/code] if the track at [code]idx[/code] wraps the interpolation loop. New tracks wrap the interpolation loop by default. </description> </method> <method name="track_get_interpolation_type" qualifiers="const"> - <return type="int" enum="Animation.InterpolationType"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> + <return type="int" enum="Animation.InterpolationType" /> + <argument index="0" name="track_idx" type="int" /> <description> Returns the interpolation type of a given track. </description> </method> <method name="track_get_key_count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="track_idx" type="int" /> <description> Returns the amount of keys in a given track. </description> </method> <method name="track_get_key_time" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="key_idx" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="key_idx" type="int" /> <description> Returns the time at which the key is located. </description> </method> <method name="track_get_key_transition" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="key_idx" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="key_idx" type="int" /> <description> Returns the transition curve (easing) for a specific key (see the built-in math function [method @GlobalScope.ease]). </description> </method> <method name="track_get_key_value" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="key_idx" type="int"> - </argument> + <return type="Variant" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="key_idx" type="int" /> <description> Returns the value of a given key in a given track. </description> </method> <method name="track_get_path" qualifiers="const"> - <return type="NodePath"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> + <return type="NodePath" /> + <argument index="0" name="track_idx" type="int" /> <description> Gets the path of a track. For more information on the path format, see [method track_set_path]. </description> </method> <method name="track_get_type" qualifiers="const"> - <return type="int" enum="Animation.TrackType"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> + <return type="int" enum="Animation.TrackType" /> + <argument index="0" name="track_idx" type="int" /> <description> Gets the type of a track. </description> </method> <method name="track_insert_key"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="time" type="float"> - </argument> - <argument index="2" name="key" type="Variant"> - </argument> - <argument index="3" name="transition" type="float" default="1"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="time" type="float" /> + <argument index="2" name="key" type="Variant" /> + <argument index="3" name="transition" type="float" default="1" /> <description> Insert a generic key in a given track. </description> </method> <method name="track_is_enabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="track_idx" type="int" /> <description> Returns [code]true[/code] if the track at index [code]idx[/code] is enabled. </description> </method> <method name="track_is_imported" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="track_idx" type="int" /> <description> Returns [code]true[/code] if the given track is imported. Else, return [code]false[/code]. </description> </method> <method name="track_move_down"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> <description> Moves a track down. </description> </method> <method name="track_move_to"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="to_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="to_idx" type="int" /> <description> Changes the index position of track [code]idx[/code] to the one defined in [code]to_idx[/code]. </description> </method> <method name="track_move_up"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> <description> Moves a track up. </description> </method> <method name="track_remove_key"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="key_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="key_idx" type="int" /> <description> Removes a key by index in a given track. </description> </method> <method name="track_remove_key_at_time"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="time" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="time" type="float" /> <description> Removes a key at [code]time[/code] in a given track. </description> </method> <method name="track_set_enabled"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="enabled" type="bool" /> <description> Enables/disables the given track. Tracks are enabled by default. </description> </method> <method name="track_set_imported"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="imported" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="imported" type="bool" /> <description> Sets the given track as imported or not. </description> </method> <method name="track_set_interpolation_loop_wrap"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="interpolation" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="interpolation" type="bool" /> <description> If [code]true[/code], the track at [code]idx[/code] wraps the interpolation loop. </description> </method> <method name="track_set_interpolation_type"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="interpolation" type="int" enum="Animation.InterpolationType"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="interpolation" type="int" enum="Animation.InterpolationType" /> <description> Sets the interpolation type of a given track. </description> </method> <method name="track_set_key_time"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="key_idx" type="int"> - </argument> - <argument index="2" name="time" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="key_idx" type="int" /> + <argument index="2" name="time" type="float" /> <description> Sets the time of an existing key. </description> </method> <method name="track_set_key_transition"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="key_idx" type="int"> - </argument> - <argument index="2" name="transition" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="key_idx" type="int" /> + <argument index="2" name="transition" type="float" /> <description> Sets the transition curve (easing) for a specific key (see the built-in math function [method @GlobalScope.ease]). </description> </method> <method name="track_set_key_value"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="key" type="int"> - </argument> - <argument index="2" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="key" type="int" /> + <argument index="2" name="value" type="Variant" /> <description> Sets the value of an existing key. </description> </method> <method name="track_set_path"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="path" type="NodePath"> - </argument> - <description> - Sets the path of a track. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by [code]":"[/code]. + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="path" type="NodePath" /> + <description> + Sets the path of a track. Paths must be valid scene-tree paths to a node and must be specified starting from the parent node of the node that will reproduce the animation. Tracks that control properties or bones must append their name after the path, separated by [code]":"[/code]. For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code]. </description> </method> <method name="track_swap"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="with_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="with_idx" type="int" /> <description> Swaps the track [code]idx[/code]'s index position with the track [code]with_idx[/code]. </description> </method> <method name="transform_track_insert_key"> - <return type="int"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="time" type="float"> - </argument> - <argument index="2" name="location" type="Vector3"> - </argument> - <argument index="3" name="rotation" type="Quaternion"> - </argument> - <argument index="4" name="scale" type="Vector3"> - </argument> + <return type="int" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="time" type="float" /> + <argument index="2" name="location" type="Vector3" /> + <argument index="3" name="rotation" type="Quaternion" /> + <argument index="4" name="scale" type="Vector3" /> <description> Insert a transform key for a transform track. </description> </method> <method name="transform_track_interpolate" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="time_sec" type="float"> - </argument> + <return type="Array" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="time_sec" type="float" /> <description> Returns the interpolated value of a transform track at a given time (in seconds). An array consisting of 3 elements: position ([Vector3]), rotation ([Quaternion]) and scale ([Vector3]). </description> </method> <method name="value_track_get_key_indices" qualifiers="const"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="time_sec" type="float"> - </argument> - <argument index="2" name="delta" type="float"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="time_sec" type="float" /> + <argument index="2" name="delta" type="float" /> <description> Returns all the key indices of a value track, given a position and delta time. </description> </method> <method name="value_track_get_update_mode" qualifiers="const"> - <return type="int" enum="Animation.UpdateMode"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> + <return type="int" enum="Animation.UpdateMode" /> + <argument index="0" name="track_idx" type="int" /> <description> Returns the update mode of a value track. </description> </method> <method name="value_track_interpolate" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="time_sec" type="float"> - </argument> + <return type="Variant" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="time_sec" type="float" /> <description> Returns the interpolated value at the given time (in seconds). The [code]track_idx[/code] must be the index of a value track. </description> </method> <method name="value_track_set_update_mode"> - <return type="void"> - </return> - <argument index="0" name="track_idx" type="int"> - </argument> - <argument index="1" name="mode" type="int" enum="Animation.UpdateMode"> - </argument> + <return type="void" /> + <argument index="0" name="track_idx" type="int" /> + <argument index="1" name="mode" type="int" enum="Animation.UpdateMode" /> <description> Sets the update mode (see [enum UpdateMode]) of a value track. </description> diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml index fddd8989ab..173ff43d2a 100644 --- a/doc/classes/AnimationNode.xml +++ b/doc/classes/AnimationNode.xml @@ -11,59 +11,48 @@ <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> </tutorials> <methods> - <method name="_get_caption" qualifiers="virtual"> - <return type="String"> - </return> + <method name="_get_caption" qualifiers="virtual const"> + <return type="String" /> <description> Gets the text caption for this node (used by some editors). </description> </method> - <method name="_get_child_by_name" qualifiers="virtual"> - <return type="Object"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <method name="_get_child_by_name" qualifiers="virtual const"> + <return type="AnimationNode" /> + <argument index="0" name="name" type="StringName" /> <description> Gets a child node by index (used by editors inheriting from [AnimationRootNode]). </description> </method> - <method name="_get_child_nodes" qualifiers="virtual"> - <return type="Dictionary"> - </return> + <method name="_get_child_nodes" qualifiers="virtual const"> + <return type="Dictionary" /> <description> Gets all children nodes in order as a [code]name: node[/code] dictionary. Only useful when inheriting [AnimationRootNode]. </description> </method> - <method name="_get_parameter_default_value" qualifiers="virtual"> - <return type="Variant"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <method name="_get_parameter_default_value" qualifiers="virtual const"> + <return type="Variant" /> + <argument index="0" name="parameter" type="StringName" /> <description> Gets the default value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. </description> </method> - <method name="_get_parameter_list" qualifiers="virtual"> - <return type="Array"> - </return> + <method name="_get_parameter_list" qualifiers="virtual const"> + <return type="Array" /> <description> Gets the property information for parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. Format is similar to [method Object.get_property_list]. </description> </method> - <method name="_has_filter" qualifiers="virtual"> - <return type="bool"> - </return> + <method name="_has_filter" qualifiers="virtual const"> + <return type="bool" /> <description> Returns [code]true[/code] whether you want the blend tree editor to display filter editing on this node. </description> </method> - <method name="_process" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="time" type="float"> - </argument> - <argument index="1" name="seek" type="bool"> - </argument> + <method name="_process" qualifiers="virtual const"> + <return type="float" /> + <argument index="0" name="time" type="float" /> + <argument index="1" name="seek" type="bool" /> <description> User-defined callback called when a custom node is processed. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute. Here, call the [method blend_input], [method blend_node] or [method blend_animation] functions. You can also use [method get_parameter] and [method set_parameter] to modify local memory. @@ -71,132 +60,94 @@ </description> </method> <method name="add_input"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> <description> Adds an input to the node. This is only useful for nodes created for use in an [AnimationNodeBlendTree]. </description> </method> <method name="blend_animation"> - <return type="void"> - </return> - <argument index="0" name="animation" type="StringName"> - </argument> - <argument index="1" name="time" type="float"> - </argument> - <argument index="2" name="delta" type="float"> - </argument> - <argument index="3" name="seeked" type="bool"> - </argument> - <argument index="4" name="blend" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="animation" type="StringName" /> + <argument index="1" name="time" type="float" /> + <argument index="2" name="delta" type="float" /> + <argument index="3" name="seeked" type="bool" /> + <argument index="4" name="blend" type="float" /> <description> Blend an animation by [code]blend[/code] amount (name must be valid in the linked [AnimationPlayer]). A [code]time[/code] and [code]delta[/code] may be passed, as well as whether [code]seek[/code] happened. </description> </method> <method name="blend_input"> - <return type="float"> - </return> - <argument index="0" name="input_index" type="int"> - </argument> - <argument index="1" name="time" type="float"> - </argument> - <argument index="2" name="seek" type="bool"> - </argument> - <argument index="3" name="blend" type="float"> - </argument> - <argument index="4" name="filter" type="int" enum="AnimationNode.FilterAction" default="0"> - </argument> - <argument index="5" name="optimize" type="bool" default="true"> - </argument> + <return type="float" /> + <argument index="0" name="input_index" type="int" /> + <argument index="1" name="time" type="float" /> + <argument index="2" name="seek" type="bool" /> + <argument index="3" name="blend" type="float" /> + <argument index="4" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" /> + <argument index="5" name="optimize" type="bool" default="true" /> <description> Blend an input. This is only useful for nodes created for an [AnimationNodeBlendTree]. The [code]time[/code] parameter is a relative delta, unless [code]seek[/code] is [code]true[/code], in which case it is absolute. A filter mode may be optionally passed (see [enum FilterAction] for options). </description> </method> <method name="blend_node"> - <return type="float"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="node" type="AnimationNode"> - </argument> - <argument index="2" name="time" type="float"> - </argument> - <argument index="3" name="seek" type="bool"> - </argument> - <argument index="4" name="blend" type="float"> - </argument> - <argument index="5" name="filter" type="int" enum="AnimationNode.FilterAction" default="0"> - </argument> - <argument index="6" name="optimize" type="bool" default="true"> - </argument> + <return type="float" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="node" type="AnimationNode" /> + <argument index="2" name="time" type="float" /> + <argument index="3" name="seek" type="bool" /> + <argument index="4" name="blend" type="float" /> + <argument index="5" name="filter" type="int" enum="AnimationNode.FilterAction" default="0" /> + <argument index="6" name="optimize" type="bool" default="true" /> <description> Blend another animation node (in case this node contains children animation nodes). This function is only useful if you inherit from [AnimationRootNode] instead, else editors will not display your node for addition. </description> </method> <method name="get_input_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Amount of inputs in this node, only useful for nodes that go into [AnimationNodeBlendTree]. </description> </method> <method name="get_input_name"> - <return type="String"> - </return> - <argument index="0" name="input" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="input" type="int" /> <description> Gets the name of an input by index. </description> </method> <method name="get_parameter" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="Variant" /> + <argument index="0" name="name" type="StringName" /> <description> Gets the value of a parameter. Parameters are custom local memory used for your nodes, given a resource can be reused in multiple trees. </description> </method> <method name="is_path_filtered" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="path" type="NodePath"> - </argument> + <return type="bool" /> + <argument index="0" name="path" type="NodePath" /> <description> Returns [code]true[/code] whether a given path is filtered. </description> </method> <method name="remove_input"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> <description> Removes an input, call this only when inactive. </description> </method> <method name="set_filter_path"> - <return type="void"> - </return> - <argument index="0" name="path" type="NodePath"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="path" type="NodePath" /> + <argument index="1" name="enable" type="bool" /> <description> Adds or removes a path for the filter. </description> </method> <method name="set_parameter"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="value" type="Variant" /> <description> Sets a custom parameter. These are used as local storage, because resources can be reused across the tree or scenes. </description> diff --git a/doc/classes/AnimationNodeBlendSpace1D.xml b/doc/classes/AnimationNodeBlendSpace1D.xml index 263b59910b..c47d84fe37 100644 --- a/doc/classes/AnimationNodeBlendSpace1D.xml +++ b/doc/classes/AnimationNodeBlendSpace1D.xml @@ -14,70 +14,53 @@ </tutorials> <methods> <method name="add_blend_point"> - <return type="void"> - </return> - <argument index="0" name="node" type="AnimationRootNode"> - </argument> - <argument index="1" name="pos" type="float"> - </argument> - <argument index="2" name="at_index" type="int" default="-1"> - </argument> + <return type="void" /> + <argument index="0" name="node" type="AnimationRootNode" /> + <argument index="1" name="pos" type="float" /> + <argument index="2" name="at_index" type="int" default="-1" /> <description> Adds a new point that represents a [code]node[/code] on the virtual axis at a given position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array. </description> </method> <method name="get_blend_point_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of points on the blend axis. </description> </method> <method name="get_blend_point_node" qualifiers="const"> - <return type="AnimationRootNode"> - </return> - <argument index="0" name="point" type="int"> - </argument> + <return type="AnimationRootNode" /> + <argument index="0" name="point" type="int" /> <description> Returns the [AnimationNode] referenced by the point at index [code]point[/code]. </description> </method> <method name="get_blend_point_position" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="point" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="point" type="int" /> <description> Returns the position of the point at index [code]point[/code]. </description> </method> <method name="remove_blend_point"> - <return type="void"> - </return> - <argument index="0" name="point" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="point" type="int" /> <description> Removes the point at index [code]point[/code] from the blend axis. </description> </method> <method name="set_blend_point_node"> - <return type="void"> - </return> - <argument index="0" name="point" type="int"> - </argument> - <argument index="1" name="node" type="AnimationRootNode"> - </argument> + <return type="void" /> + <argument index="0" name="point" type="int" /> + <argument index="1" name="node" type="AnimationRootNode" /> <description> Changes the [AnimationNode] referenced by the point at index [code]point[/code]. </description> </method> <method name="set_blend_point_position"> - <return type="void"> - </return> - <argument index="0" name="point" type="int"> - </argument> - <argument index="1" name="pos" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="point" type="int" /> + <argument index="1" name="pos" type="float" /> <description> Updates the position of the point at index [code]point[/code] on the blend axis. </description> diff --git a/doc/classes/AnimationNodeBlendSpace2D.xml b/doc/classes/AnimationNodeBlendSpace2D.xml index 1a6d2bd755..8d51f9aecc 100644 --- a/doc/classes/AnimationNodeBlendSpace2D.xml +++ b/doc/classes/AnimationNodeBlendSpace2D.xml @@ -14,112 +14,84 @@ </tutorials> <methods> <method name="add_blend_point"> - <return type="void"> - </return> - <argument index="0" name="node" type="AnimationRootNode"> - </argument> - <argument index="1" name="pos" type="Vector2"> - </argument> - <argument index="2" name="at_index" type="int" default="-1"> - </argument> + <return type="void" /> + <argument index="0" name="node" type="AnimationRootNode" /> + <argument index="1" name="pos" type="Vector2" /> + <argument index="2" name="at_index" type="int" default="-1" /> <description> Adds a new point that represents a [code]node[/code] at the position set by [code]pos[/code]. You can insert it at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array. </description> </method> <method name="add_triangle"> - <return type="void"> - </return> - <argument index="0" name="x" type="int"> - </argument> - <argument index="1" name="y" type="int"> - </argument> - <argument index="2" name="z" type="int"> - </argument> - <argument index="3" name="at_index" type="int" default="-1"> - </argument> + <return type="void" /> + <argument index="0" name="x" type="int" /> + <argument index="1" name="y" type="int" /> + <argument index="2" name="z" type="int" /> + <argument index="3" name="at_index" type="int" default="-1" /> <description> Creates a new triangle using three points [code]x[/code], [code]y[/code], and [code]z[/code]. Triangles can overlap. You can insert the triangle at a specific index using the [code]at_index[/code] argument. If you use the default value for [code]at_index[/code], the point is inserted at the end of the blend points array. </description> </method> <method name="get_blend_point_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of points in the blend space. </description> </method> <method name="get_blend_point_node" qualifiers="const"> - <return type="AnimationRootNode"> - </return> - <argument index="0" name="point" type="int"> - </argument> + <return type="AnimationRootNode" /> + <argument index="0" name="point" type="int" /> <description> Returns the [AnimationRootNode] referenced by the point at index [code]point[/code]. </description> </method> <method name="get_blend_point_position" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="point" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="point" type="int" /> <description> Returns the position of the point at index [code]point[/code]. </description> </method> <method name="get_triangle_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of triangles in the blend space. </description> </method> <method name="get_triangle_point"> - <return type="int"> - </return> - <argument index="0" name="triangle" type="int"> - </argument> - <argument index="1" name="point" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="triangle" type="int" /> + <argument index="1" name="point" type="int" /> <description> Returns the position of the point at index [code]point[/code] in the triangle of index [code]triangle[/code]. </description> </method> <method name="remove_blend_point"> - <return type="void"> - </return> - <argument index="0" name="point" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="point" type="int" /> <description> Removes the point at index [code]point[/code] from the blend space. </description> </method> <method name="remove_triangle"> - <return type="void"> - </return> - <argument index="0" name="triangle" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="triangle" type="int" /> <description> Removes the triangle at index [code]triangle[/code] from the blend space. </description> </method> <method name="set_blend_point_node"> - <return type="void"> - </return> - <argument index="0" name="point" type="int"> - </argument> - <argument index="1" name="node" type="AnimationRootNode"> - </argument> + <return type="void" /> + <argument index="0" name="point" type="int" /> + <argument index="1" name="node" type="AnimationRootNode" /> <description> Changes the [AnimationNode] referenced by the point at index [code]point[/code]. </description> </method> <method name="set_blend_point_position"> - <return type="void"> - </return> - <argument index="0" name="point" type="int"> - </argument> - <argument index="1" name="pos" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="point" type="int" /> + <argument index="1" name="pos" type="Vector2" /> <description> Updates the position of the point at index [code]point[/code] on the blend axis. </description> diff --git a/doc/classes/AnimationNodeBlendTree.xml b/doc/classes/AnimationNodeBlendTree.xml index a90e8647bb..da532dc059 100644 --- a/doc/classes/AnimationNodeBlendTree.xml +++ b/doc/classes/AnimationNodeBlendTree.xml @@ -11,96 +11,71 @@ </tutorials> <methods> <method name="add_node"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="node" type="AnimationNode"> - </argument> - <argument index="2" name="position" type="Vector2" default="Vector2(0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="node" type="AnimationNode" /> + <argument index="2" name="position" type="Vector2" default="Vector2(0, 0)" /> <description> Adds an [AnimationNode] at the given [code]position[/code]. The [code]name[/code] is used to identify the created sub-node later. </description> </method> <method name="connect_node"> - <return type="void"> - </return> - <argument index="0" name="input_node" type="StringName"> - </argument> - <argument index="1" name="input_index" type="int"> - </argument> - <argument index="2" name="output_node" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="input_node" type="StringName" /> + <argument index="1" name="input_index" type="int" /> + <argument index="2" name="output_node" type="StringName" /> <description> Connects the output of an [AnimationNode] as input for another [AnimationNode], at the input port specified by [code]input_index[/code]. </description> </method> <method name="disconnect_node"> - <return type="void"> - </return> - <argument index="0" name="input_node" type="StringName"> - </argument> - <argument index="1" name="input_index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="input_node" type="StringName" /> + <argument index="1" name="input_index" type="int" /> <description> Disconnects the node connected to the specified input. </description> </method> <method name="get_node" qualifiers="const"> - <return type="AnimationNode"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="AnimationNode" /> + <argument index="0" name="name" type="StringName" /> <description> Returns the sub-node with the specified [code]name[/code]. </description> </method> <method name="get_node_position" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="Vector2" /> + <argument index="0" name="name" type="StringName" /> <description> Returns the position of the sub-node with the specified [code]name[/code]. </description> </method> <method name="has_node" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> <description> Returns [code]true[/code] if a sub-node with specified [code]name[/code] exists. </description> </method> <method name="remove_node"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> <description> Removes a sub-node. </description> </method> <method name="rename_node"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="new_name" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="new_name" type="StringName" /> <description> Changes the name of a sub-node. </description> </method> <method name="set_node_position"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="position" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="position" type="Vector2" /> <description> Modifies the position of a sub-node. </description> diff --git a/doc/classes/AnimationNodeOneShot.xml b/doc/classes/AnimationNodeOneShot.xml index 65ab363e1f..2ecc0ae07b 100644 --- a/doc/classes/AnimationNodeOneShot.xml +++ b/doc/classes/AnimationNodeOneShot.xml @@ -12,16 +12,13 @@ </tutorials> <methods> <method name="get_mix_mode" qualifiers="const"> - <return type="int" enum="AnimationNodeOneShot.MixMode"> - </return> + <return type="int" enum="AnimationNodeOneShot.MixMode" /> <description> </description> </method> <method name="set_mix_mode"> - <return type="void"> - </return> - <argument index="0" name="mode" type="int" enum="AnimationNodeOneShot.MixMode"> - </argument> + <return type="void" /> + <argument index="0" name="mode" type="int" enum="AnimationNodeOneShot.MixMode" /> <description> </description> </method> diff --git a/doc/classes/AnimationNodeStateMachine.xml b/doc/classes/AnimationNodeStateMachine.xml index 8e070142c4..9921e157f2 100644 --- a/doc/classes/AnimationNodeStateMachine.xml +++ b/doc/classes/AnimationNodeStateMachine.xml @@ -22,217 +22,166 @@ </tutorials> <methods> <method name="add_node"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="node" type="AnimationNode"> - </argument> - <argument index="2" name="position" type="Vector2" default="Vector2(0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="node" type="AnimationNode" /> + <argument index="2" name="position" type="Vector2" default="Vector2(0, 0)" /> <description> Adds a new node to the graph. The [code]position[/code] is used for display in the editor. </description> </method> <method name="add_transition"> - <return type="void"> - </return> - <argument index="0" name="from" type="StringName"> - </argument> - <argument index="1" name="to" type="StringName"> - </argument> - <argument index="2" name="transition" type="AnimationNodeStateMachineTransition"> - </argument> + <return type="void" /> + <argument index="0" name="from" type="StringName" /> + <argument index="1" name="to" type="StringName" /> + <argument index="2" name="transition" type="AnimationNodeStateMachineTransition" /> <description> Adds a transition between the given nodes. </description> </method> <method name="get_end_node" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the graph's end node. </description> </method> <method name="get_graph_offset" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the draw offset of the graph. Used for display in the editor. </description> </method> <method name="get_node" qualifiers="const"> - <return type="AnimationNode"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="AnimationNode" /> + <argument index="0" name="name" type="StringName" /> <description> Returns the animation node with the given name. </description> </method> <method name="get_node_name" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="node" type="AnimationNode"> - </argument> + <return type="StringName" /> + <argument index="0" name="node" type="AnimationNode" /> <description> Returns the given animation node's name. </description> </method> <method name="get_node_position" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="Vector2" /> + <argument index="0" name="name" type="StringName" /> <description> Returns the given node's coordinates. Used for display in the editor. </description> </method> <method name="get_start_node" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the graph's end node. </description> </method> <method name="get_transition" qualifiers="const"> - <return type="AnimationNodeStateMachineTransition"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="AnimationNodeStateMachineTransition" /> + <argument index="0" name="idx" type="int" /> <description> Returns the given transition. </description> </method> <method name="get_transition_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of connections in the graph. </description> </method> <method name="get_transition_from" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="StringName" /> + <argument index="0" name="idx" type="int" /> <description> Returns the given transition's start node. </description> </method> <method name="get_transition_to" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="StringName" /> + <argument index="0" name="idx" type="int" /> <description> Returns the given transition's end node. </description> </method> <method name="has_node" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> <description> Returns [code]true[/code] if the graph contains the given node. </description> </method> <method name="has_transition" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="from" type="StringName"> - </argument> - <argument index="1" name="to" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="from" type="StringName" /> + <argument index="1" name="to" type="StringName" /> <description> Returns [code]true[/code] if there is a transition between the given nodes. </description> </method> <method name="remove_node"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> <description> Deletes the given node from the graph. </description> </method> <method name="remove_transition"> - <return type="void"> - </return> - <argument index="0" name="from" type="StringName"> - </argument> - <argument index="1" name="to" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="from" type="StringName" /> + <argument index="1" name="to" type="StringName" /> <description> Deletes the transition between the two specified nodes. </description> </method> <method name="remove_transition_by_index"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> <description> Deletes the given transition by index. </description> </method> <method name="rename_node"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="new_name" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="new_name" type="StringName" /> <description> Renames the given node. </description> </method> <method name="replace_node"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="node" type="AnimationNode"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="node" type="AnimationNode" /> <description> </description> </method> <method name="set_end_node"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> <description> Sets the given node as the graph end point. </description> </method> <method name="set_graph_offset"> - <return type="void"> - </return> - <argument index="0" name="offset" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="offset" type="Vector2" /> <description> Sets the draw offset of the graph. Used for display in the editor. </description> </method> <method name="set_node_position"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="position" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="position" type="Vector2" /> <description> Sets the node's coordinates. Used for display in the editor. </description> </method> <method name="set_start_node"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> <description> Sets the given node as the graph start point. </description> diff --git a/doc/classes/AnimationNodeStateMachinePlayback.xml b/doc/classes/AnimationNodeStateMachinePlayback.xml index c8468f9c8f..5c11adfaf0 100644 --- a/doc/classes/AnimationNodeStateMachinePlayback.xml +++ b/doc/classes/AnimationNodeStateMachinePlayback.xml @@ -22,60 +22,50 @@ </tutorials> <methods> <method name="get_current_length" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> </description> </method> <method name="get_current_node" qualifiers="const"> - <return type="StringName"> - </return> + <return type="StringName" /> <description> Returns the currently playing animation state. </description> </method> <method name="get_current_play_position" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the playback position within the current animation state. </description> </method> <method name="get_travel_path" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns the current travel path as computed internally by the A* algorithm. </description> </method> <method name="is_playing" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if an animation is playing. </description> </method> <method name="start"> - <return type="void"> - </return> - <argument index="0" name="node" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="node" type="StringName" /> <description> Starts playing the given animation. </description> </method> <method name="stop"> - <return type="void"> - </return> + <return type="void" /> <description> Stops the currently playing animation. </description> </method> <method name="travel"> - <return type="void"> - </return> - <argument index="0" name="to_node" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="to_node" type="StringName" /> <description> Transitions from the current state to another one, following the shortest path. </description> diff --git a/doc/classes/AnimationNodeTransition.xml b/doc/classes/AnimationNodeTransition.xml index 73c7006768..8c859e43be 100644 --- a/doc/classes/AnimationNodeTransition.xml +++ b/doc/classes/AnimationNodeTransition.xml @@ -13,38 +13,28 @@ </tutorials> <methods> <method name="get_input_caption" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="input" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="input" type="int" /> <description> </description> </method> <method name="is_input_set_as_auto_advance" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="input" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="input" type="int" /> <description> </description> </method> <method name="set_input_as_auto_advance"> - <return type="void"> - </return> - <argument index="0" name="input" type="int"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="input" type="int" /> + <argument index="1" name="enable" type="bool" /> <description> </description> </method> <method name="set_input_caption"> - <return type="void"> - </return> - <argument index="0" name="input" type="int"> - </argument> - <argument index="1" name="caption" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="input" type="int" /> + <argument index="1" name="caption" type="String" /> <description> </description> </method> diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index 8a94eee54c..1ef9d81d02 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -15,136 +15,106 @@ </tutorials> <methods> <method name="add_animation"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="animation" type="Animation"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="animation" type="Animation" /> <description> Adds [code]animation[/code] to the player accessible with the key [code]name[/code]. </description> </method> <method name="advance"> - <return type="void"> - </return> - <argument index="0" name="delta" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="delta" type="float" /> <description> Shifts position in the animation timeline and immediately updates the animation. [code]delta[/code] is the time in seconds to shift. Events between the current frame and [code]delta[/code] are handled. </description> </method> <method name="animation_get_next" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="anim_from" type="StringName"> - </argument> + <return type="StringName" /> + <argument index="0" name="anim_from" type="StringName" /> <description> Returns the name of the next animation in the queue. </description> </method> <method name="animation_set_next"> - <return type="void"> - </return> - <argument index="0" name="anim_from" type="StringName"> - </argument> - <argument index="1" name="anim_to" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="anim_from" type="StringName" /> + <argument index="1" name="anim_to" type="StringName" /> <description> Triggers the [code]anim_to[/code] animation when the [code]anim_from[/code] animation completes. </description> </method> <method name="clear_caches"> - <return type="void"> - </return> + <return type="void" /> <description> [AnimationPlayer] caches animated nodes. It may not notice if a node disappears; [method clear_caches] forces it to update the cache again. </description> </method> <method name="clear_queue"> - <return type="void"> - </return> + <return type="void" /> <description> Clears all queued, unplayed animations. </description> </method> <method name="find_animation" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="animation" type="Animation"> - </argument> + <return type="StringName" /> + <argument index="0" name="animation" type="Animation" /> <description> Returns the name of [code]animation[/code] or an empty string if not found. </description> </method> <method name="get_animation" qualifiers="const"> - <return type="Animation"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="Animation" /> + <argument index="0" name="name" type="StringName" /> <description> Returns the [Animation] with key [code]name[/code] or [code]null[/code] if not found. </description> </method> <method name="get_animation_list" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns the list of stored animation names. </description> </method> <method name="get_blend_time" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="anim_from" type="StringName"> - </argument> - <argument index="1" name="anim_to" type="StringName"> - </argument> + <return type="float" /> + <argument index="0" name="anim_from" type="StringName" /> + <argument index="1" name="anim_to" type="StringName" /> <description> Gets the blend time (in seconds) between two animations, referenced by their names. </description> </method> <method name="get_playing_speed" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Gets the actual playing speed of current animation or 0 if not playing. This speed is the [member playback_speed] property multiplied by [code]custom_speed[/code] argument specified when calling the [method play] method. </description> </method> <method name="get_queue"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns a list of the animation names that are currently queued to play. </description> </method> <method name="has_animation" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> <description> Returns [code]true[/code] if the [AnimationPlayer] stores an [Animation] with key [code]name[/code]. </description> </method> <method name="is_playing" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if playing an animation. </description> </method> <method name="play"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName" default=""""> - </argument> - <argument index="1" name="custom_blend" type="float" default="-1"> - </argument> - <argument index="2" name="custom_speed" type="float" default="1.0"> - </argument> - <argument index="3" name="from_end" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" default="""" /> + <argument index="1" name="custom_blend" type="float" default="-1" /> + <argument index="2" name="custom_speed" type="float" default="1.0" /> + <argument index="3" name="from_end" type="bool" default="false" /> <description> Plays the animation with key [code]name[/code]. Custom blend times and speed can be set. If [code]custom_speed[/code] is negative and [code]from_end[/code] is [code]true[/code], the animation will play backwards (which is equivalent to calling [method play_backwards]). The [AnimationPlayer] keeps track of its current or last played animation with [member assigned_animation]. If this method is called with that same animation [code]name[/code], or with no [code]name[/code] parameter, the assigned animation will resume playing if it was paused, or restart if it was stopped (see [method stop] for both pause and stop). If the animation was already playing, it will keep playing. @@ -152,76 +122,57 @@ </description> </method> <method name="play_backwards"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName" default=""""> - </argument> - <argument index="1" name="custom_blend" type="float" default="-1"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" default="""" /> + <argument index="1" name="custom_blend" type="float" default="-1" /> <description> Plays the animation with key [code]name[/code] in reverse. This method is a shorthand for [method play] with [code]custom_speed = -1.0[/code] and [code]from_end = true[/code], so see its description for more information. </description> </method> <method name="queue"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> <description> Queues an animation for playback once the current one is done. [b]Note:[/b] If a looped animation is currently playing, the queued animation will never play unless the looped animation is stopped somehow. </description> </method> <method name="remove_animation"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> <description> Removes the animation with key [code]name[/code]. </description> </method> <method name="rename_animation"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="newname" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="newname" type="StringName" /> <description> Renames an existing animation with key [code]name[/code] to [code]newname[/code]. </description> </method> <method name="seek"> - <return type="void"> - </return> - <argument index="0" name="seconds" type="float"> - </argument> - <argument index="1" name="update" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="seconds" type="float" /> + <argument index="1" name="update" type="bool" default="false" /> <description> Seeks the animation to the [code]seconds[/code] point in time (in seconds). If [code]update[/code] is [code]true[/code], the animation updates too, otherwise it updates at process time. Events between the current frame and [code]seconds[/code] are skipped. </description> </method> <method name="set_blend_time"> - <return type="void"> - </return> - <argument index="0" name="anim_from" type="StringName"> - </argument> - <argument index="1" name="anim_to" type="StringName"> - </argument> - <argument index="2" name="sec" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="anim_from" type="StringName" /> + <argument index="1" name="anim_to" type="StringName" /> + <argument index="2" name="sec" type="float" /> <description> Specifies a blend time (in seconds) between two animations, referenced by their names. </description> </method> <method name="stop"> - <return type="void"> - </return> - <argument index="0" name="reset" type="bool" default="true"> - </argument> + <return type="void" /> + <argument index="0" name="reset" type="bool" default="true" /> <description> Stops or pauses the currently playing animation. If [code]reset[/code] is [code]true[/code], the animation position is reset to [code]0[/code] and the playback speed is reset to [code]1.0[/code]. If [code]reset[/code] is [code]false[/code], the [member current_animation_position] will be kept and calling [method play] or [method play_backwards] without arguments or with the same animation name as [member assigned_animation] will resume the animation. @@ -270,25 +221,21 @@ </members> <signals> <signal name="animation_changed"> - <argument index="0" name="old_name" type="StringName"> - </argument> - <argument index="1" name="new_name" type="StringName"> - </argument> + <argument index="0" name="old_name" type="StringName" /> + <argument index="1" name="new_name" type="StringName" /> <description> Emitted when a queued animation plays after the previous animation was finished. See [method queue]. [b]Note:[/b] The signal is not emitted when the animation is changed via [method play] or from [AnimationTree]. </description> </signal> <signal name="animation_finished"> - <argument index="0" name="anim_name" type="StringName"> - </argument> + <argument index="0" name="anim_name" type="StringName" /> <description> Notifies when an animation finished playing. </description> </signal> <signal name="animation_started"> - <argument index="0" name="anim_name" type="StringName"> - </argument> + <argument index="0" name="anim_name" type="StringName" /> <description> Notifies when an animation starts playing. </description> diff --git a/doc/classes/AnimationTree.xml b/doc/classes/AnimationTree.xml index af7d8d73e8..843dd5a6d1 100644 --- a/doc/classes/AnimationTree.xml +++ b/doc/classes/AnimationTree.xml @@ -7,33 +7,27 @@ Note: When linked with an [AnimationPlayer], several properties and methods of the corresponding [AnimationPlayer] will not function as expected. Playback and transitions should be handled using only the [AnimationTree] and its constituent [AnimationNode](s). The [AnimationPlayer] node should be used solely for adding, deleting, and editing animations. </description> <tutorials> - <link title="AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> + <link title="Using AnimationTree">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html</link> <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> <method name="advance"> - <return type="void"> - </return> - <argument index="0" name="delta" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="delta" type="float" /> <description> Manually advance the animations by the specified time (in seconds). </description> </method> <method name="get_root_motion_transform" qualifiers="const"> - <return type="Transform3D"> - </return> + <return type="Transform3D" /> <description> - Retrieve the motion of the [member root_motion_track] as a [Transform3D] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_TRANSFORM3D], returns an identity transformation. + Retrieve the motion of the [member root_motion_track] as a [Transform3D] that can be used elsewhere. If [member root_motion_track] is not a path to a track of type [constant Animation.TYPE_TRANSFORM3D], returns an identity transformation. See also [member root_motion_track] and [RootMotionView]. </description> </method> <method name="rename_parameter"> - <return type="void"> - </return> - <argument index="0" name="old_name" type="String"> - </argument> - <argument index="1" name="new_name" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="old_name" type="String" /> + <argument index="1" name="new_name" type="String" /> <description> </description> </method> @@ -50,7 +44,7 @@ </member> <member name="root_motion_track" type="NodePath" setter="set_root_motion_track" getter="get_root_motion_track" default="NodePath("")"> The path to the Animation track used for root motion. Paths must be valid scene-tree paths to a node, and must be specified starting from the parent node of the node that will reproduce the animation. To specify a track that controls properties or bones, append its name after the path, separated by [code]":"[/code]. For example, [code]"character/skeleton:ankle"[/code] or [code]"character/mesh:transform/local"[/code]. - If the track has type [constant Animation.TYPE_TRANSFORM3D], the transformation will be cancelled visually, and the animation will appear to stay in place. + If the track has type [constant Animation.TYPE_TRANSFORM3D], the transformation will be cancelled visually, and the animation will appear to stay in place. See also [method get_root_motion_transform] and [RootMotionView]. </member> <member name="tree_root" type="AnimationNode" setter="set_tree_root" getter="get_tree_root"> The root animation node of this [AnimationTree]. See [AnimationNode]. diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml index f52c810ad2..25f67f0571 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -14,38 +14,32 @@ </tutorials> <methods> <method name="get_overlapping_areas" qualifiers="const"> - <return type="Area2D[]"> - </return> + <return type="Area2D[]" /> <description> Returns a list of intersecting [Area2D]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. </description> </method> <method name="get_overlapping_bodies" qualifiers="const"> - <return type="Node2D[]"> - </return> + <return type="Node2D[]" /> <description> Returns a list of intersecting [PhysicsBody2D]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. </description> </method> <method name="overlaps_area" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="area" type="Node"> - </argument> + <return type="bool" /> + <argument index="0" name="area" type="Node" /> <description> If [code]true[/code], the given area overlaps the Area2D. - [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. + [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, the list of overlaps is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="overlaps_body" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="body" type="Node"> - </argument> + <return type="bool" /> + <argument index="0" name="body" type="Node" /> <description> If [code]true[/code], the given physics body overlaps the Area2D. [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. - The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics body themselves, they register their tiles with collision shapes as a virtual physics body). + The [code]body[/code] argument can either be a [PhysicsBody2D] or a [TileMap] instance (while TileMaps are not physics bodies themselves, they register their tiles with collision shapes as a virtual physics body). </description> </method> </methods> @@ -91,30 +85,24 @@ </members> <signals> <signal name="area_entered"> - <argument index="0" name="area" type="Area2D"> - </argument> + <argument index="0" name="area" type="Area2D" /> <description> Emitted when another Area2D enters this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [code]area[/code] the other Area2D. </description> </signal> <signal name="area_exited"> - <argument index="0" name="area" type="Area2D"> - </argument> + <argument index="0" name="area" type="Area2D" /> <description> Emitted when another Area2D exits this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [code]area[/code] the other Area2D. </description> </signal> <signal name="area_shape_entered"> - <argument index="0" name="area_rid" type="RID"> - </argument> - <argument index="1" name="area" type="Area2D"> - </argument> - <argument index="2" name="area_shape" type="int"> - </argument> - <argument index="3" name="local_shape" type="int"> - </argument> + <argument index="0" name="area_rid" type="RID" /> + <argument index="1" name="area" type="Area2D" /> + <argument index="2" name="area_shape" type="int" /> + <argument index="3" name="local_shape" type="int" /> <description> Emitted when one of another Area2D's [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [code]area_id[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D]. @@ -124,14 +112,10 @@ </description> </signal> <signal name="area_shape_exited"> - <argument index="0" name="area_rid" type="RID"> - </argument> - <argument index="1" name="area" type="Area2D"> - </argument> - <argument index="2" name="area_shape" type="int"> - </argument> - <argument index="3" name="local_shape" type="int"> - </argument> + <argument index="0" name="area_rid" type="RID" /> + <argument index="1" name="area" type="Area2D" /> + <argument index="2" name="area_shape" type="int" /> + <argument index="3" name="local_shape" type="int" /> <description> Emitted when one of another Area2D's [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [code]area_id[/code] the [RID] of the other Area2D's [CollisionObject2D] used by the [PhysicsServer2D]. @@ -141,30 +125,24 @@ </description> </signal> <signal name="body_entered"> - <argument index="0" name="body" type="Node2D"> - </argument> + <argument index="0" name="body" type="Node2D" /> <description> Emitted when a [PhysicsBody2D] or [TileMap] enters this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. </description> </signal> <signal name="body_exited"> - <argument index="0" name="body" type="Node2D"> - </argument> + <argument index="0" name="body" type="Node2D" /> <description> Emitted when a [PhysicsBody2D] or [TileMap] exits this Area2D. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. </description> </signal> <signal name="body_shape_entered"> - <argument index="0" name="body_rid" type="RID"> - </argument> - <argument index="1" name="body" type="Node2D"> - </argument> - <argument index="2" name="body_shape" type="int"> - </argument> - <argument index="3" name="local_shape" type="int"> - </argument> + <argument index="0" name="body_rid" type="RID" /> + <argument index="1" name="body" type="Node2D" /> + <argument index="2" name="body_shape" type="int" /> + <argument index="3" name="local_shape" type="int" /> <description> Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s enters one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. [code]body_id[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. @@ -174,14 +152,10 @@ </description> </signal> <signal name="body_shape_exited"> - <argument index="0" name="body_rid" type="RID"> - </argument> - <argument index="1" name="body" type="Node2D"> - </argument> - <argument index="2" name="body_shape" type="int"> - </argument> - <argument index="3" name="local_shape" type="int"> - </argument> + <argument index="0" name="body_rid" type="RID" /> + <argument index="1" name="body" type="Node2D" /> + <argument index="2" name="body_shape" type="int" /> + <argument index="3" name="local_shape" type="int" /> <description> Emitted when one of a [PhysicsBody2D] or [TileMap]'s [Shape2D]s exits one of this Area2D's [Shape2D]s. Requires [member monitoring] to be set to [code]true[/code]. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. [code]body_id[/code] the [RID] of the [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. diff --git a/doc/classes/Area3D.xml b/doc/classes/Area3D.xml index cc31b6c203..e91cfd79a1 100644 --- a/doc/classes/Area3D.xml +++ b/doc/classes/Area3D.xml @@ -12,34 +12,28 @@ </tutorials> <methods> <method name="get_overlapping_areas" qualifiers="const"> - <return type="Area3D[]"> - </return> + <return type="Area3D[]" /> <description> Returns a list of intersecting [Area3D]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. </description> </method> <method name="get_overlapping_bodies" qualifiers="const"> - <return type="Node3D[]"> - </return> + <return type="Node3D[]" /> <description> Returns a list of intersecting [PhysicsBody3D]s. For performance reasons (collisions are all processed at the same time) this list is modified once during the physics step, not immediately after objects are moved. Consider using signals instead. </description> </method> <method name="overlaps_area" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="area" type="Node"> - </argument> + <return type="bool" /> + <argument index="0" name="area" type="Node" /> <description> If [code]true[/code], the given area overlaps the Area3D. [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="overlaps_body" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="body" type="Node"> - </argument> + <return type="bool" /> + <argument index="0" name="body" type="Node" /> <description> If [code]true[/code], the given physics body overlaps the Area3D. [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of overlaps is updated once per frame and before the physics step. Consider using signals instead. @@ -98,33 +92,36 @@ <member name="space_override" type="int" setter="set_space_override_mode" getter="get_space_override_mode" enum="Area3D.SpaceOverride" default="0"> Override mode for gravity and damping calculations within this area. See [enum SpaceOverride] for possible values. </member> + <member name="wind_attenuation_factor" type="float" setter="set_wind_attenuation_factor" getter="get_wind_attenuation_factor" default="0.0"> + The exponential rate at which wind force decreases with distance from its origin. + </member> + <member name="wind_force_magnitude" type="float" setter="set_wind_force_magnitude" getter="get_wind_force_magnitude" default="0.0"> + The magnitude of area-specific wind force. + </member> + <member name="wind_source_path" type="NodePath" setter="set_wind_source_path" getter="get_wind_source_path" default="NodePath("")"> + The [Node3D] which is used to specify the the direction and origin of an area-specific wind force. The direction is opposite to the z-axis of the [Node3D]'s local transform, and its origin is the origin of the [Node3D]'s local transform. + </member> </members> <signals> <signal name="area_entered"> - <argument index="0" name="area" type="Area3D"> - </argument> + <argument index="0" name="area" type="Area3D" /> <description> Emitted when another Area3D enters this Area3D. Requires [member monitoring] to be set to [code]true[/code]. [code]area[/code] the other Area3D. </description> </signal> <signal name="area_exited"> - <argument index="0" name="area" type="Area3D"> - </argument> + <argument index="0" name="area" type="Area3D" /> <description> Emitted when another Area3D exits this Area3D. Requires [member monitoring] to be set to [code]true[/code]. [code]area[/code] the other Area3D. </description> </signal> <signal name="area_shape_entered"> - <argument index="0" name="area_rid" type="RID"> - </argument> - <argument index="1" name="area" type="Area3D"> - </argument> - <argument index="2" name="area_shape" type="int"> - </argument> - <argument index="3" name="local_shape" type="int"> - </argument> + <argument index="0" name="area_rid" type="RID" /> + <argument index="1" name="area" type="Area3D" /> + <argument index="2" name="area_shape" type="int" /> + <argument index="3" name="local_shape" type="int" /> <description> Emitted when one of another Area3D's [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. [code]area_id[/code] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D]. @@ -134,14 +131,10 @@ </description> </signal> <signal name="area_shape_exited"> - <argument index="0" name="area_rid" type="RID"> - </argument> - <argument index="1" name="area" type="Area3D"> - </argument> - <argument index="2" name="area_shape" type="int"> - </argument> - <argument index="3" name="local_shape" type="int"> - </argument> + <argument index="0" name="area_rid" type="RID" /> + <argument index="1" name="area" type="Area3D" /> + <argument index="2" name="area_shape" type="int" /> + <argument index="3" name="local_shape" type="int" /> <description> Emitted when one of another Area3D's [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. [code]area_id[/code] the [RID] of the other Area3D's [CollisionObject3D] used by the [PhysicsServer3D]. @@ -151,30 +144,24 @@ </description> </signal> <signal name="body_entered"> - <argument index="0" name="body" type="Node3D"> - </argument> + <argument index="0" name="body" type="Node3D" /> <description> Emitted when a [PhysicsBody3D] or [GridMap] enters this Area3D. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. </description> </signal> <signal name="body_exited"> - <argument index="0" name="body" type="Node3D"> - </argument> + <argument index="0" name="body" type="Node3D" /> <description> Emitted when a [PhysicsBody3D] or [GridMap] exits this Area3D. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. </description> </signal> <signal name="body_shape_entered"> - <argument index="0" name="body_rid" type="RID"> - </argument> - <argument index="1" name="body" type="Node3D"> - </argument> - <argument index="2" name="body_shape" type="int"> - </argument> - <argument index="3" name="local_shape" type="int"> - </argument> + <argument index="0" name="body_rid" type="RID" /> + <argument index="1" name="body" type="Node3D" /> + <argument index="2" name="body_shape" type="int" /> + <argument index="3" name="local_shape" type="int" /> <description> Emitted when one of a [PhysicsBody3D] or [GridMap]'s [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. [code]body_id[/code] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. @@ -184,14 +171,10 @@ </description> </signal> <signal name="body_shape_exited"> - <argument index="0" name="body_rid" type="RID"> - </argument> - <argument index="1" name="body" type="Node3D"> - </argument> - <argument index="2" name="body_shape" type="int"> - </argument> - <argument index="3" name="local_shape" type="int"> - </argument> + <argument index="0" name="body_rid" type="RID" /> + <argument index="1" name="body" type="Node3D" /> + <argument index="2" name="body_shape" type="int" /> + <argument index="3" name="local_shape" type="int" /> <description> Emitted when one of a [PhysicsBody3D] or [GridMap]'s [Shape3D]s enters one of this Area3D's [Shape3D]s. Requires [member monitoring] to be set to [code]true[/code]. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. [code]body_id[/code] the [RID] of the [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index 543ec096c7..02c6b18d55 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Array" version="4.0"> <brief_description> - Generic array datatype. + A generic array datatype. </brief_description> <description> - Generic array which can contain several elements of any type, accessible by a numerical index starting at 0. Negative indices can be used to count from the back, like in Python (-1 is the last element, -2 the second to last, etc.). + A generic array that can contain several elements of any type, accessible by a numerical index starting at 0. Negative indices can be used to count from the back, like in Python (-1 is the last element, -2 is the second to last, etc.). [b]Example:[/b] [codeblocks] [gdscript] @@ -39,123 +39,98 @@ [/csharp] [/codeblocks] [b]Note:[/b] Concatenating with the [code]+=[/code] operator will create a new array, which has a cost. If you want to append another array to an existing array, [method append_array] is more efficient. - [b]Note:[/b] Arrays are always passed by reference. To get a copy of an array which can be modified independently of the original array, use [method duplicate]. + [b]Note:[/b] Arrays are always passed by reference. To get a copy of an array that can be modified independently of the original array, use [method duplicate]. [b]Note:[/b] When declaring an array with [code]const[/code], the array itself can still be mutated by defining the values at individual indices or pushing/removing elements. Using [code]const[/code] will only prevent assigning the constant with another value after it was initialized. </description> <tutorials> </tutorials> <methods> <method name="Array" qualifiers="constructor"> - <return type="Array"> - </return> + <return type="Array" /> <description> Constructs an empty [Array]. </description> </method> <method name="Array" qualifiers="constructor"> - <return type="Array"> - </return> - <argument index="0" name="from" type="Array"> - </argument> + <return type="Array" /> + <argument index="0" name="from" type="Array" /> <description> Constructs an [Array] as a copy of the given [Array]. </description> </method> <method name="Array" qualifiers="constructor"> - <return type="Array"> - </return> - <argument index="0" name="from" type="PackedByteArray"> - </argument> + <return type="Array" /> + <argument index="0" name="from" type="PackedByteArray" /> <description> Constructs an array from a [PackedByteArray]. </description> </method> <method name="Array" qualifiers="constructor"> - <return type="Array"> - </return> - <argument index="0" name="from" type="PackedColorArray"> - </argument> + <return type="Array" /> + <argument index="0" name="from" type="PackedColorArray" /> <description> Constructs an array from a [PackedColorArray]. </description> </method> <method name="Array" qualifiers="constructor"> - <return type="Array"> - </return> - <argument index="0" name="from" type="PackedFloat32Array"> - </argument> + <return type="Array" /> + <argument index="0" name="from" type="PackedFloat32Array" /> <description> Constructs an array from a [PackedFloat32Array]. </description> </method> <method name="Array" qualifiers="constructor"> - <return type="Array"> - </return> - <argument index="0" name="from" type="PackedFloat64Array"> - </argument> + <return type="Array" /> + <argument index="0" name="from" type="PackedFloat64Array" /> <description> Constructs an array from a [PackedFloat64Array]. </description> </method> <method name="Array" qualifiers="constructor"> - <return type="Array"> - </return> - <argument index="0" name="from" type="PackedInt32Array"> - </argument> + <return type="Array" /> + <argument index="0" name="from" type="PackedInt32Array" /> <description> Constructs an array from a [PackedInt32Array]. </description> </method> <method name="Array" qualifiers="constructor"> - <return type="Array"> - </return> - <argument index="0" name="from" type="PackedInt64Array"> - </argument> + <return type="Array" /> + <argument index="0" name="from" type="PackedInt64Array" /> <description> Constructs an array from a [PackedInt64Array]. </description> </method> <method name="Array" qualifiers="constructor"> - <return type="Array"> - </return> - <argument index="0" name="from" type="PackedStringArray"> - </argument> + <return type="Array" /> + <argument index="0" name="from" type="PackedStringArray" /> <description> Constructs an array from a [PackedStringArray]. </description> </method> <method name="Array" qualifiers="constructor"> - <return type="Array"> - </return> - <argument index="0" name="from" type="PackedVector2Array"> - </argument> + <return type="Array" /> + <argument index="0" name="from" type="PackedVector2Array" /> <description> Constructs an array from a [PackedVector2Array]. </description> </method> <method name="Array" qualifiers="constructor"> - <return type="Array"> - </return> - <argument index="0" name="from" type="PackedVector3Array"> - </argument> + <return type="Array" /> + <argument index="0" name="from" type="PackedVector3Array" /> <description> Constructs an array from a [PackedVector3Array]. </description> </method> <method name="append"> - <return type="void"> - </return> - <argument index="0" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="Variant" /> <description> Appends an element at the end of the array (alias of [method push_back]). </description> </method> <method name="append_array"> - <return type="void"> - </return> - <argument index="0" name="array" type="Array"> - </argument> + <return type="void" /> + <argument index="0" name="array" type="Array" /> <description> Appends another array at the end of this array. [codeblock] @@ -167,70 +142,55 @@ </description> </method> <method name="back" qualifiers="const"> - <return type="Variant"> - </return> + <return type="Variant" /> <description> Returns the last element of the array. Prints an error and returns [code]null[/code] if the array is empty. [b]Note:[/b] Calling this function is not the same as writing [code]array[-1][/code]. If the array is empty, accessing by index will pause project execution when running from the editor. </description> </method> <method name="bsearch"> - <return type="int"> - </return> - <argument index="0" name="value" type="Variant"> - </argument> - <argument index="1" name="before" type="bool" default="true"> - </argument> + <return type="int" /> + <argument index="0" name="value" type="Variant" /> + <argument index="1" name="before" type="bool" default="true" /> <description> Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. [b]Note:[/b] Calling [method bsearch] on an unsorted array results in unexpected behavior. </description> </method> <method name="bsearch_custom"> - <return type="int"> - </return> - <argument index="0" name="value" type="Variant"> - </argument> - <argument index="1" name="func" type="Callable"> - </argument> - <argument index="2" name="before" type="bool" default="true"> - </argument> + <return type="int" /> + <argument index="0" name="value" type="Variant" /> + <argument index="1" name="func" type="Callable" /> + <argument index="2" name="before" type="bool" default="true" /> <description> Finds the index of an existing value (or the insertion index that maintains sorting order, if the value is not yet present in the array) using binary search and a custom comparison method. Optionally, a [code]before[/code] specifier can be passed. If [code]false[/code], the returned index comes after all existing entries of the value in the array. The custom method receives two arguments (an element from the array and the value searched for) and must return [code]true[/code] if the first argument is less than the second, and return [code]false[/code] otherwise. [b]Note:[/b] Calling [method bsearch_custom] on an unsorted array results in unexpected behavior. </description> </method> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> Clears the array. This is equivalent to using [method resize] with a size of [code]0[/code]. </description> </method> <method name="count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="value" type="Variant"> - </argument> + <return type="int" /> + <argument index="0" name="value" type="Variant" /> <description> Returns the number of times an element is in the array. </description> </method> <method name="duplicate" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="deep" type="bool" default="false"> - </argument> + <return type="Array" /> + <argument index="0" name="deep" type="bool" default="false" /> <description> Returns a copy of the array. If [code]deep[/code] is [code]true[/code], a deep copy is performed: all nested arrays and dictionaries are duplicated and will not be shared with the original array. If [code]false[/code], a shallow copy is made and references to the original nested arrays and dictionaries are kept, so that modifying a sub-array or dictionary in the copy will also impact those referenced in the source array. </description> </method> <method name="erase"> - <return type="void"> - </return> - <argument index="0" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="Variant" /> <description> Removes the first occurrence of a value from the array. To remove an element by index, use [method remove] instead. [b]Note:[/b] This method acts in-place and doesn't return a value. @@ -238,10 +198,8 @@ </description> </method> <method name="fill"> - <return type="void"> - </return> - <argument index="0" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="Variant" /> <description> Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements: [codeblocks] @@ -259,10 +217,8 @@ </description> </method> <method name="filter" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="method" type="Callable"> - </argument> + <return type="Array" /> + <argument index="0" name="method" type="Callable" /> <description> Calls the provided [Callable] on each element in the array and returns a new array with the elements for which the method returned [code]true[/code]. The callable's method should take one [Variant] parameter (the current array element) and return a boolean value. @@ -277,38 +233,30 @@ </description> </method> <method name="find" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="what" type="Variant"> - </argument> - <argument index="1" name="from" type="int" default="0"> - </argument> + <return type="int" /> + <argument index="0" name="what" type="Variant" /> + <argument index="1" name="from" type="int" default="0" /> <description> Searches the array for a value and returns its index or [code]-1[/code] if not found. Optionally, the initial search index can be passed. </description> </method> <method name="find_last" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="value" type="Variant"> - </argument> + <return type="int" /> + <argument index="0" name="value" type="Variant" /> <description> Searches the array in reverse order for a value and returns its index or [code]-1[/code] if not found. </description> </method> <method name="front" qualifiers="const"> - <return type="Variant"> - </return> + <return type="Variant" /> <description> Returns the first element of the array. Prints an error and returns [code]null[/code] if the array is empty. [b]Note:[/b] Calling this function is not the same as writing [code]array[0][/code]. If the array is empty, accessing by index will pause project execution when running from the editor. </description> </method> <method name="has" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="value" type="Variant"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="Variant" /> <description> Returns [code]true[/code] if the array contains the given value. [codeblocks] @@ -347,20 +295,16 @@ </description> </method> <method name="hash" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns a hashed integer value representing the array and its contents. [b]Note:[/b] Arrays with equal contents can still produce different hashes. Only the exact same arrays will produce the same hashed integer value. </description> </method> <method name="insert"> - <return type="void"> - </return> - <argument index="0" name="position" type="int"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> + <return type="int" /> + <argument index="0" name="position" type="int" /> + <argument index="1" name="value" type="Variant" /> <description> Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]pos == size()[/code]). [b]Note:[/b] This method acts in-place and doesn't return a value. @@ -368,17 +312,14 @@ </description> </method> <method name="is_empty" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the array is empty. </description> </method> <method name="map" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="method" type="Callable"> - </argument> + <return type="Array" /> + <argument index="0" name="method" type="Callable" /> <description> Calls the provided [Callable] for each element in the array and returns a new array filled with values returned by the method. The callable's method should take one [Variant] parameter (the current array element) and can return any [Variant]. @@ -393,124 +334,105 @@ </description> </method> <method name="max" qualifiers="const"> - <return type="Variant"> - </return> + <return type="Variant" /> <description> Returns the maximum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned. </description> </method> <method name="min" qualifiers="const"> - <return type="Variant"> - </return> + <return type="Variant" /> <description> Returns the minimum value contained in the array if all elements are of comparable types. If the elements can't be compared, [code]null[/code] is returned. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Array"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Array" /> <description> </description> </method> <method name="operator +" qualifiers="operator"> - <return type="Array"> - </return> - <argument index="0" name="right" type="Array"> - </argument> + <return type="Array" /> + <argument index="0" name="right" type="Array" /> <description> </description> </method> <method name="operator <" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Array"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Array" /> <description> </description> </method> <method name="operator <=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Array"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Array" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Array"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Array" /> <description> </description> </method> <method name="operator >" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Array"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Array" /> <description> </description> </method> <method name="operator >=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Array"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Array" /> <description> </description> </method> <method name="operator []" qualifiers="operator"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> + <method name="pop_at"> + <return type="Variant" /> + <argument index="0" name="position" type="int" /> + <description> + Removes and returns the element of the array at index [code]position[/code]. If negative, [code]position[/code] is considered relative to the end of the array. Leaves the array untouched and returns [code]null[/code] if the array is empty or if it's accessed out of bounds. An error message is printed when the array is accessed out of bounds, but not when the array is empty. + [b]Note:[/b] On large arrays, this method can be slower than [method pop_back] as it will reindex the array's elements that are located after the removed element. The larger the array and the lower the index of the removed element, the slower [method pop_at] will be. + </description> + </method> <method name="pop_back"> - <return type="Variant"> - </return> + <return type="Variant" /> <description> Removes and returns the last element of the array. Returns [code]null[/code] if the array is empty, without printing an error message. See also [method pop_front]. </description> </method> <method name="pop_front"> - <return type="Variant"> - </return> + <return type="Variant" /> <description> Removes and returns the first element of the array. Returns [code]null[/code] if the array is empty, without printing an error message. See also [method pop_back]. [b]Note:[/b] On large arrays, this method is much slower than [method pop_back] as it will reindex all the array's elements every time it's called. The larger the array, the slower [method pop_front] will be. </description> </method> <method name="push_back"> - <return type="void"> - </return> - <argument index="0" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="Variant" /> <description> Appends an element at the end of the array. See also [method push_front]. </description> </method> <method name="push_front"> - <return type="void"> - </return> - <argument index="0" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="Variant" /> <description> Adds an element at the beginning of the array. See also [method push_back]. [b]Note:[/b] On large arrays, this method is much slower than [method push_back] as it will reindex all the array's elements every time it's called. The larger the array, the slower [method push_front] will be. </description> </method> <method name="reduce" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="method" type="Callable"> - </argument> - <argument index="1" name="accum" type="Variant" default="null"> - </argument> + <return type="Variant" /> + <argument index="0" name="method" type="Callable" /> + <argument index="1" name="accum" type="Variant" default="null" /> <description> Calls the provided [Callable] for each element in array and accumulates the result in [code]accum[/code]. The callable's method takes two arguments: the current value of [code]accum[/code] and the current array element. If [code]accum[/code] is [code]null[/code] (default value), the iteration will start from the second element, with the first one used as initial value of [code]accum[/code]. @@ -525,10 +447,8 @@ </description> </method> <method name="remove"> - <return type="void"> - </return> - <argument index="0" name="position" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="position" type="int" /> <description> Removes an element from the array by index. If the index does not exist in the array, nothing happens. To remove an element by searching for its value, use [method erase] instead. [b]Note:[/b] This method acts in-place and doesn't return a value. @@ -536,64 +456,50 @@ </description> </method> <method name="resize"> - <return type="int"> - </return> - <argument index="0" name="size" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="size" type="int" /> <description> Resizes the array to contain a different number of elements. If the array size is smaller, elements are cleared, if bigger, new elements are [code]null[/code]. </description> </method> <method name="reverse"> - <return type="void"> - </return> + <return type="void" /> <description> Reverses the order of the elements in the array. </description> </method> <method name="rfind" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="what" type="Variant"> - </argument> - <argument index="1" name="from" type="int" default="-1"> - </argument> + <return type="int" /> + <argument index="0" name="what" type="Variant" /> + <argument index="1" name="from" type="int" default="-1" /> <description> Searches the array in reverse order. Optionally, a start search index can be passed. If negative, the start index is considered relative to the end of the array. </description> </method> <method name="shuffle"> - <return type="void"> - </return> + <return type="void" /> <description> Shuffles the array such that the items will have a random order. This method uses the global random number generator common to methods such as [method @GlobalScope.randi]. Call [method @GlobalScope.randomize] to ensure that a new seed will be used each time if you want non-reproducible shuffling. </description> </method> <method name="size" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of elements in the array. </description> </method> <method name="slice" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="begin" type="int"> - </argument> - <argument index="1" name="end" type="int"> - </argument> - <argument index="2" name="step" type="int" default="1"> - </argument> - <argument index="3" name="deep" type="bool" default="false"> - </argument> + <return type="Array" /> + <argument index="0" name="begin" type="int" /> + <argument index="1" name="end" type="int" /> + <argument index="2" name="step" type="int" default="1" /> + <argument index="3" name="deep" type="bool" default="false" /> <description> - Duplicates the subset described in the function and returns it in an array, deeply copying the array if [code]deep[/code] is [code]true[/code]. Lower and upper index are inclusive, with the [code]step[/code] describing the change between indices while slicing. + Duplicates the subset described in the function and returns it in an array, deeply copying the array if [code]deep[/code] is [code]true[/code]. Lower and upper index are inclusive, with the [code]step[/code] describing the change between indices while slicing. If [code]end[/code] is an invalid value, the end of the array is used. </description> </method> <method name="sort"> - <return type="void"> - </return> + <return type="void" /> <description> Sorts the array. [b]Note:[/b] Strings are sorted in alphabetical order (as opposed to natural order). This may lead to unexpected behavior when sorting an array of strings ending with a sequence of numbers. Consider the following example: @@ -610,10 +516,8 @@ </description> </method> <method name="sort_custom"> - <return type="void"> - </return> - <argument index="0" name="func" type="Callable"> - </argument> + <return type="void" /> + <argument index="0" name="func" type="Callable" /> <description> Sorts the array using a custom method. The custom method receives two arguments (a pair of elements from the array) and must return either [code]true[/code] or [code]false[/code]. For two elements [code]a[/code] and [code]b[/code], if the given method returns [code]true[/code], element [code]b[/code] will be after element [code]a[/code] in the array. [b]Note:[/b] you cannot randomize the return value as the heapsort algorithm expects a deterministic result. Doing so will result in unexpected behavior. diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 7fbf53c7d1..670a25ab83 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -51,190 +51,144 @@ </tutorials> <methods> <method name="add_blend_shape"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> <description> Adds name for a blend shape that will be added with [method add_surface_from_arrays]. Must be called before surface is added. </description> </method> <method name="add_surface_from_arrays"> - <return type="void"> - </return> - <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType"> - </argument> - <argument index="1" name="arrays" type="Array"> - </argument> - <argument index="2" name="blend_shapes" type="Array" default="[]"> - </argument> + <return type="void" /> + <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType" /> + <argument index="1" name="arrays" type="Array" /> + <argument index="2" name="blend_shapes" type="Array" default="[]" /> <argument index="3" name="lods" type="Dictionary" default="{ -}"> - </argument> - <argument index="4" name="compress_flags" type="int" default="0"> - </argument> +}" /> + <argument index="4" name="compress_flags" type="int" default="0" /> <description> Creates a new surface. - Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface. + Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface. The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used. </description> </method> <method name="clear_blend_shapes"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all blend shapes from this [ArrayMesh]. </description> </method> <method name="clear_surfaces"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all surfaces from this [ArrayMesh]. </description> </method> <method name="get_blend_shape_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of blend shapes that the [ArrayMesh] holds. </description> </method> <method name="get_blend_shape_name" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="StringName" /> + <argument index="0" name="index" type="int" /> <description> Returns the name of the blend shape at this index. </description> </method> <method name="lightmap_unwrap"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="transform" type="Transform3D"> - </argument> - <argument index="1" name="texel_size" type="float"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="transform" type="Transform3D" /> + <argument index="1" name="texel_size" type="float" /> <description> Will perform a UV unwrap on the [ArrayMesh] to prepare the mesh for lightmapping. </description> </method> <method name="regen_normal_maps"> - <return type="void"> - </return> + <return type="void" /> <description> Will regenerate normal maps for the [ArrayMesh]. </description> </method> <method name="set_blend_shape_name"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="name" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> + <argument index="1" name="name" type="StringName" /> <description> + Sets the name of the blend shape at this index. </description> </method> <method name="surface_find_by_name" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="name" type="String" /> <description> Returns the index of the first surface with this name held within this [ArrayMesh]. If none are found, -1 is returned. </description> </method> <method name="surface_get_array_index_len" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="surf_idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="surf_idx" type="int" /> <description> Returns the length in indices of the index array in the requested surface (see [method add_surface_from_arrays]). </description> </method> <method name="surface_get_array_len" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="surf_idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="surf_idx" type="int" /> <description> Returns the length in vertices of the vertex array in the requested surface (see [method add_surface_from_arrays]). </description> </method> <method name="surface_get_format" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="surf_idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="surf_idx" type="int" /> <description> Returns the format mask of the requested surface (see [method add_surface_from_arrays]). </description> </method> <method name="surface_get_name" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="surf_idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="surf_idx" type="int" /> <description> Gets the name assigned to this surface. </description> </method> <method name="surface_get_primitive_type" qualifiers="const"> - <return type="int" enum="Mesh.PrimitiveType"> - </return> - <argument index="0" name="surf_idx" type="int"> - </argument> + <return type="int" enum="Mesh.PrimitiveType" /> + <argument index="0" name="surf_idx" type="int" /> <description> Returns the primitive type of the requested surface (see [method add_surface_from_arrays]). </description> </method> <method name="surface_set_name"> - <return type="void"> - </return> - <argument index="0" name="surf_idx" type="int"> - </argument> - <argument index="1" name="name" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="surf_idx" type="int" /> + <argument index="1" name="name" type="String" /> <description> Sets a name for a given surface. </description> </method> <method name="surface_update_attribute_region"> - <return type="void"> - </return> - <argument index="0" name="surf_idx" type="int"> - </argument> - <argument index="1" name="offset" type="int"> - </argument> - <argument index="2" name="data" type="PackedByteArray"> - </argument> + <return type="void" /> + <argument index="0" name="surf_idx" type="int" /> + <argument index="1" name="offset" type="int" /> + <argument index="2" name="data" type="PackedByteArray" /> <description> </description> </method> <method name="surface_update_skin_region"> - <return type="void"> - </return> - <argument index="0" name="surf_idx" type="int"> - </argument> - <argument index="1" name="offset" type="int"> - </argument> - <argument index="2" name="data" type="PackedByteArray"> - </argument> + <return type="void" /> + <argument index="0" name="surf_idx" type="int" /> + <argument index="1" name="offset" type="int" /> + <argument index="2" name="data" type="PackedByteArray" /> <description> </description> </method> <method name="surface_update_vertex_region"> - <return type="void"> - </return> - <argument index="0" name="surf_idx" type="int"> - </argument> - <argument index="1" name="offset" type="int"> - </argument> - <argument index="2" name="data" type="PackedByteArray"> - </argument> + <return type="void" /> + <argument index="0" name="surf_idx" type="int" /> + <argument index="1" name="offset" type="int" /> + <argument index="2" name="data" type="PackedByteArray" /> <description> </description> </method> diff --git a/doc/classes/AudioEffectCapture.xml b/doc/classes/AudioEffectCapture.xml index c7ee621ca6..8e46acbd07 100644 --- a/doc/classes/AudioEffectCapture.xml +++ b/doc/classes/AudioEffectCapture.xml @@ -11,55 +11,46 @@ </tutorials> <methods> <method name="can_get_buffer" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="frames" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="frames" type="int" /> <description> Returns [code]true[/code] if at least [code]frames[/code] audio frames are available to read in the internal ring buffer. </description> </method> <method name="clear_buffer"> - <return type="void"> - </return> + <return type="void" /> <description> Clears the internal ring buffer. </description> </method> <method name="get_buffer"> - <return type="PackedVector2Array"> - </return> - <argument index="0" name="frames" type="int"> - </argument> + <return type="PackedVector2Array" /> + <argument index="0" name="frames" type="int" /> <description> Gets the next [code]frames[/code] audio samples from the internal ring buffer. Returns a [PackedVector2Array] containing exactly [code]frames[/code] audio samples if available, or an empty [PackedVector2Array] if insufficient data was available. </description> </method> <method name="get_buffer_length_frames" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the total size of the internal ring buffer in frames. </description> </method> <method name="get_discarded_frames" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of audio frames discarded from the audio bus due to full buffer. </description> </method> <method name="get_frames_available" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of frames available to read using [method get_buffer]. </description> </method> <method name="get_pushed_frames" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of audio frames inserted from the audio bus. </description> diff --git a/doc/classes/AudioEffectChorus.xml b/doc/classes/AudioEffectChorus.xml index 30913a1529..cc93a8fc03 100644 --- a/doc/classes/AudioEffectChorus.xml +++ b/doc/classes/AudioEffectChorus.xml @@ -10,110 +10,80 @@ </tutorials> <methods> <method name="get_voice_cutoff_hz" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="voice_idx" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="voice_idx" type="int" /> <description> </description> </method> <method name="get_voice_delay_ms" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="voice_idx" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="voice_idx" type="int" /> <description> </description> </method> <method name="get_voice_depth_ms" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="voice_idx" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="voice_idx" type="int" /> <description> </description> </method> <method name="get_voice_level_db" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="voice_idx" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="voice_idx" type="int" /> <description> </description> </method> <method name="get_voice_pan" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="voice_idx" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="voice_idx" type="int" /> <description> </description> </method> <method name="get_voice_rate_hz" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="voice_idx" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="voice_idx" type="int" /> <description> </description> </method> <method name="set_voice_cutoff_hz"> - <return type="void"> - </return> - <argument index="0" name="voice_idx" type="int"> - </argument> - <argument index="1" name="cutoff_hz" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="voice_idx" type="int" /> + <argument index="1" name="cutoff_hz" type="float" /> <description> </description> </method> <method name="set_voice_delay_ms"> - <return type="void"> - </return> - <argument index="0" name="voice_idx" type="int"> - </argument> - <argument index="1" name="delay_ms" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="voice_idx" type="int" /> + <argument index="1" name="delay_ms" type="float" /> <description> </description> </method> <method name="set_voice_depth_ms"> - <return type="void"> - </return> - <argument index="0" name="voice_idx" type="int"> - </argument> - <argument index="1" name="depth_ms" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="voice_idx" type="int" /> + <argument index="1" name="depth_ms" type="float" /> <description> </description> </method> <method name="set_voice_level_db"> - <return type="void"> - </return> - <argument index="0" name="voice_idx" type="int"> - </argument> - <argument index="1" name="level_db" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="voice_idx" type="int" /> + <argument index="1" name="level_db" type="float" /> <description> </description> </method> <method name="set_voice_pan"> - <return type="void"> - </return> - <argument index="0" name="voice_idx" type="int"> - </argument> - <argument index="1" name="pan" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="voice_idx" type="int" /> + <argument index="1" name="pan" type="float" /> <description> </description> </method> <method name="set_voice_rate_hz"> - <return type="void"> - </return> - <argument index="0" name="voice_idx" type="int"> - </argument> - <argument index="1" name="rate_hz" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="voice_idx" type="int" /> + <argument index="1" name="rate_hz" type="float" /> <description> </description> </method> diff --git a/doc/classes/AudioEffectEQ.xml b/doc/classes/AudioEffectEQ.xml index c27c2f221c..ddc1af0618 100644 --- a/doc/classes/AudioEffectEQ.xml +++ b/doc/classes/AudioEffectEQ.xml @@ -11,28 +11,22 @@ </tutorials> <methods> <method name="get_band_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of bands of the equalizer. </description> </method> <method name="get_band_gain_db" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="band_idx" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="band_idx" type="int" /> <description> Returns the band's gain at the specified index, in dB. </description> </method> <method name="set_band_gain_db"> - <return type="void"> - </return> - <argument index="0" name="band_idx" type="int"> - </argument> - <argument index="1" name="volume_db" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="band_idx" type="int" /> + <argument index="1" name="volume_db" type="float" /> <description> Sets band's gain at the specified index, in dB. </description> diff --git a/doc/classes/AudioEffectRecord.xml b/doc/classes/AudioEffectRecord.xml index 872ddf3b0f..9656718ee8 100644 --- a/doc/classes/AudioEffectRecord.xml +++ b/doc/classes/AudioEffectRecord.xml @@ -12,24 +12,20 @@ </tutorials> <methods> <method name="get_recording" qualifiers="const"> - <return type="AudioStreamSample"> - </return> + <return type="AudioStreamSample" /> <description> Returns the recorded sample. </description> </method> <method name="is_recording_active" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns whether the recording is active or not. </description> </method> <method name="set_recording_active"> - <return type="void"> - </return> - <argument index="0" name="record" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="record" type="bool" /> <description> If [code]true[/code], the sound will be recorded. Note that restarting the recording will remove the previously recorded sample. </description> diff --git a/doc/classes/AudioEffectSpectrumAnalyzerInstance.xml b/doc/classes/AudioEffectSpectrumAnalyzerInstance.xml index 53428cdfb8..0febf2abc1 100644 --- a/doc/classes/AudioEffectSpectrumAnalyzerInstance.xml +++ b/doc/classes/AudioEffectSpectrumAnalyzerInstance.xml @@ -8,14 +8,10 @@ </tutorials> <methods> <method name="get_magnitude_for_frequency_range" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="from_hz" type="float"> - </argument> - <argument index="1" name="to_hz" type="float"> - </argument> - <argument index="2" name="mode" type="int" enum="AudioEffectSpectrumAnalyzerInstance.MagnitudeMode" default="1"> - </argument> + <return type="Vector2" /> + <argument index="0" name="from_hz" type="float" /> + <argument index="1" name="to_hz" type="float" /> + <argument index="2" name="mode" type="int" enum="AudioEffectSpectrumAnalyzerInstance.MagnitudeMode" default="1" /> <description> </description> </method> diff --git a/doc/classes/AudioServer.xml b/doc/classes/AudioServer.xml index dafc0065f6..66fa57cb52 100644 --- a/doc/classes/AudioServer.xml +++ b/doc/classes/AudioServer.xml @@ -14,380 +14,291 @@ </tutorials> <methods> <method name="add_bus"> - <return type="void"> - </return> - <argument index="0" name="at_position" type="int" default="-1"> - </argument> + <return type="void" /> + <argument index="0" name="at_position" type="int" default="-1" /> <description> Adds a bus at [code]at_position[/code]. </description> </method> <method name="add_bus_effect"> - <return type="void"> - </return> - <argument index="0" name="bus_idx" type="int"> - </argument> - <argument index="1" name="effect" type="AudioEffect"> - </argument> - <argument index="2" name="at_position" type="int" default="-1"> - </argument> + <return type="void" /> + <argument index="0" name="bus_idx" type="int" /> + <argument index="1" name="effect" type="AudioEffect" /> + <argument index="2" name="at_position" type="int" default="-1" /> <description> Adds an [AudioEffect] effect to the bus [code]bus_idx[/code] at [code]at_position[/code]. </description> </method> <method name="capture_get_device"> - <return type="String"> - </return> + <return type="String" /> <description> Name of the current device for audio input (see [method capture_get_device_list]). </description> </method> <method name="capture_get_device_list"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns the names of all audio input devices detected on the system. </description> </method> <method name="capture_set_device"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> <description> Sets which audio input device is used for audio capture. </description> </method> <method name="generate_bus_layout" qualifiers="const"> - <return type="AudioBusLayout"> - </return> + <return type="AudioBusLayout" /> <description> Generates an [AudioBusLayout] using the available buses and effects. </description> </method> <method name="get_bus_channels" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="bus_idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="bus_idx" type="int" /> <description> Returns the amount of channels of the bus at index [code]bus_idx[/code]. </description> </method> <method name="get_bus_effect"> - <return type="AudioEffect"> - </return> - <argument index="0" name="bus_idx" type="int"> - </argument> - <argument index="1" name="effect_idx" type="int"> - </argument> + <return type="AudioEffect" /> + <argument index="0" name="bus_idx" type="int" /> + <argument index="1" name="effect_idx" type="int" /> <description> Returns the [AudioEffect] at position [code]effect_idx[/code] in bus [code]bus_idx[/code]. </description> </method> <method name="get_bus_effect_count"> - <return type="int"> - </return> - <argument index="0" name="bus_idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="bus_idx" type="int" /> <description> Returns the number of effects on the bus at [code]bus_idx[/code]. </description> </method> <method name="get_bus_effect_instance"> - <return type="AudioEffectInstance"> - </return> - <argument index="0" name="bus_idx" type="int"> - </argument> - <argument index="1" name="effect_idx" type="int"> - </argument> - <argument index="2" name="channel" type="int" default="0"> - </argument> + <return type="AudioEffectInstance" /> + <argument index="0" name="bus_idx" type="int" /> + <argument index="1" name="effect_idx" type="int" /> + <argument index="2" name="channel" type="int" default="0" /> <description> Returns the [AudioEffectInstance] assigned to the given bus and effect indices (and optionally channel). </description> </method> <method name="get_bus_index" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="bus_name" type="StringName"> - </argument> + <return type="int" /> + <argument index="0" name="bus_name" type="StringName" /> <description> Returns the index of the bus with the name [code]bus_name[/code]. </description> </method> <method name="get_bus_name" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="bus_idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="bus_idx" type="int" /> <description> Returns the name of the bus with the index [code]bus_idx[/code]. </description> </method> <method name="get_bus_peak_volume_left_db" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="bus_idx" type="int"> - </argument> - <argument index="1" name="channel" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="bus_idx" type="int" /> + <argument index="1" name="channel" type="int" /> <description> Returns the peak volume of the left speaker at bus index [code]bus_idx[/code] and channel index [code]channel[/code]. </description> </method> <method name="get_bus_peak_volume_right_db" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="bus_idx" type="int"> - </argument> - <argument index="1" name="channel" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="bus_idx" type="int" /> + <argument index="1" name="channel" type="int" /> <description> Returns the peak volume of the right speaker at bus index [code]bus_idx[/code] and channel index [code]channel[/code]. </description> </method> <method name="get_bus_send" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="bus_idx" type="int"> - </argument> + <return type="StringName" /> + <argument index="0" name="bus_idx" type="int" /> <description> Returns the name of the bus that the bus at index [code]bus_idx[/code] sends to. </description> </method> <method name="get_bus_volume_db" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="bus_idx" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="bus_idx" type="int" /> <description> Returns the volume of the bus at index [code]bus_idx[/code] in dB. </description> </method> <method name="get_device_list"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns the names of all audio devices detected on the system. </description> </method> <method name="get_mix_rate" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the sample rate at the output of the [AudioServer]. </description> </method> <method name="get_output_latency" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the audio driver's output latency. </description> </method> <method name="get_speaker_mode" qualifiers="const"> - <return type="int" enum="AudioServer.SpeakerMode"> - </return> + <return type="int" enum="AudioServer.SpeakerMode" /> <description> Returns the speaker configuration. </description> </method> <method name="get_time_since_last_mix" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the relative time since the last mix occurred. </description> </method> <method name="get_time_to_next_mix" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the relative time until the next mix occurs. </description> </method> <method name="is_bus_bypassing_effects" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="bus_idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="bus_idx" type="int" /> <description> If [code]true[/code], the bus at index [code]bus_idx[/code] is bypassing effects. </description> </method> <method name="is_bus_effect_enabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="bus_idx" type="int"> - </argument> - <argument index="1" name="effect_idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="bus_idx" type="int" /> + <argument index="1" name="effect_idx" type="int" /> <description> If [code]true[/code], the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled. </description> </method> <method name="is_bus_mute" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="bus_idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="bus_idx" type="int" /> <description> If [code]true[/code], the bus at index [code]bus_idx[/code] is muted. </description> </method> <method name="is_bus_solo" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="bus_idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="bus_idx" type="int" /> <description> If [code]true[/code], the bus at index [code]bus_idx[/code] is in solo mode. </description> </method> <method name="lock"> - <return type="void"> - </return> + <return type="void" /> <description> Locks the audio driver's main loop. [b]Note:[/b] Remember to unlock it afterwards. </description> </method> <method name="move_bus"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="to_index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> + <argument index="1" name="to_index" type="int" /> <description> Moves the bus from index [code]index[/code] to index [code]to_index[/code]. </description> </method> <method name="remove_bus"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> <description> Removes the bus at index [code]index[/code]. </description> </method> <method name="remove_bus_effect"> - <return type="void"> - </return> - <argument index="0" name="bus_idx" type="int"> - </argument> - <argument index="1" name="effect_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="bus_idx" type="int" /> + <argument index="1" name="effect_idx" type="int" /> <description> Removes the effect at index [code]effect_idx[/code] from the bus at index [code]bus_idx[/code]. </description> </method> <method name="set_bus_bypass_effects"> - <return type="void"> - </return> - <argument index="0" name="bus_idx" type="int"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="bus_idx" type="int" /> + <argument index="1" name="enable" type="bool" /> <description> If [code]true[/code], the bus at index [code]bus_idx[/code] is bypassing effects. </description> </method> <method name="set_bus_effect_enabled"> - <return type="void"> - </return> - <argument index="0" name="bus_idx" type="int"> - </argument> - <argument index="1" name="effect_idx" type="int"> - </argument> - <argument index="2" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="bus_idx" type="int" /> + <argument index="1" name="effect_idx" type="int" /> + <argument index="2" name="enabled" type="bool" /> <description> If [code]true[/code], the effect at index [code]effect_idx[/code] on the bus at index [code]bus_idx[/code] is enabled. </description> </method> <method name="set_bus_layout"> - <return type="void"> - </return> - <argument index="0" name="bus_layout" type="AudioBusLayout"> - </argument> + <return type="void" /> + <argument index="0" name="bus_layout" type="AudioBusLayout" /> <description> Overwrites the currently used [AudioBusLayout]. </description> </method> <method name="set_bus_mute"> - <return type="void"> - </return> - <argument index="0" name="bus_idx" type="int"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="bus_idx" type="int" /> + <argument index="1" name="enable" type="bool" /> <description> If [code]true[/code], the bus at index [code]bus_idx[/code] is muted. </description> </method> <method name="set_bus_name"> - <return type="void"> - </return> - <argument index="0" name="bus_idx" type="int"> - </argument> - <argument index="1" name="name" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="bus_idx" type="int" /> + <argument index="1" name="name" type="String" /> <description> Sets the name of the bus at index [code]bus_idx[/code] to [code]name[/code]. </description> </method> <method name="set_bus_send"> - <return type="void"> - </return> - <argument index="0" name="bus_idx" type="int"> - </argument> - <argument index="1" name="send" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="bus_idx" type="int" /> + <argument index="1" name="send" type="StringName" /> <description> Connects the output of the bus at [code]bus_idx[/code] to the bus named [code]send[/code]. </description> </method> <method name="set_bus_solo"> - <return type="void"> - </return> - <argument index="0" name="bus_idx" type="int"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="bus_idx" type="int" /> + <argument index="1" name="enable" type="bool" /> <description> If [code]true[/code], the bus at index [code]bus_idx[/code] is in solo mode. </description> </method> <method name="set_bus_volume_db"> - <return type="void"> - </return> - <argument index="0" name="bus_idx" type="int"> - </argument> - <argument index="1" name="volume_db" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="bus_idx" type="int" /> + <argument index="1" name="volume_db" type="float" /> <description> Sets the volume of the bus at index [code]bus_idx[/code] to [code]volume_db[/code]. </description> </method> <method name="swap_bus_effects"> - <return type="void"> - </return> - <argument index="0" name="bus_idx" type="int"> - </argument> - <argument index="1" name="effect_idx" type="int"> - </argument> - <argument index="2" name="by_effect_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="bus_idx" type="int" /> + <argument index="1" name="effect_idx" type="int" /> + <argument index="2" name="by_effect_idx" type="int" /> <description> Swaps the position of two effects in bus [code]bus_idx[/code]. </description> </method> <method name="unlock"> - <return type="void"> - </return> + <return type="void" /> <description> Unlocks the audio driver's main loop. (After locking it, you should always unlock it.) </description> @@ -400,8 +311,8 @@ <member name="device" type="String" setter="set_device" getter="get_device" default=""Default""> Name of the current device for audio output (see [method get_device_list]). </member> - <member name="global_rate_scale" type="float" setter="set_global_rate_scale" getter="get_global_rate_scale" default="1.0"> - Scales the rate at which audio is played (i.e. setting it to [code]0.5[/code] will make the audio be played twice as fast). + <member name="playback_speed_scale" type="float" setter="set_playback_speed_scale" getter="get_playback_speed_scale" default="1.0"> + Scales the rate at which audio is played (i.e. setting it to [code]0.5[/code] will make the audio be played at half its speed). </member> </members> <signals> diff --git a/doc/classes/AudioStream.xml b/doc/classes/AudioStream.xml index bbfec579bb..32e51603ee 100644 --- a/doc/classes/AudioStream.xml +++ b/doc/classes/AudioStream.xml @@ -13,13 +13,38 @@ <link title="Audio Spectrum Demo">https://godotengine.org/asset-library/asset/528</link> </tutorials> <methods> + <method name="_get_length" qualifiers="virtual const"> + <return type="float" /> + <description> + </description> + </method> + <method name="_get_stream_name" qualifiers="virtual const"> + <return type="String" /> + <description> + </description> + </method> + <method name="_instance_playback" qualifiers="virtual const"> + <return type="AudioStreamPlayback" /> + <description> + </description> + </method> + <method name="_is_monophonic" qualifiers="virtual const"> + <return type="bool" /> + <description> + </description> + </method> <method name="get_length" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the length of the audio stream in seconds. </description> </method> + <method name="is_monophonic" qualifiers="const"> + <return type="bool" /> + <description> + Returns true if this audio stream only supports monophonic playback, or false if the audio stream supports polyphony. + </description> + </method> </methods> <constants> </constants> diff --git a/doc/classes/AudioStreamGeneratorPlayback.xml b/doc/classes/AudioStreamGeneratorPlayback.xml index 503f72a048..d99d041053 100644 --- a/doc/classes/AudioStreamGeneratorPlayback.xml +++ b/doc/classes/AudioStreamGeneratorPlayback.xml @@ -12,48 +12,39 @@ </tutorials> <methods> <method name="can_push_buffer" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="amount" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="amount" type="int" /> <description> Returns [code]true[/code] if a buffer of the size [code]amount[/code] can be pushed to the audio sample data buffer without overflowing it, [code]false[/code] otherwise. </description> </method> <method name="clear_buffer"> - <return type="void"> - </return> + <return type="void" /> <description> Clears the audio sample data buffer. </description> </method> <method name="get_frames_available" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of audio data frames left to play. If this returned number reaches [code]0[/code], the audio will stop playing until frames are added again. Therefore, make sure your script can always generate and push new audio frames fast enough to avoid audio cracking. </description> </method> <method name="get_skips" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> <method name="push_buffer"> - <return type="bool"> - </return> - <argument index="0" name="frames" type="PackedVector2Array"> - </argument> + <return type="bool" /> + <argument index="0" name="frames" type="PackedVector2Array" /> <description> Pushes several audio data frames to the buffer. This is usually more efficient than [method push_frame] in C# and compiled languages via GDNative, but [method push_buffer] may be [i]less[/i] efficient in GDScript. </description> </method> <method name="push_frame"> - <return type="bool"> - </return> - <argument index="0" name="frame" type="Vector2"> - </argument> + <return type="bool" /> + <argument index="0" name="frame" type="Vector2" /> <description> Pushes a single audio data frame to the buffer. This is usually less efficient than [method push_buffer] in C# and compiled languages via GDNative, but [method push_frame] may be [i]more[/i] efficient in GDScript. </description> diff --git a/doc/classes/AudioStreamPlayback.xml b/doc/classes/AudioStreamPlayback.xml index cb01aa75e8..25f3e076b4 100644 --- a/doc/classes/AudioStreamPlayback.xml +++ b/doc/classes/AudioStreamPlayback.xml @@ -10,6 +10,46 @@ <link title="Audio Generator Demo">https://godotengine.org/asset-library/asset/526</link> </tutorials> <methods> + <method name="_get_loop_count" qualifiers="virtual const"> + <return type="int" /> + <description> + </description> + </method> + <method name="_get_playback_position" qualifiers="virtual const"> + <return type="float" /> + <description> + </description> + </method> + <method name="_is_playing" qualifiers="virtual const"> + <return type="bool" /> + <description> + </description> + </method> + <method name="_mix" qualifiers="virtual"> + <return type="int" /> + <argument index="0" name="buffer" type="AudioFrame*" /> + <argument index="1" name="rate_scale" type="float" /> + <argument index="2" name="frames" type="int" /> + <description> + </description> + </method> + <method name="_seek" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="position" type="float" /> + <description> + </description> + </method> + <method name="_start" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="from_pos" type="float" /> + <description> + </description> + </method> + <method name="_stop" qualifiers="virtual"> + <return type="void" /> + <description> + </description> + </method> </methods> <constants> </constants> diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml index 7c7f7e0cea..b692ae858e 100644 --- a/doc/classes/AudioStreamPlayer.xml +++ b/doc/classes/AudioStreamPlayer.xml @@ -17,40 +17,33 @@ </tutorials> <methods> <method name="get_playback_position"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the position in the [AudioStream] in seconds. </description> </method> <method name="get_stream_playback"> - <return type="AudioStreamPlayback"> - </return> + <return type="AudioStreamPlayback" /> <description> Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer]. </description> </method> <method name="play"> - <return type="void"> - </return> - <argument index="0" name="from_position" type="float" default="0.0"> - </argument> + <return type="void" /> + <argument index="0" name="from_position" type="float" default="0.0" /> <description> Plays the audio from the given [code]from_position[/code], in seconds. </description> </method> <method name="seek"> - <return type="void"> - </return> - <argument index="0" name="to_position" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="to_position" type="float" /> <description> Sets the position from which audio will be played, in seconds. </description> </method> <method name="stop"> - <return type="void"> - </return> + <return type="void" /> <description> Stops the audio. </description> @@ -63,6 +56,9 @@ <member name="bus" type="StringName" setter="set_bus" getter="get_bus" default="&"Master""> Bus on which this audio is playing. </member> + <member name="max_polyphony" type="int" setter="set_max_polyphony" getter="get_max_polyphony" default="1"> + The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds. + </member> <member name="mix_target" type="int" setter="set_mix_target" getter="get_mix_target" enum="AudioStreamPlayer.MixTarget" default="0"> If the audio configuration has more than two speakers, this sets the target channels. See [enum MixTarget] constants. </member> diff --git a/doc/classes/AudioStreamPlayer2D.xml b/doc/classes/AudioStreamPlayer2D.xml index b1e18ab550..e36a428499 100644 --- a/doc/classes/AudioStreamPlayer2D.xml +++ b/doc/classes/AudioStreamPlayer2D.xml @@ -13,40 +13,33 @@ </tutorials> <methods> <method name="get_playback_position"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the position in the [AudioStream]. </description> </method> <method name="get_stream_playback"> - <return type="AudioStreamPlayback"> - </return> + <return type="AudioStreamPlayback" /> <description> Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer2D]. </description> </method> <method name="play"> - <return type="void"> - </return> - <argument index="0" name="from_position" type="float" default="0.0"> - </argument> + <return type="void" /> + <argument index="0" name="from_position" type="float" default="0.0" /> <description> Plays the audio from the given position [code]from_position[/code], in seconds. </description> </method> <method name="seek"> - <return type="void"> - </return> - <argument index="0" name="to_position" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="to_position" type="float" /> <description> Sets the position from which audio will be played, in seconds. </description> </method> <method name="stop"> - <return type="void"> - </return> + <return type="void" /> <description> Stops the audio. </description> @@ -68,6 +61,9 @@ <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="2000.0"> Maximum distance from which audio is still hearable. </member> + <member name="max_polyphony" type="int" setter="set_max_polyphony" getter="get_max_polyphony" default="1"> + The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds. + </member> <member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0"> The pitch and the tempo of the audio, as a multiplier of the audio sample's sample rate. </member> diff --git a/doc/classes/AudioStreamPlayer3D.xml b/doc/classes/AudioStreamPlayer3D.xml index 3bd20b4b9b..fa2fa5a8e3 100644 --- a/doc/classes/AudioStreamPlayer3D.xml +++ b/doc/classes/AudioStreamPlayer3D.xml @@ -14,40 +14,33 @@ </tutorials> <methods> <method name="get_playback_position"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the position in the [AudioStream]. </description> </method> <method name="get_stream_playback"> - <return type="AudioStreamPlayback"> - </return> + <return type="AudioStreamPlayback" /> <description> Returns the [AudioStreamPlayback] object associated with this [AudioStreamPlayer3D]. </description> </method> <method name="play"> - <return type="void"> - </return> - <argument index="0" name="from_position" type="float" default="0.0"> - </argument> + <return type="void" /> + <argument index="0" name="from_position" type="float" default="0.0" /> <description> Plays the audio from the given position [code]from_position[/code], in seconds. </description> </method> <method name="seek"> - <return type="void"> - </return> - <argument index="0" name="to_position" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="to_position" type="float" /> <description> Sets the position from which audio will be played, in seconds. </description> </method> <method name="stop"> - <return type="void"> - </return> + <return type="void" /> <description> Stops the audio. </description> @@ -90,6 +83,9 @@ <member name="max_distance" type="float" setter="set_max_distance" getter="get_max_distance" default="0.0"> Sets the distance from which the [member out_of_range_mode] takes effect. Has no effect if set to 0. </member> + <member name="max_polyphony" type="int" setter="set_max_polyphony" getter="get_max_polyphony" default="1"> + The maximum number of sounds this node can play at the same time. Playing additional sounds after this value is reached will cut off the oldest sounds. + </member> <member name="out_of_range_mode" type="int" setter="set_out_of_range_mode" getter="get_out_of_range_mode" enum="AudioStreamPlayer3D.OutOfRangeMode" default="0"> Decides if audio should pause when source is outside of [member max_distance] range. </member> diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml index 5a0e71a0f8..7e1155d89b 100644 --- a/doc/classes/AudioStreamSample.xml +++ b/doc/classes/AudioStreamSample.xml @@ -11,10 +11,8 @@ </tutorials> <methods> <method name="save_to_wav"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> <description> Saves the AudioStreamSample as a WAV file to [code]path[/code]. Samples with IMA ADPCM format can't be saved. [b]Note:[/b] A [code].wav[/code] extension is automatically appended to [code]path[/code] if it is missing. diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index f7e31f5f9c..889c703b07 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -10,35 +10,38 @@ </tutorials> <methods> <method name="_pressed" qualifiers="virtual"> - <return type="void"> - </return> + <return type="void" /> <description> Called when the button is pressed. If you need to know the button's pressed state (and [member toggle_mode] is active), use [method _toggled] instead. </description> </method> <method name="_toggled" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="button_pressed" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="button_pressed" type="bool" /> <description> Called when the button is toggled (only if [member toggle_mode] is active). </description> </method> <method name="get_draw_mode" qualifiers="const"> - <return type="int" enum="BaseButton.DrawMode"> - </return> + <return type="int" enum="BaseButton.DrawMode" /> <description> Returns the visual state used to draw the button. This is useful mainly when implementing your own draw code by either overriding _draw() or connecting to "draw" signal. The visual state of the button is defined by the [enum DrawMode] enum. </description> </method> <method name="is_hovered" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the mouse has entered the button and has not left it yet. </description> </method> + <method name="set_pressed_no_signal"> + <return type="void" /> + <argument index="0" name="pressed" type="bool" /> + <description> + Changes the [member pressed] state of the button, without emitting [signal toggled]. Use when you just want to change the state of the button without sending the pressed event (e.g. when initializing scene). Only works if [member toggle_mode] is [code]true[/code]. + [b]Note:[/b] This method doesn't unpress other buttons in [member button_group]. + </description> + </method> </methods> <members> <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="BaseButton.ActionMode" default="1"> @@ -60,7 +63,8 @@ [b]Note:[/b] This property only affects the button's visual appearance. Signals will be emitted at the same moment regardless of this property's value. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false"> - If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if [member toggle_mode] is active). + If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if [member toggle_mode] is active). Only works if [member toggle_mode] is [code]true[/code]. + [b]Note:[/b] Setting [member pressed] will result in [signal toggled] to be emitted. If you want to change the pressed state without emitting that signal, use [method set_pressed_no_signal]. </member> <member name="shortcut" type="Shortcut" setter="set_shortcut" getter="get_shortcut"> [Shortcut] associated to the button. @@ -93,8 +97,7 @@ </description> </signal> <signal name="toggled"> - <argument index="0" name="button_pressed" type="bool"> - </argument> + <argument index="0" name="button_pressed" type="bool" /> <description> Emitted when the button was just toggled between pressed and normal states (only if [member toggle_mode] is active). The new state is contained in the [code]button_pressed[/code] argument. </description> diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index 2a378ed03e..a5516636aa 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -11,61 +11,46 @@ </tutorials> <methods> <method name="get_feature" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="feature" type="int" enum="BaseMaterial3D.Feature"> - </argument> + <return type="bool" /> + <argument index="0" name="feature" type="int" enum="BaseMaterial3D.Feature" /> <description> Returns [code]true[/code], if the specified [enum Feature] is enabled. </description> </method> <method name="get_flag" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="flag" type="int" enum="BaseMaterial3D.Flags"> - </argument> + <return type="bool" /> + <argument index="0" name="flag" type="int" enum="BaseMaterial3D.Flags" /> <description> Returns [code]true[/code], if the specified flag is enabled. See [enum Flags] enumerator for options. </description> </method> <method name="get_texture" qualifiers="const"> - <return type="Texture2D"> - </return> - <argument index="0" name="param" type="int" enum="BaseMaterial3D.TextureParam"> - </argument> + <return type="Texture2D" /> + <argument index="0" name="param" type="int" enum="BaseMaterial3D.TextureParam" /> <description> Returns the [Texture] associated with the specified [enum TextureParam]. </description> </method> <method name="set_feature"> - <return type="void"> - </return> - <argument index="0" name="feature" type="int" enum="BaseMaterial3D.Feature"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="feature" type="int" enum="BaseMaterial3D.Feature" /> + <argument index="1" name="enable" type="bool" /> <description> If [code]true[/code], enables the specified [enum Feature]. Many features that are available in [BaseMaterial3D]s need to be enabled before use. This way the cost for using the feature is only incurred when specified. Features can also be enabled by setting the corresponding member to [code]true[/code]. </description> </method> <method name="set_flag"> - <return type="void"> - </return> - <argument index="0" name="flag" type="int" enum="BaseMaterial3D.Flags"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="flag" type="int" enum="BaseMaterial3D.Flags" /> + <argument index="1" name="enable" type="bool" /> <description> If [code]true[/code], 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 [code]true[/code]. See [enum Flags] enumerator for options. </description> </method> <method name="set_texture"> - <return type="void"> - </return> - <argument index="0" name="param" type="int" enum="BaseMaterial3D.TextureParam"> - </argument> - <argument index="1" name="texture" type="Texture2D"> - </argument> + <return type="void" /> + <argument index="0" name="param" type="int" enum="BaseMaterial3D.TextureParam" /> + <argument index="1" name="texture" type="Texture2D" /> <description> Sets the texture for the slot specified by [code]param[/code]. See [enum TextureParam] for available slots. </description> @@ -698,7 +683,7 @@ </constant> <constant name="BILLBOARD_PARTICLES" value="3" enum="BillboardMode"> Used for particle systems when assigned to [GPUParticles3D] and [CPUParticles3D] nodes. Enables [code]particles_anim_*[/code] properties. - The [member ParticlesMaterial.anim_speed] or [member CPUParticles3D.anim_speed] should also be set to a positive value for the animation to play. + The [member ParticlesMaterial.anim_speed_min] or [member CPUParticles3D.anim_speed_min] should also be set to a value bigger than zero for the animation to play. </constant> <constant name="TEXTURE_CHANNEL_RED" value="0" enum="TextureChannel"> Used to read from the red channel of a texture. diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index bd1abe914d..8fab84d885 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -20,243 +20,200 @@ </tutorials> <methods> <method name="Basis" qualifiers="constructor"> - <return type="Basis"> - </return> + <return type="Basis" /> <description> Constructs a default-initialized [Basis] set to [constant IDENTITY]. </description> </method> <method name="Basis" qualifiers="constructor"> - <return type="Basis"> - </return> - <argument index="0" name="from" type="Basis"> - </argument> + <return type="Basis" /> + <argument index="0" name="from" type="Basis" /> <description> Constructs a [Basis] as a copy of the given [Basis]. </description> </method> <method name="Basis" qualifiers="constructor"> - <return type="Basis"> - </return> - <argument index="0" name="axis" type="Vector3"> - </argument> - <argument index="1" name="phi" type="float"> - </argument> + <return type="Basis" /> + <argument index="0" name="axis" type="Vector3" /> + <argument index="1" name="phi" type="float" /> <description> Constructs a pure rotation basis matrix, rotated around the given [code]axis[/code] by [code]phi[/code], in radians. The axis must be a normalized vector. </description> </method> <method name="Basis" qualifiers="constructor"> - <return type="Basis"> - </return> - <argument index="0" name="euler" type="Vector3"> - </argument> + <return type="Basis" /> + <argument index="0" name="euler" type="Vector3" /> <description> Constructs a pure rotation basis matrix from the given Euler angles (in the YXZ convention: when *composing*, first Y, then X, and Z last), given in the vector format as (X angle, Y angle, Z angle). Consider using the [Quaternion] constructor instead, which uses a quaternion instead of Euler angles. </description> </method> <method name="Basis" qualifiers="constructor"> - <return type="Basis"> - </return> - <argument index="0" name="from" type="Quaternion"> - </argument> + <return type="Basis" /> + <argument index="0" name="from" type="Quaternion" /> <description> Constructs a pure rotation basis matrix from the given quaternion. </description> </method> <method name="Basis" qualifiers="constructor"> - <return type="Basis"> - </return> - <argument index="0" name="x_axis" type="Vector3"> - </argument> - <argument index="1" name="y_axis" type="Vector3"> - </argument> - <argument index="2" name="z_axis" type="Vector3"> - </argument> + <return type="Basis" /> + <argument index="0" name="x_axis" type="Vector3" /> + <argument index="1" name="y_axis" type="Vector3" /> + <argument index="2" name="z_axis" type="Vector3" /> <description> Constructs a basis matrix from 3 axis vectors (matrix columns). </description> </method> <method name="determinant" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the determinant of the basis matrix. If the basis is uniformly scaled, its determinant is the square of the scale. A negative determinant means the basis has a negative scale. A zero determinant means the basis isn't invertible, and is usually considered invalid. </description> </method> <method name="get_euler" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns the basis's rotation in the form of Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last). The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). Consider using the [method get_rotation_quaternion] method instead, which returns a [Quaternion] quaternion instead of Euler angles. </description> </method> <method name="get_orthogonal_index" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> This function considers a discretization of rotations into 24 points on unit sphere, lying along the vectors (x,y,z) with each component being either -1, 0, or 1, and returns the index of the point best representing the orientation of the object. It is mainly used by the [GridMap] editor. For further details, refer to the Godot source code. </description> </method> <method name="get_rotation_quaternion" qualifiers="const"> - <return type="Quaternion"> - </return> + <return type="Quaternion" /> <description> Returns the basis's rotation in the form of a quaternion. See [method get_euler] if you need Euler angles, but keep in mind quaternions should generally be preferred to Euler angles. </description> </method> <method name="get_scale" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Assuming that the matrix is the combination of a rotation and scaling, return the absolute value of scaling factors along each axis. </description> </method> <method name="inverse" qualifiers="const"> - <return type="Basis"> - </return> + <return type="Basis" /> <description> Returns the inverse of the matrix. </description> </method> <method name="is_equal_approx" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="b" type="Basis"> - </argument> + <return type="bool" /> + <argument index="0" name="b" type="Basis" /> <description> Returns [code]true[/code] if this basis and [code]b[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component. </description> </method> + <method name="looking_at" qualifiers="static"> + <return type="Basis" /> + <argument index="0" name="target" type="Vector3" /> + <argument index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)" /> + <description> + Creates a Basis with a rotation such that the forward axis (-Z) points towards the [code]target[/code] position. + The up axis (+Y) points as close to the [code]up[/code] vector as possible while staying perpendicular to the forward axis. The resulting Basis is orthonormalized. The [code]target[/code] and [code]up[/code] vectors cannot be zero, and cannot be parallel to each other. + </description> + </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Basis"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Basis" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector3"> - </return> - <argument index="0" name="right" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="right" type="Vector3" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Basis"> - </return> - <argument index="0" name="right" type="Basis"> - </argument> + <return type="Basis" /> + <argument index="0" name="right" type="Basis" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Basis"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="Basis" /> + <argument index="0" name="right" type="float" /> <description> This operator multiplies all components of the [Basis], which scales it uniformly. </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Basis"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="Basis" /> + <argument index="0" name="right" type="int" /> <description> This operator multiplies all components of the [Basis], which scales it uniformly. </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Basis"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Basis" /> <description> </description> </method> <method name="operator []" qualifiers="operator"> - <return type="Vector3"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="Vector3" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="orthonormalized" qualifiers="const"> - <return type="Basis"> - </return> + <return type="Basis" /> <description> Returns the orthonormalized version of the matrix (useful to call from time to time to avoid rounding error for orthogonal matrices). This performs a Gram-Schmidt orthonormalization on the basis of the matrix. </description> </method> <method name="rotated" qualifiers="const"> - <return type="Basis"> - </return> - <argument index="0" name="axis" type="Vector3"> - </argument> - <argument index="1" name="phi" type="float"> - </argument> + <return type="Basis" /> + <argument index="0" name="axis" type="Vector3" /> + <argument index="1" name="phi" type="float" /> <description> Introduce an additional rotation around the given axis by phi (radians). The axis must be a normalized vector. </description> </method> <method name="scaled" qualifiers="const"> - <return type="Basis"> - </return> - <argument index="0" name="scale" type="Vector3"> - </argument> + <return type="Basis" /> + <argument index="0" name="scale" type="Vector3" /> <description> Introduce an additional scaling specified by the given 3D scaling factor. </description> </method> <method name="slerp" qualifiers="const"> - <return type="Basis"> - </return> - <argument index="0" name="to" type="Basis"> - </argument> - <argument index="1" name="weight" type="float"> - </argument> + <return type="Basis" /> + <argument index="0" name="to" type="Basis" /> + <argument index="1" name="weight" type="float" /> <description> Assuming that the matrix is a proper rotation matrix, slerp performs a spherical-linear interpolation with another rotation matrix. </description> </method> <method name="tdotx" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="with" type="Vector3"> - </argument> + <return type="float" /> + <argument index="0" name="with" type="Vector3" /> <description> Transposed dot product with the X axis of the matrix. </description> </method> <method name="tdoty" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="with" type="Vector3"> - </argument> + <return type="float" /> + <argument index="0" name="with" type="Vector3" /> <description> Transposed dot product with the Y axis of the matrix. </description> </method> <method name="tdotz" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="with" type="Vector3"> - </argument> + <return type="float" /> + <argument index="0" name="with" type="Vector3" /> <description> Transposed dot product with the Z axis of the matrix. </description> </method> <method name="transposed" qualifiers="const"> - <return type="Basis"> - </return> + <return type="Basis" /> <description> Returns the transposed version of the matrix. </description> diff --git a/doc/classes/BitMap.xml b/doc/classes/BitMap.xml index 83e598d2ba..9a349c957f 100644 --- a/doc/classes/BitMap.xml +++ b/doc/classes/BitMap.xml @@ -10,66 +10,51 @@ </tutorials> <methods> <method name="create"> - <return type="void"> - </return> - <argument index="0" name="size" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="size" type="Vector2" /> <description> Creates a bitmap with the specified size, filled with [code]false[/code]. </description> </method> <method name="create_from_image_alpha"> - <return type="void"> - </return> - <argument index="0" name="image" type="Image"> - </argument> - <argument index="1" name="threshold" type="float" default="0.1"> - </argument> + <return type="void" /> + <argument index="0" name="image" type="Image" /> + <argument index="1" name="threshold" type="float" default="0.1" /> <description> Creates a bitmap that matches the given image dimensions, every element of the bitmap is set to [code]false[/code] if the alpha value of the image at that position is equal to [code]threshold[/code] or less, and [code]true[/code] in other case. </description> </method> <method name="get_bit" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="position" type="Vector2"> - </argument> + <return type="bool" /> + <argument index="0" name="position" type="Vector2" /> <description> Returns bitmap's value at the specified position. </description> </method> <method name="get_size" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns bitmap's dimensions. </description> </method> <method name="get_true_bit_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the amount of bitmap elements that are set to [code]true[/code]. </description> </method> <method name="grow_mask"> - <return type="void"> - </return> - <argument index="0" name="pixels" type="int"> - </argument> - <argument index="1" name="rect" type="Rect2"> - </argument> + <return type="void" /> + <argument index="0" name="pixels" type="int" /> + <argument index="1" name="rect" type="Rect2" /> <description> Applies morphological dilation to the bitmap. The first argument is the dilation amount, Rect2 is the area where the dilation will be applied. </description> </method> <method name="opaque_to_polygons" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="rect" type="Rect2"> - </argument> - <argument index="1" name="epsilon" type="float" default="2.0"> - </argument> + <return type="Array" /> + <argument index="0" name="rect" type="Rect2" /> + <argument index="1" name="epsilon" type="float" default="2.0" /> <description> Creates an [Array] of polygons covering a rectangular portion of the bitmap. It uses a marching squares algorithm, followed by Ramer-Douglas-Peucker (RDP) reduction of the number of vertices. Each polygon is described as a [PackedVector2Array] of its vertices. To get polygons covering the whole bitmap, pass: @@ -80,23 +65,17 @@ </description> </method> <method name="set_bit"> - <return type="void"> - </return> - <argument index="0" name="position" type="Vector2"> - </argument> - <argument index="1" name="bit" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="position" type="Vector2" /> + <argument index="1" name="bit" type="bool" /> <description> Sets the bitmap's element at the specified position, to the specified value. </description> </method> <method name="set_bit_rect"> - <return type="void"> - </return> - <argument index="0" name="rect" type="Rect2"> - </argument> - <argument index="1" name="bit" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="rect" type="Rect2" /> + <argument index="1" name="bit" type="bool" /> <description> Sets a rectangular portion of the bitmap to the specified value. </description> diff --git a/doc/classes/Bone2D.xml b/doc/classes/Bone2D.xml index b8d5544d59..f9f3ea21f1 100644 --- a/doc/classes/Bone2D.xml +++ b/doc/classes/Bone2D.xml @@ -13,88 +13,73 @@ </tutorials> <methods> <method name="apply_rest"> - <return type="void"> - </return> + <return type="void" /> <description> Stores the node's current transforms in [member rest]. </description> </method> <method name="get_autocalculate_length_and_angle" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns whether this [code]Bone2D[/code] node is going to autocalculate its length and bone angle using its first [code]Bone2D[/code] child node, if one exists. If there are no [code]Bone2D[/code] children, then it cannot autocalculate these values and will print a warning. </description> </method> <method name="get_bone_angle" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the angle of the bone in the [code]Bone2D[/code] node. [b]Note:[/b] This is different from the [code]Bone2D[/code]'s rotation. The bone angle is the rotation of the bone shown by the [code]Bone2D[/code] gizmo, and because [code]Bone2D[/code] bones are based on positions, this can vary from the actual rotation of the [code]Bone2D[/code] node. </description> </method> <method name="get_default_length" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Deprecated. Please use [code]get_length[/code] instead. </description> </method> <method name="get_index_in_skeleton" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the node's index as part of the entire skeleton. See [Skeleton2D]. </description> </method> <method name="get_length" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the length of the bone in the [code]Bone2D[/code] node. </description> </method> <method name="get_skeleton_rest" qualifiers="const"> - <return type="Transform2D"> - </return> + <return type="Transform2D" /> <description> Returns the node's [member rest] [code]Transform2D[/code] if it doesn't have a parent, or its rest pose relative to its parent. </description> </method> <method name="set_autocalculate_length_and_angle"> - <return type="void"> - </return> - <argument index="0" name="auto_calculate" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="auto_calculate" type="bool" /> <description> When set to [code]true[/code], the [code]Bone2D[/code] node will attempt to automatically calculate the bone angle and length using the first child [code]Bone2D[/code] node, if one exists. If none exist, the [code]Bone2D[/code] cannot automatically calculate these values and will print a warning. </description> </method> <method name="set_bone_angle"> - <return type="void"> - </return> - <argument index="0" name="angle" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="angle" type="float" /> <description> Sets the bone angle for the [code]Bone2D[/code] node. This is typically set to the rotation from the [code]Bone2D[/code] node to a child [code]Bone2D[/code] node. [b]Note:[/b] This is different from the [code]Bone2D[/code]'s rotation. The bone angle is the rotation of the bone shown by the [code]Bone2D[/code] gizmo, and because [code]Bone2D[/code] bones are based on positions, this can vary from the actual rotation of the [code]Bone2D[/code] node. </description> </method> <method name="set_default_length"> - <return type="void"> - </return> - <argument index="0" name="default_length" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="default_length" type="float" /> <description> Deprecated. Please use [code]set_length[/code] instead. </description> </method> <method name="set_length"> - <return type="void"> - </return> - <argument index="0" name="length" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="length" type="float" /> <description> Sets the length of the bone in the [code]Bone2D[/code] node. </description> diff --git a/doc/classes/BoneAttachment3D.xml b/doc/classes/BoneAttachment3D.xml index ab1e5b17d9..b493002c70 100644 --- a/doc/classes/BoneAttachment3D.xml +++ b/doc/classes/BoneAttachment3D.xml @@ -4,13 +4,76 @@ A node that will attach to a bone. </brief_description> <description> - This node must be the child of a [Skeleton3D] node. You can then select a bone for this node to attach to. The BoneAttachment3D node will copy the transform of the selected bone. + This node will allow you to select a bone for this node to attach to. The BoneAttachment3D node can copy the transform of the select bone, or can override the transform of the selected bone. + The BoneAttachment3D node must either be a child of a [Skeleton3D] node or be given an external [Skeleton3D] to use in order to function properly. </description> <tutorials> </tutorials> <methods> + <method name="get_external_skeleton" qualifiers="const"> + <return type="NodePath" /> + <description> + Returns the [NodePath] to the external [Skeleton3D] node, if one has been set. + </description> + </method> + <method name="get_override_mode" qualifiers="const"> + <return type="int" /> + <description> + Returns the override mode for the BoneAttachment3D node. + </description> + </method> + <method name="get_override_pose" qualifiers="const"> + <return type="bool" /> + <description> + Returns whether the BoneAttachment3D node is overriding the bone pose of the bone it's attached to. + </description> + </method> + <method name="get_use_external_skeleton" qualifiers="const"> + <return type="bool" /> + <description> + Returns whether the BoneAttachment3D node is using an external [Skeleton3D] rather than attempting to use its parent node as the [Skeleton3D]. + </description> + </method> + <method name="on_bone_pose_update"> + <return type="void" /> + <argument index="0" name="bone_index" type="int" /> + <description> + A function that is called automatically when the [Skeleton3D] the BoneAttachment3D node is using has a bone that has changed its pose. This function is where the BoneAttachment3D node updates its position so it is correctly bound when it is [i]not[/i] set to override the bone pose. + </description> + </method> + <method name="set_external_skeleton"> + <return type="void" /> + <argument index="0" name="external_skeleton" type="NodePath" /> + <description> + Sets the [NodePath] to the external skeleton that the BoneAttachment3D node should use. The external [Skeleton3D] node is only used when [code]use_external_skeleton[/code] is set to [code]true[/code]. + </description> + </method> + <method name="set_override_mode"> + <return type="void" /> + <argument index="0" name="override_mode" type="int" /> + <description> + Sets the override mode for the BoneAttachment3D node. The override mode defines which of the bone poses the BoneAttachment3D node will override. + </description> + </method> + <method name="set_override_pose"> + <return type="void" /> + <argument index="0" name="override_pose" type="bool" /> + <description> + Sets whether the BoneAttachment3D node will override the bone pose of the bone it is attached to. When set to [code]true[/code], the BoneAttachment3D node can change the pose of the bone. + </description> + </method> + <method name="set_use_external_skeleton"> + <return type="void" /> + <argument index="0" name="use_external_skeleton" type="bool" /> + <description> + Sets whether the BoneAttachment3D node will use an extenral [Skeleton3D] node rather than attenpting to use its parent node as the [Skeleton3D]. When set to [code]true[/code], the BoneAttachment3D node will use the external [Skeleton3D] node set in [code]set_external_skeleton[/code]. + </description> + </method> </methods> <members> + <member name="bone_idx" type="int" setter="set_bone_idx" getter="get_bone_idx" default="-1"> + The index of the attached bone. + </member> <member name="bone_name" type="String" setter="set_bone_name" getter="get_bone_name" default=""""> The name of the attached bone. </member> diff --git a/doc/classes/BoxContainer.xml b/doc/classes/BoxContainer.xml index ffa7c9066a..ec81b866f6 100644 --- a/doc/classes/BoxContainer.xml +++ b/doc/classes/BoxContainer.xml @@ -10,10 +10,8 @@ </tutorials> <methods> <method name="add_spacer"> - <return type="Control"> - </return> - <argument index="0" name="begin" type="bool"> - </argument> + <return type="Control" /> + <argument index="0" name="begin" type="bool" /> <description> Adds a [Control] node to the box as a spacer. If [code]begin[/code] is [code]true[/code], it will insert the [Control] node in front of all other children. </description> diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index 239e0bb2d9..dfbd6c0680 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -42,28 +42,22 @@ </tutorials> <methods> <method name="clear_opentype_features"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all OpenType features. </description> </method> <method name="get_opentype_feature" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="tag" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="tag" type="String" /> <description> Returns OpenType feature [code]tag[/code]. </description> </method> <method name="set_opentype_feature"> - <return type="void"> - </return> - <argument index="0" name="tag" type="String"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="tag" type="String" /> + <argument index="1" name="value" type="int" /> <description> Sets OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. </description> @@ -110,64 +104,64 @@ </constant> </constants> <theme_items> - <theme_item name="disabled" type="StyleBox"> + <theme_item name="disabled" data_type="style" type="StyleBox"> [StyleBox] used when the [Button] is disabled. </theme_item> - <theme_item name="focus" type="StyleBox"> + <theme_item name="focus" data_type="style" type="StyleBox"> [StyleBox] used when the [Button] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> [Font] of the [Button]'s text. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> Default text [Color] of the [Button]. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> + <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> Text [Color] used when the [Button] is disabled. </theme_item> - <theme_item name="font_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> + <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> Text [Color] used when the [Button] is being hovered. </theme_item> - <theme_item name="font_hover_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_hover_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> Text [Color] used when the [Button] is being hovered and pressed. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [Button]. </theme_item> - <theme_item name="font_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> Text [Color] used when the [Button] is being pressed. </theme_item> - <theme_item name="font_size" type="int"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the [Button]'s text. </theme_item> - <theme_item name="hover" type="StyleBox"> + <theme_item name="hover" data_type="style" type="StyleBox"> [StyleBox] used when the [Button] is being hovered. </theme_item> - <theme_item name="hseparation" type="int" default="2"> + <theme_item name="hseparation" data_type="constant" type="int" default="2"> The horizontal space between [Button]'s icon and text. </theme_item> - <theme_item name="icon_disabled_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="icon_disabled_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> Icon modulate [Color] used when the [Button] is disabled. </theme_item> - <theme_item name="icon_hover_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="icon_hover_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> Icon modulate [Color] used when the [Button] is being hovered. </theme_item> - <theme_item name="icon_hover_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="icon_hover_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> Icon modulate [Color] used when the [Button] is being hovered and pressed. </theme_item> - <theme_item name="icon_normal_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="icon_normal_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> Default icon modulate [Color] of the [Button]. </theme_item> - <theme_item name="icon_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="icon_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> Icon modulate [Color] used when the [Button] is being pressed. </theme_item> - <theme_item name="normal" type="StyleBox"> + <theme_item name="normal" data_type="style" type="StyleBox"> Default [StyleBox] for the [Button]. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. </theme_item> - <theme_item name="pressed" type="StyleBox"> + <theme_item name="pressed" data_type="style" type="StyleBox"> [StyleBox] used when the [Button] is being pressed. </theme_item> </theme_items> diff --git a/doc/classes/ButtonGroup.xml b/doc/classes/ButtonGroup.xml index 0b31352611..302a213836 100644 --- a/doc/classes/ButtonGroup.xml +++ b/doc/classes/ButtonGroup.xml @@ -11,15 +11,13 @@ </tutorials> <methods> <method name="get_buttons"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns an [Array] of [Button]s who have this as their [ButtonGroup] (see [member BaseButton.button_group]). </description> </method> <method name="get_pressed_button"> - <return type="BaseButton"> - </return> + <return type="BaseButton" /> <description> Returns the current pressed button. </description> @@ -30,8 +28,7 @@ </members> <signals> <signal name="pressed"> - <argument index="0" name="button" type="Object"> - </argument> + <argument index="0" name="button" type="Object" /> <description> Emitted when one of the buttons of the group is pressed. </description> diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index 9620e9abd1..9226140c1a 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -12,97 +12,70 @@ </tutorials> <methods> <method name="convert_from_particles"> - <return type="void"> - </return> - <argument index="0" name="particles" type="Node"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="Node" /> <description> Sets this node's properties to match a given [GPUParticles2D] node with an assigned [ParticlesMaterial]. </description> </method> - <method name="get_param" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter"> - </argument> + <method name="get_param_curve" qualifiers="const"> + <return type="Curve" /> + <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" /> <description> - Returns the base value of the parameter specified by [enum Parameter]. + Returns the [Curve] of the parameter specified by [enum Parameter]. </description> </method> - <method name="get_param_curve" qualifiers="const"> - <return type="Curve"> - </return> - <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter"> - </argument> + <method name="get_param_max" qualifiers="const"> + <return type="float" /> + <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" /> <description> - Returns the [Curve] of the parameter specified by [enum Parameter]. </description> </method> - <method name="get_param_randomness" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter"> - </argument> + <method name="get_param_min" qualifiers="const"> + <return type="float" /> + <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" /> <description> - Returns the randomness factor of the parameter specified by [enum Parameter]. </description> </method> <method name="get_particle_flag" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="particle_flag" type="int" enum="CPUParticles2D.ParticleFlags"> - </argument> + <return type="bool" /> + <argument index="0" name="particle_flag" type="int" enum="CPUParticles2D.ParticleFlags" /> <description> Returns the enabled state of the given flag (see [enum ParticleFlags] for options). </description> </method> <method name="restart"> - <return type="void"> - </return> + <return type="void" /> <description> Restarts the particle emitter. </description> </method> - <method name="set_param"> - <return type="void"> - </return> - <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter"> - </argument> - <argument index="1" name="value" type="float"> - </argument> + <method name="set_param_curve"> + <return type="void" /> + <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" /> + <argument index="1" name="curve" type="Curve" /> <description> - Sets the base value of the parameter specified by [enum Parameter]. + Sets the [Curve] of the parameter specified by [enum Parameter]. </description> </method> - <method name="set_param_curve"> - <return type="void"> - </return> - <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter"> - </argument> - <argument index="1" name="curve" type="Curve"> - </argument> + <method name="set_param_max"> + <return type="void" /> + <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" /> + <argument index="1" name="value" type="float" /> <description> - Sets the [Curve] of the parameter specified by [enum Parameter]. </description> </method> - <method name="set_param_randomness"> - <return type="void"> - </return> - <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter"> - </argument> - <argument index="1" name="randomness" type="float"> - </argument> + <method name="set_param_min"> + <return type="void" /> + <argument index="0" name="param" type="int" enum="CPUParticles2D.Parameter" /> + <argument index="1" name="value" type="float" /> <description> - Sets the randomness factor of the parameter specified by [enum Parameter]. </description> </method> <method name="set_particle_flag"> - <return type="void"> - </return> - <argument index="0" name="particle_flag" type="int" enum="CPUParticles2D.ParticleFlags"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="particle_flag" type="int" enum="CPUParticles2D.ParticleFlags" /> + <argument index="1" name="enable" type="bool" /> <description> Enables or disables the given flag (see [enum ParticleFlags] for options). </description> @@ -112,56 +85,46 @@ <member name="amount" type="int" setter="set_amount" getter="get_amount" default="8"> Number of particles emitted in one emission cycle. </member> - <member name="angle" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial rotation applied to each particle, in degrees. - </member> <member name="angle_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's rotation will be animated along this [Curve]. </member> - <member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Rotation randomness ratio. + <member name="angle_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> </member> - <member name="angular_velocity" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial angular velocity applied to each particle. Sets the speed of rotation of the particle. + <member name="angle_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> <member name="angular_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's angular velocity will vary along this [Curve]. </member> - <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Angular velocity randomness ratio. + <member name="angular_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> </member> - <member name="anim_offset" type="float" setter="set_param" getter="get_param" default="0.0"> - Particle animation offset. + <member name="angular_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> <member name="anim_offset_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's animation offset will vary along this [Curve]. </member> - <member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Animation offset randomness ratio. + <member name="anim_offset_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> </member> - <member name="anim_speed" type="float" setter="set_param" getter="get_param" default="0.0"> - Particle animation speed. + <member name="anim_offset_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> <member name="anim_speed_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's animation speed will vary along this [Curve]. </member> - <member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Animation speed randomness ratio. + <member name="anim_speed_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + </member> + <member name="anim_speed_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)"> Each particle's initial color. If [member texture] is defined, it will be multiplied by this color. </member> <member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp"> - Each particle's color will vary along this [Gradient]. - </member> - <member name="damping" type="float" setter="set_param" getter="get_param" default="0.0"> - The rate at which particles lose velocity. + Each particle's color will vary along this [Gradient] (multiplied with [member color]). </member> <member name="damping_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Damping will vary along this [Curve]. </member> - <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Damping randomness ratio. + <member name="damping_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + </member> + <member name="damping_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> <member name="direction" type="Vector2" setter="set_direction" getter="get_direction" default="Vector2(1, 0)"> Unit vector specifying the particles' emission direction. @@ -202,20 +165,16 @@ <member name="gravity" type="Vector2" setter="set_gravity" getter="get_gravity" default="Vector2(0, 980)"> Gravity applied to every particle. </member> - <member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial hue variation applied to each particle. - </member> <member name="hue_variation_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's hue will vary along this [Curve]. </member> - <member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Hue variation randomness ratio. + <member name="hue_variation_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + </member> + <member name="hue_variation_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> - <member name="initial_velocity" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial velocity magnitude for each particle. Direction comes from [member spread] and the node's orientation. + <member name="initial_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> </member> - <member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Initial velocity randomness ratio. + <member name="initial_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" default="1.0"> Amount of time each particle will exist. @@ -223,14 +182,12 @@ <member name="lifetime_randomness" type="float" setter="set_lifetime_randomness" getter="get_lifetime_randomness" default="0.0"> Particle lifetime randomness ratio. </member> - <member name="linear_accel" type="float" setter="set_param" getter="get_param" default="0.0"> - Linear acceleration applied to each particle in the direction of motion. - </member> <member name="linear_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's linear acceleration will vary along this [Curve]. </member> - <member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Linear acceleration randomness ratio. + <member name="linear_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + </member> + <member name="linear_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true"> If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. @@ -238,14 +195,12 @@ <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false"> If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. </member> - <member name="orbit_velocity" type="float" setter="set_param" getter="get_param" default="0.0"> - Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second. - </member> <member name="orbit_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's orbital velocity will vary along this [Curve]. </member> - <member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Orbital velocity randomness ratio. + <member name="orbit_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + </member> + <member name="orbit_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> <member name="particle_flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> Align Y axis of particle with the direction of its velocity. @@ -253,41 +208,41 @@ <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time" default="0.0"> Particle system starts as if it had already run for this many seconds. </member> - <member name="radial_accel" type="float" setter="set_param" getter="get_param" default="0.0"> - Radial acceleration applied to each particle. Makes particle accelerate away from origin. - </member> <member name="radial_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's radial acceleration will vary along this [Curve]. </member> - <member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Radial acceleration randomness ratio. + <member name="radial_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + </member> + <member name="radial_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> <member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio" default="0.0"> Emission lifetime randomness ratio. </member> - <member name="scale_amount" type="float" setter="set_param" getter="get_param" default="1.0"> - Initial scale applied to each particle. - </member> <member name="scale_amount_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's scale will vary along this [Curve]. </member> - <member name="scale_amount_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Scale randomness ratio. + <member name="scale_amount_max" type="float" setter="set_param_max" getter="get_param_max" default="1.0"> + </member> + <member name="scale_amount_min" type="float" setter="set_param_min" getter="get_param_min" default="1.0"> + </member> + <member name="scale_curve_x" type="Curve" setter="set_scale_curve_x" getter="get_scale_curve_x"> + </member> + <member name="scale_curve_y" type="Curve" setter="set_scale_curve_y" getter="get_scale_curve_y"> </member> <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0"> Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles. </member> + <member name="split_scale" type="bool" setter="set_split_scale" getter="get_split_scale" default="false"> + </member> <member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0"> Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. </member> - <member name="tangential_accel" type="float" setter="set_param" getter="get_param" default="0.0"> - Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. - </member> <member name="tangential_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's tangential acceleration will vary along this [Curve]. </member> - <member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Tangential acceleration randomness ratio. + <member name="tangential_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + </member> + <member name="tangential_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> <member name="texture" type="Texture2D" setter="set_texture" getter="get_texture"> Particle texture. If [code]null[/code], particles will be squares. @@ -301,40 +256,40 @@ Particles are drawn in order of remaining lifetime. </constant> <constant name="PARAM_INITIAL_LINEAR_VELOCITY" value="0" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set initial velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set initial velocity properties. </constant> <constant name="PARAM_ANGULAR_VELOCITY" value="1" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angular velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angular velocity properties. </constant> <constant name="PARAM_ORBIT_VELOCITY" value="2" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set orbital velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set orbital velocity properties. </constant> <constant name="PARAM_LINEAR_ACCEL" value="3" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set linear acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set linear acceleration properties. </constant> <constant name="PARAM_RADIAL_ACCEL" value="4" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set radial acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set radial acceleration properties. </constant> <constant name="PARAM_TANGENTIAL_ACCEL" value="5" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set tangential acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set tangential acceleration properties. </constant> <constant name="PARAM_DAMPING" value="6" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set damping properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set damping properties. </constant> <constant name="PARAM_ANGLE" value="7" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angle properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angle properties. </constant> <constant name="PARAM_SCALE" value="8" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set scale properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set scale properties. </constant> <constant name="PARAM_HUE_VARIATION" value="9" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set hue variation properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set hue variation properties. </constant> <constant name="PARAM_ANIM_SPEED" value="10" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation speed properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation speed properties. </constant> <constant name="PARAM_ANIM_OFFSET" value="11" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation offset properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation offset properties. </constant> <constant name="PARAM_MAX" value="12" enum="Parameter"> Represents the size of the [enum Parameter] enum. diff --git a/doc/classes/CPUParticles3D.xml b/doc/classes/CPUParticles3D.xml index 7509775d20..fe8c354427 100644 --- a/doc/classes/CPUParticles3D.xml +++ b/doc/classes/CPUParticles3D.xml @@ -11,97 +11,72 @@ </tutorials> <methods> <method name="convert_from_particles"> - <return type="void"> - </return> - <argument index="0" name="particles" type="Node"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="Node" /> <description> Sets this node's properties to match a given [GPUParticles3D] node with an assigned [ParticlesMaterial]. </description> </method> - <method name="get_param" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter"> - </argument> + <method name="get_param_curve" qualifiers="const"> + <return type="Curve" /> + <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" /> <description> - Returns the base value of the parameter specified by [enum Parameter]. + Returns the [Curve] of the parameter specified by [enum Parameter]. </description> </method> - <method name="get_param_curve" qualifiers="const"> - <return type="Curve"> - </return> - <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter"> - </argument> + <method name="get_param_max" qualifiers="const"> + <return type="float" /> + <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" /> <description> - Returns the [Curve] of the parameter specified by [enum Parameter]. </description> </method> - <method name="get_param_randomness" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter"> - </argument> + <method name="get_param_min" qualifiers="const"> + <return type="float" /> + <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" /> <description> - Returns the randomness factor of the parameter specified by [enum Parameter]. </description> </method> <method name="get_particle_flag" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="particle_flag" type="int" enum="CPUParticles3D.ParticleFlags"> - </argument> + <return type="bool" /> + <argument index="0" name="particle_flag" type="int" enum="CPUParticles3D.ParticleFlags" /> <description> Returns the enabled state of the given particle flag (see [enum ParticleFlags] for options). </description> </method> <method name="restart"> - <return type="void"> - </return> + <return type="void" /> <description> Restarts the particle emitter. </description> </method> - <method name="set_param"> - <return type="void"> - </return> - <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter"> - </argument> - <argument index="1" name="value" type="float"> - </argument> + <method name="set_param_curve"> + <return type="void" /> + <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" /> + <argument index="1" name="curve" type="Curve" /> <description> - Sets the base value of the parameter specified by [enum Parameter]. + Sets the [Curve] of the parameter specified by [enum Parameter]. </description> </method> - <method name="set_param_curve"> - <return type="void"> - </return> - <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter"> - </argument> - <argument index="1" name="curve" type="Curve"> - </argument> + <method name="set_param_max"> + <return type="void" /> + <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" /> + <argument index="1" name="value" type="float" /> <description> - Sets the [Curve] of the parameter specified by [enum Parameter]. + Sets the maximum value for the given parameter </description> </method> - <method name="set_param_randomness"> - <return type="void"> - </return> - <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter"> - </argument> - <argument index="1" name="randomness" type="float"> - </argument> + <method name="set_param_min"> + <return type="void" /> + <argument index="0" name="param" type="int" enum="CPUParticles3D.Parameter" /> + <argument index="1" name="value" type="float" /> <description> - Sets the randomness factor of the parameter specified by [enum Parameter]. + Sets the minimum value for the given parameter </description> </method> <method name="set_particle_flag"> - <return type="void"> - </return> - <argument index="0" name="particle_flag" type="int" enum="CPUParticles3D.ParticleFlags"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="particle_flag" type="int" enum="CPUParticles3D.ParticleFlags" /> + <argument index="1" name="enable" type="bool" /> <description> Enables or disables the given particle flag (see [enum ParticleFlags] for options). </description> @@ -111,56 +86,56 @@ <member name="amount" type="int" setter="set_amount" getter="get_amount" default="8"> Number of particles emitted in one emission cycle. </member> - <member name="angle" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial rotation applied to each particle, in degrees. - </member> <member name="angle_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's rotation will be animated along this [Curve]. </member> - <member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Rotation randomness ratio. + <member name="angle_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum angle. </member> - <member name="angular_velocity" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial angular velocity applied to each particle. Sets the speed of rotation of the particle. + <member name="angle_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum angle. </member> <member name="angular_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's angular velocity will vary along this [Curve]. </member> - <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Angular velocity randomness ratio. + <member name="angular_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum angular velocity. </member> - <member name="anim_offset" type="float" setter="set_param" getter="get_param" default="0.0"> - Particle animation offset. + <member name="angular_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum angular velocity. </member> <member name="anim_offset_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's animation offset will vary along this [Curve]. </member> - <member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Animation offset randomness ratio. + <member name="anim_offset_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum animation offset. </member> - <member name="anim_speed" type="float" setter="set_param" getter="get_param" default="0.0"> - Particle animation speed. + <member name="anim_offset_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum animation offset. </member> <member name="anim_speed_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's animation speed will vary along this [Curve]. </member> - <member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Animation speed randomness ratio. + <member name="anim_speed_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum particle animation speed. + </member> + <member name="anim_speed_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum particle animation speed. </member> <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)"> - Unused for 3D particles. + Each particle's initial color. To have particle display color in a [BaseMaterial3D] make sure to set [member BaseMaterial3D.vertex_color_use_as_albedo] to [code]true[/code]. </member> <member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp"> - Unused for 3D particles. - </member> - <member name="damping" type="float" setter="set_param" getter="get_param" default="0.0"> - The rate at which particles lose velocity. + Each particle's color will vary along this [GradientTexture] over its lifetime (multiplied with [member color]). </member> <member name="damping_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Damping will vary along this [Curve]. </member> - <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Damping randomness ratio. + <member name="damping_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum damping. + </member> + <member name="damping_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum damping </member> <member name="direction" type="Vector3" setter="set_direction" getter="get_direction" default="Vector3(1, 0, 0)"> Unit vector specifying the particles' emission direction. @@ -177,9 +152,21 @@ <member name="emission_normals" type="PackedVector3Array" setter="set_emission_normals" getter="get_emission_normals"> Sets the direction the particles will be emitted in when using [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> - <member name="emission_points" type="PackedVector3Array" setter="set_emission_points" getter="get_emission_points" default="PackedVector3Array()"> + <member name="emission_points" type="PackedVector3Array" setter="set_emission_points" getter="get_emission_points"> Sets the initial positions to spawn particles when using [constant EMISSION_SHAPE_POINTS] or [constant EMISSION_SHAPE_DIRECTED_POINTS]. </member> + <member name="emission_ring_axis" type="Vector3" setter="set_emission_ring_axis" getter="get_emission_ring_axis"> + The axis of the ring when using the emitter [constant EMISSION_SHAPE_RING]. + </member> + <member name="emission_ring_height" type="float" setter="set_emission_ring_height" getter="get_emission_ring_height"> + The height of the ring when using the emitter [constant EMISSION_SHAPE_RING]. + </member> + <member name="emission_ring_inner_radius" type="float" setter="set_emission_ring_inner_radius" getter="get_emission_ring_inner_radius"> + The inner radius of the ring when using the emitter [constant EMISSION_SHAPE_RING]. + </member> + <member name="emission_ring_radius" type="float" setter="set_emission_ring_radius" getter="get_emission_ring_radius"> + The radius of the ring when using the emitter [constant EMISSION_SHAPE_RING]. + </member> <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="CPUParticles3D.EmissionShape" default="0"> Particles will be emitted inside this region. See [enum EmissionShape] for possible values. </member> @@ -204,20 +191,20 @@ <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3(0, -9.8, 0)"> Gravity applied to every particle. </member> - <member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial hue variation applied to each particle. - </member> <member name="hue_variation_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's hue will vary along this [Curve]. </member> - <member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Hue variation randomness ratio. + <member name="hue_variation_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum hue variation. </member> - <member name="initial_velocity" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial velocity magnitude for each particle. Direction comes from [member spread] and the node's orientation. + <member name="hue_variation_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum hue variation. </member> - <member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Initial velocity randomness ratio. + <member name="initial_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum value of the initial velocity. + </member> + <member name="initial_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum value of the initial velocity. </member> <member name="lifetime" type="float" setter="set_lifetime" getter="get_lifetime" default="1.0"> Amount of time each particle will exist. @@ -225,14 +212,14 @@ <member name="lifetime_randomness" type="float" setter="set_lifetime_randomness" getter="get_lifetime_randomness" default="0.0"> Particle lifetime randomness ratio. </member> - <member name="linear_accel" type="float" setter="set_param" getter="get_param" default="0.0"> - Linear acceleration applied to each particle in the direction of motion. - </member> <member name="linear_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's linear acceleration will vary along this [Curve]. </member> - <member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Linear acceleration randomness ratio. + <member name="linear_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum linear acceleration. + </member> + <member name="linear_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum linear acceleration. </member> <member name="local_coords" type="bool" setter="set_use_local_coordinates" getter="get_use_local_coordinates" default="true"> If [code]true[/code], particles use the parent node's coordinate space. If [code]false[/code], they use global coordinates. @@ -243,15 +230,14 @@ <member name="one_shot" type="bool" setter="set_one_shot" getter="get_one_shot" default="false"> If [code]true[/code], only one emission cycle occurs. If set [code]true[/code] during a cycle, emission will stop at the cycle's end. </member> - <member name="orbit_velocity" type="float" setter="set_param" getter="get_param"> - Orbital velocity applied to each particle. Makes the particles circle around origin in the local XY plane. Specified in number of full rotations around origin per second. - This property is only available when [member particle_flag_disable_z] is [code]true[/code]. - </member> <member name="orbit_velocity_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's orbital velocity will vary along this [Curve]. </member> - <member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Orbital velocity randomness ratio. + <member name="orbit_velocity_max" type="float" setter="set_param_max" getter="get_param_max"> + Maximum orbit velocity. + </member> + <member name="orbit_velocity_min" type="float" setter="set_param_min" getter="get_param_min"> + Minimum orbit velocity. </member> <member name="particle_flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> Align Y axis of particle with the direction of its velocity. @@ -260,46 +246,58 @@ If [code]true[/code], particles will not move on the Z axis. </member> <member name="particle_flag_rotate_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> - If [code]true[/code], particles rotate around Y axis by [member angle]. + If [code]true[/code], particles rotate around Y axis by [member angle_min]. </member> <member name="preprocess" type="float" setter="set_pre_process_time" getter="get_pre_process_time" default="0.0"> Particle system starts as if it had already run for this many seconds. </member> - <member name="radial_accel" type="float" setter="set_param" getter="get_param" default="0.0"> - Radial acceleration applied to each particle. Makes particle accelerate away from origin. - </member> <member name="radial_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's radial acceleration will vary along this [Curve]. </member> - <member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Radial acceleration randomness ratio. + <member name="radial_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum radial acceleration. + </member> + <member name="radial_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum radial acceleration. </member> <member name="randomness" type="float" setter="set_randomness_ratio" getter="get_randomness_ratio" default="0.0"> Emission lifetime randomness ratio. </member> - <member name="scale_amount" type="float" setter="set_param" getter="get_param" default="1.0"> - Initial scale applied to each particle. - </member> <member name="scale_amount_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's scale will vary along this [Curve]. </member> - <member name="scale_amount_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Scale randomness ratio. + <member name="scale_amount_max" type="float" setter="set_param_max" getter="get_param_max" default="1.0"> + Maximum scale. + </member> + <member name="scale_amount_min" type="float" setter="set_param_min" getter="get_param_min" default="1.0"> + Minimum scale. + </member> + <member name="scale_curve_x" type="Curve" setter="set_scale_curve_x" getter="get_scale_curve_x"> + Curve for the scale over life, along the x axis. + </member> + <member name="scale_curve_y" type="Curve" setter="set_scale_curve_y" getter="get_scale_curve_y"> + Curve for the scale over life, along the y axis. + </member> + <member name="scale_curve_z" type="Curve" setter="set_scale_curve_z" getter="get_scale_curve_z"> + Curve for the scale over life, along the z axis. </member> <member name="speed_scale" type="float" setter="set_speed_scale" getter="get_speed_scale" default="1.0"> Particle system's running speed scaling ratio. A value of [code]0[/code] can be used to pause the particles. </member> + <member name="split_scale" type="bool" setter="set_split_scale" getter="get_split_scale" default="false"> + If set to true, three different scale curves can be specified, one per scale axis. + </member> <member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0"> Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. Applied to X/Z plane and Y/Z planes. </member> - <member name="tangential_accel" type="float" setter="set_param" getter="get_param" default="0.0"> - Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. - </member> <member name="tangential_accel_curve" type="Curve" setter="set_param_curve" getter="get_param_curve"> Each particle's tangential acceleration will vary along this [Curve]. </member> - <member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Tangential acceleration randomness ratio. + <member name="tangential_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum tangent acceleration. + </member> + <member name="tangential_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum tangent acceleration. </member> </members> <constants> @@ -313,40 +311,40 @@ Particles are drawn in order of depth. </constant> <constant name="PARAM_INITIAL_LINEAR_VELOCITY" value="0" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set initial velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set initial velocity properties. </constant> <constant name="PARAM_ANGULAR_VELOCITY" value="1" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angular velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angular velocity properties. </constant> <constant name="PARAM_ORBIT_VELOCITY" value="2" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set orbital velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set orbital velocity properties. </constant> <constant name="PARAM_LINEAR_ACCEL" value="3" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set linear acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set linear acceleration properties. </constant> <constant name="PARAM_RADIAL_ACCEL" value="4" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set radial acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set radial acceleration properties. </constant> <constant name="PARAM_TANGENTIAL_ACCEL" value="5" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set tangential acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set tangential acceleration properties. </constant> <constant name="PARAM_DAMPING" value="6" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set damping properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set damping properties. </constant> <constant name="PARAM_ANGLE" value="7" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set angle properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set angle properties. </constant> <constant name="PARAM_SCALE" value="8" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set scale properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set scale properties. </constant> <constant name="PARAM_HUE_VARIATION" value="9" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set hue variation properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set hue variation properties. </constant> <constant name="PARAM_ANIM_SPEED" value="10" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation speed properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation speed properties. </constant> <constant name="PARAM_ANIM_OFFSET" value="11" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_curve] to set animation offset properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_curve] to set animation offset properties. </constant> <constant name="PARAM_MAX" value="12" enum="Parameter"> Represents the size of the [enum Parameter] enum. @@ -378,7 +376,10 @@ <constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4" enum="EmissionShape"> Particles will be emitted at a position chosen randomly among [member emission_points]. Particle velocity and rotation will be set based on [member emission_normals]. Particle color will be modulated by [member emission_colors]. </constant> - <constant name="EMISSION_SHAPE_MAX" value="5" enum="EmissionShape"> + <constant name="EMISSION_SHAPE_RING" value="5" enum="EmissionShape"> + Particles will be emitted in a ring or cylinder. + </constant> + <constant name="EMISSION_SHAPE_MAX" value="6" enum="EmissionShape"> Represents the size of the [enum EmissionShape] enum. </constant> </constants> diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml index 3c61e8278f..5228df706b 100644 --- a/doc/classes/Callable.xml +++ b/doc/classes/Callable.xml @@ -37,148 +37,122 @@ </tutorials> <methods> <method name="Callable" qualifiers="constructor"> - <return type="Callable"> - </return> + <return type="Callable" /> <description> Constructs a null [Callable] with no object nor method bound. </description> </method> <method name="Callable" qualifiers="constructor"> - <return type="Callable"> - </return> - <argument index="0" name="from" type="Callable"> - </argument> + <return type="Callable" /> + <argument index="0" name="from" type="Callable" /> <description> Constructs a [Callable] as a copy of the given [Callable]. </description> </method> <method name="Callable" qualifiers="constructor"> - <return type="Callable"> - </return> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="method" type="StringName"> - </argument> + <return type="Callable" /> + <argument index="0" name="object" type="Object" /> + <argument index="1" name="method" type="StringName" /> <description> Creates a new [Callable] for the method called [code]method[/code] in the specified [code]object[/code]. </description> </method> <method name="bind" qualifiers="vararg const"> - <return type="Callable"> - </return> + <return type="Callable" /> <description> Returns a copy of this [Callable] with the arguments bound. Bound arguments are passed after the arguments supplied by [method call]. </description> </method> <method name="call" qualifiers="vararg const"> - <return type="Variant"> - </return> + <return type="Variant" /> <description> Calls the method represented by this [Callable]. Arguments can be passed and should match the method's signature. </description> </method> <method name="call_deferred" qualifiers="vararg const"> - <return type="void"> - </return> + <return type="void" /> <description> Calls the method represented by this [Callable] in deferred mode, i.e. during the idle frame. Arguments can be passed and should match the method's signature. </description> </method> <method name="get_method" qualifiers="const"> - <return type="StringName"> - </return> + <return type="StringName" /> <description> Returns the name of the method represented by this [Callable]. </description> </method> <method name="get_object" qualifiers="const"> - <return type="Object"> - </return> + <return type="Object" /> <description> Returns the object on which this [Callable] is called. </description> </method> <method name="get_object_id" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the ID of this [Callable]'s object (see [method Object.get_instance_id]). </description> </method> <method name="hash" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the hash value of this [Callable]'s object. </description> </method> <method name="is_custom" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if this [Callable] is a custom callable whose behavior differs based on implementation details. Custom callables are used in the engine for various reasons. If [code]true[/code], you can't use [method get_method]. </description> </method> <method name="is_null" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if this [Callable] has no target to call the method on. </description> </method> <method name="is_standard" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if this [Callable] is a standard callable, referencing an object and a method using a [StringName]. </description> </method> <method name="is_valid" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the object exists and has a valid function assigned, or is a custom callable. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Callable"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Callable" /> <description> Returns [code]true[/code] if both [Callable]s invoke different targets. </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Callable"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Callable" /> <description> Returns [code]true[/code] if both [Callable]s invoke the same custom target. </description> </method> <method name="rpc" qualifiers="vararg const"> - <return type="void"> - </return> + <return type="void" /> <description> Perform an RPC (Remote Procedure Call). This is used for multiplayer and is normally not available unless the function being called has been marked as [i]RPC[/i]. Calling it on unsupported functions will result in an error. </description> </method> <method name="rpc_id" qualifiers="vararg const"> - <return type="void"> - </return> - <argument index="0" name="peer_id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="peer_id" type="int" /> <description> Perform an RPC (Remote Procedure Call) on a specific peer ID (see multiplayer documentation for reference). This is used for multiplayer and is normally not available unless the function being called has been marked as [i]RPC[/i]. Calling it on unsupported functions will result in an error. </description> </method> <method name="unbind" qualifiers="const"> - <return type="Callable"> - </return> - <argument index="0" name="argcount" type="int"> - </argument> + <return type="Callable" /> + <argument index="0" name="argcount" type="int" /> <description> Returns a copy of this [Callable] with the arguments unbound. Calling the returned [Callable] will call the method without the extra arguments that are supplied in the [Callable] on which you are calling this method. </description> diff --git a/doc/classes/CallbackTweener.xml b/doc/classes/CallbackTweener.xml index 8ac285c3df..fab5f06ba8 100644 --- a/doc/classes/CallbackTweener.xml +++ b/doc/classes/CallbackTweener.xml @@ -11,10 +11,8 @@ </tutorials> <methods> <method name="set_delay"> - <return type="CallbackTweener"> - </return> - <argument index="0" name="delay" type="float"> - </argument> + <return type="CallbackTweener" /> + <argument index="0" name="delay" type="float" /> <description> Makes the callback call delayed by given time in seconds. Example: [codeblock] diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml index 4620b3d93c..a3a891cdcb 100644 --- a/doc/classes/Camera2D.xml +++ b/doc/classes/Camera2D.xml @@ -5,7 +5,8 @@ </brief_description> <description> Camera node for 2D scenes. It forces the screen (current layer) to scroll following this node. This makes it easier (and faster) to program scrollable scenes than manually changing the position of [CanvasItem]-based nodes. - This node is intended to be a simple helper to get things going quickly and it may happen that more functionality is desired to change how the camera works. To make your own custom camera node, inherit from [Node2D] and change the transform of the canvas by setting [member Viewport.canvas_transform] in [Viewport] (you can obtain the current [Viewport] by using [method Node.get_viewport]). + Cameras register themselves in the nearest [Viewport] node (when ascending the tree). Only one camera can be active per viewport. If no viewport is available ascending the tree, the camera will register in the global viewport. + 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 [Node2D] and change the transform of the canvas by setting [member Viewport.canvas_transform] in [Viewport] (you can obtain the current [Viewport] by using [method Node.get_viewport]). Note that the [Camera2D] node's [code]position[/code] doesn't represent the actual position of the screen, which may differ due to applied smoothing or limits. You can use [method get_camera_screen_center] to get the real position. </description> <tutorials> @@ -15,91 +16,62 @@ </tutorials> <methods> <method name="align"> - <return type="void"> - </return> + <return type="void" /> <description> Aligns the camera to the tracked node. </description> </method> - <method name="clear_current"> - <return type="void"> - </return> - <description> - Removes any [Camera2D] from the ancestor [Viewport]'s internal currently-assigned camera. - </description> - </method> <method name="force_update_scroll"> - <return type="void"> - </return> + <return type="void" /> <description> Forces the camera to update scroll immediately. </description> </method> <method name="get_camera_position" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the camera position. </description> </method> <method name="get_camera_screen_center" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the location of the [Camera2D]'s screen-center, relative to the origin. </description> </method> <method name="get_drag_margin" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="margin" type="int" enum="Side"> - </argument> + <return type="float" /> + <argument index="0" name="margin" type="int" enum="Side" /> <description> Returns the specified [enum Side]'s margin. See also [member drag_bottom_margin], [member drag_top_margin], [member drag_left_margin], and [member drag_right_margin]. </description> </method> <method name="get_limit" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="margin" type="int" enum="Side"> - </argument> + <return type="int" /> + <argument index="0" name="margin" type="int" enum="Side" /> <description> Returns the camera limit for the specified [enum Side]. See also [member limit_bottom], [member limit_top], [member limit_left], and [member limit_right]. </description> </method> - <method name="make_current"> - <return type="void"> - </return> - <description> - Make this the current 2D camera for the scene (viewport and layer), in case there are many cameras in the scene. - </description> - </method> <method name="reset_smoothing"> - <return type="void"> - </return> + <return type="void" /> <description> Sets the camera's position immediately to its current smoothing destination. This has no effect if smoothing is disabled. </description> </method> <method name="set_drag_margin"> - <return type="void"> - </return> - <argument index="0" name="margin" type="int" enum="Side"> - </argument> - <argument index="1" name="drag_margin" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="margin" type="int" enum="Side" /> + <argument index="1" name="drag_margin" type="float" /> <description> Sets the specified [enum Side]'s margin. See also [member drag_bottom_margin], [member drag_top_margin], [member drag_left_margin], and [member drag_right_margin]. </description> </method> <method name="set_limit"> - <return type="void"> - </return> - <argument index="0" name="margin" type="int" enum="Side"> - </argument> - <argument index="1" name="limit" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="margin" type="int" enum="Side" /> + <argument index="1" name="limit" type="int" /> <description> Sets the camera limit for the specified [enum Side]. See also [member limit_bottom], [member limit_top], [member limit_left], and [member limit_right]. </description> @@ -109,8 +81,8 @@ <member name="anchor_mode" type="int" setter="set_anchor_mode" getter="get_anchor_mode" enum="Camera2D.AnchorMode" default="1"> The Camera2D's anchor point. See [enum AnchorMode] constants. </member> - <member name="current" type="bool" setter="_set_current" getter="is_current" default="false"> - If [code]true[/code], the camera is the active camera for the current scene. Only one camera can be current, so setting a different camera [code]current[/code] will disable this one. + <member name="current" type="bool" setter="set_current" getter="is_current" default="false"> + If [code]true[/code], the camera acts as the active camera for its [Viewport] ancestor. Only one camera can be current in a given viewport, so setting a different camera in the same viewport [code]current[/code] will disable whatever camera was already active in that viewport. </member> <member name="custom_viewport" type="Node" setter="set_custom_viewport" getter="get_custom_viewport"> The custom [Viewport] node attached to the [Camera2D]. If [code]null[/code] or not a [Viewport], uses the default viewport instead. diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml index afba478a20..8a91a91b22 100644 --- a/doc/classes/Camera3D.xml +++ b/doc/classes/Camera3D.xml @@ -11,173 +11,134 @@ </tutorials> <methods> <method name="clear_current"> - <return type="void"> - </return> - <argument index="0" name="enable_next" type="bool" default="true"> - </argument> + <return type="void" /> + <argument index="0" name="enable_next" type="bool" default="true" /> <description> If this is the current camera, remove it from being current. If [code]enable_next[/code] is [code]true[/code], request to make the next camera current, if any. </description> </method> <method name="get_camera_rid" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> Returns the camera's RID from the [RenderingServer]. </description> </method> <method name="get_camera_transform" qualifiers="const"> - <return type="Transform3D"> - </return> + <return type="Transform3D" /> <description> Gets the camera transform. Subclassed cameras such as [ClippedCamera3D] may provide different transforms than the [Node] transform. </description> </method> - <method name="get_cull_mask_bit" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="layer" type="int"> - </argument> + <method name="get_cull_mask_value" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns [code]true[/code] if the given [code]layer[/code] in the [member cull_mask] is enabled, [code]false[/code] otherwise. + Returns whether or not the specified layer of the [member cull_mask] is enabled, given a [code]layer_number[/code] between 1 and 20. </description> </method> <method name="get_frustum" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> - Returns the camera's frustum planes in world-space units as an array of [Plane]s in the following order: near, far, left, top, right, bottom. Not to be confused with [member frustum_offset]. + Returns the camera's frustum planes in world space units as an array of [Plane]s in the following order: near, far, left, top, right, bottom. Not to be confused with [member frustum_offset]. </description> </method> <method name="is_position_behind" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="world_point" type="Vector3"> - </argument> + <return type="bool" /> + <argument index="0" name="world_point" type="Vector3" /> <description> Returns [code]true[/code] if the given position is behind the camera (the blue part of the linked diagram). [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/camera3d_position_frustum.png]See this diagram[/url] for an overview of position query methods. [b]Note:[/b] A position which returns [code]false[/code] may still be outside the camera's field of view. </description> </method> <method name="is_position_in_frustum" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="world_point" type="Vector3"> - </argument> + <return type="bool" /> + <argument index="0" name="world_point" type="Vector3" /> <description> Returns [code]true[/code] if the given position is inside the camera's frustum (the green part of the linked diagram). [url=https://raw.githubusercontent.com/godotengine/godot-docs/master/img/camera3d_position_frustum.png]See this diagram[/url] for an overview of position query methods. </description> </method> <method name="make_current"> - <return type="void"> - </return> + <return type="void" /> <description> Makes this camera the current camera for the [Viewport] (see class description). If the camera node is outside the scene tree, it will attempt to become current once it's added. </description> </method> <method name="project_local_ray_normal" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="screen_point" type="Vector2"> - </argument> + <return type="Vector3" /> + <argument index="0" name="screen_point" type="Vector2" /> <description> Returns a normal vector from the screen point location directed along the camera. Orthogonal cameras are normalized. Perspective cameras account for perspective, screen width/height, etc. </description> </method> <method name="project_position" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="screen_point" type="Vector2"> - </argument> - <argument index="1" name="z_depth" type="float"> - </argument> + <return type="Vector3" /> + <argument index="0" name="screen_point" type="Vector2" /> + <argument index="1" name="z_depth" type="float" /> <description> - Returns the 3D point in worldspace that maps to the given 2D coordinate in the [Viewport] rectangle on a plane that is the given [code]z_depth[/code] distance into the scene away from the camera. + Returns the 3D point in world space that maps to the given 2D coordinate in the [Viewport] rectangle on a plane that is the given [code]z_depth[/code] distance into the scene away from the camera. </description> </method> <method name="project_ray_normal" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="screen_point" type="Vector2"> - </argument> + <return type="Vector3" /> + <argument index="0" name="screen_point" type="Vector2" /> <description> - Returns a normal vector in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. + Returns a normal vector in world space, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. </description> </method> <method name="project_ray_origin" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="screen_point" type="Vector2"> - </argument> + <return type="Vector3" /> + <argument index="0" name="screen_point" type="Vector2" /> <description> - Returns a 3D position in worldspace, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. + Returns a 3D position in world space, that is the result of projecting a point on the [Viewport] rectangle by the camera projection. This is useful for casting rays in the form of (origin, normal) for object intersection or picking. </description> </method> - <method name="set_cull_mask_bit"> - <return type="void"> - </return> - <argument index="0" name="layer" type="int"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <method name="set_cull_mask_value"> + <return type="void" /> + <argument index="0" name="layer_number" type="int" /> + <argument index="1" name="value" type="bool" /> <description> - Enables or disables the given [code]layer[/code] in the [member cull_mask]. + Based on [code]value[/code], enables or disables the specified layer in the [member cull_mask], given a [code]layer_number[/code] between 1 and 20. </description> </method> <method name="set_frustum"> - <return type="void"> - </return> - <argument index="0" name="size" type="float"> - </argument> - <argument index="1" name="offset" type="Vector2"> - </argument> - <argument index="2" name="z_near" type="float"> - </argument> - <argument index="3" name="z_far" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="size" type="float" /> + <argument index="1" name="offset" type="Vector2" /> + <argument index="2" name="z_near" type="float" /> + <argument index="3" name="z_far" type="float" /> <description> - Sets the camera projection to frustum mode (see [constant PROJECTION_FRUSTUM]), by specifying a [code]size[/code], an [code]offset[/code], and the [code]z_near[/code] and [code]z_far[/code] clip planes in world-space units. + Sets the camera projection to frustum mode (see [constant PROJECTION_FRUSTUM]), by specifying a [code]size[/code], an [code]offset[/code], and the [code]z_near[/code] and [code]z_far[/code] clip planes in world space units. </description> </method> <method name="set_orthogonal"> - <return type="void"> - </return> - <argument index="0" name="size" type="float"> - </argument> - <argument index="1" name="z_near" type="float"> - </argument> - <argument index="2" name="z_far" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="size" type="float" /> + <argument index="1" name="z_near" type="float" /> + <argument index="2" name="z_far" type="float" /> <description> - Sets the camera projection to orthogonal mode (see [constant PROJECTION_ORTHOGONAL]), by specifying a [code]size[/code], and the [code]z_near[/code] and [code]z_far[/code] clip planes in world-space units. (As a hint, 2D games often use this projection, with values specified in pixels.) + Sets the camera projection to orthogonal mode (see [constant PROJECTION_ORTHOGONAL]), by specifying a [code]size[/code], and the [code]z_near[/code] and [code]z_far[/code] clip planes in world space units. (As a hint, 2D games often use this projection, with values specified in pixels.) </description> </method> <method name="set_perspective"> - <return type="void"> - </return> - <argument index="0" name="fov" type="float"> - </argument> - <argument index="1" name="z_near" type="float"> - </argument> - <argument index="2" name="z_far" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="fov" type="float" /> + <argument index="1" name="z_near" type="float" /> + <argument index="2" name="z_far" type="float" /> <description> - Sets the camera projection to perspective mode (see [constant PROJECTION_PERSPECTIVE]), by specifying a [code]fov[/code] (field of view) angle in degrees, and the [code]z_near[/code] and [code]z_far[/code] clip planes in world-space units. + Sets the camera projection to perspective mode (see [constant PROJECTION_PERSPECTIVE]), by specifying a [code]fov[/code] (field of view) angle in degrees, and the [code]z_near[/code] and [code]z_far[/code] clip planes in world space units. </description> </method> <method name="unproject_position" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="world_point" type="Vector3"> - </argument> + <return type="Vector2" /> + <argument index="0" name="world_point" type="Vector3" /> <description> - Returns the 2D coordinate in the [Viewport] rectangle that maps to the given 3D point in worldspace. + Returns the 2D coordinate in the [Viewport] rectangle that maps to the given 3D point in world space. [b]Note:[/b] When using this to position GUI elements over a 3D viewport, use [method is_position_behind] to prevent them from appearing if the 3D point is behind the camera: [codeblock] # This code block is part of a script that inherits from Node3D. # `control` is a reference to a node inheriting from Control. - control.visible = not get_viewport().get_camera().is_position_behind(global_transform.origin) - control.rect_position = get_viewport().get_camera().unproject_position(global_transform.origin) + control.visible = not get_viewport().get_camera_3d().is_position_behind(global_transform.origin) + control.rect_position = get_viewport().get_camera_3d().unproject_position(global_transform.origin) [/codeblock] </description> </method> diff --git a/doc/classes/CameraFeed.xml b/doc/classes/CameraFeed.xml index fc7dcd3772..2dda36a1bc 100644 --- a/doc/classes/CameraFeed.xml +++ b/doc/classes/CameraFeed.xml @@ -10,7 +10,60 @@ <tutorials> </tutorials> <methods> + <method name="get_datatype" qualifiers="const"> + <return type="int" enum="CameraFeed.FeedDataType" /> + <description> + Returns feed image data type. + </description> + </method> + <method name="get_id" qualifiers="const"> + <return type="int" /> + <description> + Returns the unique ID for this feed. + </description> + </method> + <method name="get_name" qualifiers="const"> + <return type="String" /> + <description> + Returns the camera's name. + </description> + </method> + <method name="get_position" qualifiers="const"> + <return type="int" enum="CameraFeed.FeedPosition" /> + <description> + Returns the position of camera on the device. + </description> + </method> </methods> + <members> + <member name="feed_is_active" type="bool" setter="set_active" getter="is_active" default="false"> + If [code]true[/code], the feed is active. + </member> + <member name="feed_transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D(1, 0, 0, -1, 0, 1)"> + The transform applied to the camera's image. + </member> + </members> <constants> + <constant name="FEED_NOIMAGE" value="0" enum="FeedDataType"> + No image set for the feed. + </constant> + <constant name="FEED_RGB" value="1" enum="FeedDataType"> + Feed supplies RGB images. + </constant> + <constant name="FEED_YCBCR" value="2" enum="FeedDataType"> + Feed supplies YCbCr images that need to be converted to RGB. + </constant> + <constant name="FEED_YCBCR_SEP" value="3" enum="FeedDataType"> + Feed supplies separate Y and CbCr images that need to be combined and converted to RGB. + </constant> + <constant name="FEED_UNSPECIFIED" value="0" enum="FeedPosition"> + Unspecified position. + </constant> + <constant name="FEED_FRONT" value="1" enum="FeedPosition"> + Camera is mounted at the front of the device. + </constant> + <constant name="FEED_BACK" value="2" enum="FeedPosition"> + Camera is mounted at the back of the device. + </constant> </constants> </class> diff --git a/doc/classes/CameraServer.xml b/doc/classes/CameraServer.xml index e00dc031dc..404ea08851 100644 --- a/doc/classes/CameraServer.xml +++ b/doc/classes/CameraServer.xml @@ -12,42 +12,34 @@ </tutorials> <methods> <method name="add_feed"> - <return type="void"> - </return> - <argument index="0" name="feed" type="CameraFeed"> - </argument> + <return type="void" /> + <argument index="0" name="feed" type="CameraFeed" /> <description> Adds the camera [code]feed[/code] to the camera server. </description> </method> <method name="feeds"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns an array of [CameraFeed]s. </description> </method> <method name="get_feed"> - <return type="CameraFeed"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="CameraFeed" /> + <argument index="0" name="index" type="int" /> <description> Returns the [CameraFeed] corresponding to the camera with the given [code]index[/code]. </description> </method> <method name="get_feed_count"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of [CameraFeed]s registered. </description> </method> <method name="remove_feed"> - <return type="void"> - </return> - <argument index="0" name="feed" type="CameraFeed"> - </argument> + <return type="void" /> + <argument index="0" name="feed" type="CameraFeed" /> <description> Removes the specified camera [code]feed[/code]. </description> @@ -55,15 +47,13 @@ </methods> <signals> <signal name="camera_feed_added"> - <argument index="0" name="id" type="int"> - </argument> + <argument index="0" name="id" type="int" /> <description> Emitted when a [CameraFeed] is added (e.g. a webcam is plugged in). </description> </signal> <signal name="camera_feed_removed"> - <argument index="0" name="id" type="int"> - </argument> + <argument index="0" name="id" type="int" /> <description> Emitted when a [CameraFeed] is removed (e.g. a webcam is unplugged). </description> diff --git a/doc/classes/CanvasItem.xml b/doc/classes/CanvasItem.xml index d0950ae741..4641bc52a4 100644 --- a/doc/classes/CanvasItem.xml +++ b/doc/classes/CanvasItem.xml @@ -18,327 +18,231 @@ </tutorials> <methods> <method name="_draw" qualifiers="virtual"> - <return type="void"> - </return> + <return type="void" /> <description> Overridable function called by the engine (if defined) to draw the canvas item. </description> </method> <method name="draw_animation_slice"> - <return type="void"> - </return> - <argument index="0" name="animation_length" type="float"> - </argument> - <argument index="1" name="slice_begin" type="float"> - </argument> - <argument index="2" name="slice_end" type="float"> - </argument> - <argument index="3" name="offset" type="float" default="0.0"> - </argument> + <return type="void" /> + <argument index="0" name="animation_length" type="float" /> + <argument index="1" name="slice_begin" type="float" /> + <argument index="2" name="slice_end" type="float" /> + <argument index="3" name="offset" type="float" default="0.0" /> <description> Subsequent drawing commands will be ignored unless they fall within the specified animation slice. This is a faster way to implement animations that loop on background rather than redrawing constantly. </description> </method> <method name="draw_arc"> - <return type="void"> - </return> - <argument index="0" name="center" type="Vector2"> - </argument> - <argument index="1" name="radius" type="float"> - </argument> - <argument index="2" name="start_angle" type="float"> - </argument> - <argument index="3" name="end_angle" type="float"> - </argument> - <argument index="4" name="point_count" type="int"> - </argument> - <argument index="5" name="color" type="Color"> - </argument> - <argument index="6" name="width" type="float" default="1.0"> - </argument> - <argument index="7" name="antialiased" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="center" type="Vector2" /> + <argument index="1" name="radius" type="float" /> + <argument index="2" name="start_angle" type="float" /> + <argument index="3" name="end_angle" type="float" /> + <argument index="4" name="point_count" type="int" /> + <argument index="5" name="color" type="Color" /> + <argument index="6" name="width" type="float" default="1.0" /> + <argument index="7" name="antialiased" type="bool" default="false" /> <description> Draws an arc between the given angles. The larger the value of [code]point_count[/code], the smoother the curve. </description> </method> <method name="draw_char" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="font" type="Font"> - </argument> - <argument index="1" name="pos" type="Vector2"> - </argument> - <argument index="2" name="char" type="String"> - </argument> - <argument index="3" name="next" type="String" default=""""> - </argument> - <argument index="4" name="size" type="int" default="-1"> - </argument> - <argument index="5" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <argument index="6" name="outline_size" type="int" default="0"> - </argument> - <argument index="7" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)"> - </argument> + <return type="float" /> + <argument index="0" name="font" type="Font" /> + <argument index="1" name="pos" type="Vector2" /> + <argument index="2" name="char" type="String" /> + <argument index="3" name="next" type="String" default="""" /> + <argument index="4" name="size" type="int" default="-1" /> + <argument index="5" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> + <argument index="6" name="outline_size" type="int" default="0" /> + <argument index="7" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" /> <description> Draws a string character using a custom font. Returns the advance, depending on the character width and kerning with an optional next character. </description> </method> <method name="draw_circle"> - <return type="void"> - </return> - <argument index="0" name="position" type="Vector2"> - </argument> - <argument index="1" name="radius" type="float"> - </argument> - <argument index="2" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="position" type="Vector2" /> + <argument index="1" name="radius" type="float" /> + <argument index="2" name="color" type="Color" /> <description> Draws a colored circle. </description> </method> <method name="draw_colored_polygon"> - <return type="void"> - </return> - <argument index="0" name="points" type="PackedVector2Array"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> - <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array()"> - </argument> - <argument index="3" name="texture" type="Texture2D" default="null"> - </argument> + <return type="void" /> + <argument index="0" name="points" type="PackedVector2Array" /> + <argument index="1" name="color" type="Color" /> + <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array()" /> + <argument index="3" name="texture" type="Texture2D" default="null" /> <description> Draws a colored polygon of any amount of points, convex or concave. </description> </method> <method name="draw_end_animation"> - <return type="void"> - </return> + <return type="void" /> <description> After submitting all animations slices via [method draw_animation_slice], this function can be used to revert drawing to its default state (all subsequent drawing commands will be visible). If you don't care about this particular use case, usage of this function after submitting the slices is not required. </description> </method> <method name="draw_line"> - <return type="void"> - </return> - <argument index="0" name="from" type="Vector2"> - </argument> - <argument index="1" name="to" type="Vector2"> - </argument> - <argument index="2" name="color" type="Color"> - </argument> - <argument index="3" name="width" type="float" default="1.0"> - </argument> + <return type="void" /> + <argument index="0" name="from" type="Vector2" /> + <argument index="1" name="to" type="Vector2" /> + <argument index="2" name="color" type="Color" /> + <argument index="3" name="width" type="float" default="1.0" /> <description> Draws a line from a 2D point to another, with a given color and width. </description> </method> <method name="draw_mesh"> - <return type="void"> - </return> - <argument index="0" name="mesh" type="Mesh"> - </argument> - <argument index="1" name="texture" type="Texture2D"> - </argument> - <argument index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)"> - </argument> - <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> - </argument> + <return type="void" /> + <argument index="0" name="mesh" type="Mesh" /> + <argument index="1" name="texture" type="Texture2D" /> + <argument index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)" /> + <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> <description> Draws a [Mesh] in 2D, using the provided texture. See [MeshInstance2D] for related documentation. </description> </method> + <method name="draw_msdf_texture_rect_region"> + <return type="void" /> + <argument index="0" name="texture" type="Texture2D" /> + <argument index="1" name="rect" type="Rect2" /> + <argument index="2" name="src_rect" type="Rect2" /> + <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> + <argument index="4" name="outline" type="float" default="0.0" /> + <argument index="5" name="pixel_range" type="float" default="4.0" /> + <description> + Draws a textured rectangle region of the multi-channel signed distance field texture at a given position, optionally modulated by a color. + If [code]outline[/code] is positive, each alpha channel value of pixel in region is set to maximum value of true distance in the [code]outline[/code] radius. + Value of the [code]pixel_range[/code] should the same that was used during distance field texture generation. + </description> + </method> <method name="draw_multiline"> - <return type="void"> - </return> - <argument index="0" name="points" type="PackedVector2Array"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> - <argument index="2" name="width" type="float" default="1.0"> - </argument> + <return type="void" /> + <argument index="0" name="points" type="PackedVector2Array" /> + <argument index="1" name="color" type="Color" /> + <argument index="2" name="width" type="float" default="1.0" /> <description> Draws multiple, parallel lines with a uniform [code]color[/code]. </description> </method> <method name="draw_multiline_colors"> - <return type="void"> - </return> - <argument index="0" name="points" type="PackedVector2Array"> - </argument> - <argument index="1" name="colors" type="PackedColorArray"> - </argument> - <argument index="2" name="width" type="float" default="1.0"> - </argument> + <return type="void" /> + <argument index="0" name="points" type="PackedVector2Array" /> + <argument index="1" name="colors" type="PackedColorArray" /> + <argument index="2" name="width" type="float" default="1.0" /> <description> Draws multiple, parallel lines with a uniform [code]width[/code] and segment-by-segment coloring. Colors assigned to line segments match by index between [code]points[/code] and [code]colors[/code]. </description> </method> <method name="draw_multiline_string" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="font" type="Font"> - </argument> - <argument index="1" name="pos" type="Vector2"> - </argument> - <argument index="2" name="text" type="String"> - </argument> - <argument index="3" name="align" type="int" enum="HAlign" default="0"> - </argument> - <argument index="4" name="width" type="float" default="-1"> - </argument> - <argument index="5" name="max_lines" type="int" default="-1"> - </argument> - <argument index="6" name="size" type="int" default="-1"> - </argument> - <argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <argument index="8" name="outline_size" type="int" default="0"> - </argument> - <argument index="9" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)"> - </argument> - <argument index="10" name="flags" type="int" default="51"> - </argument> + <return type="void" /> + <argument index="0" name="font" type="Font" /> + <argument index="1" name="pos" type="Vector2" /> + <argument index="2" name="text" type="String" /> + <argument index="3" name="align" type="int" enum="HAlign" default="0" /> + <argument index="4" name="width" type="float" default="-1" /> + <argument index="5" name="max_lines" type="int" default="-1" /> + <argument index="6" name="size" type="int" default="-1" /> + <argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> + <argument index="8" name="outline_size" type="int" default="0" /> + <argument index="9" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" /> + <argument index="10" name="flags" type="int" default="51" /> <description> Breaks [code]text[/code] to the lines and draws it using the specified [code]font[/code] at the [code]position[/code] (top-left corner). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. </description> </method> <method name="draw_multimesh"> - <return type="void"> - </return> - <argument index="0" name="multimesh" type="MultiMesh"> - </argument> - <argument index="1" name="texture" type="Texture2D"> - </argument> + <return type="void" /> + <argument index="0" name="multimesh" type="MultiMesh" /> + <argument index="1" name="texture" type="Texture2D" /> <description> Draws a [MultiMesh] in 2D with the provided texture. See [MultiMeshInstance2D] for related documentation. </description> </method> <method name="draw_polygon"> - <return type="void"> - </return> - <argument index="0" name="points" type="PackedVector2Array"> - </argument> - <argument index="1" name="colors" type="PackedColorArray"> - </argument> - <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array()"> - </argument> - <argument index="3" name="texture" type="Texture2D" default="null"> - </argument> + <return type="void" /> + <argument index="0" name="points" type="PackedVector2Array" /> + <argument index="1" name="colors" type="PackedColorArray" /> + <argument index="2" name="uvs" type="PackedVector2Array" default="PackedVector2Array()" /> + <argument index="3" name="texture" type="Texture2D" default="null" /> <description> Draws a polygon of any amount of points, convex or concave. </description> </method> <method name="draw_polyline"> - <return type="void"> - </return> - <argument index="0" name="points" type="PackedVector2Array"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> - <argument index="2" name="width" type="float" default="1.0"> - </argument> - <argument index="3" name="antialiased" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="points" type="PackedVector2Array" /> + <argument index="1" name="color" type="Color" /> + <argument index="2" name="width" type="float" default="1.0" /> + <argument index="3" name="antialiased" type="bool" default="false" /> <description> Draws interconnected line segments with a uniform [code]color[/code] and [code]width[/code]. </description> </method> <method name="draw_polyline_colors"> - <return type="void"> - </return> - <argument index="0" name="points" type="PackedVector2Array"> - </argument> - <argument index="1" name="colors" type="PackedColorArray"> - </argument> - <argument index="2" name="width" type="float" default="1.0"> - </argument> - <argument index="3" name="antialiased" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="points" type="PackedVector2Array" /> + <argument index="1" name="colors" type="PackedColorArray" /> + <argument index="2" name="width" type="float" default="1.0" /> + <argument index="3" name="antialiased" type="bool" default="false" /> <description> Draws interconnected line segments with a uniform [code]width[/code] and segment-by-segment coloring. Colors assigned to line segments match by index between [code]points[/code] and [code]colors[/code]. </description> </method> <method name="draw_primitive"> - <return type="void"> - </return> - <argument index="0" name="points" type="PackedVector2Array"> - </argument> - <argument index="1" name="colors" type="PackedColorArray"> - </argument> - <argument index="2" name="uvs" type="PackedVector2Array"> - </argument> - <argument index="3" name="texture" type="Texture2D" default="null"> - </argument> - <argument index="4" name="width" type="float" default="1.0"> - </argument> + <return type="void" /> + <argument index="0" name="points" type="PackedVector2Array" /> + <argument index="1" name="colors" type="PackedColorArray" /> + <argument index="2" name="uvs" type="PackedVector2Array" /> + <argument index="3" name="texture" type="Texture2D" default="null" /> + <argument index="4" name="width" type="float" default="1.0" /> <description> Draws a custom primitive. 1 point for a point, 2 points for a line, 3 points for a triangle, and 4 points for a quad. </description> </method> <method name="draw_rect"> - <return type="void"> - </return> - <argument index="0" name="rect" type="Rect2"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> - <argument index="2" name="filled" type="bool" default="true"> - </argument> - <argument index="3" name="width" type="float" default="1.0"> - </argument> + <return type="void" /> + <argument index="0" name="rect" type="Rect2" /> + <argument index="1" name="color" type="Color" /> + <argument index="2" name="filled" type="bool" default="true" /> + <argument index="3" name="width" type="float" default="1.0" /> <description> Draws a rectangle. If [code]filled[/code] is [code]true[/code], the rectangle will be filled with the [code]color[/code] specified. If [code]filled[/code] is [code]false[/code], the rectangle will be drawn as a stroke with the [code]color[/code] and [code]width[/code] specified. [b]Note:[/b] [code]width[/code] is only effective if [code]filled[/code] is [code]false[/code]. </description> </method> <method name="draw_set_transform"> - <return type="void"> - </return> - <argument index="0" name="position" type="Vector2"> - </argument> - <argument index="1" name="rotation" type="float" default="0.0"> - </argument> - <argument index="2" name="scale" type="Vector2" default="Vector2(1, 1)"> - </argument> + <return type="void" /> + <argument index="0" name="position" type="Vector2" /> + <argument index="1" name="rotation" type="float" default="0.0" /> + <argument index="2" name="scale" type="Vector2" default="Vector2(1, 1)" /> <description> Sets a custom transform for drawing via components. Anything drawn afterwards will be transformed by this. </description> </method> <method name="draw_set_transform_matrix"> - <return type="void"> - </return> - <argument index="0" name="xform" type="Transform2D"> - </argument> + <return type="void" /> + <argument index="0" name="xform" type="Transform2D" /> <description> Sets a custom transform for drawing via matrix. Anything drawn afterwards will be transformed by this. </description> </method> <method name="draw_string" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="font" type="Font"> - </argument> - <argument index="1" name="pos" type="Vector2"> - </argument> - <argument index="2" name="text" type="String"> - </argument> - <argument index="3" name="align" type="int" enum="HAlign" default="0"> - </argument> - <argument index="4" name="width" type="float" default="-1"> - </argument> - <argument index="5" name="size" type="int" default="-1"> - </argument> - <argument index="6" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <argument index="7" name="outline_size" type="int" default="0"> - </argument> - <argument index="8" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)"> - </argument> - <argument index="9" name="flags" type="int" default="3"> - </argument> + <return type="void" /> + <argument index="0" name="font" type="Font" /> + <argument index="1" name="pos" type="Vector2" /> + <argument index="2" name="text" type="String" /> + <argument index="3" name="align" type="int" enum="HAlign" default="0" /> + <argument index="4" name="width" type="float" default="-1" /> + <argument index="5" name="size" type="int" default="-1" /> + <argument index="6" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> + <argument index="7" name="outline_size" type="int" default="0" /> + <argument index="8" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" /> + <argument index="9" name="flags" type="int" default="3" /> <description> Draws [code]text[/code] using the specified [code]font[/code] at the [code]position[/code] (bottom-left corner using the baseline of the font). The text will have its color multiplied by [code]modulate[/code]. If [code]clip_w[/code] is greater than or equal to 0, the text will be clipped if it exceeds the specified width. [b]Example using the default project font:[/b] @@ -364,223 +268,177 @@ </description> </method> <method name="draw_style_box"> - <return type="void"> - </return> - <argument index="0" name="style_box" type="StyleBox"> - </argument> - <argument index="1" name="rect" type="Rect2"> - </argument> + <return type="void" /> + <argument index="0" name="style_box" type="StyleBox" /> + <argument index="1" name="rect" type="Rect2" /> <description> Draws a styled rectangle. </description> </method> <method name="draw_texture"> - <return type="void"> - </return> - <argument index="0" name="texture" type="Texture2D"> - </argument> - <argument index="1" name="position" type="Vector2"> - </argument> - <argument index="2" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> - </argument> + <return type="void" /> + <argument index="0" name="texture" type="Texture2D" /> + <argument index="1" name="position" type="Vector2" /> + <argument index="2" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> <description> Draws a texture at a given position. </description> </method> <method name="draw_texture_rect"> - <return type="void"> - </return> - <argument index="0" name="texture" type="Texture2D"> - </argument> - <argument index="1" name="rect" type="Rect2"> - </argument> - <argument index="2" name="tile" type="bool"> - </argument> - <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <argument index="4" name="transpose" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="texture" type="Texture2D" /> + <argument index="1" name="rect" type="Rect2" /> + <argument index="2" name="tile" type="bool" /> + <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> + <argument index="4" name="transpose" type="bool" default="false" /> <description> Draws a textured rectangle at a given position, optionally modulated by a color. If [code]transpose[/code] is [code]true[/code], the texture will have its X and Y coordinates swapped. </description> </method> <method name="draw_texture_rect_region"> - <return type="void"> - </return> - <argument index="0" name="texture" type="Texture2D"> - </argument> - <argument index="1" name="rect" type="Rect2"> - </argument> - <argument index="2" name="src_rect" type="Rect2"> - </argument> - <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <argument index="4" name="transpose" type="bool" default="false"> - </argument> - <argument index="5" name="clip_uv" type="bool" default="true"> - </argument> + <return type="void" /> + <argument index="0" name="texture" type="Texture2D" /> + <argument index="1" name="rect" type="Rect2" /> + <argument index="2" name="src_rect" type="Rect2" /> + <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> + <argument index="4" name="transpose" type="bool" default="false" /> + <argument index="5" name="clip_uv" type="bool" default="true" /> <description> Draws a textured rectangle region at a given position, optionally modulated by a color. If [code]transpose[/code] is [code]true[/code], the texture will have its X and Y coordinates swapped. </description> </method> <method name="force_update_transform"> - <return type="void"> - </return> + <return type="void" /> <description> Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations. </description> </method> <method name="get_canvas" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> Returns the [RID] of the [World2D] canvas where this item is in. </description> </method> <method name="get_canvas_item" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> Returns the canvas item RID used by [RenderingServer] for this item. </description> </method> <method name="get_canvas_transform" qualifiers="const"> - <return type="Transform2D"> - </return> + <return type="Transform2D" /> <description> Returns the transform matrix of this item's canvas. </description> </method> <method name="get_global_mouse_position" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the global position of the mouse. </description> </method> <method name="get_global_transform" qualifiers="const"> - <return type="Transform2D"> - </return> + <return type="Transform2D" /> <description> Returns the global transform matrix of this item. </description> </method> <method name="get_global_transform_with_canvas" qualifiers="const"> - <return type="Transform2D"> - </return> + <return type="Transform2D" /> <description> Returns the global transform matrix of this item in relation to the canvas. </description> </method> <method name="get_local_mouse_position" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the mouse position relative to this item's position. </description> </method> <method name="get_transform" qualifiers="const"> - <return type="Transform2D"> - </return> + <return type="Transform2D" /> <description> Returns the transform matrix of this item. </description> </method> <method name="get_viewport_rect" qualifiers="const"> - <return type="Rect2"> - </return> + <return type="Rect2" /> <description> Returns the viewport's boundaries as a [Rect2]. </description> </method> <method name="get_viewport_transform" qualifiers="const"> - <return type="Transform2D"> - </return> + <return type="Transform2D" /> <description> Returns this item's transform in relation to the viewport. </description> </method> <method name="get_world_2d" qualifiers="const"> - <return type="World2D"> - </return> + <return type="World2D" /> <description> Returns the [World2D] where this item is in. </description> </method> <method name="hide"> - <return type="void"> - </return> + <return type="void" /> <description> Hide the [CanvasItem] if it's currently visible. </description> </method> <method name="is_local_transform_notification_enabled" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if local transform notifications are communicated to children. </description> </method> <method name="is_transform_notification_enabled" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if global transform notifications are communicated to children. </description> </method> <method name="is_visible_in_tree" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the node is present in the [SceneTree], its [member visible] property is [code]true[/code] and all its antecedents are also visible. If any antecedent is hidden, this node will not be visible in the scene tree. </description> </method> <method name="make_canvas_position_local" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="screen_point" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="screen_point" type="Vector2" /> <description> Assigns [code]screen_point[/code] as this node's new local transform. </description> </method> <method name="make_input_local" qualifiers="const"> - <return type="InputEvent"> - </return> - <argument index="0" name="event" type="InputEvent"> - </argument> + <return type="InputEvent" /> + <argument index="0" name="event" type="InputEvent" /> <description> Transformations issued by [code]event[/code]'s inputs are applied in local space instead of global space. </description> </method> <method name="set_notify_local_transform"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enable" type="bool" /> <description> If [code]enable[/code] is [code]true[/code], children will be updated with local transform data. </description> </method> <method name="set_notify_transform"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enable" type="bool" /> <description> If [code]enable[/code] is [code]true[/code], children will be updated with global transform data. </description> </method> <method name="show"> - <return type="void"> - </return> + <return type="void" /> <description> Show the [CanvasItem] if it's currently hidden. For controls that inherit [Popup], the correct way to make them visible is to call one of the multiple [code]popup*()[/code] functions instead. </description> </method> <method name="update"> - <return type="void"> - </return> + <return type="void" /> <description> Queue the [CanvasItem] for update. [constant NOTIFICATION_DRAW] will be called on idle time to request redraw. </description> diff --git a/doc/classes/CanvasItemMaterial.xml b/doc/classes/CanvasItemMaterial.xml index c2d44c1d17..780899bff7 100644 --- a/doc/classes/CanvasItemMaterial.xml +++ b/doc/classes/CanvasItemMaterial.xml @@ -30,7 +30,7 @@ [b]Note:[/b] This property is only used and visible in the editor if [member particles_animation] is [code]true[/code]. </member> <member name="particles_animation" type="bool" setter="set_particles_animation" getter="get_particles_animation" default="false"> - If [code]true[/code], enable spritesheet-based animation features when assigned to [GPUParticles2D] and [CPUParticles2D] nodes. The [member ParticlesMaterial.anim_speed] or [member CPUParticles2D.anim_speed] should also be set to a positive value for the animation to play. + If [code]true[/code], enable spritesheet-based animation features when assigned to [GPUParticles2D] and [CPUParticles2D] nodes. The [member ParticlesMaterial.anim_speed_max] or [member CPUParticles2D.anim_speed_max] should also be set to a positive value for the animation to play. This property (and other [code]particles_anim_*[/code] properties that depend on it) has no effect on other types of nodes. </member> </members> diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml index eb99368079..616fb24a6f 100644 --- a/doc/classes/CanvasLayer.xml +++ b/doc/classes/CanvasLayer.xml @@ -13,8 +13,7 @@ </tutorials> <methods> <method name="get_canvas" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> Returns the RID of the canvas used by this layer. </description> diff --git a/doc/classes/CapsuleMesh.xml b/doc/classes/CapsuleMesh.xml index 031abd0112..b8605ccaec 100644 --- a/doc/classes/CapsuleMesh.xml +++ b/doc/classes/CapsuleMesh.xml @@ -11,9 +11,8 @@ <methods> </methods> <members> - <member name="mid_height" type="float" setter="set_mid_height" getter="get_mid_height" default="1.0"> - Height of the middle cylindrical part of the capsule (without the hemispherical ends). - [b]Note:[/b] The capsule's total height is equal to [member mid_height] + 2 * [member radius]. + <member name="height" type="float" setter="set_height" getter="get_height" default="3.0"> + Total height of the capsule mesh (including the hemispherical ends). </member> <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" default="64"> Number of radial segments on the capsule mesh. diff --git a/doc/classes/CapsuleShape2D.xml b/doc/classes/CapsuleShape2D.xml index 290d260f0f..8ed7d56557 100644 --- a/doc/classes/CapsuleShape2D.xml +++ b/doc/classes/CapsuleShape2D.xml @@ -11,7 +11,7 @@ <methods> </methods> <members> - <member name="height" type="float" setter="set_height" getter="get_height" default="20.0"> + <member name="height" type="float" setter="set_height" getter="get_height" default="30.0"> The capsule's height. </member> <member name="radius" type="float" setter="set_radius" getter="get_radius" default="10.0"> diff --git a/doc/classes/CapsuleShape3D.xml b/doc/classes/CapsuleShape3D.xml index 27a6242bc9..c2b13224cf 100644 --- a/doc/classes/CapsuleShape3D.xml +++ b/doc/classes/CapsuleShape3D.xml @@ -12,7 +12,7 @@ <methods> </methods> <members> - <member name="height" type="float" setter="set_height" getter="get_height" default="1.0"> + <member name="height" type="float" setter="set_height" getter="get_height" default="3.0"> The capsule's height. </member> <member name="radius" type="float" setter="set_radius" getter="get_radius" default="1.0"> diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml index b2d8aba174..f98c22a1e9 100644 --- a/doc/classes/CharacterBody2D.xml +++ b/doc/classes/CharacterBody2D.xml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CharacterBody2D" inherits="PhysicsBody2D" version="4.0"> <brief_description> - Character body 2D node. + Specialized 2D physics body node for characters moved by script. </brief_description> <description> - Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a static body. However, they have two main uses: - [b]Kinematic characters:[/b] Character bodies have an API for moving objects with walls and slopes detection ([method move_and_slide] method), in addition to collision detection (also done with [method PhysicsBody3D.move_and_collide]). This makes them really useful to implement characters that move in specific ways and collide with the world, but don't require advanced physics. - [b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [member StaticBody3D.kinematic_motion] when enabled), which allows them to be moved by code and push other bodies on their path. + Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a [AnimatableBody2D]. However, they have two main uses: + [b]Kinematic characters:[/b] Character bodies have an API for moving objects with walls and slopes detection ([method move_and_slide] method), in addition to collision detection (also done with [method PhysicsBody2D.move_and_collide]). This makes them really useful to implement characters that move in specific ways and collide with the world, but don't require advanced physics. + [b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [AnimatableBody2D]), which allows them to be moved by code and push other bodies on their path. </description> <tutorials> <link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link> @@ -15,31 +15,40 @@ <link title="2D Platformer Demo">https://godotengine.org/asset-library/asset/120</link> </tutorials> <methods> + <method name="get_floor_angle" qualifiers="const"> + <return type="float" /> + <argument index="0" name="up_direction" type="Vector2" default="Vector2(0, -1)" /> + <description> + Returns the floor's collision angle at the last collision point according to [code]up_direction[/code], which is [code]Vector2.UP[/code] by default. This value is always positive and only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code]. + </description> + </method> <method name="get_floor_normal" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code]. </description> </method> - <method name="get_floor_velocity" qualifiers="const"> - <return type="Vector2"> - </return> + <method name="get_last_slide_collision"> + <return type="KinematicCollision2D" /> + <description> + Returns a [KinematicCollision2D], which contains information about the latest collision that occurred during the last call to [method move_and_slide]. + </description> + </method> + <method name="get_platform_velocity" qualifiers="const"> + <return type="Vector2" /> <description> - Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code]. + Returns the linear velocity of the platform at the last collision point. Only valid after calling [method move_and_slide]. </description> </method> <method name="get_slide_collision"> - <return type="KinematicCollision2D"> - </return> - <argument index="0" name="slide_idx" type="int"> - </argument> + <return type="KinematicCollision2D" /> + <argument index="0" name="slide_idx" type="int" /> <description> - Returns a [KinematicCollision2D], which contains information about a collision that occurred during the last call to [method move_and_slide]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1). + Returns a [KinematicCollision2D], which contains information about a collision that occurred during the last call to [method move_and_slide]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_collision_count] - 1). [b]Example usage:[/b] [codeblocks] [gdscript] - for i in get_slide_count(): + for i in get_slide_collision_count(): var collision = get_slide_collision(i) print("Collided with: ", collision.collider.name) [/gdscript] @@ -53,41 +62,57 @@ [/codeblocks] </description> </method> - <method name="get_slide_count" qualifiers="const"> - <return type="int"> - </return> + <method name="get_slide_collision_count" qualifiers="const"> + <return type="int" /> <description> Returns the number of times the body collided and changed direction during the last call to [method move_and_slide]. </description> </method> <method name="is_on_ceiling" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the body collided with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. </description> </method> + <method name="is_on_ceiling_only" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the body collided only with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. + </description> + </method> <method name="is_on_floor" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the body collided with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. </description> </method> + <method name="is_on_floor_only" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the body collided only with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. + </description> + </method> <method name="is_on_wall" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the body collided with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. </description> </method> + <method name="is_on_wall_only" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the body collided only with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. + </description> + </method> <method name="move_and_slide"> - <return type="void"> - </return> + <return type="bool" /> <description> - Moves the body based on [member linear_velocity]. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [CharacterBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. + Moves the body based on [member linear_velocity]. If the body collides with another, it will slide along the other body (by default only on floor) rather than stop immediately. If the other body is a [CharacterBody2D] or [RigidBody2D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed. - Modifies [member linear_velocity] if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision]. + Modifies [member linear_velocity] if a slide collision occurred. To get the latest collision call [method get_last_slide_collision], for detailed information about collisions that occurred, use [method get_slide_collision]. + When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions. + The general behaviour and available properties change according to the [member motion_mode]. + Returns [code]true[/code] if the body collided, otherwise, returns [code]false[/code]. </description> </method> </methods> @@ -98,11 +123,25 @@ A higher value means it's more flexible for detecting collision, which helps with consistently detecting walls and floors. A lower value forces the collision algorithm to use more exact detection, so it can be used in cases that specifically require precision, e.g at very low scale to avoid visible jittering, or for stability with a stack of character bodies. </member> + <member name="floor_block_on_wall" type="bool" setter="set_floor_block_on_wall_enabled" getter="is_floor_block_on_wall_enabled" default="true"> + If [code]true[/code], the body will be able to move on the floor only. This option avoids to be able to walk on walls, it will however allow to slide down along them. + </member> + <member name="floor_constant_speed" type="bool" setter="set_floor_constant_speed_enabled" getter="is_floor_constant_speed_enabled" default="false"> + If [code]false[/code] (by default), the body will move faster on downward slopes and slower on upward slopes. + If [code]true[/code], the body will always move at the same speed on the ground no matter the slope. Note that you need to use [member floor_snap_length] to stick along a downward slope at constant speed. + </member> <member name="floor_max_angle" type="float" setter="set_floor_max_angle" getter="get_floor_max_angle" default="0.785398"> Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. The default value equals 45 degrees. </member> - <member name="infinite_inertia" type="bool" setter="set_infinite_inertia_enabled" getter="is_infinite_inertia_enabled" default="true"> - If [code]true[/code], the body will be able to push [RigidBody2D] nodes when calling [method move_and_slide], but it also won't detect any collisions with them. If [code]false[/code], it will interact with [RigidBody2D] nodes like with [StaticBody2D]. + <member name="floor_snap_length" type="float" setter="set_floor_snap_length" getter="get_floor_snap_length" default="0.0"> + Sets a snapping distance. When set to a value different from [code]0.0[/code], the body is kept attached to slopes when calling [method move_and_slide]. The snapping vector is determined by the given distance along the opposite direction of the [member up_direction]. + As long as the snapping vector is in contact with the ground and the body moves against `up_direction`, the body will remain attached to the surface. Snapping is not applied if the body moves along `up_direction`, so it will be able to detach from the ground when jumping. + </member> + <member name="floor_stop_on_slope" type="bool" setter="set_floor_stop_on_slope_enabled" getter="is_floor_stop_on_slope_enabled" default="false"> + If [code]true[/code], the body will not slide on floor's slopes when you include gravity in [code]linear_velocity[/code] when calling [method move_and_slide] and the body is standing still. + </member> + <member name="free_mode_min_slide_angle" type="float" setter="set_free_mode_min_slide_angle" getter="get_free_mode_min_slide_angle" default="0.261799"> + Minimum angle (in radians) where the body is allowed to slide when it encounters a slope. The default value equals 15 degrees. </member> <member name="linear_velocity" type="Vector2" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector2(0, 0)"> Current velocity vector in pixels per second, used and modified during calls to [method move_and_slide]. @@ -110,20 +149,28 @@ <member name="max_slides" type="int" setter="set_max_slides" getter="get_max_slides" default="4"> Maximum number of times the body can change direction before it stops when calling [method move_and_slide]. </member> - <member name="motion/sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false"> - If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method move_and_slide] or [method PhysicsBody2D.move_and_collide] functions. + <member name="motion_mode" type="int" setter="set_motion_mode" getter="get_motion_mode" enum="CharacterBody2D.MotionMode" default="0"> + Sets the motion mode which defines the behaviour of [method move_and_slide]. See [enum MotionMode] constants for available modes. + </member> + <member name="moving_platform_floor_layers" type="int" setter="set_moving_platform_floor_layers" getter="get_moving_platform_floor_layers" default="4294967295"> + Collision layers that will be included for detecting floor bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all floor bodies are detected and propagate their velocity. </member> - <member name="snap" type="Vector2" setter="set_snap" getter="get_snap" default="Vector2(0, 0)"> - When set to a value different from [code]Vector2(0, 0)[/code], the body is kept attached to slopes when calling [method move_and_slide]. - As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code]Vector2(0, 0)[/code]. + <member name="moving_platform_wall_layers" type="int" setter="set_moving_platform_wall_layers" getter="get_moving_platform_wall_layers" default="0"> + Collision layers that will be included for detecting wall bodies that will act as moving platforms to be followed by the [CharacterBody2D]. By default, all wall bodies are ignored. </member> - <member name="stop_on_slope" type="bool" setter="set_stop_on_slope_enabled" getter="is_stop_on_slope_enabled" default="false"> - If [code]true[/code], the body will not slide on slopes when you include gravity in [code]linear_velocity[/code] when calling [method move_and_slide] and the body is standing still. + <member name="slide_on_ceiling" type="bool" setter="set_slide_on_ceiling_enabled" getter="is_slide_on_ceiling_enabled" default="true"> + If [code]true[/code], during a jump against the ceiling, the body will slide, if [code]false[/code] it will be stopped and will fall vertically. </member> <member name="up_direction" type="Vector2" setter="set_up_direction" getter="get_up_direction" default="Vector2(0, -1)"> Direction vector used to determine what is a wall and what is a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. Defaults to [code]Vector2.UP[/code]. If set to [code]Vector2(0, 0)[/code], everything is considered a wall. This is useful for topdown games. </member> </members> <constants> + <constant name="MOTION_MODE_GROUNDED" value="0" enum="MotionMode"> + Apply when notions of walls, ceiling and floor are relevant. In this mode the body motion will react to slopes (acceleration/slowdown). This mode is suitable for sided games like platformers. + </constant> + <constant name="MOTION_MODE_FREE" value="1" enum="MotionMode"> + Apply when there is no notion of floor or ceiling. All collisions will be reported as [code]on_wall[/code]. In this mode, when you slide, the speed will be always constant. This mode is suitable for top-down games. + </constant> </constants> </class> diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml index c76e02fac0..81ffbe01c1 100644 --- a/doc/classes/CharacterBody3D.xml +++ b/doc/classes/CharacterBody3D.xml @@ -1,12 +1,12 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CharacterBody3D" inherits="PhysicsBody3D" version="4.0"> <brief_description> - Character body 3D node. + Specialized 3D physics body node for characters moved by script. </brief_description> <description> - Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a static body. However, they have two main uses: + Character bodies are special types of bodies that are meant to be user-controlled. They are not affected by physics at all; to other types of bodies, such as a rigid body, these are the same as a [AnimatableBody3D]. However, they have two main uses: [b]Kinematic characters:[/b] Character bodies have an API for moving objects with walls and slopes detection ([method move_and_slide] method), in addition to collision detection (also done with [method PhysicsBody3D.move_and_collide]). This makes them really useful to implement characters that move in specific ways and collide with the world, but don't require advanced physics. - [b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [member StaticBody3D.kinematic_motion] when enabled), which allows them to be moved by code and push other bodies on their path. + [b]Kinematic motion:[/b] Character bodies can also be used for kinematic motion (same functionality as [AnimatableBody3D]), which allows them to be moved by code and push other bodies on their path. </description> <tutorials> <link title="Kinematic character (2D)">https://docs.godotengine.org/en/latest/tutorials/physics/kinematic_character_2d.html</link> @@ -16,64 +16,88 @@ <link title="Third Person Shooter Demo">https://godotengine.org/asset-library/asset/678</link> </tutorials> <methods> + <method name="get_floor_angle" qualifiers="const"> + <return type="float" /> + <argument index="0" name="up_direction" type="Vector3" default="Vector3(0, 1, 0)" /> + <description> + Returns the floor's collision angle at the last collision point according to [code]up_direction[/code], which is [code]Vector3.UP[/code] by default. This value is always positive and only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code]. + </description> + </method> <method name="get_floor_normal" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns the surface normal of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code]. </description> </method> - <method name="get_floor_velocity" qualifiers="const"> - <return type="Vector3"> - </return> + <method name="get_last_slide_collision"> + <return type="KinematicCollision3D" /> + <description> + Returns a [KinematicCollision3D], which contains information about the latest collision that occurred during the last call to [method move_and_slide]. + </description> + </method> + <method name="get_platform_velocity" qualifiers="const"> + <return type="Vector3" /> <description> Returns the linear velocity of the floor at the last collision point. Only valid after calling [method move_and_slide] and when [method is_on_floor] returns [code]true[/code]. </description> </method> <method name="get_slide_collision"> - <return type="KinematicCollision3D"> - </return> - <argument index="0" name="slide_idx" type="int"> - </argument> + <return type="KinematicCollision3D" /> + <argument index="0" name="slide_idx" type="int" /> <description> - Returns a [KinematicCollision3D], which contains information about a collision that occurred during the last call to [method move_and_slide]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_count] - 1). + Returns a [KinematicCollision3D], which contains information about a collision that occurred during the last call to [method move_and_slide]. Since the body can collide several times in a single call to [method move_and_slide], you must specify the index of the collision in the range 0 to ([method get_slide_collision_count] - 1). </description> </method> - <method name="get_slide_count" qualifiers="const"> - <return type="int"> - </return> + <method name="get_slide_collision_count" qualifiers="const"> + <return type="int" /> <description> Returns the number of times the body collided and changed direction during the last call to [method move_and_slide]. </description> </method> <method name="is_on_ceiling" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the body collided with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. </description> </method> + <method name="is_on_ceiling_only" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the body collided only with the ceiling on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. + </description> + </method> <method name="is_on_floor" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the body collided with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. </description> </method> + <method name="is_on_floor_only" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the body collided only with the floor on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. + </description> + </method> <method name="is_on_wall" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the body collided with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. </description> </method> + <method name="is_on_wall_only" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the body collided only with a wall on the last call of [method move_and_slide]. Otherwise, returns [code]false[/code]. + </description> + </method> <method name="move_and_slide"> - <return type="void"> - </return> + <return type="bool" /> <description> Moves the body based on [member linear_velocity]. If the body collides with another, it will slide along the other body rather than stop immediately. If the other body is a [CharacterBody3D] or [RigidBody3D], it will also be affected by the motion of the other body. You can use this to make moving and rotating platforms, or to make nodes push other nodes. This method should be used in [method Node._physics_process] (or in a method called by [method Node._physics_process]), as it uses the physics step's [code]delta[/code] value automatically in calculations. Otherwise, the simulation will run at an incorrect speed. - Modifies [member linear_velocity] if a slide collision occurred. To get detailed information about collisions that occurred, use [method get_slide_collision]. + Modifies [member linear_velocity] if a slide collision occurred. To get the latest collision call [method get_last_slide_collision], for more detailed information about collisions that occurred, use [method get_slide_collision]. + When the body touches a moving platform, the platform's velocity is automatically added to the body motion. If a collision occurs due to the platform's motion, it will always be first in the slide collisions. + Returns [code]true[/code] if the body collided, otherwise, returns [code]false[/code]. </description> </method> </methods> @@ -87,8 +111,8 @@ <member name="floor_max_angle" type="float" setter="set_floor_max_angle" getter="get_floor_max_angle" default="0.785398"> Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. The default value equals 45 degrees. </member> - <member name="infinite_inertia" type="bool" setter="set_infinite_inertia_enabled" getter="is_infinite_inertia_enabled" default="true"> - If [code]true[/code], the body will be able to push [RigidBody3D] nodes when calling [method move_and_slide], but it also won't detect any collisions with them. If [code]false[/code], it will interact with [RigidBody3D] nodes like with [StaticBody3D]. + <member name="floor_stop_on_slope" type="bool" setter="set_floor_stop_on_slope_enabled" getter="is_floor_stop_on_slope_enabled" default="false"> + If [code]true[/code], the body will not slide on slopes when you include gravity in [code]linear_velocity[/code] when calling [method move_and_slide] and the body is standing still. </member> <member name="linear_velocity" type="Vector3" setter="set_linear_velocity" getter="get_linear_velocity" default="Vector3(0, 0, 0)"> Current velocity vector (typically meters per second), used and modified during calls to [method move_and_slide]. @@ -100,9 +124,6 @@ When set to a value different from [code]Vector3(0, 0, 0)[/code], the body is kept attached to slopes when calling [method move_and_slide]. As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code]Vector3(0, 0, 0)[/code]. </member> - <member name="stop_on_slope" type="bool" setter="set_stop_on_slope_enabled" getter="is_stop_on_slope_enabled" default="false"> - If [code]true[/code], the body will not slide on slopes when you include gravity in [code]linear_velocity[/code] when calling [method move_and_slide] and the body is standing still. - </member> <member name="up_direction" type="Vector3" setter="set_up_direction" getter="get_up_direction" default="Vector3(0, 1, 0)"> Direction vector used to determine what is a wall and what is a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. Defaults to [code]Vector3.UP[/code]. If set to [code]Vector3(0, 0, 0)[/code], everything is considered a wall. This is useful for topdown games. </member> diff --git a/doc/classes/CheckBox.xml b/doc/classes/CheckBox.xml index 90f3725172..f13a6ea34a 100644 --- a/doc/classes/CheckBox.xml +++ b/doc/classes/CheckBox.xml @@ -18,76 +18,76 @@ <constants> </constants> <theme_items> - <theme_item name="check_vadjust" type="int" default="0"> + <theme_item name="check_vadjust" data_type="constant" type="int" default="0"> The vertical offset used when rendering the check icons (in pixels). </theme_item> - <theme_item name="checked" type="Texture2D"> + <theme_item name="checked" data_type="icon" type="Texture2D"> The check icon to display when the [CheckBox] is checked. </theme_item> - <theme_item name="checked_disabled" type="Texture2D"> + <theme_item name="checked_disabled" data_type="icon" type="Texture2D"> </theme_item> - <theme_item name="disabled" type="StyleBox"> + <theme_item name="disabled" data_type="style" type="StyleBox"> The [StyleBox] to display as a background when the [CheckBox] is disabled. </theme_item> - <theme_item name="focus" type="StyleBox"> + <theme_item name="focus" data_type="style" type="StyleBox"> The [StyleBox] to display as a background when the [CheckBox] is focused. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> The [Font] to use for the [CheckBox] text. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> The [CheckBox] text's font color. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> + <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> The [CheckBox] text's font color when it's disabled. </theme_item> - <theme_item name="font_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> + <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> The [CheckBox] text's font color when it's hovered. </theme_item> - <theme_item name="font_hover_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_hover_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The [CheckBox] text's font color when it's hovered and pressed. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [CheckBox]. </theme_item> - <theme_item name="font_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The [CheckBox] text's font color when it's pressed. </theme_item> - <theme_item name="font_size" type="int"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the [CheckBox]'s text. </theme_item> - <theme_item name="hover" type="StyleBox"> + <theme_item name="hover" data_type="style" type="StyleBox"> The [StyleBox] to display as a background when the [CheckBox] is hovered. </theme_item> - <theme_item name="hover_pressed" type="StyleBox"> + <theme_item name="hover_pressed" data_type="style" type="StyleBox"> The [StyleBox] to display as a background when the [CheckBox] is hovered and pressed. </theme_item> - <theme_item name="hseparation" type="int" default="4"> + <theme_item name="hseparation" data_type="constant" type="int" default="4"> The separation between the check icon and the text (in pixels). </theme_item> - <theme_item name="normal" type="StyleBox"> + <theme_item name="normal" data_type="style" type="StyleBox"> The [StyleBox] to display as a background. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. </theme_item> - <theme_item name="pressed" type="StyleBox"> + <theme_item name="pressed" data_type="style" type="StyleBox"> The [StyleBox] to display as a background when the [CheckBox] is pressed. </theme_item> - <theme_item name="radio_checked" type="Texture2D"> + <theme_item name="radio_checked" data_type="icon" type="Texture2D"> If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is checked. </theme_item> - <theme_item name="radio_checked_disabled" type="Texture2D"> + <theme_item name="radio_checked_disabled" data_type="icon" type="Texture2D"> </theme_item> - <theme_item name="radio_unchecked" type="Texture2D"> + <theme_item name="radio_unchecked" data_type="icon" type="Texture2D"> If the [CheckBox] is configured as a radio button, the icon to display when the [CheckBox] is unchecked. </theme_item> - <theme_item name="radio_unchecked_disabled" type="Texture2D"> + <theme_item name="radio_unchecked_disabled" data_type="icon" type="Texture2D"> </theme_item> - <theme_item name="unchecked" type="Texture2D"> + <theme_item name="unchecked" data_type="icon" type="Texture2D"> The check icon to display when the [CheckBox] is unchecked. </theme_item> - <theme_item name="unchecked_disabled" type="Texture2D"> + <theme_item name="unchecked_disabled" data_type="icon" type="Texture2D"> </theme_item> </theme_items> </class> diff --git a/doc/classes/CheckButton.xml b/doc/classes/CheckButton.xml index 7fa7093b32..a0a05bcb79 100644 --- a/doc/classes/CheckButton.xml +++ b/doc/classes/CheckButton.xml @@ -18,79 +18,79 @@ <constants> </constants> <theme_items> - <theme_item name="check_vadjust" type="int" default="0"> + <theme_item name="check_vadjust" data_type="constant" type="int" default="0"> The vertical offset used when rendering the toggle icons (in pixels). </theme_item> - <theme_item name="disabled" type="StyleBox"> + <theme_item name="disabled" data_type="style" type="StyleBox"> The [StyleBox] to display as a background when the [CheckButton] is disabled. </theme_item> - <theme_item name="focus" type="StyleBox"> + <theme_item name="focus" data_type="style" type="StyleBox"> The [StyleBox] to display as a background when the [CheckButton] is focused. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> The [Font] to use for the [CheckButton] text. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> The [CheckButton] text's font color. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> + <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> The [CheckButton] text's font color when it's disabled. </theme_item> - <theme_item name="font_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> + <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> The [CheckButton] text's font color when it's hovered. </theme_item> - <theme_item name="font_hover_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_hover_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The [CheckButton] text's font color when it's hovered and pressed. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [CheckButton]. </theme_item> - <theme_item name="font_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The [CheckButton] text's font color when it's pressed. </theme_item> - <theme_item name="font_size" type="int"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the [CheckButton]'s text. </theme_item> - <theme_item name="hover" type="StyleBox"> + <theme_item name="hover" data_type="style" type="StyleBox"> The [StyleBox] to display as a background when the [CheckButton] is hovered. </theme_item> - <theme_item name="hover_pressed" type="StyleBox"> + <theme_item name="hover_pressed" data_type="style" type="StyleBox"> The [StyleBox] to display as a background when the [CheckButton] is hovered and pressed. </theme_item> - <theme_item name="hseparation" type="int" default="4"> + <theme_item name="hseparation" data_type="constant" type="int" default="4"> The separation between the toggle icon and the text (in pixels). </theme_item> - <theme_item name="normal" type="StyleBox"> + <theme_item name="normal" data_type="style" type="StyleBox"> The [StyleBox] to display as a background. </theme_item> - <theme_item name="off" type="Texture2D"> + <theme_item name="off" data_type="icon" type="Texture2D"> The icon to display when the [CheckButton] is unchecked (for left-to-right layouts). </theme_item> - <theme_item name="off_disabled" type="Texture2D"> + <theme_item name="off_disabled" data_type="icon" type="Texture2D"> The icon to display when the [CheckButton] is unchecked and disabled (for left-to-right layouts). </theme_item> - <theme_item name="off_disabled_mirrored" type="Texture2D"> + <theme_item name="off_disabled_mirrored" data_type="icon" type="Texture2D"> The icon to display when the [CheckButton] is unchecked and disabled (for right-to-left layouts). </theme_item> - <theme_item name="off_mirrored" type="Texture2D"> + <theme_item name="off_mirrored" data_type="icon" type="Texture2D"> The icon to display when the [CheckButton] is unchecked (for right-to-left layouts). </theme_item> - <theme_item name="on" type="Texture2D"> + <theme_item name="on" data_type="icon" type="Texture2D"> The icon to display when the [CheckButton] is checked (for left-to-right layouts). </theme_item> - <theme_item name="on_disabled" type="Texture2D"> + <theme_item name="on_disabled" data_type="icon" type="Texture2D"> The icon to display when the [CheckButton] is checked and disabled (for left-to-right layouts). </theme_item> - <theme_item name="on_disabled_mirrored" type="Texture2D"> + <theme_item name="on_disabled_mirrored" data_type="icon" type="Texture2D"> The icon to display when the [CheckButton] is checked and disabled (for right-to-left layouts). </theme_item> - <theme_item name="on_mirrored" type="Texture2D"> + <theme_item name="on_mirrored" data_type="icon" type="Texture2D"> The icon to display when the [CheckButton] is checked (for right-to-left layouts). </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. </theme_item> - <theme_item name="pressed" type="StyleBox"> + <theme_item name="pressed" data_type="style" type="StyleBox"> The [StyleBox] to display as a background when the [CheckButton] is pressed. </theme_item> </theme_items> diff --git a/doc/classes/ClassDB.xml b/doc/classes/ClassDB.xml index 028781d313..063233fe50 100644 --- a/doc/classes/ClassDB.xml +++ b/doc/classes/ClassDB.xml @@ -10,208 +10,155 @@ </tutorials> <methods> <method name="can_instantiate" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="class" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="class" type="StringName" /> <description> Returns [code]true[/code] if you can instance objects from the specified [code]class[/code], [code]false[/code] in other case. </description> </method> <method name="class_exists" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="class" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="class" type="StringName" /> <description> Returns whether the specified [code]class[/code] is available or not. </description> </method> <method name="class_get_category" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="class" type="StringName"> - </argument> + <return type="StringName" /> + <argument index="0" name="class" type="StringName" /> <description> Returns a category associated with the class for use in documentation and the Asset Library. Debug mode required. </description> </method> <method name="class_get_integer_constant" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="class" type="StringName"> - </argument> - <argument index="1" name="name" type="StringName"> - </argument> + <return type="int" /> + <argument index="0" name="class" type="StringName" /> + <argument index="1" name="name" type="StringName" /> <description> Returns the value of the integer constant [code]name[/code] of [code]class[/code] or its ancestry. Always returns 0 when the constant could not be found. </description> </method> <method name="class_get_integer_constant_list" qualifiers="const"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="class" type="StringName"> - </argument> - <argument index="1" name="no_inheritance" type="bool" default="false"> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="class" type="StringName" /> + <argument index="1" name="no_inheritance" type="bool" default="false" /> <description> Returns an array with the names all the integer constants of [code]class[/code] or its ancestry. </description> </method> <method name="class_get_method_list" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="class" type="StringName"> - </argument> - <argument index="1" name="no_inheritance" type="bool" default="false"> - </argument> + <return type="Array" /> + <argument index="0" name="class" type="StringName" /> + <argument index="1" name="no_inheritance" type="bool" default="false" /> <description> Returns an array with all the methods of [code]class[/code] or its ancestry if [code]no_inheritance[/code] is [code]false[/code]. Every element of the array is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code]. [b]Note:[/code] In exported release builds the debug info is not available, so the returned dictionaries will contain only method names. </description> </method> <method name="class_get_property" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="property" type="StringName"> - </argument> + <return type="Variant" /> + <argument index="0" name="object" type="Object" /> + <argument index="1" name="property" type="StringName" /> <description> Returns the value of [code]property[/code] of [code]class[/code] or its ancestry. </description> </method> <method name="class_get_property_list" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="class" type="StringName"> - </argument> - <argument index="1" name="no_inheritance" type="bool" default="false"> - </argument> + <return type="Array" /> + <argument index="0" name="class" type="StringName" /> + <argument index="1" name="no_inheritance" type="bool" default="false" /> <description> Returns an array with all the properties of [code]class[/code] or its ancestry if [code]no_inheritance[/code] is [code]false[/code]. </description> </method> <method name="class_get_signal" qualifiers="const"> - <return type="Dictionary"> - </return> - <argument index="0" name="class" type="StringName"> - </argument> - <argument index="1" name="signal" type="StringName"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="class" type="StringName" /> + <argument index="1" name="signal" type="StringName" /> <description> Returns the [code]signal[/code] data of [code]class[/code] or its ancestry. The returned value is a [Dictionary] with the following keys: [code]args[/code], [code]default_args[/code], [code]flags[/code], [code]id[/code], [code]name[/code], [code]return: (class_name, hint, hint_string, name, type, usage)[/code]. </description> </method> <method name="class_get_signal_list" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="class" type="StringName"> - </argument> - <argument index="1" name="no_inheritance" type="bool" default="false"> - </argument> + <return type="Array" /> + <argument index="0" name="class" type="StringName" /> + <argument index="1" name="no_inheritance" type="bool" default="false" /> <description> Returns an array with all the signals of [code]class[/code] or its ancestry if [code]no_inheritance[/code] is [code]false[/code]. Every element of the array is a [Dictionary] as described in [method class_get_signal]. </description> </method> <method name="class_has_integer_constant" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="class" type="StringName"> - </argument> - <argument index="1" name="name" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="class" type="StringName" /> + <argument index="1" name="name" type="StringName" /> <description> Returns whether [code]class[/code] or its ancestry has an integer constant called [code]name[/code] or not. </description> </method> <method name="class_has_method" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="class" type="StringName"> - </argument> - <argument index="1" name="method" type="StringName"> - </argument> - <argument index="2" name="no_inheritance" type="bool" default="false"> - </argument> + <return type="bool" /> + <argument index="0" name="class" type="StringName" /> + <argument index="1" name="method" type="StringName" /> + <argument index="2" name="no_inheritance" type="bool" default="false" /> <description> Returns whether [code]class[/code] (or its ancestry if [code]no_inheritance[/code] is [code]false[/code]) has a method called [code]method[/code] or not. </description> </method> <method name="class_has_signal" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="class" type="StringName"> - </argument> - <argument index="1" name="signal" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="class" type="StringName" /> + <argument index="1" name="signal" type="StringName" /> <description> Returns whether [code]class[/code] or its ancestry has a signal called [code]signal[/code] or not. </description> </method> <method name="class_set_property" qualifiers="const"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="property" type="StringName"> - </argument> - <argument index="2" name="value" type="Variant"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="object" type="Object" /> + <argument index="1" name="property" type="StringName" /> + <argument index="2" name="value" type="Variant" /> <description> Sets [code]property[/code] value of [code]class[/code] to [code]value[/code]. </description> </method> <method name="get_class_list" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns the names of all the classes available. </description> </method> <method name="get_inheriters_from_class" qualifiers="const"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="class" type="StringName"> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="class" type="StringName" /> <description> Returns the names of all the classes that directly or indirectly inherit from [code]class[/code]. </description> </method> <method name="get_parent_class" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="class" type="StringName"> - </argument> + <return type="StringName" /> + <argument index="0" name="class" type="StringName" /> <description> Returns the parent class of [code]class[/code]. </description> </method> <method name="instantiate" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="class" type="StringName"> - </argument> + <return type="Variant" /> + <argument index="0" name="class" type="StringName" /> <description> Creates an instance of [code]class[/code]. </description> </method> <method name="is_class_enabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="class" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="class" type="StringName" /> <description> Returns whether this [code]class[/code] is enabled or not. </description> </method> <method name="is_parent_class" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="class" type="StringName"> - </argument> - <argument index="1" name="inherits" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="class" type="StringName" /> + <argument index="1" name="inherits" type="StringName" /> <description> Returns whether [code]inherits[/code] is an ancestor of [code]class[/code] or not. </description> diff --git a/doc/classes/ClippedCamera3D.xml b/doc/classes/ClippedCamera3D.xml index 9116af19c3..1a0d3499cd 100644 --- a/doc/classes/ClippedCamera3D.xml +++ b/doc/classes/ClippedCamera3D.xml @@ -10,75 +10,58 @@ </tutorials> <methods> <method name="add_exception"> - <return type="void"> - </return> - <argument index="0" name="node" type="Object"> - </argument> + <return type="void" /> + <argument index="0" name="node" type="Object" /> <description> Adds a collision exception so the camera does not collide with the specified node. </description> </method> <method name="add_exception_rid"> - <return type="void"> - </return> - <argument index="0" name="rid" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="rid" type="RID" /> <description> Adds a collision exception so the camera does not collide with the specified [RID]. </description> </method> <method name="clear_exceptions"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all collision exceptions. </description> </method> <method name="get_clip_offset" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the distance the camera has been offset due to a collision. </description> </method> - <method name="get_collision_mask_bit" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="bit" type="int"> - </argument> + <method name="get_collision_mask_value" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns [code]true[/code] if the specified bit index is on. - [b]Note:[/b] Bit indices range from 0-19. + Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. </description> </method> <method name="remove_exception"> - <return type="void"> - </return> - <argument index="0" name="node" type="Object"> - </argument> + <return type="void" /> + <argument index="0" name="node" type="Object" /> <description> Removes a collision exception with the specified node. </description> </method> <method name="remove_exception_rid"> - <return type="void"> - </return> - <argument index="0" name="rid" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="rid" type="RID" /> <description> Removes a collision exception with the specified [RID]. </description> </method> - <method name="set_collision_mask_bit"> - <return type="void"> - </return> - <argument index="0" name="bit" type="int"> - </argument> - <argument index="1" name="value" type="bool"> - </argument> + <method name="set_collision_mask_value"> + <return type="void" /> + <argument index="0" name="layer_number" type="int" /> + <argument index="1" name="value" type="bool" /> <description> - Sets the specified bit index to the [code]value[/code]. - [b]Note:[/b] Bit indices range from 0-19. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32. </description> </method> </methods> diff --git a/doc/classes/CodeEdit.xml b/doc/classes/CodeEdit.xml index 30fd47cdb6..93f72d45ae 100644 --- a/doc/classes/CodeEdit.xml +++ b/doc/classes/CodeEdit.xml @@ -1,70 +1,64 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CodeEdit" inherits="TextEdit" version="4.0"> <brief_description> + Multiline text control intended for editing code. </brief_description> <description> + CodeEdit is a specialised [TextEdit] designed for editing plain text code files. It contains a bunch of features commonly found in code editors such as line numbers, line folding, code completion, indent management and string / comment management. [b]Note[/b]: By default [CodeEdit] always use left-to-right text direction to correctly display source code. </description> <tutorials> </tutorials> <methods> <method name="_confirm_code_completion" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="replace" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="replace" type="bool" /> <description> Override this method to define how the selected entry should be inserted. If [code]replace[/code] is true, any existing text should be replaced. </description> </method> - <method name="_filter_code_completion_candidates" qualifiers="virtual"> - <return type="Array"> - </return> - <argument index="0" name="candidates" type="Array"> - </argument> + <method name="_filter_code_completion_candidates" qualifiers="virtual const"> + <return type="Array" /> + <argument index="0" name="candidates" type="Dictionary[]" /> <description> Override this method to define what items in [code]candidates[/code] should be displayed. Both [code]candidates[/code] and the return is a [Array] of [Dictionary], see [method get_code_completion_option] for [Dictionary] content. </description> </method> <method name="_request_code_completion" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="force" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="force" type="bool" /> <description> Override this method to define what happens when the user requests code completion. If [code]force[/code] is true, any checks should be bypassed. </description> </method> + <method name="add_auto_brace_completion_pair"> + <return type="void" /> + <argument index="0" name="start_key" type="String" /> + <argument index="1" name="end_key" type="String" /> + <description> + Adds a brace pair. + Both the start and end keys must be symbols. Only the start key has to be unique. + </description> + </method> <method name="add_code_completion_option"> - <return type="void"> - </return> - <argument index="0" name="type" type="int" enum="CodeEdit.CodeCompletionKind"> - </argument> - <argument index="1" name="display_text" type="String"> - </argument> - <argument index="2" name="insert_text" type="String"> - </argument> - <argument index="3" name="text_color" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <argument index="4" name="icon" type="Resource" default="null"> - </argument> - <argument index="5" name="value" type="Variant" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="type" type="int" enum="CodeEdit.CodeCompletionKind" /> + <argument index="1" name="display_text" type="String" /> + <argument index="2" name="insert_text" type="String" /> + <argument index="3" name="text_color" type="Color" default="Color(1, 1, 1, 1)" /> + <argument index="4" name="icon" type="Resource" default="null" /> + <argument index="5" name="value" type="Variant" default="0" /> <description> Submits an item to the queue of potential candidates for the autocomplete menu. Call [method update_code_completion_options] to update the list. [b]Note[/b]: This list will replace all current candidates. </description> </method> <method name="add_comment_delimiter"> - <return type="void"> - </return> - <argument index="0" name="start_key" type="String"> - </argument> - <argument index="1" name="end_key" type="String"> - </argument> - <argument index="2" name="line_only" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="start_key" type="String" /> + <argument index="1" name="end_key" type="String" /> + <argument index="2" name="line_only" type="bool" default="false" /> <description> Adds a comment delimiter. Both the start and end keys must be symbols. Only the start key has to be unique. @@ -72,14 +66,10 @@ </description> </method> <method name="add_string_delimiter"> - <return type="void"> - </return> - <argument index="0" name="start_key" type="String"> - </argument> - <argument index="1" name="end_key" type="String"> - </argument> - <argument index="2" name="line_only" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="start_key" type="String" /> + <argument index="1" name="end_key" type="String" /> + <argument index="2" name="line_only" type="bool" default="false" /> <description> Adds a string delimiter. Both the start and end keys must be symbols. Only the start key has to be unique. @@ -87,109 +77,102 @@ </description> </method> <method name="can_fold_line" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="line" type="int" /> <description> Returns if the given line is foldable, that is, it has indented lines right below it or a comment / string block. </description> </method> <method name="cancel_code_completion"> - <return type="void"> - </return> + <return type="void" /> <description> Cancels the autocomplete menu. </description> </method> <method name="clear_bookmarked_lines"> - <return type="void"> - </return> + <return type="void" /> <description> + Clears all bookmarked lines. </description> </method> <method name="clear_breakpointed_lines"> - <return type="void"> - </return> + <return type="void" /> <description> + Clears all breakpointed lines. </description> </method> <method name="clear_comment_delimiters"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all comment delimiters. </description> </method> <method name="clear_executing_lines"> - <return type="void"> - </return> + <return type="void" /> <description> + Clears all executed lines. </description> </method> <method name="clear_string_delimiters"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all string delimiters. </description> </method> <method name="confirm_code_completion"> - <return type="void"> - </return> - <argument index="0" name="replace" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="replace" type="bool" default="false" /> <description> Inserts the selected entry into the text. If [code]replace[/code] is true, any existing text is replaced rather then merged. </description> </method> <method name="do_indent"> - <return type="void"> - </return> + <return type="void" /> <description> Perform an indent as if the user activated the "ui_text_indent" action. </description> </method> <method name="do_unindent"> - <return type="void"> - </return> + <return type="void" /> <description> Perform an unindent as if the user activated the "ui_text_unindent" action. </description> </method> <method name="fold_all_lines"> - <return type="void"> - </return> + <return type="void" /> <description> Folds all lines that are possible to be folded (see [method can_fold_line]). </description> </method> <method name="fold_line"> - <return type="void"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="line" type="int" /> <description> Folds the given line, if possible (see [method can_fold_line]). </description> </method> + <method name="get_auto_brace_completion_close_key" qualifiers="const"> + <return type="String" /> + <argument index="0" name="open_key" type="String" /> + <description> + Gets the matching auto brace close key for [code]open_key[/code]. + </description> + </method> <method name="get_bookmarked_lines" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> + Gets all bookmarked lines. </description> </method> <method name="get_breakpointed_lines" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> + Gets all breakpointed lines. </description> </method> <method name="get_code_completion_option" qualifiers="const"> - <return type="Dictionary"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="index" type="int" /> <description> Gets the completion option at [code]index[/code]. The return [Dictionary] has the following key-values: [code]kind[/code]: [enum CodeCompletionKind] @@ -201,279 +184,251 @@ </description> </method> <method name="get_code_completion_options" qualifiers="const"> - <return type="Dictionary[]"> - </return> + <return type="Dictionary[]" /> <description> Gets all completion options, see [method get_code_completion_option] for return content. </description> </method> <method name="get_code_completion_selected_index" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Gets the index of the current selected completion option. </description> </method> <method name="get_delimiter_end_key" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="delimiter_index" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="delimiter_index" type="int" /> <description> Gets the end key for a string or comment region index. </description> </method> <method name="get_delimiter_end_position" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <argument index="1" name="column" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="column" type="int" /> <description> If [code]line[/code] [code]column[/code] is in a string or comment, returns the end position of the region. If not or no end could be found, both [Vector2] values will be [code]-1[/code]. </description> </method> <method name="get_delimiter_start_key" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="delimiter_index" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="delimiter_index" type="int" /> <description> Gets the start key for a string or comment region index. </description> </method> <method name="get_delimiter_start_position" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <argument index="1" name="column" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="column" type="int" /> <description> If [code]line[/code] [code]column[/code] is in a string or comment, returns the start position of the region. If not or no start could be found, both [Vector2] values will be [code]-1[/code]. </description> </method> <method name="get_executing_lines" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> + Gets all executing lines. </description> </method> <method name="get_folded_lines" qualifiers="const"> - <return type="int[]"> - </return> + <return type="int[]" /> <description> Return all lines that are current folded. </description> </method> <method name="get_text_for_code_completion" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the full text with char [code]0xFFFF[/code] at the caret location. </description> </method> + <method name="get_text_for_symbol_lookup"> + <return type="String" /> + <description> + Returns the full text with char [code]0xFFFF[/code] at the cursor location. + </description> + </method> + <method name="has_auto_brace_completion_close_key" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="close_key" type="String" /> + <description> + Returns [code]true[/code] if close key [code]close_key[/code] exists. + </description> + </method> + <method name="has_auto_brace_completion_open_key" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="open_key" type="String" /> + <description> + Returns [code]true[/code] if open key [code]open_key[/code] exists. + </description> + </method> <method name="has_comment_delimiter" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="start_key" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="start_key" type="String" /> <description> Returns [code]true[/code] if comment [code]start_key[/code] exists. </description> </method> <method name="has_string_delimiter" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="start_key" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="start_key" type="String" /> <description> Returns [code]true[/code] if string [code]start_key[/code] exists. </description> </method> <method name="indent_lines"> - <return type="void"> - </return> + <return type="void" /> <description> Indents selected lines, or in the case of no selection the caret line by one. </description> </method> <method name="is_in_comment" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <argument index="1" name="column" type="int" default="-1"> - </argument> + <return type="int" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="column" type="int" default="-1" /> <description> Return delimiter index if [code]line[/code] [code]column[/code] is in a comment. If [code]column[/code] is not provided, will return delimiter index if the entire [code]line[/code] is a comment. Otherwise [code]-1[/code]. </description> </method> <method name="is_in_string" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <argument index="1" name="column" type="int" default="-1"> - </argument> + <return type="int" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="column" type="int" default="-1" /> <description> Return the delimiter index if [code]line[/code] [code]column[/code] is in a string. If [code]column[/code] is not provided, will return the delimiter index if the entire [code]line[/code] is a string. Otherwise [code]-1[/code]. </description> </method> <method name="is_line_bookmarked" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="line" type="int" /> <description> + Returns whether the line at the specified index is bookmarked or not. </description> </method> <method name="is_line_breakpointed" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="line" type="int" /> <description> + Returns whether the line at the specified index is breakpointed or not. </description> </method> <method name="is_line_executing" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="line" type="int" /> <description> + Returns whether the line at the specified index is marked as executing or not. </description> </method> <method name="is_line_folded" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="line" type="int" /> <description> Returns whether the line at the specified index is folded or not. </description> </method> <method name="remove_comment_delimiter"> - <return type="void"> - </return> - <argument index="0" name="start_key" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="start_key" type="String" /> <description> Removes the comment delimiter with [code]start_key[/code]. </description> </method> <method name="remove_string_delimiter"> - <return type="void"> - </return> - <argument index="0" name="start_key" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="start_key" type="String" /> <description> Removes the string delimiter with [code]start_key[/code]. </description> </method> <method name="request_code_completion"> - <return type="void"> - </return> - <argument index="0" name="force" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="force" type="bool" default="false" /> <description> Emits [signal request_code_completion], if [code]force[/code] is true will bypass all checks. Otherwise will check that the caret is in a word or in front of a prefix. Will ignore the request if all current options are of type file path, node path or signal. </description> </method> <method name="set_code_completion_selected_index"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> <description> Sets the current selected completion option. </description> </method> <method name="set_code_hint"> - <return type="void"> - </return> - <argument index="0" name="code_hint" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="code_hint" type="String" /> <description> Sets the code hint text. Pass an empty string to clear. </description> </method> <method name="set_code_hint_draw_below"> - <return type="void"> - </return> - <argument index="0" name="draw_below" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="draw_below" type="bool" /> <description> Sets if the code hint should draw below the text. </description> </method> <method name="set_line_as_bookmarked"> - <return type="void"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <argument index="1" name="bookmarked" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="bookmarked" type="bool" /> <description> + Sets the line as bookmarked. </description> </method> <method name="set_line_as_breakpoint"> - <return type="void"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <argument index="1" name="breakpointed" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="breakpointed" type="bool" /> <description> + Sets the line as breakpointed. </description> </method> <method name="set_line_as_executing"> - <return type="void"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <argument index="1" name="executing" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="executing" type="bool" /> + <description> + Sets the line as executing. + </description> + </method> + <method name="set_symbol_lookup_word_as_valid"> + <return type="void" /> + <argument index="0" name="valid" type="bool" /> <description> + Sets the symbol emitted by [signal symbol_validate] as a valid lookup. </description> </method> <method name="toggle_foldable_line"> - <return type="void"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="line" type="int" /> <description> Toggle the folding of the code block at the given line. </description> </method> <method name="unfold_all_lines"> - <return type="void"> - </return> + <return type="void" /> <description> + Unfolds all lines, folded or not. </description> </method> <method name="unfold_line"> - <return type="void"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="line" type="int" /> <description> Unfolds all lines that were previously folded. </description> </method> <method name="unindent_lines"> - <return type="void"> - </return> + <return type="void" /> <description> Unindents selected lines, or in the case of no selection the caret line by one. </description> </method> <method name="update_code_completion_options"> - <return type="void"> - </return> - <argument index="0" name="force" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="force" type="bool" /> <description> Submits all completion options added with [method add_code_completion_option]. Will try to force the autoccomplete menu to popup, if [code]force[/code] is [code]true[/code]. [b]Note[/b]: This will replace all current candidates. @@ -481,6 +436,15 @@ </method> </methods> <members> + <member name="auto_brace_completion_enabled" type="bool" setter="set_auto_brace_completion_enabled" getter="is_auto_brace_completion_enabled" default="false"> + Sets whether brace pairs should be autocompleted. + </member> + <member name="auto_brace_completion_highlight_matching" type="bool" setter="set_highlight_matching_braces_enabled" getter="is_highlight_matching_braces_enabled" default="false"> + Highlight mismatching brace pairs. + </member> + <member name="auto_brace_completion_pairs" type="Dictionary" setter="set_auto_brace_completion_pairs" getter="get_auto_brace_completion_pairs" default="{"\"": "\"","'": "'","(": ")","[": "]","{": "}"}"> + Sets the brace pairs to be autocompleted. + </member> <member name="code_completion_enabled" type="bool" setter="set_code_completion_enabled" getter="is_code_completion_enabled" default="false"> Sets whether code completion is allowed. </member> @@ -490,18 +454,26 @@ <member name="delimiter_comments" type="String[]" setter="set_comment_delimiters" getter="get_comment_delimiters" default="[]"> Sets the comment delimiters. All existing comment delimiters will be removed. </member> - <member name="delimiter_strings" type="String[]" setter="set_string_delimiters" getter="get_string_delimiters" default="[]"> + <member name="delimiter_strings" type="String[]" setter="set_string_delimiters" getter="get_string_delimiters" default="["' '", "\" \""]"> Sets the string delimiters. All existing string delimiters will be removed. </member> - <member name="draw_bookmarks" type="bool" setter="set_draw_bookmarks_gutter" getter="is_drawing_bookmarks_gutter" default="false"> + <member name="gutters_draw_bookmarks" type="bool" setter="set_draw_bookmarks_gutter" getter="is_drawing_bookmarks_gutter" default="false"> + Sets if bookmarked should be drawn in the gutter. This gutter is shared with breakpoints and executing lines. </member> - <member name="draw_breakpoints_gutter" type="bool" setter="set_draw_breakpoints_gutter" getter="is_drawing_breakpoints_gutter" default="false"> + <member name="gutters_draw_breakpoints_gutter" type="bool" setter="set_draw_breakpoints_gutter" getter="is_drawing_breakpoints_gutter" default="false"> + Sets if breakpoints should be drawn in the gutter. This gutter is shared with bookmarks and executing lines. </member> - <member name="draw_executing_lines" type="bool" setter="set_draw_executing_lines_gutter" getter="is_drawing_executing_lines_gutter" default="false"> + <member name="gutters_draw_executing_lines" type="bool" setter="set_draw_executing_lines_gutter" getter="is_drawing_executing_lines_gutter" default="false"> + Sets if executing lines should be marked in the gutter. This gutter is shared with breakpoints and bookmarks lines. </member> - <member name="draw_fold_gutter" type="bool" setter="set_draw_fold_gutter" getter="is_drawing_fold_gutter" default="false"> + <member name="gutters_draw_fold_gutter" type="bool" setter="set_draw_fold_gutter" getter="is_drawing_fold_gutter" default="false"> + Sets if foldable lines icons should be drawn in the gutter. </member> - <member name="draw_line_numbers" type="bool" setter="set_draw_line_numbers" getter="is_draw_line_numbers_enabled" default="false"> + <member name="gutters_draw_line_numbers" type="bool" setter="set_draw_line_numbers" getter="is_draw_line_numbers_enabled" default="false"> + Sets if line numbers should be drawn in the gutter. + </member> + <member name="gutters_zero_pad_line_numbers" type="bool" setter="set_line_numbers_zero_padded" getter="is_line_numbers_zero_padded" default="false"> + Sets if line numbers drawn in the gutter are zero padded. </member> <member name="indent_automatic" type="bool" setter="set_auto_indent_enabled" getter="is_auto_indent_enabled" default="false"> Sets whether automatic indent are enabled, this will add an extra indent if a prefix or brace is found. @@ -516,19 +488,23 @@ Use spaces instead of tabs for indentation. </member> <member name="layout_direction" type="int" setter="set_layout_direction" getter="get_layout_direction" override="true" enum="Control.LayoutDirection" default="2" /> - <member name="line_folding" type="bool" setter="set_line_folding_enabled" getter="is_line_folding_enabled" default="true"> + <member name="line_folding" type="bool" setter="set_line_folding_enabled" getter="is_line_folding_enabled" default="false"> Sets whether line folding is allowed. </member> + <member name="line_length_guidelines" type="int[]" setter="set_line_length_guidelines" getter="get_line_length_guidelines" default="[]"> + Draws vertical lines at the provided columns. The first entry is considered a main hard guideline and is draw more prominently + </member> <member name="structured_text_bidi_override_options" type="Array" setter="set_structured_text_bidi_override_options" getter="get_structured_text_bidi_override_options" override="true" default="[]" /> - <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" override="true" enum="Control.TextDirection" default="1" /> - <member name="zero_pad_line_numbers" type="bool" setter="set_line_numbers_zero_padded" getter="is_line_numbers_zero_padded" default="false"> + <member name="symbol_lookup_on_click" type="bool" setter="set_symbol_lookup_on_click_enabled" getter="is_symbol_lookup_on_click_enabled" default="false"> + Set when a validated word from [signal symbol_validate] is clicked, the [signal symbol_lookup] should be emitted. </member> + <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" override="true" enum="Control.TextDirection" default="1" /> </members> <signals> <signal name="breakpoint_toggled"> - <argument index="0" name="line" type="int"> - </argument> + <argument index="0" name="line" type="int" /> <description> + Emitted when a breakpoint is added or removed from a line. If the line is moved via backspace a removed is emitted at the old line. </description> </signal> <signal name="request_code_completion"> @@ -536,114 +512,176 @@ Emitted when the user requests code completion. </description> </signal> + <signal name="symbol_lookup"> + <argument index="0" name="symbol" type="String" /> + <argument index="1" name="line" type="int" /> + <argument index="2" name="column" type="int" /> + <description> + Emitted when the user has clicked on a valid symbol. + </description> + </signal> + <signal name="symbol_validate"> + <argument index="0" name="symbol" type="String" /> + <description> + Emitted when the user hovers over a symbol. The symbol should be validated and responded to, by calling [method set_symbol_lookup_word_as_valid]. + </description> + </signal> </signals> <constants> <constant name="KIND_CLASS" value="0" enum="CodeCompletionKind"> + Marks the option as a class. </constant> <constant name="KIND_FUNCTION" value="1" enum="CodeCompletionKind"> + Marks the option as a function. </constant> <constant name="KIND_SIGNAL" value="2" enum="CodeCompletionKind"> + Marks the option as a Godot signal. </constant> <constant name="KIND_VARIABLE" value="3" enum="CodeCompletionKind"> + Marks the option as a variable. </constant> <constant name="KIND_MEMBER" value="4" enum="CodeCompletionKind"> + Marks the option as a member. </constant> <constant name="KIND_ENUM" value="5" enum="CodeCompletionKind"> + Marks the option as a enum entry. </constant> <constant name="KIND_CONSTANT" value="6" enum="CodeCompletionKind"> + Marks the option as a constant. </constant> <constant name="KIND_NODE_PATH" value="7" enum="CodeCompletionKind"> + Marks the option as a Godot node path. </constant> <constant name="KIND_FILE_PATH" value="8" enum="CodeCompletionKind"> + Marks the option as a file path. </constant> <constant name="KIND_PLAIN_TEXT" value="9" enum="CodeCompletionKind"> + Marks the option as unclassified or plain text. </constant> </constants> <theme_items> - <theme_item name="background_color" type="Color" default="Color(0, 0, 0, 0)"> + <theme_item name="background_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)"> + Sets the background [Color]. </theme_item> - <theme_item name="bookmark" type="Texture2D"> + <theme_item name="bookmark" data_type="icon" type="Texture2D"> + Sets a custom [Texture2D] to draw in the bookmark gutter for bookmarked lines. </theme_item> - <theme_item name="bookmark_color" type="Color" default="Color(0.5, 0.64, 1, 0.8)"> + <theme_item name="bookmark_color" data_type="color" type="Color" default="Color(0.5, 0.64, 1, 0.8)"> + [Color] of the bookmark icon for bookmarked lines. </theme_item> - <theme_item name="brace_mismatch_color" type="Color" default="Color(1, 0.2, 0.2, 1)"> + <theme_item name="brace_mismatch_color" data_type="color" type="Color" default="Color(1, 0.2, 0.2, 1)"> + [Color] of the text to highlight mismatched braces. </theme_item> - <theme_item name="breakpoint" type="Texture2D"> + <theme_item name="breakpoint" data_type="icon" type="Texture2D"> + Sets a custom [Texture2D] to draw in the breakpoint gutter for breakpointed lines. </theme_item> - <theme_item name="breakpoint_color" type="Color" default="Color(0.9, 0.29, 0.3, 1)"> + <theme_item name="breakpoint_color" data_type="color" type="Color" default="Color(0.9, 0.29, 0.3, 1)"> + [Color] of the breakpoint icon for bookmarked lines. </theme_item> - <theme_item name="can_fold" type="Texture2D"> + <theme_item name="can_fold" data_type="icon" type="Texture2D"> + Sets a custom [Texture2D] to draw in the line folding gutter when a line can be folded. </theme_item> - <theme_item name="caret_background_color" type="Color" default="Color(0, 0, 0, 1)"> + <theme_item name="caret_background_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> + [Color] of the text behind the caret when block caret is enabled. </theme_item> - <theme_item name="caret_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="caret_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + [Color] of the caret. </theme_item> - <theme_item name="code_folding_color" type="Color" default="Color(0.8, 0.8, 0.8, 0.8)"> + <theme_item name="code_folding_color" data_type="color" type="Color" default="Color(0.8, 0.8, 0.8, 0.8)"> + [Color] for all icons related to line folding. </theme_item> - <theme_item name="completion" type="StyleBox"> + <theme_item name="completion" data_type="style" type="StyleBox"> + [StyleBox] for the code completion popup. </theme_item> - <theme_item name="completion_background_color" type="Color" default="Color(0.17, 0.16, 0.2, 1)"> + <theme_item name="completion_background_color" data_type="color" type="Color" default="Color(0.17, 0.16, 0.2, 1)"> + Sets the background [Color] for the code completion popup. </theme_item> - <theme_item name="completion_existing_color" type="Color" default="Color(0.87, 0.87, 0.87, 0.13)"> + <theme_item name="completion_existing_color" data_type="color" type="Color" default="Color(0.87, 0.87, 0.87, 0.13)"> + Background highlight [Color] for matching text in code completion options. </theme_item> - <theme_item name="completion_font_color" type="Color" default="Color(0.67, 0.67, 0.67, 1)"> + <theme_item name="completion_font_color" data_type="color" type="Color" default="Color(0.67, 0.67, 0.67, 1)"> + Font [Color] for the code completion popup. </theme_item> - <theme_item name="completion_lines" type="int" default="7"> + <theme_item name="completion_lines" data_type="constant" type="int" default="7"> + Max number of options to display in the code completion popup at any one time. </theme_item> - <theme_item name="completion_max_width" type="int" default="50"> + <theme_item name="completion_max_width" data_type="constant" type="int" default="50"> + Max width of options in the code completion popup. Options longer then this will be cut off. </theme_item> - <theme_item name="completion_scroll_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="completion_scroll_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> + [Color] of the scrollbar in the code completion popup. </theme_item> - <theme_item name="completion_scroll_width" type="int" default="3"> + <theme_item name="completion_scroll_width" data_type="constant" type="int" default="3"> + Width of the scrollbar in the code completion popup. </theme_item> - <theme_item name="completion_selected_color" type="Color" default="Color(0.26, 0.26, 0.27, 1)"> + <theme_item name="completion_selected_color" data_type="color" type="Color" default="Color(0.26, 0.26, 0.27, 1)"> + Background highlight [Color] for the current selected option item in the code completion popup. </theme_item> - <theme_item name="current_line_color" type="Color" default="Color(0.25, 0.25, 0.26, 0.8)"> + <theme_item name="current_line_color" data_type="color" type="Color" default="Color(0.25, 0.25, 0.26, 0.8)"> + Background [Color] of the line containing the caret. </theme_item> - <theme_item name="executing_line" type="Texture2D"> + <theme_item name="executing_line" data_type="icon" type="Texture2D"> + Icon to draw in the executing gutter for executing lines. </theme_item> - <theme_item name="executing_line_color" type="Color" default="Color(0.98, 0.89, 0.27, 1)"> + <theme_item name="executing_line_color" data_type="color" type="Color" default="Color(0.98, 0.89, 0.27, 1)"> + [Color] of the executing icon for executing lines. </theme_item> - <theme_item name="focus" type="StyleBox"> + <theme_item name="focus" data_type="style" type="StyleBox"> + Sets the [StyleBox] when in focus. </theme_item> - <theme_item name="folded" type="Texture2D"> + <theme_item name="folded" data_type="icon" type="Texture2D"> + Sets a custom [Texture2D] to draw in the line folding gutter when a line is folded and can be unfolded. </theme_item> - <theme_item name="folded_eol_icon" type="Texture2D"> + <theme_item name="folded_eol_icon" data_type="icon" type="Texture2D"> + Sets a custom [Texture2D] to draw at the end of a folded line. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> + Sets the default [Font]. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + Sets the font [Color]. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [CodeEdit]. </theme_item> - <theme_item name="font_readonly_color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)"> + <theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)"> + Sets the font [Color] when [member TextEdit.editable] is disabled. </theme_item> - <theme_item name="font_selected_color" type="Color" default="Color(0, 0, 0, 1)"> + <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> + Sets the [Color] of the selected text. [member TextEdit.override_selected_font_color] has to be enabled. </theme_item> - <theme_item name="font_size" type="int"> - Font size of the [CodeEdit]'s text. + <theme_item name="font_size" data_type="font_size" type="int"> + Sets default font size. </theme_item> - <theme_item name="line_number_color" type="Color" default="Color(0.67, 0.67, 0.67, 0.4)"> + <theme_item name="line_length_guideline_color" data_type="color" type="Color" default="Color(0.3, 0.5, 0.8, 0.1)"> + [Color] of the main line length guideline, secondary guidelines will have 50% alpha applied. </theme_item> - <theme_item name="line_spacing" type="int" default="4"> + <theme_item name="line_number_color" data_type="color" type="Color" default="Color(0.67, 0.67, 0.67, 0.4)"> + Sets the [Color] of line numbers. </theme_item> - <theme_item name="normal" type="StyleBox"> + <theme_item name="line_spacing" data_type="constant" type="int" default="4"> + Sets the spacing between the lines. </theme_item> - <theme_item name="outline_size" type="int" default="0"> - The size of the text outline. + <theme_item name="normal" data_type="style" type="StyleBox"> + Sets the [StyleBox]. </theme_item> - <theme_item name="read_only" type="StyleBox"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> + The size of the text outline. </theme_item> - <theme_item name="safe_line_number_color" type="Color" default="Color(0.67, 0.78, 0.67, 0.6)"> + <theme_item name="read_only" data_type="style" type="StyleBox"> + Sets the [StyleBox] when [member TextEdit.editable] is disabled. </theme_item> - <theme_item name="selection_color" type="Color" default="Color(0.49, 0.49, 0.49, 1)"> + <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)"> + Sets the highlight [Color] of text selections. </theme_item> - <theme_item name="space" type="Texture2D"> + <theme_item name="space" data_type="icon" type="Texture2D"> + Sets a custom [Texture2D] for space text characters. </theme_item> - <theme_item name="tab" type="Texture2D"> + <theme_item name="tab" data_type="icon" type="Texture2D"> + Sets a custom [Texture2D] for tab text characters. </theme_item> - <theme_item name="word_highlighted_color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)"> + <theme_item name="word_highlighted_color" data_type="color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)"> + Sets the highlight [Color] of multiple occurrences. [member TextEdit.highlight_all_occurrences] has to be enabled. </theme_item> </theme_items> </class> diff --git a/doc/classes/CodeHighlighter.xml b/doc/classes/CodeHighlighter.xml index 0406c25ffd..2b93188d10 100644 --- a/doc/classes/CodeHighlighter.xml +++ b/doc/classes/CodeHighlighter.xml @@ -10,16 +10,11 @@ </tutorials> <methods> <method name="add_color_region"> - <return type="void"> - </return> - <argument index="0" name="start_key" type="String"> - </argument> - <argument index="1" name="end_key" type="String"> - </argument> - <argument index="2" name="color" type="Color"> - </argument> - <argument index="3" name="line_only" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="start_key" type="String" /> + <argument index="1" name="end_key" type="String" /> + <argument index="2" name="color" type="Color" /> + <argument index="3" name="line_only" type="bool" default="false" /> <description> Adds a color region such as comments or strings. Both the start and end keys must be symbols. Only the start key has to be unique. @@ -27,24 +22,18 @@ </description> </method> <method name="add_keyword_color"> - <return type="void"> - </return> - <argument index="0" name="keyword" type="String"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="keyword" type="String" /> + <argument index="1" name="color" type="Color" /> <description> Sets the color for a keyword. The keyword cannot contain any symbols except '_'. </description> </method> <method name="add_member_keyword_color"> - <return type="void"> - </return> - <argument index="0" name="member_keyword" type="String"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="member_keyword" type="String" /> + <argument index="1" name="color" type="Color" /> <description> Sets the color for a member keyword. The member keyword cannot contain any symbols except '_'. @@ -52,94 +41,75 @@ </description> </method> <method name="clear_color_regions"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all color regions. </description> </method> <method name="clear_keyword_colors"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all keywords. </description> </method> <method name="clear_member_keyword_colors"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all member keywords. </description> </method> <method name="get_keyword_color" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="keyword" type="String"> - </argument> + <return type="Color" /> + <argument index="0" name="keyword" type="String" /> <description> Returns the color for a keyword. </description> </method> <method name="get_member_keyword_color" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="member_keyword" type="String"> - </argument> + <return type="Color" /> + <argument index="0" name="member_keyword" type="String" /> <description> Returns the color for a member keyword. </description> </method> <method name="has_color_region" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="start_key" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="start_key" type="String" /> <description> Return [code]true[/code] if the start key exists, else [code]false[/code]. </description> </method> <method name="has_keyword_color" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="keyword" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="keyword" type="String" /> <description> Return [code]true[/code] if the keyword exists, else [code]false[/code]. </description> </method> <method name="has_member_keyword_color" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="member_keyword" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="member_keyword" type="String" /> <description> Return [code]true[/code] if the member keyword exists, else [code]false[/code]. </description> </method> <method name="remove_color_region"> - <return type="void"> - </return> - <argument index="0" name="start_key" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="start_key" type="String" /> <description> Removes the color region that uses that start key. </description> </method> <method name="remove_keyword_color"> - <return type="void"> - </return> - <argument index="0" name="keyword" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="keyword" type="String" /> <description> Removes the keyword. </description> </method> <method name="remove_member_keyword_color"> - <return type="void"> - </return> - <argument index="0" name="member_keyword" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="member_keyword" type="String" /> <description> Removes the member keyword. </description> diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml index e96124c9eb..ba1ee3909d 100644 --- a/doc/classes/CollisionObject2D.xml +++ b/doc/classes/CollisionObject2D.xml @@ -10,248 +10,186 @@ </tutorials> <methods> <method name="_input_event" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="Object"> - </argument> - <argument index="1" name="event" type="InputEvent"> - </argument> - <argument index="2" name="shape_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="Viewport" /> + <argument index="1" name="event" type="InputEvent" /> + <argument index="2" name="shape_idx" type="int" /> <description> Accepts unhandled [InputEvent]s. Requires [member input_pickable] to be [code]true[/code]. [code]shape_idx[/code] is the child index of the clicked [Shape2D]. Connect to the [code]input_event[/code] signal to easily pick up these events. </description> </method> <method name="create_shape_owner"> - <return type="int"> - </return> - <argument index="0" name="owner" type="Object"> - </argument> + <return type="int" /> + <argument index="0" name="owner" type="Object" /> <description> Creates a new shape owner for the given object. Returns [code]owner_id[/code] of the new owner for future reference. </description> </method> - <method name="get_collision_layer_bit" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="bit" type="int"> - </argument> + <method name="get_collision_layer_value" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified [code]bit[/code] of the [member collision_layer] is set. + Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [code]layer_number[/code] between 1 and 32. </description> </method> - <method name="get_collision_mask_bit" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="bit" type="int"> - </argument> + <method name="get_collision_mask_value" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified [code]bit[/code] of the [member collision_mask] is set. + Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. </description> </method> <method name="get_rid" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> Returns the object's [RID]. </description> </method> <method name="get_shape_owner_one_way_collision_margin" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="owner_id" type="int" /> <description> Returns the [code]one_way_collision_margin[/code] of the shape owner identified by given [code]owner_id[/code]. </description> </method> <method name="get_shape_owners"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns an [Array] of [code]owner_id[/code] identifiers. You can use these ids in other methods that take [code]owner_id[/code] as an argument. </description> </method> <method name="is_shape_owner_disabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="owner_id" type="int" /> <description> If [code]true[/code], the shape owner and its shapes are disabled. </description> </method> <method name="is_shape_owner_one_way_collision_enabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="owner_id" type="int" /> <description> Returns [code]true[/code] if collisions for the shape owner originating from this [CollisionObject2D] will not be reported to collided with [CollisionObject2D]s. </description> </method> <method name="remove_shape_owner"> - <return type="void"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="owner_id" type="int" /> <description> Removes the given shape owner. </description> </method> - <method name="set_collision_layer_bit"> - <return type="void"> - </return> - <argument index="0" name="bit" type="int"> - </argument> - <argument index="1" name="value" type="bool"> - </argument> + <method name="set_collision_layer_value"> + <return type="void" /> + <argument index="0" name="layer_number" type="int" /> + <argument index="1" name="value" type="bool" /> <description> - If [code]value[/value] is [code]true[/code], sets the specified [code]bit[/code] in the the [member collision_layer]. - If [code]value[/value] is [code]false[/code], clears the specified [code]bit[/code] in the the [member collision_layer]. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_layer], given a [code]layer_number[/code] between 1 and 32. </description> </method> - <method name="set_collision_mask_bit"> - <return type="void"> - </return> - <argument index="0" name="bit" type="int"> - </argument> - <argument index="1" name="value" type="bool"> - </argument> + <method name="set_collision_mask_value"> + <return type="void" /> + <argument index="0" name="layer_number" type="int" /> + <argument index="1" name="value" type="bool" /> <description> - If [code]value[/value] is [code]true[/code], sets the specified [code]bit[/code] in the the [member collision_mask]. - If [code]value[/value] is [code]false[/code], clears the specified [code]bit[/code] in the the [member collision_mask]. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32. </description> </method> <method name="shape_find_owner" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="shape_index" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="shape_index" type="int" /> <description> Returns the [code]owner_id[/code] of the given shape. </description> </method> <method name="shape_owner_add_shape"> - <return type="void"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> - <argument index="1" name="shape" type="Shape2D"> - </argument> + <return type="void" /> + <argument index="0" name="owner_id" type="int" /> + <argument index="1" name="shape" type="Shape2D" /> <description> Adds a [Shape2D] to the shape owner. </description> </method> <method name="shape_owner_clear_shapes"> - <return type="void"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="owner_id" type="int" /> <description> Removes all shapes from the shape owner. </description> </method> <method name="shape_owner_get_owner" qualifiers="const"> - <return type="Object"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> + <return type="Object" /> + <argument index="0" name="owner_id" type="int" /> <description> Returns the parent object of the given shape owner. </description> </method> <method name="shape_owner_get_shape" qualifiers="const"> - <return type="Shape2D"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> - <argument index="1" name="shape_id" type="int"> - </argument> + <return type="Shape2D" /> + <argument index="0" name="owner_id" type="int" /> + <argument index="1" name="shape_id" type="int" /> <description> Returns the [Shape2D] with the given id from the given shape owner. </description> </method> <method name="shape_owner_get_shape_count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="owner_id" type="int" /> <description> Returns the number of shapes the given shape owner contains. </description> </method> <method name="shape_owner_get_shape_index" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> - <argument index="1" name="shape_id" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="owner_id" type="int" /> + <argument index="1" name="shape_id" type="int" /> <description> Returns the child index of the [Shape2D] with the given id from the given shape owner. </description> </method> <method name="shape_owner_get_transform" qualifiers="const"> - <return type="Transform2D"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> + <return type="Transform2D" /> + <argument index="0" name="owner_id" type="int" /> <description> Returns the shape owner's [Transform2D]. </description> </method> <method name="shape_owner_remove_shape"> - <return type="void"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> - <argument index="1" name="shape_id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="owner_id" type="int" /> + <argument index="1" name="shape_id" type="int" /> <description> Removes a shape from the given shape owner. </description> </method> <method name="shape_owner_set_disabled"> - <return type="void"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> - <argument index="1" name="disabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="owner_id" type="int" /> + <argument index="1" name="disabled" type="bool" /> <description> If [code]true[/code], disables the given shape owner. </description> </method> <method name="shape_owner_set_one_way_collision"> - <return type="void"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="owner_id" type="int" /> + <argument index="1" name="enable" type="bool" /> <description> If [code]enable[/code] is [code]true[/code], collisions for the shape owner originating from this [CollisionObject2D] will not be reported to collided with [CollisionObject2D]s. </description> </method> <method name="shape_owner_set_one_way_collision_margin"> - <return type="void"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> - <argument index="1" name="margin" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="owner_id" type="int" /> + <argument index="1" name="margin" type="float" /> <description> Sets the [code]one_way_collision_margin[/code] of the shape owner identified by given [code]owner_id[/code] to [code]margin[/code] pixels. </description> </method> <method name="shape_owner_set_transform"> - <return type="void"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> - <argument index="1" name="transform" type="Transform2D"> - </argument> + <return type="void" /> + <argument index="0" name="owner_id" type="int" /> + <argument index="1" name="transform" type="Transform2D" /> <description> Sets the [Transform2D] of the given shape owner. </description> @@ -260,11 +198,11 @@ <members> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> The physics layers this CollisionObject2D is in. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask]. - [b]Note:[/b] A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> The physics layers this CollisionObject2D scans. Collision objects can scan one or more of 32 different layers. See also [member collision_layer]. - [b]Note:[/b] A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="disable_mode" type="int" setter="set_disable_mode" getter="get_disable_mode" enum="CollisionObject2D.DisableMode" default="0"> Defines the behavior in physics when [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED]. See [enum DisableMode] for more details about the different modes. @@ -275,24 +213,33 @@ </members> <signals> <signal name="input_event"> - <argument index="0" name="viewport" type="Node"> - </argument> - <argument index="1" name="event" type="InputEvent"> - </argument> - <argument index="2" name="shape_idx" type="int"> - </argument> + <argument index="0" name="viewport" type="Node" /> + <argument index="1" name="event" type="InputEvent" /> + <argument index="2" name="shape_idx" type="int" /> <description> Emitted when an input event occurs. Requires [member input_pickable] to be [code]true[/code] and at least one [code]collision_layer[/code] bit to be set. See [method _input_event] for details. </description> </signal> <signal name="mouse_entered"> <description> - Emitted when the mouse pointer enters any of this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [code]collision_layer[/code] bit to be set. + Emitted when the mouse pointer enters any of this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject2D] won't cause this signal to be emitted. </description> </signal> <signal name="mouse_exited"> <description> - Emitted when the mouse pointer exits all this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [code]collision_layer[/code] bit to be set. + Emitted when the mouse pointer exits all this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject2D] won't cause this signal to be emitted. + </description> + </signal> + <signal name="mouse_shape_entered"> + <argument index="0" name="shape_idx" type="int" /> + <description> + Emitted when the mouse pointer enters any of this object's shapes or moves from one shape to another. [code]shape_idx[/code] is the child index of the newly entered [Shape2D]. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. + </description> + </signal> + <signal name="mouse_shape_exited"> + <argument index="0" name="shape_idx" type="int" /> + <description> + Emitted when the mouse pointer exits any of this object's shapes. [code]shape_idx[/code] is the child index of the exited [Shape2D]. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. </description> </signal> </signals> diff --git a/doc/classes/CollisionObject3D.xml b/doc/classes/CollisionObject3D.xml index dfd1e85e56..19bcdcbb27 100644 --- a/doc/classes/CollisionObject3D.xml +++ b/doc/classes/CollisionObject3D.xml @@ -10,212 +10,158 @@ </tutorials> <methods> <method name="_input_event" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="camera" type="Object"> - </argument> - <argument index="1" name="event" type="InputEvent"> - </argument> - <argument index="2" name="position" type="Vector3"> - </argument> - <argument index="3" name="normal" type="Vector3"> - </argument> - <argument index="4" name="shape_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="camera" type="Camera3D" /> + <argument index="1" name="event" type="InputEvent" /> + <argument index="2" name="position" type="Vector3" /> + <argument index="3" name="normal" type="Vector3" /> + <argument index="4" name="shape_idx" type="int" /> <description> Receives unhandled [InputEvent]s. [code]position[/code] is the location in world space of the mouse pointer on the surface of the shape with index [code]shape_idx[/code] and [code]normal[/code] is the normal vector of the surface at that point. Connect to the [signal input_event] signal to easily pick up these events. </description> </method> <method name="create_shape_owner"> - <return type="int"> - </return> - <argument index="0" name="owner" type="Object"> - </argument> + <return type="int" /> + <argument index="0" name="owner" type="Object" /> <description> Creates a new shape owner for the given object. Returns [code]owner_id[/code] of the new owner for future reference. </description> </method> - <method name="get_collision_layer_bit" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="bit" type="int"> - </argument> + <method name="get_collision_layer_value" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified [code]bit[/code] of the [member collision_layer] is set. + Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [code]layer_number[/code] between 1 and 32. </description> </method> - <method name="get_collision_mask_bit" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="bit" type="int"> - </argument> + <method name="get_collision_mask_value" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns whether or not the specified [code]bit[/code] of the [member collision_mask] is set. + Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. </description> </method> <method name="get_rid" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> Returns the object's [RID]. </description> </method> <method name="get_shape_owners"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns an [Array] of [code]owner_id[/code] identifiers. You can use these ids in other methods that take [code]owner_id[/code] as an argument. </description> </method> <method name="is_shape_owner_disabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="owner_id" type="int" /> <description> If [code]true[/code], the shape owner and its shapes are disabled. </description> </method> <method name="remove_shape_owner"> - <return type="void"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="owner_id" type="int" /> <description> Removes the given shape owner. </description> </method> - <method name="set_collision_layer_bit"> - <return type="void"> - </return> - <argument index="0" name="bit" type="int"> - </argument> - <argument index="1" name="value" type="bool"> - </argument> + <method name="set_collision_layer_value"> + <return type="void" /> + <argument index="0" name="layer_number" type="int" /> + <argument index="1" name="value" type="bool" /> <description> - If [code]value[/value] is [code]true[/code], sets the specified [code]bit[/code] in the the [member collision_layer]. - If [code]value[/value] is [code]false[/code], clears the specified [code]bit[/code] in the the [member collision_layer]. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_layer], given a [code]layer_number[/code] between 1 and 32. </description> </method> - <method name="set_collision_mask_bit"> - <return type="void"> - </return> - <argument index="0" name="bit" type="int"> - </argument> - <argument index="1" name="value" type="bool"> - </argument> + <method name="set_collision_mask_value"> + <return type="void" /> + <argument index="0" name="layer_number" type="int" /> + <argument index="1" name="value" type="bool" /> <description> - If [code]value[/value] is [code]true[/code], sets the specified [code]bit[/code] in the the [member collision_mask]. - If [code]value[/value] is [code]false[/code], clears the specified [code]bit[/code] in the the [member collision_mask]. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32. </description> </method> <method name="shape_find_owner" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="shape_index" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="shape_index" type="int" /> <description> Returns the [code]owner_id[/code] of the given shape. </description> </method> <method name="shape_owner_add_shape"> - <return type="void"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> - <argument index="1" name="shape" type="Shape3D"> - </argument> + <return type="void" /> + <argument index="0" name="owner_id" type="int" /> + <argument index="1" name="shape" type="Shape3D" /> <description> Adds a [Shape3D] to the shape owner. </description> </method> <method name="shape_owner_clear_shapes"> - <return type="void"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="owner_id" type="int" /> <description> Removes all shapes from the shape owner. </description> </method> <method name="shape_owner_get_owner" qualifiers="const"> - <return type="Object"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> + <return type="Object" /> + <argument index="0" name="owner_id" type="int" /> <description> Returns the parent object of the given shape owner. </description> </method> <method name="shape_owner_get_shape" qualifiers="const"> - <return type="Shape3D"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> - <argument index="1" name="shape_id" type="int"> - </argument> + <return type="Shape3D" /> + <argument index="0" name="owner_id" type="int" /> + <argument index="1" name="shape_id" type="int" /> <description> Returns the [Shape3D] with the given id from the given shape owner. </description> </method> <method name="shape_owner_get_shape_count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="owner_id" type="int" /> <description> Returns the number of shapes the given shape owner contains. </description> </method> <method name="shape_owner_get_shape_index" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> - <argument index="1" name="shape_id" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="owner_id" type="int" /> + <argument index="1" name="shape_id" type="int" /> <description> Returns the child index of the [Shape3D] with the given id from the given shape owner. </description> </method> <method name="shape_owner_get_transform" qualifiers="const"> - <return type="Transform3D"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="owner_id" type="int" /> <description> Returns the shape owner's [Transform3D]. </description> </method> <method name="shape_owner_remove_shape"> - <return type="void"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> - <argument index="1" name="shape_id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="owner_id" type="int" /> + <argument index="1" name="shape_id" type="int" /> <description> Removes a shape from the given shape owner. </description> </method> <method name="shape_owner_set_disabled"> - <return type="void"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> - <argument index="1" name="disabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="owner_id" type="int" /> + <argument index="1" name="disabled" type="bool" /> <description> If [code]true[/code], disables the given shape owner. </description> </method> <method name="shape_owner_set_transform"> - <return type="void"> - </return> - <argument index="0" name="owner_id" type="int"> - </argument> - <argument index="1" name="transform" type="Transform3D"> - </argument> + <return type="void" /> + <argument index="0" name="owner_id" type="int" /> + <argument index="1" name="transform" type="Transform3D" /> <description> Sets the [Transform3D] of the given shape owner. </description> @@ -223,12 +169,12 @@ </methods> <members> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> - The physics layers this CollisionObject3D is in. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask]. - [b]Note:[/b] A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + The physics layers this CollisionObject3D [b]is in[/b]. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask]. + [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> - The physics layers this CollisionObject3D scans. Collision objects can scan one or more of 32 different layers. See also [member collision_layer]. - [b]Note:[/b] A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + The physics layers this CollisionObject3D [b]scans[/b]. Collision objects can scan one or more of 32 different layers. See also [member collision_layer]. + [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="disable_mode" type="int" setter="set_disable_mode" getter="get_disable_mode" enum="CollisionObject3D.DisableMode" default="0"> Defines the behavior in physics when [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED]. See [enum DisableMode] for more details about the different modes. @@ -242,16 +188,11 @@ </members> <signals> <signal name="input_event"> - <argument index="0" name="camera" type="Node"> - </argument> - <argument index="1" name="event" type="InputEvent"> - </argument> - <argument index="2" name="position" type="Vector3"> - </argument> - <argument index="3" name="normal" type="Vector3"> - </argument> - <argument index="4" name="shape_idx" type="int"> - </argument> + <argument index="0" name="camera" type="Node" /> + <argument index="1" name="event" type="InputEvent" /> + <argument index="2" name="position" type="Vector3" /> + <argument index="3" name="normal" type="Vector3" /> + <argument index="4" name="shape_idx" type="int" /> <description> Emitted when the object receives an unhandled [InputEvent]. [code]position[/code] is the location in world space of the mouse pointer on the surface of the shape with index [code]shape_idx[/code] and [code]normal[/code] is the normal vector of the surface at that point. </description> diff --git a/doc/classes/CollisionShape3D.xml b/doc/classes/CollisionShape3D.xml index 5590947a4f..9184b672ff 100644 --- a/doc/classes/CollisionShape3D.xml +++ b/doc/classes/CollisionShape3D.xml @@ -14,17 +14,14 @@ </tutorials> <methods> <method name="make_convex_from_siblings"> - <return type="void"> - </return> + <return type="void" /> <description> Sets the collision shape's shape to the addition of all its convexed [MeshInstance3D] siblings geometry. </description> </method> <method name="resource_changed"> - <return type="void"> - </return> - <argument index="0" name="resource" type="Resource"> - </argument> + <return type="void" /> + <argument index="0" name="resource" type="Resource" /> <description> If this method exists within a script it will be called whenever the shape resource has been modified. </description> diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index 7b1415e40d..f00a20e95e 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -17,28 +17,22 @@ </tutorials> <methods> <method name="Color" qualifiers="constructor"> - <return type="Color"> - </return> + <return type="Color" /> <description> Constructs a default-initialized [Color] with all components set to [code]0[/code]. </description> </method> <method name="Color" qualifiers="constructor"> - <return type="Color"> - </return> - <argument index="0" name="from" type="Color"> - </argument> + <return type="Color" /> + <argument index="0" name="from" type="Color" /> <description> Constructs a [Color] as a copy of the given [Color]. </description> </method> <method name="Color" qualifiers="constructor"> - <return type="Color"> - </return> - <argument index="0" name="from" type="Color"> - </argument> - <argument index="1" name="alpha" type="float"> - </argument> + <return type="Color" /> + <argument index="0" name="from" type="Color" /> + <argument index="1" name="alpha" type="float" /> <description> Constructs a [Color] from an existing color, but with a custom alpha value. [codeblocks] @@ -52,36 +46,26 @@ </description> </method> <method name="Color" qualifiers="constructor"> - <return type="Color"> - </return> - <argument index="0" name="code" type="String"> - </argument> + <return type="Color" /> + <argument index="0" name="code" type="String" /> <description> Constructs a [Color] either from an HTML color code or from a standardized color name. Supported color names are the same as the constants. </description> </method> <method name="Color" qualifiers="constructor"> - <return type="Color"> - </return> - <argument index="0" name="code" type="String"> - </argument> - <argument index="1" name="alpha" type="float"> - </argument> + <return type="Color" /> + <argument index="0" name="code" type="String" /> + <argument index="1" name="alpha" type="float" /> <description> Constructs a [Color] either from an HTML color code or from a standardized color name, with [code]alpha[/code] on the range of 0 to 1. Supported color names are the same as the constants. </description> </method> <method name="Color" qualifiers="constructor"> - <return type="Color"> - </return> - <argument index="0" name="r" type="float"> - </argument> - <argument index="1" name="g" type="float"> - </argument> - <argument index="2" name="b" type="float"> - </argument> - <argument index="3" name="a" type="float"> - </argument> + <return type="Color" /> + <argument index="0" name="r" type="float" /> + <argument index="1" name="g" type="float" /> + <argument index="2" name="b" type="float" /> + <argument index="3" name="a" type="float" /> <description> Constructs a [Color] from RGBA values, typically between 0 and 1. [codeblocks] @@ -95,14 +79,10 @@ </description> </method> <method name="Color" qualifiers="constructor"> - <return type="Color"> - </return> - <argument index="0" name="r" type="float"> - </argument> - <argument index="1" name="g" type="float"> - </argument> - <argument index="2" name="b" type="float"> - </argument> + <return type="Color" /> + <argument index="0" name="r" type="float" /> + <argument index="1" name="g" type="float" /> + <argument index="2" name="b" type="float" /> <description> Constructs a [Color] from RGB values, typically between 0 and 1. Alpha will be 1. [codeblocks] @@ -116,10 +96,8 @@ </description> </method> <method name="blend" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="over" type="Color"> - </argument> + <return type="Color" /> + <argument index="0" name="over" type="Color" /> <description> Returns a new color resulting from blending this color over another. If the color is opaque, the result is also opaque. The second color may have a range of alpha values. [codeblocks] @@ -137,21 +115,16 @@ </description> </method> <method name="clamp" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="min" type="Color" default="Color(0, 0, 0, 0)"> - </argument> - <argument index="1" name="max" type="Color" default="Color(1, 1, 1, 1)"> - </argument> + <return type="Color" /> + <argument index="0" name="min" type="Color" default="Color(0, 0, 0, 0)" /> + <argument index="1" name="max" type="Color" default="Color(1, 1, 1, 1)" /> <description> Returns a new color with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component. </description> </method> <method name="darkened" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="amount" type="float"> - </argument> + <return type="Color" /> + <argument index="0" name="amount" type="float" /> <description> Returns a new color resulting from making this color darker by the specified percentage (ratio from 0 to 1). [codeblocks] @@ -167,88 +140,67 @@ </description> </method> <method name="find_named_color" qualifiers="static"> - <return type="int"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="name" type="String" /> <description> </description> </method> <method name="from_rgbe9995" qualifiers="static"> - <return type="Color"> - </return> - <argument index="0" name="rgbe" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="rgbe" type="int" /> <description> </description> </method> <method name="from_string" qualifiers="static"> - <return type="Color"> - </return> - <argument index="0" name="str" type="String"> - </argument> - <argument index="1" name="default" type="Color"> - </argument> + <return type="Color" /> + <argument index="0" name="str" type="String" /> + <argument index="1" name="default" type="Color" /> <description> </description> </method> <method name="get_named_color" qualifiers="static"> - <return type="Color"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="idx" type="int" /> <description> </description> </method> <method name="get_named_color_count" qualifiers="static"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> <method name="get_named_color_name" qualifiers="static"> - <return type="String"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="idx" type="int" /> <description> </description> </method> <method name="hex" qualifiers="static"> - <return type="Color"> - </return> - <argument index="0" name="hex" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="hex" type="int" /> <description> </description> </method> <method name="hex64" qualifiers="static"> - <return type="Color"> - </return> - <argument index="0" name="hex" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="hex" type="int" /> <description> </description> </method> <method name="html" qualifiers="static"> - <return type="Color"> - </return> - <argument index="0" name="rgba" type="String"> - </argument> + <return type="Color" /> + <argument index="0" name="rgba" type="String" /> <description> </description> </method> <method name="html_is_valid" qualifiers="static"> - <return type="bool"> - </return> - <argument index="0" name="color" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="color" type="String" /> <description> </description> </method> <method name="inverted" qualifiers="const"> - <return type="Color"> - </return> + <return type="Color" /> <description> Returns the inverted color [code](1 - r, 1 - g, 1 - b, a)[/code]. [codeblocks] @@ -264,21 +216,16 @@ </description> </method> <method name="is_equal_approx" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="to" type="Color"> - </argument> + <return type="bool" /> + <argument index="0" name="to" type="Color" /> <description> Returns [code]true[/code] if this color and [code]color[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. </description> </method> <method name="lerp" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="to" type="Color"> - </argument> - <argument index="1" name="weight" type="float"> - </argument> + <return type="Color" /> + <argument index="0" name="to" type="Color" /> + <argument index="1" name="weight" type="float" /> <description> Returns the linear interpolation with another color. The interpolation factor [code]weight[/code] is between 0 and 1. [codeblocks] @@ -296,10 +243,8 @@ </description> </method> <method name="lightened" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="amount" type="float"> - </argument> + <return type="Color" /> + <argument index="0" name="amount" type="float" /> <description> Returns a new color resulting from making this color lighter by the specified percentage (ratio from 0 to 1). [codeblocks] @@ -315,108 +260,83 @@ </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Color"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Color" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Color"> - </return> - <argument index="0" name="right" type="Color"> - </argument> + <return type="Color" /> + <argument index="0" name="right" type="Color" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Color"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="Color" /> + <argument index="0" name="right" type="float" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Color"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="right" type="int" /> <description> </description> </method> <method name="operator +" qualifiers="operator"> - <return type="Color"> - </return> - <argument index="0" name="right" type="Color"> - </argument> + <return type="Color" /> + <argument index="0" name="right" type="Color" /> <description> </description> </method> <method name="operator -" qualifiers="operator"> - <return type="Color"> - </return> - <argument index="0" name="right" type="Color"> - </argument> + <return type="Color" /> + <argument index="0" name="right" type="Color" /> <description> </description> </method> <method name="operator /" qualifiers="operator"> - <return type="Color"> - </return> - <argument index="0" name="right" type="Color"> - </argument> + <return type="Color" /> + <argument index="0" name="right" type="Color" /> <description> </description> </method> <method name="operator /" qualifiers="operator"> - <return type="Color"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="Color" /> + <argument index="0" name="right" type="float" /> <description> </description> </method> <method name="operator /" qualifiers="operator"> - <return type="Color"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="right" type="int" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Color"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Color" /> <description> </description> </method> <method name="operator []" qualifiers="operator"> - <return type="float"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="operator unary+" qualifiers="operator"> - <return type="Color"> - </return> + <return type="Color" /> <description> </description> </method> <method name="operator unary-" qualifiers="operator"> - <return type="Color"> - </return> + <return type="Color" /> <description> </description> </method> <method name="to_abgr32" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the color converted to a 32-bit integer in ABGR format (each byte represents a color channel). ABGR is the reversed version of the default format. [codeblocks] @@ -432,8 +352,7 @@ </description> </method> <method name="to_abgr64" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the color converted to a 64-bit integer in ABGR format (each word represents a color channel). ABGR is the reversed version of the default format. [codeblocks] @@ -449,8 +368,7 @@ </description> </method> <method name="to_argb32" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the color converted to a 32-bit integer in ARGB format (each byte represents a color channel). ARGB is more compatible with DirectX. [codeblocks] @@ -466,8 +384,7 @@ </description> </method> <method name="to_argb64" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the color converted to a 64-bit integer in ARGB format (each word represents a color channel). ARGB is more compatible with DirectX. [codeblocks] @@ -483,10 +400,8 @@ </description> </method> <method name="to_html" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="with_alpha" type="bool" default="true"> - </argument> + <return type="String" /> + <argument index="0" name="with_alpha" type="bool" default="true" /> <description> Returns the color converted to an HTML hexadecimal color string in RGBA format (ex: [code]ff34f822[/code]). Setting [code]with_alpha[/code] to [code]false[/code] excludes alpha from the hexadecimal string (and uses RGB instead of RGBA format). @@ -505,8 +420,7 @@ </description> </method> <method name="to_rgba32" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the color converted to a 32-bit integer in RGBA format (each byte represents a color channel). RGBA is Godot's default format. [codeblocks] @@ -522,8 +436,7 @@ </description> </method> <method name="to_rgba64" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the color converted to a 64-bit integer in RGBA format (each word represents a color channel). RGBA is Godot's default format. [codeblocks] diff --git a/doc/classes/ColorPicker.xml b/doc/classes/ColorPicker.xml index 2111358ef4..571ffd592a 100644 --- a/doc/classes/ColorPicker.xml +++ b/doc/classes/ColorPicker.xml @@ -11,27 +11,22 @@ </tutorials> <methods> <method name="add_preset"> - <return type="void"> - </return> - <argument index="0" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="color" type="Color" /> <description> Adds the given color to a list of color presets. The presets are displayed in the color picker and the user will be able to select them. [b]Note:[/b] the presets list is only for [i]this[/i] color picker. </description> </method> <method name="erase_preset"> - <return type="void"> - </return> - <argument index="0" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="color" type="Color" /> <description> Removes the given color from the list of color presets of this color picker. </description> </method> <method name="get_presets" qualifiers="const"> - <return type="PackedColorArray"> - </return> + <return type="PackedColorArray" /> <description> Returns the list of colors in the presets of the color picker. </description> @@ -67,22 +62,19 @@ </members> <signals> <signal name="color_changed"> - <argument index="0" name="color" type="Color"> - </argument> + <argument index="0" name="color" type="Color" /> <description> Emitted when the color is changed. </description> </signal> <signal name="preset_added"> - <argument index="0" name="color" type="Color"> - </argument> + <argument index="0" name="color" type="Color" /> <description> Emitted when a preset is added. </description> </signal> <signal name="preset_removed"> - <argument index="0" name="color" type="Color"> - </argument> + <argument index="0" name="color" type="Color" /> <description> Emitted when a preset is removed. </description> @@ -100,39 +92,39 @@ </constant> </constants> <theme_items> - <theme_item name="add_preset" type="Texture2D"> + <theme_item name="add_preset" data_type="icon" type="Texture2D"> The icon for the "Add Preset" button. </theme_item> - <theme_item name="bar_arrow" type="Texture2D"> + <theme_item name="bar_arrow" data_type="icon" type="Texture2D"> The texture for the arrow grabber. </theme_item> - <theme_item name="color_hue" type="Texture2D"> + <theme_item name="color_hue" data_type="icon" type="Texture2D"> Custom texture for the hue selection slider on the right. </theme_item> - <theme_item name="color_sample" type="Texture2D"> + <theme_item name="color_sample" data_type="icon" type="Texture2D"> </theme_item> - <theme_item name="h_width" type="int" default="30"> + <theme_item name="h_width" data_type="constant" type="int" default="30"> The width of the hue selection slider. </theme_item> - <theme_item name="label_width" type="int" default="10"> + <theme_item name="label_width" data_type="constant" type="int" default="10"> </theme_item> - <theme_item name="margin" type="int" default="4"> + <theme_item name="margin" data_type="constant" type="int" default="4"> The margin around the [ColorPicker]. </theme_item> - <theme_item name="overbright_indicator" type="Texture2D"> + <theme_item name="overbright_indicator" data_type="icon" type="Texture2D"> The indicator used to signalize that the color value is outside the 0-1 range. </theme_item> - <theme_item name="picker_cursor" type="Texture2D"> + <theme_item name="picker_cursor" data_type="icon" type="Texture2D"> </theme_item> - <theme_item name="preset_bg" type="Texture2D"> + <theme_item name="sample_bg" data_type="icon" type="Texture2D"> </theme_item> - <theme_item name="screen_picker" type="Texture2D"> + <theme_item name="screen_picker" data_type="icon" type="Texture2D"> The icon for the screen color picker button. </theme_item> - <theme_item name="sv_height" type="int" default="256"> + <theme_item name="sv_height" data_type="constant" type="int" default="256"> The height of the saturation-value selection box. </theme_item> - <theme_item name="sv_width" type="int" default="256"> + <theme_item name="sv_width" data_type="constant" type="int" default="256"> The width of the saturation-value selection box. </theme_item> </theme_items> diff --git a/doc/classes/ColorPickerButton.xml b/doc/classes/ColorPickerButton.xml index 09b828366f..6b5a9f2503 100644 --- a/doc/classes/ColorPickerButton.xml +++ b/doc/classes/ColorPickerButton.xml @@ -13,15 +13,13 @@ </tutorials> <methods> <method name="get_picker"> - <return type="ColorPicker"> - </return> + <return type="ColorPicker" /> <description> Returns the [ColorPicker] that this node toggles. </description> </method> <method name="get_popup"> - <return type="PopupPanel"> - </return> + <return type="PopupPanel" /> <description> Returns the control's [PopupPanel] which allows you to connect to popup signals. This allows you to handle events when the ColorPicker is shown or hidden. </description> @@ -38,8 +36,7 @@ </members> <signals> <signal name="color_changed"> - <argument index="0" name="color" type="Color"> - </argument> + <argument index="0" name="color" type="Color" /> <description> Emitted when the color changes. </description> @@ -58,49 +55,49 @@ <constants> </constants> <theme_items> - <theme_item name="bg" type="Texture2D"> + <theme_item name="bg" data_type="icon" type="Texture2D"> The background of the color preview rect on the button. </theme_item> - <theme_item name="disabled" type="StyleBox"> + <theme_item name="disabled" data_type="style" type="StyleBox"> [StyleBox] used when the [ColorPickerButton] is disabled. </theme_item> - <theme_item name="focus" type="StyleBox"> + <theme_item name="focus" data_type="style" type="StyleBox"> [StyleBox] used when the [ColorPickerButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> [Font] of the [ColorPickerButton]'s text. </theme_item> - <theme_item name="font_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> Default text [Color] of the [ColorPickerButton]. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.3)"> + <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.3)"> Text [Color] used when the [ColorPickerButton] is disabled. </theme_item> - <theme_item name="font_hover_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> Text [Color] used when the [ColorPickerButton] is being hovered. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [ColorPickerButton]. </theme_item> - <theme_item name="font_pressed_color" type="Color" default="Color(0.8, 0.8, 0.8, 1)"> + <theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(0.8, 0.8, 0.8, 1)"> Text [Color] used when the [ColorPickerButton] is being pressed. </theme_item> - <theme_item name="font_size" type="int"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the [ColorPickerButton]'s text. </theme_item> - <theme_item name="hover" type="StyleBox"> + <theme_item name="hover" data_type="style" type="StyleBox"> [StyleBox] used when the [ColorPickerButton] is being hovered. </theme_item> - <theme_item name="hseparation" type="int" default="2"> + <theme_item name="hseparation" data_type="constant" type="int" default="2"> The horizontal space between [ColorPickerButton]'s icon and text. </theme_item> - <theme_item name="normal" type="StyleBox"> + <theme_item name="normal" data_type="style" type="StyleBox"> Default [StyleBox] for the [ColorPickerButton]. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. </theme_item> - <theme_item name="pressed" type="StyleBox"> + <theme_item name="pressed" data_type="style" type="StyleBox"> [StyleBox] used when the [ColorPickerButton] is being pressed. </theme_item> </theme_items> diff --git a/doc/classes/ConcavePolygonShape3D.xml b/doc/classes/ConcavePolygonShape3D.xml index b510905d1f..34fb06a476 100644 --- a/doc/classes/ConcavePolygonShape3D.xml +++ b/doc/classes/ConcavePolygonShape3D.xml @@ -12,17 +12,14 @@ </tutorials> <methods> <method name="get_faces" qualifiers="const"> - <return type="PackedVector3Array"> - </return> + <return type="PackedVector3Array" /> <description> Returns the faces (an array of triangles). </description> </method> <method name="set_faces"> - <return type="void"> - </return> - <argument index="0" name="faces" type="PackedVector3Array"> - </argument> + <return type="void" /> + <argument index="0" name="faces" type="PackedVector3Array" /> <description> Sets the faces (an array of triangles). </description> diff --git a/doc/classes/ConeTwistJoint3D.xml b/doc/classes/ConeTwistJoint3D.xml index bd6e24dafd..dd65b3c688 100644 --- a/doc/classes/ConeTwistJoint3D.xml +++ b/doc/classes/ConeTwistJoint3D.xml @@ -12,20 +12,15 @@ </tutorials> <methods> <method name="get_param" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="param" type="int" enum="ConeTwistJoint3D.Param"> - </argument> + <return type="float" /> + <argument index="0" name="param" type="int" enum="ConeTwistJoint3D.Param" /> <description> </description> </method> <method name="set_param"> - <return type="void"> - </return> - <argument index="0" name="param" type="int" enum="ConeTwistJoint3D.Param"> - </argument> - <argument index="1" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="param" type="int" enum="ConeTwistJoint3D.Param" /> + <argument index="1" name="value" type="float" /> <description> </description> </method> diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml index 76855fc19f..d6da4bc248 100644 --- a/doc/classes/ConfigFile.xml +++ b/doc/classes/ConfigFile.xml @@ -12,34 +12,75 @@ a_vector=Vector3(1, 0, 2) [/codeblock] The stored data can be saved to or parsed from a file, though ConfigFile objects can also be used directly without accessing the filesystem. - The following example shows how to parse an INI-style file from the system, read its contents and store new values in it: + The following example shows how to create a simple [ConfigFile] and save it on disc: [codeblocks] [gdscript] + # Create new ConfigFile object. var config = ConfigFile.new() - var err = config.load("user://settings.cfg") - if err == OK: # If not, something went wrong with the file loading - # Look for the display/width pair, and default to 1024 if missing - var screen_width = config.get_value("display", "width", 1024) - # Store a variable if and only if it hasn't been defined yet - if not config.has_section_key("audio", "mute"): - config.set_value("audio", "mute", false) - # Save the changes by overwriting the previous file - config.save("user://settings.cfg") + + # 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") [/gdscript] [csharp] + // Create new ConfigFile object. var config = new ConfigFile(); - Error err = config.Load("user://settings.cfg"); - if (err == Error.Ok) // If not, something went wrong with the file loading + + // 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"); + [/csharp] + [/codeblocks] + This example shows how the above file could be loaded: + [codeblocks] + [gdscript] + 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. + var player_name = config.get_value(player, "player_name") + var player_score = config.get_value(player, "best_score") + score_data[player_name] = player_score + [/gdscript] + [csharp] + 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()) { - // Look for the display/width pair, and default to 1024 if missing - int screenWidth = (int)config.GetValue("display", "width", 1024); - // Store a variable if and only if it hasn't been defined yet - if (!config.HasSectionKey("audio", "mute")) - { - config.SetValue("audio", "mute", false); - } - // Save the changes by overwriting the previous file - config.Save("user://settings.cfg"); + // Fetch the data for each section. + var player_name = (String)config.GetValue(player, "player_name"); + var player_score = (int)config.GetValue(player, "best_score"); + score_data[player_name] = player_score; } [/csharp] [/codeblocks] @@ -50,167 +91,129 @@ </tutorials> <methods> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> <method name="erase_section"> - <return type="void"> - </return> - <argument index="0" name="section" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="section" type="String" /> <description> Deletes the specified section along with all the key-value pairs inside. Raises an error if the section does not exist. </description> </method> <method name="erase_section_key"> - <return type="void"> - </return> - <argument index="0" name="section" type="String"> - </argument> - <argument index="1" name="key" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="section" type="String" /> + <argument index="1" name="key" type="String" /> <description> Deletes the specified key in a section. Raises an error if either the section or the key do not exist. </description> </method> <method name="get_section_keys" qualifiers="const"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="section" type="String"> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="section" type="String" /> <description> Returns an array of all defined key identifiers in the specified section. Raises an error and returns an empty array if the section does not exist. </description> </method> <method name="get_sections" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns an array of all defined section identifiers. </description> </method> <method name="get_value" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="section" type="String"> - </argument> - <argument index="1" name="key" type="String"> - </argument> - <argument index="2" name="default" type="Variant" default="null"> - </argument> + <return type="Variant" /> + <argument index="0" name="section" type="String" /> + <argument index="1" name="key" type="String" /> + <argument index="2" name="default" type="Variant" default="null" /> <description> Returns the current value for the specified section and key. If either the section or the key do not exist, the method returns the fallback [code]default[/code] value. If [code]default[/code] is not specified or set to [code]null[/code], an error is also raised. </description> </method> <method name="has_section" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="section" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="section" type="String" /> <description> Returns [code]true[/code] if the specified section exists. </description> </method> <method name="has_section_key" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="section" type="String"> - </argument> - <argument index="1" name="key" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="section" type="String" /> + <argument index="1" name="key" type="String" /> <description> Returns [code]true[/code] if the specified section-key pair exists. </description> </method> <method name="load"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="int" enum="Error" /> + <returns_error number="0"/> + <returns_error number="12"/> + <argument index="0" name="path" type="String" /> <description> Loads the config file specified as a parameter. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on. Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="load_encrypted"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="key" type="PackedByteArray"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="key" type="PackedByteArray" /> <description> Loads the encrypted config file specified as a parameter, using the provided [code]key[/code] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on. Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="load_encrypted_pass"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="password" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="password" type="String" /> <description> Loads the encrypted config file specified as a parameter, using the provided [code]password[/code] to decrypt it. The file's contents are parsed and loaded in the [ConfigFile] object which the method was called on. Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="parse"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="data" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="data" type="String" /> <description> Parses the passed string as the contents of a config file. The string is parsed and loaded in the ConfigFile object which the method was called on. Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="save"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> <description> Saves the contents of the [ConfigFile] object to the file specified as a parameter. The output file uses an INI-style structure. Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="save_encrypted"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="key" type="PackedByteArray"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="key" type="PackedByteArray" /> <description> Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [code]key[/code] to encrypt it. The output file uses an INI-style structure. Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="save_encrypted_pass"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="password" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="password" type="String" /> <description> Saves the contents of the [ConfigFile] object to the AES-256 encrypted file specified as a parameter, using the provided [code]password[/code] to encrypt it. The output file uses an INI-style structure. Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="set_value"> - <return type="void"> - </return> - <argument index="0" name="section" type="String"> - </argument> - <argument index="1" name="key" type="String"> - </argument> - <argument index="2" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="section" type="String" /> + <argument index="1" name="key" type="String" /> + <argument index="2" name="value" type="Variant" /> <description> 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 [code]null[/code] value deletes the specified key if it exists, and deletes the section if it ends up empty once the key has been removed. </description> diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml index 0253ef21df..871082696c 100644 --- a/doc/classes/ConfirmationDialog.xml +++ b/doc/classes/ConfirmationDialog.xml @@ -19,8 +19,7 @@ </tutorials> <methods> <method name="get_cancel_button"> - <return type="Button"> - </return> + <return type="Button" /> <description> Returns the cancel button. </description> diff --git a/doc/classes/Container.xml b/doc/classes/Container.xml index c285b448d8..e78eb8d259 100644 --- a/doc/classes/Container.xml +++ b/doc/classes/Container.xml @@ -11,19 +11,15 @@ </tutorials> <methods> <method name="fit_child_in_rect"> - <return type="void"> - </return> - <argument index="0" name="child" type="Control"> - </argument> - <argument index="1" name="rect" type="Rect2"> - </argument> + <return type="void" /> + <argument index="0" name="child" type="Control" /> + <argument index="1" name="rect" type="Rect2" /> <description> Fit a child control in a given rect. This is mainly a helper for creating custom container classes. </description> </method> <method name="queue_sort"> - <return type="void"> - </return> + <return type="void" /> <description> Queue resort of the contained children. This is called automatically anyway, but can be called upon request. </description> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index 47e26b7a2e..5392189f6a 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -9,7 +9,7 @@ [b]User Interface nodes and input[/b] Godot sends input events to the scene's root node first, by calling [method Node._input]. [method Node._input] forwards the event down the node tree to the nodes under the mouse cursor, or on keyboard focus. To do so, it calls [code]MainLoop._input_event[/code]. [b]FIXME:[/b] No longer valid after DisplayServer split and Input refactoring. - Call [method accept_event] so no other node receives the event. Once you accepted an input, it becomes handled so [method Node._unhandled_input] will not process it. + Call [method accept_event] so no other node receives the event. Once you accept an input, it becomes handled so [method Node._unhandled_input] will not process it. Only one [Control] node can be in keyboard focus. Only the node in focus will receive keyboard events. To get the focus, call [method grab_focus]. [Control] nodes lose focus when another node grabs it, or if you hide the node in focus. Sets [member mouse_filter] to [constant MOUSE_FILTER_IGNORE] to tell a [Control] node to ignore mouse or touch events. You'll need it if you place an icon on top of a button. [Theme] resources change the Control's appearance. If you change the [Theme] on a [Control] node, it affects all of its children. To override some of the theme's parameters, call one of the [code]add_theme_*_override[/code] methods, like [method add_theme_font_override]. You can override the theme with the inspector. @@ -22,13 +22,10 @@ <link title="All GUI Demos">https://github.com/godotengine/godot-demo-projects/tree/master/gui</link> </tutorials> <methods> - <method name="_can_drop_data" qualifiers="virtual"> - <return type="bool"> - </return> - <argument index="0" name="position" type="Vector2"> - </argument> - <argument index="1" name="data" type="Variant"> - </argument> + <method name="_can_drop_data" qualifiers="virtual const"> + <return type="bool" /> + <argument index="0" name="at_position" type="Vector2" /> + <argument index="1" name="data" type="Variant" /> <description> Godot calls this method to test if [code]data[/code] from a control's [method _get_drag_data] can be dropped at [code]position[/code]. [code]position[/code] is local to this control. This method should only be used to test the data. Process the data in [method _drop_data]. @@ -51,12 +48,9 @@ </description> </method> <method name="_drop_data" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="position" type="Vector2"> - </argument> - <argument index="1" name="data" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="at_position" type="Vector2" /> + <argument index="1" name="data" type="Variant" /> <description> Godot calls this method to pass you the [code]data[/code] from a control's [method _get_drag_data] result. Godot first calls [method _can_drop_data] to test if [code]data[/code] is allowed to drop at [code]position[/code] where [code]position[/code] is local to this control. [codeblocks] @@ -79,11 +73,9 @@ [/codeblocks] </description> </method> - <method name="_get_drag_data" qualifiers="virtual"> - <return type="Variant"> - </return> - <argument index="0" name="position" type="Vector2"> - </argument> + <method name="_get_drag_data" qualifiers="virtual const"> + <return type="Variant" /> + <argument index="0" name="at_position" type="Vector2" /> <description> Godot calls this method to get data that can be dragged and dropped onto controls that expect drop data. Returns [code]null[/code] if there is no data to drag. Controls that want to receive drop data should implement [method _can_drop_data] and [method _drop_data]. [code]position[/code] is local to this control. Drag may be forced with [method force_drag]. A preview that will follow the mouse that should represent the data can be set with [method set_drag_preview]. A good time to set the preview is in this method. @@ -105,19 +97,16 @@ [/codeblocks] </description> </method> - <method name="_get_minimum_size" qualifiers="virtual"> - <return type="Vector2"> - </return> + <method name="_get_minimum_size" qualifiers="virtual const"> + <return type="Vector2" /> <description> Virtual method to be implemented by the user. Returns the minimum size for this control. Alternative to [member rect_min_size] for controlling minimum size via code. The actual minimum size will be the max value of these two (in each axis separately). If not overridden, defaults to [constant Vector2.ZERO]. </description> </method> <method name="_gui_input" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="event" type="InputEvent"> - </argument> + <return type="void" /> + <argument index="0" name="event" type="InputEvent" /> <description> Virtual method to be implemented by the user. Use this method to process and accept inputs on UI elements. See [method accept_event]. Example: clicking a control. @@ -147,31 +136,27 @@ * control has [member mouse_filter] set to [constant MOUSE_FILTER_IGNORE]; * control is obstructed by another [Control] on top of it, which doesn't have [member mouse_filter] set to [constant MOUSE_FILTER_IGNORE]; * control's parent has [member mouse_filter] set to [constant MOUSE_FILTER_STOP] or has accepted the event; - * it happens outside parent's rectangle and the parent has either [member rect_clip_content] enabled. + * it happens outside the parent's rectangle and the parent has either [member rect_clip_content] enabled. </description> </method> <method name="_has_point" qualifiers="virtual const"> - <return type="bool"> - </return> - <argument index="0" name="" type="Vector2"> - </argument> + <return type="bool" /> + <argument index="0" name="position" type="Vector2" /> <description> Virtual method to be implemented by the user. Returns whether the given [code]point[/code] is inside this control. If not overridden, default behavior is checking if the point is within control's Rect. [b]Note:[/b] If you want to check if a point is inside the control, you can use [code]get_rect().has_point(point)[/code]. </description> </method> - <method name="_make_custom_tooltip" qualifiers="virtual"> - <return type="Control"> - </return> - <argument index="0" name="for_text" type="String"> - </argument> + <method name="_make_custom_tooltip" qualifiers="virtual const"> + <return type="Object" /> + <argument index="0" name="for_text" type="String" /> <description> Virtual method to be implemented by the user. Returns a [Control] node that should be used as a tooltip instead of the default one. The [code]for_text[/code] includes the contents of the [member hint_tooltip] property. - The returned node must be of type [Control] or Control-derived. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance (if you want to use a pre-existing node from your scene tree, you can duplicate it and pass the duplicated instance).When [code]null[/code] or a non-Control node is returned, the default tooltip will be used instead. + The returned node must be of type [Control] or Control-derived. It can have child nodes of any type. It is freed when the tooltip disappears, so make sure you always provide a new instance (if you want to use a pre-existing node from your scene tree, you can duplicate it and pass the duplicated instance). When [code]null[/code] or a non-Control node is returned, the default tooltip will be used instead. The returned node will be added as child to a [PopupPanel], so you should only provide the contents of that panel. That [PopupPanel] can be themed using [method Theme.set_stylebox] for the type [code]"TooltipPanel"[/code] (see [member hint_tooltip] for an example). [b]Note:[/b] The tooltip is shrunk to minimal size. If you want to ensure it's fully visible, you might want to set its [member rect_min_size] to some non-zero value. - [b]Note:[/b] The node (and any relevant children) should be [member CanvasItem.visible] when returned, otherwise the viewport that instantiates it will not be able to calculate its minimum size reliably. + [b]Note:[/b] The node (and any relevant children) should be [member CanvasItem.visible] when returned, otherwise, the viewport that instantiates it will not be able to calculate its minimum size reliably. Example of usage with a custom-constructed node: [codeblocks] [gdscript] @@ -208,106 +193,92 @@ [/codeblocks] </description> </method> - <method name="_structured_text_parser" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="args" type="Array"> - </argument> - <argument index="1" name="text" type="String"> - </argument> + <method name="_structured_text_parser" qualifiers="virtual const"> + <return type="Array" /> + <argument index="0" name="args" type="Array" /> + <argument index="1" name="text" type="String" /> <description> User defined BiDi algorithm override function. Return [code]Array[/code] of [code]Vector2i[/code] text ranges, in the left-to-right order. Ranges should cover full source [code]text[/code] without overlaps. BiDi algorithm will be used on each range separately. </description> </method> <method name="accept_event"> - <return type="void"> - </return> + <return type="void" /> <description> Marks an input event as handled. Once you accept an input event, it stops propagating, even to nodes listening to [method Node._unhandled_input] or [method Node._unhandled_key_input]. </description> </method> <method name="add_theme_color_override"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> - <description> - Overrides the [Color] with given [code]name[/code] in the [member theme] resource the control uses. + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="color" type="Color" /> + <description> + Creates a local override for a theme [Color] with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_color_override]. + See also [method get_theme_color]. [b]Example of overriding a label's color and resetting it later:[/b] [codeblocks] [gdscript] - # Override the child node "MyLabel"'s font color to orange. + # Given the child Label node "MyLabel", override its font color with a custom value. $MyLabel.add_theme_color_override("font_color", Color(1, 0.5, 0)) - # Reset the color by creating a new node to get the default value: - var default_label_color = Label.new().get_theme_color("font_color") - $MyLabel.add_theme_color_override("font_color", default_label_color) + # Reset the font color of the child label. + $MyLabel.remove_theme_color_override("font_color") + # Alternatively it can be overridden with the default value from the Label type. + $MyLabel.add_theme_color_override("font_color", get_theme_color("font_color", "Label")) [/gdscript] [csharp] - // Override the child node "MyLabel"'s font color to orange. - GetNode<Label>("MyLabel").AddThemeColorOverride("font_color", new Color(1, 0.5f, 0)); - // Reset the color by creating a new node to get the default value: - var defaultLabelColor = new Label().GetThemeColor("font_color"); - GetNode<Label>("MyLabel").AddThemeColorOverride("font_color", defaultLabelColor); + // Given the child Label node "MyLabel", override its font color with a custom value. + GetNode<Label>("MyLabel").AddThemeColorOverride("font_color", new Color(1, 0.5f, 0)) + // Reset the font color of the child label. + GetNode<Label>("MyLabel").RemoveThemeColorOverride("font_color") + // Alternatively it can be overridden with the default value from the Label type. + GetNode<Label>("MyLabel").AddThemeColorOverride("font_color", GetThemeColor("font_color", "Label")) [/csharp] [/codeblocks] </description> </method> <method name="add_theme_constant_override"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="constant" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="constant" type="int" /> <description> - Overrides an integer constant with given [code]name[/code] in the [member theme] resource the control uses. + Creates a local override for a theme constant with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_constant_override]. + See also [method get_theme_constant]. </description> </method> <method name="add_theme_font_override"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="font" type="Font"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="font" type="Font" /> <description> - Overrides the font with given [code]name[/code] in the [member theme] resource the control uses. + Creates a local override for a theme [Font] with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_override]. + See also [method get_theme_font]. </description> </method> <method name="add_theme_font_size_override"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="font_size" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="font_size" type="int" /> <description> - Overrides the font size with given [code]name[/code] in the [member theme] resource the control uses. + Creates a local override for a theme font size with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_size_override]. + See also [method get_theme_font_size]. </description> </method> <method name="add_theme_icon_override"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="texture" type="Texture2D"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="texture" type="Texture2D" /> <description> - Overrides the icon with given [code]name[/code] in the [member theme] resource the control uses. + Creates a local override for a theme icon with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_icon_override]. + See also [method get_theme_icon]. </description> </method> <method name="add_theme_stylebox_override"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="stylebox" type="StyleBox"> - </argument> - <description> - Overrides the [StyleBox] with given [code]name[/code] in the [member theme] resource the control uses. + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="stylebox" type="StyleBox" /> + <description> + Creates a local override for a theme [StyleBox] with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_stylebox_override]. + See also [method get_theme_stylebox]. [b]Example of modifying a property in a StyleBox by duplicating it:[/b] [codeblocks] [gdscript] @@ -318,8 +289,8 @@ new_stylebox_normal.border_width_top = 3 new_stylebox_normal.border_color = Color(0, 1, 0.5) $MyButton.add_theme_stylebox_override("normal", new_stylebox_normal) - # Remove the stylebox override: - $MyButton.add_theme_stylebox_override("normal", null) + # Remove the stylebox override. + $MyButton.remove_theme_stylebox_override("normal") [/gdscript] [csharp] // The snippet below assumes the child node MyButton has a StyleBoxFlat assigned. @@ -329,227 +300,208 @@ newStyleboxNormal.BorderWidthTop = 3; newStyleboxNormal.BorderColor = new Color(0, 1, 0.5f); GetNode<Button>("MyButton").AddThemeStyleboxOverride("normal", newStyleboxNormal); - // Remove the stylebox override: - GetNode<Button>("MyButton").AddThemeStyleboxOverride("normal", null); + // Remove the stylebox override. + GetNode<Button>("MyButton").RemoveThemeStyleboxOverride("normal"); [/csharp] [/codeblocks] </description> </method> + <method name="begin_bulk_theme_override"> + <return type="void" /> + <description> + Prevents [code]*_theme_*_override[/code] methods from emitting [constant NOTIFICATION_THEME_CHANGED] until [method end_bulk_theme_override] is called. + </description> + </method> + <method name="end_bulk_theme_override"> + <return type="void" /> + <description> + Ends a bulk theme override update. See [method begin_bulk_theme_override]. + </description> + </method> <method name="find_next_valid_focus" qualifiers="const"> - <return type="Control"> - </return> + <return type="Control" /> <description> Finds the next (below in the tree) [Control] that can receive the focus. </description> </method> <method name="find_prev_valid_focus" qualifiers="const"> - <return type="Control"> - </return> + <return type="Control" /> <description> Finds the previous (above in the tree) [Control] that can receive the focus. </description> </method> <method name="force_drag"> - <return type="void"> - </return> - <argument index="0" name="data" type="Variant"> - </argument> - <argument index="1" name="preview" type="Control"> - </argument> + <return type="void" /> + <argument index="0" name="data" type="Variant" /> + <argument index="1" name="preview" type="Control" /> <description> Forces drag and bypasses [method _get_drag_data] and [method set_drag_preview] by passing [code]data[/code] and [code]preview[/code]. Drag will start even if the mouse is neither over nor pressed on this control. The methods [method _can_drop_data] and [method _drop_data] must be implemented on controls that want to receive drop data. </description> </method> <method name="get_anchor" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="side" type="int" enum="Side"> - </argument> + <return type="float" /> + <argument index="0" name="side" type="int" enum="Side" /> <description> Returns the anchor for the specified [enum Side]. A getter method for [member anchor_bottom], [member anchor_left], [member anchor_right] and [member anchor_top]. </description> </method> <method name="get_begin" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns [member offset_left] and [member offset_top]. See also [member rect_position]. </description> </method> <method name="get_combined_minimum_size" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns combined minimum size from [member rect_min_size] and [method get_minimum_size]. </description> </method> <method name="get_cursor_shape" qualifiers="const"> - <return type="int" enum="Control.CursorShape"> - </return> - <argument index="0" name="position" type="Vector2" default="Vector2(0, 0)"> - </argument> + <return type="int" enum="Control.CursorShape" /> + <argument index="0" name="position" type="Vector2" default="Vector2(0, 0)" /> <description> Returns the mouse cursor shape the control displays on mouse hover. See [enum CursorShape]. </description> </method> <method name="get_end" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns [member offset_right] and [member offset_bottom]. </description> </method> <method name="get_focus_neighbor" qualifiers="const"> - <return type="NodePath"> - </return> - <argument index="0" name="side" type="int" enum="Side"> - </argument> + <return type="NodePath" /> + <argument index="0" name="side" type="int" enum="Side" /> <description> Returns the focus neighbor for the specified [enum Side]. A getter method for [member focus_neighbor_bottom], [member focus_neighbor_left], [member focus_neighbor_right] and [member focus_neighbor_top]. </description> </method> <method name="get_focus_owner" qualifiers="const"> - <return type="Control"> - </return> + <return type="Control" /> <description> Returns the control that has the keyboard focus or [code]null[/code] if none. </description> </method> <method name="get_global_rect" qualifiers="const"> - <return type="Rect2"> - </return> + <return type="Rect2" /> <description> Returns the position and size of the control relative to the top-left corner of the screen. See [member rect_position] and [member rect_size]. </description> </method> <method name="get_minimum_size" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the minimum size for this control. See [member rect_min_size]. </description> </method> <method name="get_offset" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="offset" type="int" enum="Side"> - </argument> + <return type="float" /> + <argument index="0" name="offset" type="int" enum="Side" /> <description> Returns the anchor for the specified [enum Side]. A getter method for [member offset_bottom], [member offset_left], [member offset_right] and [member offset_top]. </description> </method> <method name="get_parent_area_size" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the width/height occupied in the parent control. </description> </method> <method name="get_parent_control" qualifiers="const"> - <return type="Control"> - </return> + <return type="Control" /> <description> Returns the parent control node. </description> </method> <method name="get_rect" qualifiers="const"> - <return type="Rect2"> - </return> + <return type="Rect2" /> <description> Returns the position and size of the control relative to the top-left corner of the parent Control. See [member rect_position] and [member rect_size]. </description> </method> <method name="get_theme_color" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> - <description> - Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. + <return type="Color" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> + <description> + Returns a [Color] from the first matching [Theme] in the tree if that [Theme] has a color item with the specified [code]name[/code] and [code]theme_type[/code]. If [code]theme_type[/code] is omitted the class name of the current control is used as the type, or [member theme_type_variation] if it is defined. If the type is a class name its parent classes are also checked, in order of inheritance. If the type is a variation its base types are checked, in order of dependency, then the control's class name and its parent classes are checked. + For the current control its local overrides are considered first (see [method add_theme_color_override]), then its assigned [member theme]. After the current control, each parent control and its assigned [member theme] are considered; controls without a [member theme] assigned are skipped. If no matching [Theme] is found in the tree, a custom project [Theme] (see [member ProjectSettings.gui/theme/custom]) and the default [Theme] are used. [codeblocks] [gdscript] func _ready(): - modulate = get_theme_color("font_color", "Button") #get the color defined for button fonts + # Get the font color defined for the current Control's class, if it exists. + modulate = get_theme_color("font_color") + # Get the font color defined for the Button class. + modulate = get_theme_color("font_color", "Button") [/gdscript] [csharp] public override void _Ready() { - Modulate = GetThemeColor("font_color", "Button"); //get the color defined for button fonts + // Get the font color defined for the current Control's class, if it exists. + Modulate = GetThemeColor("font_color"); + // Get the font color defined for the Button class. + Modulate = GetThemeColor("font_color", "Button"); } [/csharp] [/codeblocks] </description> </method> <method name="get_theme_constant" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> + <return type="int" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> <description> - Returns a constant from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. + Returns a constant from the first matching [Theme] in the tree if that [Theme] has a constant item with the specified [code]name[/code] and [code]theme_type[/code]. + See [method get_theme_color] for details. </description> </method> <method name="get_theme_font" qualifiers="const"> - <return type="Font"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> + <return type="Font" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> <description> - Returns a font from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. + Returns a [Font] from the first matching [Theme] in the tree if that [Theme] has a font item with the specified [code]name[/code] and [code]theme_type[/code]. + See [method get_theme_color] for details. </description> </method> <method name="get_theme_font_size" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> + <return type="int" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> <description> - Returns a font size from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. + Returns a font size from the first matching [Theme] in the tree if that [Theme] has a font size item with the specified [code]name[/code] and [code]theme_type[/code]. + See [method get_theme_color] for details. </description> </method> <method name="get_theme_icon" qualifiers="const"> - <return type="Texture2D"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> + <return type="Texture2D" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> <description> - Returns an icon from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. + Returns an icon from the first matching [Theme] in the tree if that [Theme] has an icon item with the specified [code]name[/code] and [code]theme_type[/code]. + See [method get_theme_color] for details. </description> </method> <method name="get_theme_stylebox" qualifiers="const"> - <return type="StyleBox"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> + <return type="StyleBox" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> <description> - Returns a [StyleBox] from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. + Returns a [StyleBox] from the first matching [Theme] in the tree if that [Theme] has a stylebox item with the specified [code]name[/code] and [code]theme_type[/code]. + See [method get_theme_color] for details. </description> </method> <method name="get_tooltip" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="at_position" type="Vector2" default="Vector2(0, 0)"> - </argument> + <return type="String" /> + <argument index="0" name="at_position" type="Vector2" default="Vector2(0, 0)" /> <description> Returns the tooltip, which will appear when the cursor is resting over this control. See [member hint_tooltip]. </description> </method> <method name="grab_click_focus"> - <return type="void"> - </return> + <return type="void" /> <description> Creates an [InputEventMouseButton] that attempts to click the control. If the event is received, the control acquires focus. [codeblocks] @@ -567,225 +519,185 @@ </description> </method> <method name="grab_focus"> - <return type="void"> - </return> + <return type="void" /> <description> Steal the focus from another control and become the focused control (see [member focus_mode]). </description> </method> <method name="has_focus" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if this is the current focused control. See [member focus_mode]. </description> </method> <method name="has_theme_color" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> <description> - Returns [code]true[/code] if [Color] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has a color item with the specified [code]name[/code] and [code]theme_type[/code]. + See [method get_theme_color] for details. </description> </method> <method name="has_theme_color_override" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> <description> - Returns [code]true[/code] if [Color] with given [code]name[/code] has a valid override in this [Control] node. + Returns [code]true[/code] if there is a local override for a theme [Color] with the specified [code]name[/code] in this [Control] node. + See [method add_theme_color_override]. </description> </method> <method name="has_theme_constant" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> <description> - Returns [code]true[/code] if constant with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has a constant item with the specified [code]name[/code] and [code]theme_type[/code]. + See [method get_theme_color] for details. </description> </method> <method name="has_theme_constant_override" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> <description> - Returns [code]true[/code] if constant with given [code]name[/code] has a valid override in this [Control] node. + Returns [code]true[/code] if there is a local override for a theme constant with the specified [code]name[/code] in this [Control] node. + See [method add_theme_constant_override]. </description> </method> <method name="has_theme_font" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> <description> - Returns [code]true[/code] if font with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has a font item with the specified [code]name[/code] and [code]theme_type[/code]. + See [method get_theme_color] for details. </description> </method> <method name="has_theme_font_override" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> <description> - Returns [code]true[/code] if font with given [code]name[/code] has a valid override in this [Control] node. + Returns [code]true[/code] if there is a local override for a theme [Font] with the specified [code]name[/code] in this [Control] node. + See [method add_theme_font_override]. </description> </method> <method name="has_theme_font_size" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> <description> - Returns [code]true[/code] if font size with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has a font size item with the specified [code]name[/code] and [code]theme_type[/code]. + See [method get_theme_color] for details. </description> </method> <method name="has_theme_font_size_override" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> <description> - Returns [code]true[/code] if font size with given [code]name[/code] has a valid override in this [Control] node. + Returns [code]true[/code] if there is a local override for a theme font size with the specified [code]name[/code] in this [Control] node. + See [method add_theme_font_size_override]. </description> </method> <method name="has_theme_icon" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> <description> - Returns [code]true[/code] if icon with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has an icon item with the specified [code]name[/code] and [code]theme_type[/code]. + See [method get_theme_color] for details. </description> </method> <method name="has_theme_icon_override" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> <description> - Returns [code]true[/code] if icon with given [code]name[/code] has a valid override in this [Control] node. + Returns [code]true[/code] if there is a local override for a theme icon with the specified [code]name[/code] in this [Control] node. + See [method add_theme_icon_override]. </description> </method> <method name="has_theme_stylebox" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> <description> - Returns [code]true[/code] if [StyleBox] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has a stylebox item with the specified [code]name[/code] and [code]theme_type[/code]. + See [method get_theme_color] for details. </description> </method> <method name="has_theme_stylebox_override" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> <description> - Returns [code]true[/code] if [StyleBox] with given [code]name[/code] has a valid override in this [Control] node. + Returns [code]true[/code] if there is a local override for a theme [StyleBox] with the specified [code]name[/code] in this [Control] node. + See [method add_theme_stylebox_override]. </description> </method> <method name="is_layout_rtl" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if layout is right-to-left. </description> </method> <method name="minimum_size_changed"> - <return type="void"> - </return> + <return type="void" /> <description> Invalidates the size cache in this node and in parent nodes up to top_level. Intended to be used with [method get_minimum_size] when the return value is changed. Setting [member rect_min_size] directly calls this method automatically. </description> </method> <method name="release_focus"> - <return type="void"> - </return> + <return type="void" /> <description> Give up the focus. No other control will be able to receive keyboard input. </description> </method> <method name="remove_theme_color_override"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> <description> - Removes a theme override for a [Color] with the given [code]name[/code]. + Removes a local override for a theme [Color] with the specified [code]name[/code] previously added by [method add_theme_color_override] or via the Inspector dock. </description> </method> <method name="remove_theme_constant_override"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> <description> - Removes a theme override for a constant with the given [code]name[/code]. + Removes a local override for a theme constant with the specified [code]name[/code] previously added by [method add_theme_constant_override] or via the Inspector dock. </description> </method> <method name="remove_theme_font_override"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> <description> - Removes a theme override for a [Font] with the given [code]name[/code]. + Removes a local override for a theme [Font] with the specified [code]name[/code] previously added by [method add_theme_font_override] or via the Inspector dock. </description> </method> <method name="remove_theme_font_size_override"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> <description> - Removes a theme override for a font size with the given [code]name[/code]. + Removes a local override for a theme font size with the specified [code]name[/code] previously added by [method add_theme_font_size_override] or via the Inspector dock. </description> </method> <method name="remove_theme_icon_override"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> <description> - Removes a theme override for an icon with the given [code]name[/code]. + Removes a local override for a theme icon with the specified [code]name[/code] previously added by [method add_theme_icon_override] or via the Inspector dock. </description> </method> <method name="remove_theme_stylebox_override"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> <description> - Removes a theme override for a [StyleBox] with the given [code]name[/code]. + Removes a local override for a theme [StyleBox] with the specified [code]name[/code] previously added by [method add_theme_stylebox_override] or via the Inspector dock. </description> </method> <method name="set_anchor"> - <return type="void"> - </return> - <argument index="0" name="side" type="int" enum="Side"> - </argument> - <argument index="1" name="anchor" type="float"> - </argument> - <argument index="2" name="keep_offset" type="bool" default="false"> - </argument> - <argument index="3" name="push_opposite_anchor" type="bool" default="true"> - </argument> + <return type="void" /> + <argument index="0" name="side" type="int" enum="Side" /> + <argument index="1" name="anchor" type="float" /> + <argument index="2" name="keep_offset" type="bool" default="false" /> + <argument index="3" name="push_opposite_anchor" type="bool" default="true" /> <description> Sets the anchor for the specified [enum Side] to [code]anchor[/code]. A setter method for [member anchor_bottom], [member anchor_left], [member anchor_right] and [member anchor_top]. If [code]keep_offset[/code] is [code]true[/code], offsets aren't updated after this operation. @@ -793,59 +705,43 @@ </description> </method> <method name="set_anchor_and_offset"> - <return type="void"> - </return> - <argument index="0" name="side" type="int" enum="Side"> - </argument> - <argument index="1" name="anchor" type="float"> - </argument> - <argument index="2" name="offset" type="float"> - </argument> - <argument index="3" name="push_opposite_anchor" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="side" type="int" enum="Side" /> + <argument index="1" name="anchor" type="float" /> + <argument index="2" name="offset" type="float" /> + <argument index="3" name="push_opposite_anchor" type="bool" default="false" /> <description> Works the same as [method set_anchor], but instead of [code]keep_offset[/code] argument and automatic update of offset, it allows to set the offset yourself (see [method set_offset]). </description> </method> <method name="set_anchors_and_offsets_preset"> - <return type="void"> - </return> - <argument index="0" name="preset" type="int" enum="Control.LayoutPreset"> - </argument> - <argument index="1" name="resize_mode" type="int" enum="Control.LayoutPresetMode" default="0"> - </argument> - <argument index="2" name="margin" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="preset" type="int" enum="Control.LayoutPreset" /> + <argument index="1" name="resize_mode" type="int" enum="Control.LayoutPresetMode" default="0" /> + <argument index="2" name="margin" type="int" default="0" /> <description> Sets both anchor preset and offset preset. See [method set_anchors_preset] and [method set_offsets_preset]. </description> </method> <method name="set_anchors_preset"> - <return type="void"> - </return> - <argument index="0" name="preset" type="int" enum="Control.LayoutPreset"> - </argument> - <argument index="1" name="keep_offsets" type="bool" default="false"> - </argument> - <description> - Sets the anchors to a [code]preset[/code] from [enum Control.LayoutPreset] enum. This is code equivalent of using the Layout menu in 2D editor. + <return type="void" /> + <argument index="0" name="preset" type="int" enum="Control.LayoutPreset" /> + <argument index="1" name="keep_offsets" type="bool" default="false" /> + <description> + Sets the anchors to a [code]preset[/code] from [enum Control.LayoutPreset] enum. This is the code equivalent to using the Layout menu in the 2D editor. If [code]keep_offsets[/code] is [code]true[/code], control's position will also be updated. </description> </method> <method name="set_begin"> - <return type="void"> - </return> - <argument index="0" name="position" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="position" type="Vector2" /> <description> Sets [member offset_left] and [member offset_top] at the same time. Equivalent of changing [member rect_position]. </description> </method> <method name="set_drag_forwarding"> - <return type="void"> - </return> - <argument index="0" name="target" type="Control"> - </argument> + <return type="void" /> + <argument index="0" name="target" type="Control" /> <description> Forwards the handling of this control's drag and drop to [code]target[/code] control. Forwarding can be implemented in the target control similar to the methods [method _get_drag_data], [method _can_drop_data], and [method _drop_data] but with two differences: @@ -909,10 +805,8 @@ </description> </method> <method name="set_drag_preview"> - <return type="void"> - </return> - <argument index="0" name="control" type="Control"> - </argument> + <return type="void" /> + <argument index="0" name="control" type="Control" /> <description> Shows the given control at the mouse pointer. A good time to call this method is in [method _get_drag_data]. The control must not be in the scene tree. You should not free the control, and you should not keep a reference to the control beyond the duration of the drag. It will be deleted automatically after the drag has ended. [codeblocks] @@ -945,92 +839,69 @@ </description> </method> <method name="set_end"> - <return type="void"> - </return> - <argument index="0" name="position" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="position" type="Vector2" /> <description> Sets [member offset_right] and [member offset_bottom] at the same time. </description> </method> <method name="set_focus_neighbor"> - <return type="void"> - </return> - <argument index="0" name="side" type="int" enum="Side"> - </argument> - <argument index="1" name="neighbor" type="NodePath"> - </argument> + <return type="void" /> + <argument index="0" name="side" type="int" enum="Side" /> + <argument index="1" name="neighbor" type="NodePath" /> <description> Sets the anchor for the specified [enum Side] to the [Control] at [code]neighbor[/code] node path. A setter method for [member focus_neighbor_bottom], [member focus_neighbor_left], [member focus_neighbor_right] and [member focus_neighbor_top]. </description> </method> <method name="set_global_position"> - <return type="void"> - </return> - <argument index="0" name="position" type="Vector2"> - </argument> - <argument index="1" name="keep_offsets" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="position" type="Vector2" /> + <argument index="1" name="keep_offsets" type="bool" default="false" /> <description> Sets the [member rect_global_position] to given [code]position[/code]. If [code]keep_offsets[/code] is [code]true[/code], control's anchors will be updated instead of offsets. </description> </method> <method name="set_offset"> - <return type="void"> - </return> - <argument index="0" name="side" type="int" enum="Side"> - </argument> - <argument index="1" name="offset" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="side" type="int" enum="Side" /> + <argument index="1" name="offset" type="float" /> <description> Sets the offset for the specified [enum Side] to [code]offset[/code]. A setter method for [member offset_bottom], [member offset_left], [member offset_right] and [member offset_top]. </description> </method> <method name="set_offsets_preset"> - <return type="void"> - </return> - <argument index="0" name="preset" type="int" enum="Control.LayoutPreset"> - </argument> - <argument index="1" name="resize_mode" type="int" enum="Control.LayoutPresetMode" default="0"> - </argument> - <argument index="2" name="margin" type="int" default="0"> - </argument> - <description> - Sets the offsets to a [code]preset[/code] from [enum Control.LayoutPreset] enum. This is code equivalent of using the Layout menu in 2D editor. + <return type="void" /> + <argument index="0" name="preset" type="int" enum="Control.LayoutPreset" /> + <argument index="1" name="resize_mode" type="int" enum="Control.LayoutPresetMode" default="0" /> + <argument index="2" name="margin" type="int" default="0" /> + <description> + Sets the offsets to a [code]preset[/code] from [enum Control.LayoutPreset] enum. This is the code equivalent to using the Layout menu in the 2D editor. Use parameter [code]resize_mode[/code] with constants from [enum Control.LayoutPresetMode] to better determine the resulting size of the [Control]. Constant size will be ignored if used with presets that change size, e.g. [code]PRESET_LEFT_WIDE[/code]. Use parameter [code]margin[/code] to determine the gap between the [Control] and the edges. </description> </method> <method name="set_position"> - <return type="void"> - </return> - <argument index="0" name="position" type="Vector2"> - </argument> - <argument index="1" name="keep_offsets" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="position" type="Vector2" /> + <argument index="1" name="keep_offsets" type="bool" default="false" /> <description> Sets the [member rect_position] to given [code]position[/code]. If [code]keep_offsets[/code] is [code]true[/code], control's anchors will be updated instead of offsets. </description> </method> <method name="set_size"> - <return type="void"> - </return> - <argument index="0" name="size" type="Vector2"> - </argument> - <argument index="1" name="keep_offsets" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="size" type="Vector2" /> + <argument index="1" name="keep_offsets" type="bool" default="false" /> <description> Sets the size (see [member rect_size]). If [code]keep_offsets[/code] is [code]true[/code], control's anchors will be updated instead of offsets. </description> </method> <method name="warp_mouse"> - <return type="void"> - </return> - <argument index="0" name="to_position" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="to_position" type="Vector2" /> <description> Moves the mouse cursor to [code]to_position[/code], relative to [member rect_position] of this [Control]. </description> @@ -1049,6 +920,9 @@ <member name="anchor_top" type="float" setter="_set_anchor" getter="get_anchor" default="0.0"> Anchors the top edge of the node to the origin, the center or the end of its parent control. It changes how the top offset updates when the node moves or changes size. You can use one of the [enum Anchor] constants for convenience. </member> + <member name="auto_translate" type="bool" setter="set_auto_translate" getter="is_auto_translating" default="true"> + Toggles if any text should automatically change to its translated version depending on the current locale. + </member> <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" enum="Control.FocusMode" default="0"> The focus access mode for the control (None, Click or All). Only one Control can be focused at the same time, and it will receive keyboard signals. </member> @@ -1164,8 +1038,9 @@ <member name="theme" type="Theme" setter="set_theme" getter="get_theme"> The [Theme] resource this node and all its [Control] children use. If a child node has its own [Theme] resource set, theme items are merged with child's definitions having higher priority. </member> - <member name="theme_custom_type" type="StringName" setter="set_theme_custom_type" getter="get_theme_custom_type" default="&"""> - The type name used by this [Control] to look up its own theme items. By default, the class name of the node is used (e.g. [code]Button[/code] for the [Button] control), as well as the class names of all parent classes (in order of inheritance). Setting this property gives the highest priority to the type of the specified name, then falls back on the class names. + <member name="theme_type_variation" type="StringName" setter="set_theme_type_variation" getter="get_theme_type_variation" default="&"""> + The name of a theme type variation used by this [Control] to look up its own theme items. When empty, the class name of the node is used (e.g. [code]Button[/code] for the [Button] control), as well as the class names of all parent classes (in order of inheritance). + When set, this property gives the highest priority to the type of the specified name. This type can in turn extend another type, forming a dependency chain. See [method Theme.set_type_variation]. If the theme item cannot be found using this type or its base types, lookup falls back on the class names. [b]Note:[/b] To look up [Control]'s own items use various [code]get_theme_*[/code] methods without specifying [code]theme_type[/code]. [b]Note:[/b] Theme items are looked for in the tree order, from branch to root, where each [Control] node is checked for its [member theme] property. The earliest match against any type/class name is returned. The project-level Theme and the default Theme are checked last. </member> @@ -1182,8 +1057,7 @@ </description> </signal> <signal name="gui_input"> - <argument index="0" name="event" type="InputEvent"> - </argument> + <argument index="0" name="event" type="InputEvent" /> <description> Emitted when the node receives an [InputEvent]. </description> @@ -1196,11 +1070,13 @@ <signal name="mouse_entered"> <description> Emitted when the mouse enters the control's [code]Rect[/code] area, provided its [member mouse_filter] lets the event reach it. + [b]Note:[/b] [signal mouse_entered] will not be emitted if the mouse enters a child [Control] node before entering the parent's [code]Rect[/code] area, at least until the mouse is moved to reach the parent's [code]Rect[/code] area. </description> </signal> <signal name="mouse_exited"> <description> Emitted when the mouse leaves the control's [code]Rect[/code] area, provided its [member mouse_filter] lets the event reach it. + [b]Note:[/b] [signal mouse_exited] will be emitted if the mouse enters a child [Control] node, even if the mouse cursor is still inside the parent's [code]Rect[/code] area. </description> </signal> <signal name="resized"> diff --git a/doc/classes/ConvexPolygonShape2D.xml b/doc/classes/ConvexPolygonShape2D.xml index d53900e6c5..243605e2b7 100644 --- a/doc/classes/ConvexPolygonShape2D.xml +++ b/doc/classes/ConvexPolygonShape2D.xml @@ -11,10 +11,8 @@ </tutorials> <methods> <method name="set_point_cloud"> - <return type="void"> - </return> - <argument index="0" name="point_cloud" type="PackedVector2Array"> - </argument> + <return type="void" /> + <argument index="0" name="point_cloud" type="PackedVector2Array" /> <description> Based on the set of points provided, this creates and assigns the [member points] property using the convex hull algorithm. Removing all unneeded points. See [method Geometry2D.convex_hull] for details. </description> diff --git a/doc/classes/Crypto.xml b/doc/classes/Crypto.xml index deda6116f4..3d7ca956da 100644 --- a/doc/classes/Crypto.xml +++ b/doc/classes/Crypto.xml @@ -74,70 +74,52 @@ </tutorials> <methods> <method name="constant_time_compare"> - <return type="bool"> - </return> - <argument index="0" name="trusted" type="PackedByteArray"> - </argument> - <argument index="1" name="received" type="PackedByteArray"> - </argument> + <return type="bool" /> + <argument index="0" name="trusted" type="PackedByteArray" /> + <argument index="1" name="received" type="PackedByteArray" /> <description> Compares two [PackedByteArray]s for equality without leaking timing information in order to prevent timing attacks. See [url=https://paragonie.com/blog/2015/11/preventing-timing-attacks-on-string-comparison-with-double-hmac-strategy]this blog post[/url] for more information. </description> </method> <method name="decrypt"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="key" type="CryptoKey"> - </argument> - <argument index="1" name="ciphertext" type="PackedByteArray"> - </argument> + <return type="PackedByteArray" /> + <argument index="0" name="key" type="CryptoKey" /> + <argument index="1" name="ciphertext" type="PackedByteArray" /> <description> Decrypt the given [code]ciphertext[/code] with the provided private [code]key[/code]. [b]Note[/b]: The maximum size of accepted ciphertext is limited by the key size. </description> </method> <method name="encrypt"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="key" type="CryptoKey"> - </argument> - <argument index="1" name="plaintext" type="PackedByteArray"> - </argument> + <return type="PackedByteArray" /> + <argument index="0" name="key" type="CryptoKey" /> + <argument index="1" name="plaintext" type="PackedByteArray" /> <description> Encrypt the given [code]plaintext[/code] with the provided public [code]key[/code]. [b]Note[/b]: The maximum size of accepted plaintext is limited by the key size. </description> </method> <method name="generate_random_bytes"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="size" type="int"> - </argument> + <return type="PackedByteArray" /> + <argument index="0" name="size" type="int" /> <description> Generates a [PackedByteArray] of cryptographically secure random bytes with given [code]size[/code]. </description> </method> <method name="generate_rsa"> - <return type="CryptoKey"> - </return> - <argument index="0" name="size" type="int"> - </argument> + <return type="CryptoKey" /> + <argument index="0" name="size" type="int" /> <description> Generates an RSA [CryptoKey] that can be used for creating self-signed certificates and passed to [method StreamPeerSSL.accept_stream]. </description> </method> <method name="generate_self_signed_certificate"> - <return type="X509Certificate"> - </return> - <argument index="0" name="key" type="CryptoKey"> - </argument> - <argument index="1" name="issuer_name" type="String" default=""CN=myserver,O=myorganisation,C=IT""> - </argument> - <argument index="2" name="not_before" type="String" default=""20140101000000""> - </argument> - <argument index="3" name="not_after" type="String" default=""20340101000000""> - </argument> + <return type="X509Certificate" /> + <argument index="0" name="key" type="CryptoKey" /> + <argument index="1" name="issuer_name" type="String" default=""CN=myserver,O=myorganisation,C=IT"" /> + <argument index="2" name="not_before" type="String" default=""20140101000000"" /> + <argument index="3" name="not_after" type="String" default=""20340101000000"" /> <description> Generates a self-signed [X509Certificate] from the given [CryptoKey] and [code]issuer_name[/code]. The certificate validity will be defined by [code]not_before[/code] and [code]not_after[/code] (first valid date and last valid date). The [code]issuer_name[/code] must contain at least "CN=" (common name, i.e. the domain name), "O=" (organization, i.e. your company name), "C=" (country, i.e. 2 lettered ISO-3166 code of the country the organization is based in). A small example to generate an RSA key and a X509 self-signed certificate. @@ -160,43 +142,30 @@ </description> </method> <method name="hmac_digest"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="hash_type" type="int" enum="HashingContext.HashType"> - </argument> - <argument index="1" name="key" type="PackedByteArray"> - </argument> - <argument index="2" name="msg" type="PackedByteArray"> - </argument> + <return type="PackedByteArray" /> + <argument index="0" name="hash_type" type="int" enum="HashingContext.HashType" /> + <argument index="1" name="key" type="PackedByteArray" /> + <argument index="2" name="msg" type="PackedByteArray" /> <description> Generates an [url=https://en.wikipedia.org/wiki/HMAC]HMAC[/url] digest of [code]msg[/code] using [code]key[/code]. The [code]hash_type[/code] parameter is the hashing algorithm that is used for the inner and outer hashes. Currently, only [constant HashingContext.HASH_SHA256] and [constant HashingContext.HASH_SHA1] are supported. </description> </method> <method name="sign"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="hash_type" type="int" enum="HashingContext.HashType"> - </argument> - <argument index="1" name="hash" type="PackedByteArray"> - </argument> - <argument index="2" name="key" type="CryptoKey"> - </argument> + <return type="PackedByteArray" /> + <argument index="0" name="hash_type" type="int" enum="HashingContext.HashType" /> + <argument index="1" name="hash" type="PackedByteArray" /> + <argument index="2" name="key" type="CryptoKey" /> <description> Sign a given [code]hash[/code] of type [code]hash_type[/code] with the provided private [code]key[/code]. </description> </method> <method name="verify"> - <return type="bool"> - </return> - <argument index="0" name="hash_type" type="int" enum="HashingContext.HashType"> - </argument> - <argument index="1" name="hash" type="PackedByteArray"> - </argument> - <argument index="2" name="signature" type="PackedByteArray"> - </argument> - <argument index="3" name="key" type="CryptoKey"> - </argument> + <return type="bool" /> + <argument index="0" name="hash_type" type="int" enum="HashingContext.HashType" /> + <argument index="1" name="hash" type="PackedByteArray" /> + <argument index="2" name="signature" type="PackedByteArray" /> + <argument index="3" name="key" type="CryptoKey" /> <description> Verify that a given [code]signature[/code] for [code]hash[/code] of type [code]hash_type[/code] against the provided public [code]key[/code]. </description> diff --git a/doc/classes/CryptoKey.xml b/doc/classes/CryptoKey.xml index 26b3087b21..afe2c6b301 100644 --- a/doc/classes/CryptoKey.xml +++ b/doc/classes/CryptoKey.xml @@ -12,52 +12,40 @@ </tutorials> <methods> <method name="is_public_only" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Return [code]true[/code] if this CryptoKey only has the public part, and not the private one. </description> </method> <method name="load"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="public_only" type="bool" default="false"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="public_only" type="bool" default="false" /> <description> Loads a key from [code]path[/code]. If [code]public_only[/code] is [code]true[/code], only the public key will be loaded. [b]Note[/b]: [code]path[/code] should be a "*.pub" file if [code]public_only[/code] is [code]true[/code], a "*.key" file otherwise. </description> </method> <method name="load_from_string"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="string_key" type="String"> - </argument> - <argument index="1" name="public_only" type="bool" default="false"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="string_key" type="String" /> + <argument index="1" name="public_only" type="bool" default="false" /> <description> Loads a key from the given [code]string[/code]. If [code]public_only[/code] is [code]true[/code], only the public key will be loaded. </description> </method> <method name="save"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="public_only" type="bool" default="false"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="public_only" type="bool" default="false" /> <description> Saves a key to the given [code]path[/code]. If [code]public_only[/code] is [code]true[/code], only the public key will be saved. [b]Note[/b]: [code]path[/code] should be a "*.pub" file if [code]public_only[/code] is [code]true[/code], a "*.key" file otherwise. </description> </method> <method name="save_to_string"> - <return type="String"> - </return> - <argument index="0" name="public_only" type="bool" default="false"> - </argument> + <return type="String" /> + <argument index="0" name="public_only" type="bool" default="false" /> <description> Returns a string containing the key in PEM format. If [code]public_only[/code] is [code]true[/code], only the public key will be included. </description> diff --git a/doc/classes/Curve.xml b/doc/classes/Curve.xml index e47c420a3b..2c337c32db 100644 --- a/doc/classes/Curve.xml +++ b/doc/classes/Curve.xml @@ -10,184 +10,140 @@ </tutorials> <methods> <method name="add_point"> - <return type="int"> - </return> - <argument index="0" name="position" type="Vector2"> - </argument> - <argument index="1" name="left_tangent" type="float" default="0"> - </argument> - <argument index="2" name="right_tangent" type="float" default="0"> - </argument> - <argument index="3" name="left_mode" type="int" enum="Curve.TangentMode" default="0"> - </argument> - <argument index="4" name="right_mode" type="int" enum="Curve.TangentMode" default="0"> - </argument> + <return type="int" /> + <argument index="0" name="position" type="Vector2" /> + <argument index="1" name="left_tangent" type="float" default="0" /> + <argument index="2" name="right_tangent" type="float" default="0" /> + <argument index="3" name="left_mode" type="int" enum="Curve.TangentMode" default="0" /> + <argument index="4" name="right_mode" type="int" enum="Curve.TangentMode" default="0" /> <description> Adds a point to the curve. For each side, if the [code]*_mode[/code] is [constant TANGENT_LINEAR], the [code]*_tangent[/code] angle (in degrees) uses the slope of the curve halfway to the adjacent point. Allows custom assignments to the [code]*_tangent[/code] angle if [code]*_mode[/code] is set to [constant TANGENT_FREE]. </description> </method> <method name="bake"> - <return type="void"> - </return> + <return type="void" /> <description> Recomputes the baked cache of points for the curve. </description> </method> <method name="clean_dupes"> - <return type="void"> - </return> + <return type="void" /> <description> Removes points that are closer than [code]CMP_EPSILON[/code] (0.00001) units to their neighbor on the curve. </description> </method> <method name="clear_points"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all points from the curve. </description> </method> <method name="get_point_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of points describing the curve. </description> </method> <method name="get_point_left_mode" qualifiers="const"> - <return type="int" enum="Curve.TangentMode"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="int" enum="Curve.TangentMode" /> + <argument index="0" name="index" type="int" /> <description> Returns the left [enum TangentMode] for the point at [code]index[/code]. </description> </method> <method name="get_point_left_tangent" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="index" type="int" /> <description> Returns the left tangent angle (in degrees) for the point at [code]index[/code]. </description> </method> <method name="get_point_position" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="index" type="int" /> <description> Returns the curve coordinates for the point at [code]index[/code]. </description> </method> <method name="get_point_right_mode" qualifiers="const"> - <return type="int" enum="Curve.TangentMode"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="int" enum="Curve.TangentMode" /> + <argument index="0" name="index" type="int" /> <description> Returns the right [enum TangentMode] for the point at [code]index[/code]. </description> </method> <method name="get_point_right_tangent" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="index" type="int" /> <description> Returns the right tangent angle (in degrees) for the point at [code]index[/code]. </description> </method> <method name="interpolate" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="offset" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="offset" type="float" /> <description> Returns the Y value for the point that would exist at the X position [code]offset[/code] along the curve. </description> </method> <method name="interpolate_baked" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="offset" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="offset" type="float" /> <description> Returns the Y value for the point that would exist at the X position [code]offset[/code] along the curve using the baked cache. Bakes the curve's points if not already baked. </description> </method> <method name="remove_point"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> <description> Removes the point at [code]index[/code] from the curve. </description> </method> <method name="set_point_left_mode"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="mode" type="int" enum="Curve.TangentMode"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> + <argument index="1" name="mode" type="int" enum="Curve.TangentMode" /> <description> Sets the left [enum TangentMode] for the point at [code]index[/code] to [code]mode[/code]. </description> </method> <method name="set_point_left_tangent"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="tangent" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> + <argument index="1" name="tangent" type="float" /> <description> Sets the left tangent angle for the point at [code]index[/code] to [code]tangent[/code]. </description> </method> <method name="set_point_offset"> - <return type="int"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="offset" type="float"> - </argument> + <return type="int" /> + <argument index="0" name="index" type="int" /> + <argument index="1" name="offset" type="float" /> <description> Sets the offset from [code]0.5[/code]. </description> </method> <method name="set_point_right_mode"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="mode" type="int" enum="Curve.TangentMode"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> + <argument index="1" name="mode" type="int" enum="Curve.TangentMode" /> <description> Sets the right [enum TangentMode] for the point at [code]index[/code] to [code]mode[/code]. </description> </method> <method name="set_point_right_tangent"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="tangent" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> + <argument index="1" name="tangent" type="float" /> <description> Sets the right tangent angle for the point at [code]index[/code] to [code]tangent[/code]. </description> </method> <method name="set_point_value"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="y" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> + <argument index="1" name="y" type="float" /> <description> Assigns the vertical position [code]y[/code] to the point at [code]index[/code]. </description> diff --git a/doc/classes/Curve2D.xml b/doc/classes/Curve2D.xml index c9fcbd2892..c02b0f7ead 100644 --- a/doc/classes/Curve2D.xml +++ b/doc/classes/Curve2D.xml @@ -11,115 +11,90 @@ </tutorials> <methods> <method name="add_point"> - <return type="void"> - </return> - <argument index="0" name="position" type="Vector2"> - </argument> - <argument index="1" name="in" type="Vector2" default="Vector2(0, 0)"> - </argument> - <argument index="2" name="out" type="Vector2" default="Vector2(0, 0)"> - </argument> - <argument index="3" name="at_position" type="int" default="-1"> - </argument> + <return type="void" /> + <argument index="0" name="position" type="Vector2" /> + <argument index="1" name="in" type="Vector2" default="Vector2(0, 0)" /> + <argument index="2" name="out" type="Vector2" default="Vector2(0, 0)" /> + <argument index="3" name="at_position" type="int" default="-1" /> <description> Adds a point to a curve at [code]position[/code], with control points [code]in[/code] and [code]out[/code]. If [code]at_position[/code] is given, the point is inserted before the point number [code]at_position[/code], moving that point (and every point after) after the inserted point. If [code]at_position[/code] is not given, or is an illegal value ([code]at_position <0[/code] or [code]at_position >= [method get_point_count][/code]), the point will be appended at the end of the point list. </description> </method> <method name="clear_points"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all points from the curve. </description> </method> <method name="get_baked_length" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the total length of the curve, based on the cached points. Given enough density (see [member bake_interval]), it should be approximate enough. </description> </method> <method name="get_baked_points" qualifiers="const"> - <return type="PackedVector2Array"> - </return> + <return type="PackedVector2Array" /> <description> Returns the cache of points as a [PackedVector2Array]. </description> </method> <method name="get_closest_offset" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="to_point" type="Vector2"> - </argument> + <return type="float" /> + <argument index="0" name="to_point" type="Vector2" /> <description> Returns the closest offset to [code]to_point[/code]. This offset is meant to be used in [method interpolate_baked]. [code]to_point[/code] must be in this curve's local space. </description> </method> <method name="get_closest_point" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="to_point" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="to_point" type="Vector2" /> <description> Returns the closest baked point (in curve's local space) to [code]to_point[/code]. [code]to_point[/code] must be in this curve's local space. </description> </method> <method name="get_point_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of points describing the curve. </description> </method> <method name="get_point_in" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="idx" type="int" /> <description> Returns the position of the control point leading to the vertex [code]idx[/code]. The returned position is relative to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code]. </description> </method> <method name="get_point_out" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="idx" type="int" /> <description> Returns the position of the control point leading out of the vertex [code]idx[/code]. The returned position is relative to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code]. </description> </method> <method name="get_point_position" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="idx" type="int" /> <description> Returns the position of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0)[/code]. </description> </method> <method name="interpolate" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="t" type="float"> - </argument> + <return type="Vector2" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="t" type="float" /> <description> Returns the position between the vertex [code]idx[/code] and the vertex [code]idx + 1[/code], where [code]t[/code] controls if the point is the first vertex ([code]t = 0.0[/code]), the last vertex ([code]t = 1.0[/code]), or in between. Values of [code]t[/code] outside the range ([code]0.0 >= t <=1[/code]) give strange, but predictable results. If [code]idx[/code] is out of bounds it is truncated to the first or last vertex, and [code]t[/code] is ignored. If the curve has no points, the function sends an error to the console, and returns [code](0, 0)[/code]. </description> </method> <method name="interpolate_baked" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="offset" type="float"> - </argument> - <argument index="1" name="cubic" type="bool" default="false"> - </argument> + <return type="Vector2" /> + <argument index="0" name="offset" type="float" /> + <argument index="1" name="cubic" type="bool" default="false" /> <description> Returns a point within the curve at position [code]offset[/code], where [code]offset[/code] is measured as a pixel distance along the curve. To do that, it finds the two cached points where the [code]offset[/code] lies between, then interpolates the values. This interpolation is cubic if [code]cubic[/code] is set to [code]true[/code], or linear if set to [code]false[/code]. @@ -127,63 +102,47 @@ </description> </method> <method name="interpolatef" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="fofs" type="float"> - </argument> + <return type="Vector2" /> + <argument index="0" name="fofs" type="float" /> <description> Returns the position at the vertex [code]fofs[/code]. It calls [method interpolate] using the integer part of [code]fofs[/code] as [code]idx[/code], and its fractional part as [code]t[/code]. </description> </method> <method name="remove_point"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> <description> Deletes the point [code]idx[/code] from the curve. Sends an error to the console if [code]idx[/code] is out of bounds. </description> </method> <method name="set_point_in"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="position" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="position" type="Vector2" /> <description> Sets the position of the control point leading to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex. </description> </method> <method name="set_point_out"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="position" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="position" type="Vector2" /> <description> Sets the position of the control point leading out of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex. </description> </method> <method name="set_point_position"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="position" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="position" type="Vector2" /> <description> Sets the position for the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. </description> </method> <method name="tessellate" qualifiers="const"> - <return type="PackedVector2Array"> - </return> - <argument index="0" name="max_stages" type="int" default="5"> - </argument> - <argument index="1" name="tolerance_degrees" type="float" default="4"> - </argument> + <return type="PackedVector2Array" /> + <argument index="0" name="max_stages" type="int" default="5" /> + <argument index="1" name="tolerance_degrees" type="float" default="4" /> <description> Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts. This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough. diff --git a/doc/classes/Curve3D.xml b/doc/classes/Curve3D.xml index fdf96b4262..5839ccba02 100644 --- a/doc/classes/Curve3D.xml +++ b/doc/classes/Curve3D.xml @@ -11,139 +11,110 @@ </tutorials> <methods> <method name="add_point"> - <return type="void"> - </return> - <argument index="0" name="position" type="Vector3"> - </argument> - <argument index="1" name="in" type="Vector3" default="Vector3(0, 0, 0)"> - </argument> - <argument index="2" name="out" type="Vector3" default="Vector3(0, 0, 0)"> - </argument> - <argument index="3" name="at_position" type="int" default="-1"> - </argument> + <return type="void" /> + <argument index="0" name="position" type="Vector3" /> + <argument index="1" name="in" type="Vector3" default="Vector3(0, 0, 0)" /> + <argument index="2" name="out" type="Vector3" default="Vector3(0, 0, 0)" /> + <argument index="3" name="at_position" type="int" default="-1" /> <description> Adds a point to a curve at [code]position[/code], with control points [code]in[/code] and [code]out[/code]. If [code]at_position[/code] is given, the point is inserted before the point number [code]at_position[/code], moving that point (and every point after) after the inserted point. If [code]at_position[/code] is not given, or is an illegal value ([code]at_position <0[/code] or [code]at_position >= [method get_point_count][/code]), the point will be appended at the end of the point list. </description> </method> <method name="clear_points"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all points from the curve. </description> </method> <method name="get_baked_length" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the total length of the curve, based on the cached points. Given enough density (see [member bake_interval]), it should be approximate enough. </description> </method> <method name="get_baked_points" qualifiers="const"> - <return type="PackedVector3Array"> - </return> + <return type="PackedVector3Array" /> <description> Returns the cache of points as a [PackedVector3Array]. </description> </method> <method name="get_baked_tilts" qualifiers="const"> - <return type="PackedFloat32Array"> - </return> + <return type="PackedFloat32Array" /> <description> Returns the cache of tilts as a [PackedFloat32Array]. </description> </method> <method name="get_baked_up_vectors" qualifiers="const"> - <return type="PackedVector3Array"> - </return> + <return type="PackedVector3Array" /> <description> Returns the cache of up vectors as a [PackedVector3Array]. If [member up_vector_enabled] is [code]false[/code], the cache will be empty. </description> </method> <method name="get_closest_offset" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="to_point" type="Vector3"> - </argument> + <return type="float" /> + <argument index="0" name="to_point" type="Vector3" /> <description> Returns the closest offset to [code]to_point[/code]. This offset is meant to be used in [method interpolate_baked] or [method interpolate_baked_up_vector]. [code]to_point[/code] must be in this curve's local space. </description> </method> <method name="get_closest_point" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="to_point" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="to_point" type="Vector3" /> <description> Returns the closest baked point (in curve's local space) to [code]to_point[/code]. [code]to_point[/code] must be in this curve's local space. </description> </method> <method name="get_point_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of points describing the curve. </description> </method> <method name="get_point_in" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Vector3" /> + <argument index="0" name="idx" type="int" /> <description> Returns the position of the control point leading to the vertex [code]idx[/code]. The returned position is relative to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code]. </description> </method> <method name="get_point_out" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Vector3" /> + <argument index="0" name="idx" type="int" /> <description> Returns the position of the control point leading out of the vertex [code]idx[/code]. The returned position is relative to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code]. </description> </method> <method name="get_point_position" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Vector3" /> + <argument index="0" name="idx" type="int" /> <description> Returns the position of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code](0, 0, 0)[/code]. </description> </method> <method name="get_point_tilt" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="idx" type="int" /> <description> Returns the tilt angle in radians for the point [code]idx[/code]. If the index is out of bounds, the function sends an error to the console, and returns [code]0[/code]. </description> </method> <method name="interpolate" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="t" type="float"> - </argument> + <return type="Vector3" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="t" type="float" /> <description> Returns the position between the vertex [code]idx[/code] and the vertex [code]idx + 1[/code], where [code]t[/code] controls if the point is the first vertex ([code]t = 0.0[/code]), the last vertex ([code]t = 1.0[/code]), or in between. Values of [code]t[/code] outside the range ([code]0.0 >= t <=1[/code]) give strange, but predictable results. If [code]idx[/code] is out of bounds it is truncated to the first or last vertex, and [code]t[/code] is ignored. If the curve has no points, the function sends an error to the console, and returns [code](0, 0, 0)[/code]. </description> </method> <method name="interpolate_baked" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="offset" type="float"> - </argument> - <argument index="1" name="cubic" type="bool" default="false"> - </argument> + <return type="Vector3" /> + <argument index="0" name="offset" type="float" /> + <argument index="1" name="cubic" type="bool" default="false" /> <description> Returns a point within the curve at position [code]offset[/code], where [code]offset[/code] is measured as a distance in 3D units along the curve. To do that, it finds the two cached points where the [code]offset[/code] lies between, then interpolates the values. This interpolation is cubic if [code]cubic[/code] is set to [code]true[/code], or linear if set to [code]false[/code]. @@ -151,12 +122,9 @@ </description> </method> <method name="interpolate_baked_up_vector" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="offset" type="float"> - </argument> - <argument index="1" name="apply_tilt" type="bool" default="false"> - </argument> + <return type="Vector3" /> + <argument index="0" name="offset" type="float" /> + <argument index="1" name="apply_tilt" type="bool" default="false" /> <description> Returns an up vector within the curve at position [code]offset[/code], where [code]offset[/code] is measured as a distance in 3D units along the curve. To do that, it finds the two cached up vectors where the [code]offset[/code] lies between, then interpolates the values. If [code]apply_tilt[/code] is [code]true[/code], an interpolated tilt is applied to the interpolated up vector. @@ -164,75 +132,56 @@ </description> </method> <method name="interpolatef" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="fofs" type="float"> - </argument> + <return type="Vector3" /> + <argument index="0" name="fofs" type="float" /> <description> Returns the position at the vertex [code]fofs[/code]. It calls [method interpolate] using the integer part of [code]fofs[/code] as [code]idx[/code], and its fractional part as [code]t[/code]. </description> </method> <method name="remove_point"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> <description> Deletes the point [code]idx[/code] from the curve. Sends an error to the console if [code]idx[/code] is out of bounds. </description> </method> <method name="set_point_in"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="position" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="position" type="Vector3" /> <description> Sets the position of the control point leading to the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex. </description> </method> <method name="set_point_out"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="position" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="position" type="Vector3" /> <description> Sets the position of the control point leading out of the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. The position is relative to the vertex. </description> </method> <method name="set_point_position"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="position" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="position" type="Vector3" /> <description> Sets the position for the vertex [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. </description> </method> <method name="set_point_tilt"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="tilt" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="tilt" type="float" /> <description> Sets the tilt angle in radians for the point [code]idx[/code]. If the index is out of bounds, the function sends an error to the console. The tilt controls the rotation along the look-at axis an object traveling the path would have. In the case of a curve controlling a [PathFollow3D], this tilt is an offset over the natural tilt the [PathFollow3D] calculates. </description> </method> <method name="tessellate" qualifiers="const"> - <return type="PackedVector3Array"> - </return> - <argument index="0" name="max_stages" type="int" default="5"> - </argument> - <argument index="1" name="tolerance_degrees" type="float" default="4"> - </argument> + <return type="PackedVector3Array" /> + <argument index="0" name="max_stages" type="int" default="5" /> + <argument index="1" name="tolerance_degrees" type="float" default="4" /> <description> Returns a list of points along the curve, with a curvature controlled point density. That is, the curvier parts will have more points than the straighter parts. This approximation makes straight segments between each point, then subdivides those segments until the resulting shape is similar enough. diff --git a/doc/classes/Curve3Texture.xml b/doc/classes/CurveXYZTexture.xml index 1b352dff0d..9afeb58060 100644 --- a/doc/classes/Curve3Texture.xml +++ b/doc/classes/CurveXYZTexture.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="Curve3Texture" inherits="Texture2D" version="4.0"> +<class name="CurveXYZTexture" inherits="Texture2D" version="4.0"> <brief_description> </brief_description> <description> diff --git a/doc/classes/DTLSServer.xml b/doc/classes/DTLSServer.xml index 28d68d309f..627a7a65a5 100644 --- a/doc/classes/DTLSServer.xml +++ b/doc/classes/DTLSServer.xml @@ -147,23 +147,17 @@ </tutorials> <methods> <method name="setup"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="key" type="CryptoKey"> - </argument> - <argument index="1" name="certificate" type="X509Certificate"> - </argument> - <argument index="2" name="chain" type="X509Certificate" default="null"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="key" type="CryptoKey" /> + <argument index="1" name="certificate" type="X509Certificate" /> + <argument index="2" name="chain" type="X509Certificate" default="null" /> <description> Setup the DTLS server to use the given [code]private_key[/code] and provide the given [code]certificate[/code] to clients. You can pass the optional [code]chain[/code] parameter to provide additional CA chain information along with the certificate. </description> </method> <method name="take_connection"> - <return type="PacketPeerDTLS"> - </return> - <argument index="0" name="udp_peer" type="PacketPeerUDP"> - </argument> + <return type="PacketPeerDTLS" /> + <argument index="0" name="udp_peer" type="PacketPeerUDP" /> <description> Try to initiate the DTLS handshake with the given [code]udp_peer[/code] which must be already connected (see [method PacketPeerUDP.connect_to_host]). [b]Note[/b]: You must check that the state of the return PacketPeerUDP is [constant PacketPeerDTLS.STATUS_HANDSHAKING], as it is normal that 50% of the new connections will be invalid due to cookie exchange. diff --git a/doc/classes/Decal.xml b/doc/classes/Decal.xml index e84cea7c30..e993fc6198 100644 --- a/doc/classes/Decal.xml +++ b/doc/classes/Decal.xml @@ -12,10 +12,8 @@ </tutorials> <methods> <method name="get_texture" qualifiers="const"> - <return type="Texture2D"> - </return> - <argument index="0" name="type" type="int" enum="Decal.DecalTexture"> - </argument> + <return type="Texture2D" /> + <argument index="0" name="type" type="int" enum="Decal.DecalTexture" /> <description> Returns the [Texture2D] associated with the specified [enum DecalTexture]. This is a convenience method, in most cases you should access the texture directly. For example, instead of [code]albedo_tex = $Decal.get_texture(Decal.TEXTURE_ALBEDO)[/code], use [code]albedo_tex = $Decal.texture_albedo[/code]. @@ -35,12 +33,9 @@ </description> </method> <method name="set_texture"> - <return type="void"> - </return> - <argument index="0" name="type" type="int" enum="Decal.DecalTexture"> - </argument> - <argument index="1" name="texture" type="Texture2D"> - </argument> + <return type="void" /> + <argument index="0" name="type" type="int" enum="Decal.DecalTexture" /> + <argument index="1" name="texture" type="Texture2D" /> <description> Sets the [Texture2D] associated with the specified [enum DecalTexture]. This is a convenience method, in most cases you should access the texture directly. For example, instead of [code]$Decal.set_texture(Decal.TEXTURE_ALBEDO, albedo_tex)[/code], use [code]$Decal.texture_albedo = albedo_tex[/code]. diff --git a/doc/classes/Dictionary.xml b/doc/classes/Dictionary.xml index 16c4348994..59088f33fd 100644 --- a/doc/classes/Dictionary.xml +++ b/doc/classes/Dictionary.xml @@ -184,62 +184,49 @@ </tutorials> <methods> <method name="Dictionary" qualifiers="constructor"> - <return type="Dictionary"> - </return> + <return type="Dictionary" /> <description> Constructs an empty [Dictionary]. </description> </method> <method name="Dictionary" qualifiers="constructor"> - <return type="Dictionary"> - </return> - <argument index="0" name="from" type="Dictionary"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="from" type="Dictionary" /> <description> Constructs a [Dictionary] as a copy of the given [Dictionary]. </description> </method> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> Clear the dictionary, removing all key/value pairs. </description> </method> <method name="duplicate" qualifiers="const"> - <return type="Dictionary"> - </return> - <argument index="0" name="deep" type="bool" default="false"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="deep" type="bool" default="false" /> <description> Creates a copy of the dictionary, and returns it. The [code]deep[/code] parameter causes inner dictionaries and arrays to be copied recursively, but does not apply to objects. </description> </method> <method name="erase"> - <return type="bool"> - </return> - <argument index="0" name="key" type="Variant"> - </argument> + <return type="bool" /> + <argument index="0" name="key" type="Variant" /> <description> Erase a dictionary key/value pair by key. Returns [code]true[/code] if the given key was present in the dictionary, [code]false[/code] otherwise. Does not erase elements while iterating over the dictionary. </description> </method> <method name="get" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="key" type="Variant"> - </argument> - <argument index="1" name="default" type="Variant" default="null"> - </argument> + <return type="Variant" /> + <argument index="0" name="key" type="Variant" /> + <argument index="1" name="default" type="Variant" default="null" /> <description> Returns the current value for the specified key in the [Dictionary]. If the key does not exist, the method returns the value of the optional default argument, or [code]null[/code] if it is omitted. </description> </method> <method name="has" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="key" type="Variant"> - </argument> + <return type="bool" /> + <argument index="0" name="key" type="Variant" /> <description> Returns [code]true[/code] if the dictionary has a given key. [b]Note:[/b] This is equivalent to using the [code]in[/code] operator as follows: @@ -261,17 +248,14 @@ </description> </method> <method name="has_all" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="keys" type="Array"> - </argument> + <return type="bool" /> + <argument index="0" name="keys" type="Array" /> <description> Returns [code]true[/code] if the dictionary has all the keys in the given array. </description> </method> <method name="hash" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns a hashed integer value representing the dictionary contents. This can be used to compare dictionaries by value: [codeblocks] @@ -293,53 +277,43 @@ </description> </method> <method name="is_empty" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the dictionary is empty. </description> </method> <method name="keys" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns the list of keys in the [Dictionary]. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Dictionary"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Dictionary" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Dictionary"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Dictionary" /> <description> </description> </method> <method name="operator []" qualifiers="operator"> - <return type="Variant"> - </return> - <argument index="0" name="key" type="Variant"> - </argument> + <return type="Variant" /> + <argument index="0" name="key" type="Variant" /> <description> </description> </method> <method name="size" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of keys in the dictionary. </description> </method> <method name="values" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns the list of values in the [Dictionary]. </description> diff --git a/doc/classes/DirectionalLight3D.xml b/doc/classes/DirectionalLight3D.xml index 4f51adb8fc..e3badea0f4 100644 --- a/doc/classes/DirectionalLight3D.xml +++ b/doc/classes/DirectionalLight3D.xml @@ -36,8 +36,7 @@ <member name="directional_shadow_split_3" type="float" setter="set_param" getter="get_param" default="0.5"> The distance from shadow split 2 to split 3. Relative to [member directional_shadow_max_distance]. Only used when [member directional_shadow_mode] is [code]SHADOW_PARALLEL_4_SPLITS[/code]. </member> - <member name="shadow_bias" type="float" setter="set_param" getter="get_param" override="true" default="0.05" /> - <member name="shadow_normal_bias" type="float" setter="set_param" getter="get_param" override="true" default="1.0" /> + <member name="shadow_bias" type="float" setter="set_param" getter="get_param" override="true" default="0.1" /> <member name="use_in_sky_only" type="bool" setter="set_sky_only" getter="is_sky_only" default="false"> If [code]true[/code], this [DirectionalLight3D] will not be used for anything except sky shaders. Use this for lights that impact your sky shader that you may want to hide from affecting the rest of the scene. For example, you may want to enable this when the sun in your sky shader falls below the horizon. </member> diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml index dae8d83f0c..e8e5a286b4 100644 --- a/doc/classes/Directory.xml +++ b/doc/classes/Directory.xml @@ -58,168 +58,136 @@ </tutorials> <methods> <method name="change_dir"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="todir" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="todir" type="String" /> <description> Changes the currently opened directory to the one passed as an argument. The argument can be relative to the current directory (e.g. [code]newdir[/code] or [code]../newdir[/code]), or an absolute path (e.g. [code]/tmp/newdir[/code] or [code]res://somedir/newdir[/code]). Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="copy"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="from" type="String"> - </argument> - <argument index="1" name="to" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="from" type="String" /> + <argument index="1" name="to" type="String" /> <description> Copies the [code]from[/code] file to the [code]to[/code] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="current_is_dir" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns whether the current item processed with the last [method get_next] call is a directory ([code].[/code] and [code]..[/code] are considered directories). </description> </method> <method name="dir_exists"> - <return type="bool"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="path" type="String" /> <description> Returns whether the target directory exists. The argument can be relative to the current directory, or an absolute path. If the [Directory] is not open, the path is relative to [code]res://[/code]. </description> </method> <method name="file_exists"> - <return type="bool"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="path" type="String" /> <description> Returns whether the target file exists. The argument can be relative to the current directory, or an absolute path. If the [Directory] is not open, the path is relative to [code]res://[/code]. </description> </method> <method name="get_current_dir"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the absolute path to the currently opened directory (e.g. [code]res://folder[/code] or [code]C:\tmp\folder[/code]). </description> </method> <method name="get_current_drive"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the currently opened directory's drive index. See [method get_drive] to convert returned index to the name of the drive. </description> </method> <method name="get_drive"> - <return type="String"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="idx" type="int" /> <description> On Windows, returns the name of the drive (partition) passed as an argument (e.g. [code]C:[/code]). On other platforms, or if the requested drive does not exist, the method returns an empty String. </description> </method> <method name="get_drive_count"> - <return type="int"> - </return> + <return type="int" /> <description> On Windows, returns the number of drives (partitions) mounted on the current filesystem. On other platforms, the method returns 0. </description> </method> <method name="get_next"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the next element (file or directory) in the current directory (including [code].[/code] and [code]..[/code], unless [code]skip_navigational[/code] was given to [method list_dir_begin]). The name of the file or directory is returned (and not its full path). Once the stream has been fully processed, the method returns an empty String and closes the stream automatically (i.e. [method list_dir_end] would not be mandatory in such a case). </description> </method> <method name="get_space_left"> - <return type="int"> - </return> + <return type="int" /> <description> On UNIX desktop systems, returns the available space on the current directory's disk. On other platforms, this information is not available and the method returns 0 or -1. </description> </method> <method name="list_dir_begin"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="show_navigational" type="bool" default="false"> - </argument> - <argument index="1" name="show_hidden" type="bool" default="false"> - </argument> - <description> - Initializes the stream used to list all files and directories using the [method get_next] function, closing the current opened stream if needed. Once the stream has been processed, it should typically be closed with [method list_dir_end]. + <return type="int" enum="Error" /> + <argument index="0" name="show_navigational" type="bool" default="false" /> + <argument index="1" name="show_hidden" type="bool" default="false" /> + <description> + Initializes the stream used to list all files and directories using the [method get_next] function, closing the currently opened stream if needed. Once the stream has been processed, it should typically be closed with [method list_dir_end]. If [code]show_navigational[/code] is [code]true[/code], [code].[/code] and [code]..[/code] are included too. If [code]show_hidden[/code] is [code]true[/code], hidden files are included too. </description> </method> <method name="list_dir_end"> - <return type="void"> - </return> + <return type="void" /> <description> Closes the current stream opened with [method list_dir_begin] (whether it has been fully processed with [method get_next] does not matter). </description> </method> <method name="make_dir"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> <description> Creates a directory. The argument can be relative to the current directory, or an absolute path. The target directory should be placed in an already existing directory (to create the full path recursively, see [method make_dir_recursive]). Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="make_dir_recursive"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> <description> Creates a target directory and all necessary intermediate directories in its path, by calling [method make_dir] recursively. The argument can be relative to the current directory, or an absolute path. Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="open"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> <description> Opens an existing directory of the filesystem. The [code]path[/code] argument can be within the project tree ([code]res://folder[/code]), the user directory ([code]user://folder[/code]) or an absolute path of the user filesystem (e.g. [code]/tmp/folder[/code] or [code]C:\tmp\folder[/code]). Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="remove"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> <description> Deletes the target file or an empty directory. The argument can be relative to the current directory, or an absolute path. If the target directory is not empty, the operation will fail. Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="rename"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="from" type="String"> - </argument> - <argument index="1" name="to" type="String"> - </argument> - <description> - Renames (move) the [code]from[/code] file to the [code]to[/code] destination. Both arguments should be paths to files, either relative or absolute. If the destination file exists and is not access-protected, it will be overwritten. + <return type="int" enum="Error" /> + <argument index="0" name="from" type="String" /> + <argument index="1" name="to" type="String" /> + <description> + Renames (move) the [code]from[/code] file or directory to the [code]to[/code] destination. Both arguments should be paths to files or directories, either relative or absolute. If the destination file or directory exists and is not access-protected, it will be overwritten. Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index 17b51d5cbe..4f495eaec9 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -7,481 +7,346 @@ <tutorials> </tutorials> <methods> - <method name="alert"> - <return type="void"> - </return> - <argument index="0" name="text" type="String"> - </argument> - <argument index="1" name="title" type="String" default=""Alert!""> - </argument> - <description> - </description> - </method> <method name="clipboard_get" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> </description> </method> <method name="clipboard_set"> - <return type="void"> - </return> - <argument index="0" name="clipboard" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="clipboard" type="String" /> <description> </description> </method> <method name="console_set_visible"> - <return type="void"> - </return> - <argument index="0" name="console_visible" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="console_visible" type="bool" /> <description> </description> </method> <method name="create_sub_window"> - <return type="int"> - </return> - <argument index="0" name="mode" type="int" enum="DisplayServer.WindowMode"> - </argument> - <argument index="1" name="vsync_mode" type="int" enum="DisplayServer.VSyncMode"> - </argument> - <argument index="2" name="flags" type="int"> - </argument> - <argument index="3" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)"> - </argument> + <return type="int" /> + <argument index="0" name="mode" type="int" enum="DisplayServer.WindowMode" /> + <argument index="1" name="vsync_mode" type="int" enum="DisplayServer.VSyncMode" /> + <argument index="2" name="flags" type="int" /> + <argument index="3" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)" /> <description> </description> </method> <method name="cursor_get_shape" qualifiers="const"> - <return type="int" enum="DisplayServer.CursorShape"> - </return> + <return type="int" enum="DisplayServer.CursorShape" /> <description> </description> </method> <method name="cursor_set_custom_image"> - <return type="void"> - </return> - <argument index="0" name="cursor" type="Resource"> - </argument> - <argument index="1" name="shape" type="int" enum="DisplayServer.CursorShape" default="0"> - </argument> - <argument index="2" name="hotspot" type="Vector2" default="Vector2(0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="cursor" type="Resource" /> + <argument index="1" name="shape" type="int" enum="DisplayServer.CursorShape" default="0" /> + <argument index="2" name="hotspot" type="Vector2" default="Vector2(0, 0)" /> <description> </description> </method> <method name="cursor_set_shape"> - <return type="void"> - </return> - <argument index="0" name="shape" type="int" enum="DisplayServer.CursorShape"> - </argument> + <return type="void" /> + <argument index="0" name="shape" type="int" enum="DisplayServer.CursorShape" /> <description> </description> </method> <method name="delete_sub_window"> - <return type="void"> - </return> - <argument index="0" name="window_id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="window_id" type="int" /> <description> </description> </method> <method name="dialog_input_text"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="title" type="String"> - </argument> - <argument index="1" name="description" type="String"> - </argument> - <argument index="2" name="existing_text" type="String"> - </argument> - <argument index="3" name="callback" type="Callable"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="title" type="String" /> + <argument index="1" name="description" type="String" /> + <argument index="2" name="existing_text" type="String" /> + <argument index="3" name="callback" type="Callable" /> <description> </description> </method> <method name="dialog_show"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="title" type="String"> - </argument> - <argument index="1" name="description" type="String"> - </argument> - <argument index="2" name="buttons" type="PackedStringArray"> - </argument> - <argument index="3" name="callback" type="Callable"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="title" type="String" /> + <argument index="1" name="description" type="String" /> + <argument index="2" name="buttons" type="PackedStringArray" /> + <argument index="3" name="callback" type="Callable" /> <description> </description> </method> <method name="enable_for_stealing_focus"> - <return type="void"> - </return> - <argument index="0" name="process_id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="process_id" type="int" /> <description> </description> </method> <method name="force_process_and_drop_events"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> <method name="get_name" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> </description> </method> <method name="get_screen_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> <method name="get_swap_cancel_ok"> - <return type="bool"> - </return> + <return type="bool" /> <description> </description> </method> <method name="get_window_at_screen_position" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="position" type="Vector2i"> - </argument> + <return type="int" /> + <argument index="0" name="position" type="Vector2i" /> <description> </description> </method> <method name="get_window_list" qualifiers="const"> - <return type="PackedInt32Array"> - </return> + <return type="PackedInt32Array" /> <description> </description> </method> <method name="global_menu_add_check_item"> - <return type="void"> - </return> - <argument index="0" name="menu_root" type="String"> - </argument> - <argument index="1" name="label" type="String"> - </argument> - <argument index="2" name="callback" type="Callable"> - </argument> - <argument index="3" name="tag" type="Variant" default="null"> - </argument> + <return type="void" /> + <argument index="0" name="menu_root" type="String" /> + <argument index="1" name="label" type="String" /> + <argument index="2" name="callback" type="Callable" /> + <argument index="3" name="tag" type="Variant" default="null" /> <description> </description> </method> <method name="global_menu_add_item"> - <return type="void"> - </return> - <argument index="0" name="menu_root" type="String"> - </argument> - <argument index="1" name="label" type="String"> - </argument> - <argument index="2" name="callback" type="Callable"> - </argument> - <argument index="3" name="tag" type="Variant" default="null"> - </argument> + <return type="void" /> + <argument index="0" name="menu_root" type="String" /> + <argument index="1" name="label" type="String" /> + <argument index="2" name="callback" type="Callable" /> + <argument index="3" name="tag" type="Variant" default="null" /> <description> </description> </method> <method name="global_menu_add_separator"> - <return type="void"> - </return> - <argument index="0" name="menu_root" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="menu_root" type="String" /> <description> </description> </method> <method name="global_menu_add_submenu_item"> - <return type="void"> - </return> - <argument index="0" name="menu_root" type="String"> - </argument> - <argument index="1" name="label" type="String"> - </argument> - <argument index="2" name="submenu" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="menu_root" type="String" /> + <argument index="1" name="label" type="String" /> + <argument index="2" name="submenu" type="String" /> <description> </description> </method> <method name="global_menu_clear"> - <return type="void"> - </return> - <argument index="0" name="menu_root" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="menu_root" type="String" /> <description> </description> </method> <method name="global_menu_get_item_callback"> - <return type="Callable"> - </return> - <argument index="0" name="menu_root" type="String"> - </argument> - <argument index="1" name="idx" type="int"> - </argument> + <return type="Callable" /> + <argument index="0" name="menu_root" type="String" /> + <argument index="1" name="idx" type="int" /> <description> </description> </method> <method name="global_menu_get_item_submenu"> - <return type="String"> - </return> - <argument index="0" name="menu_root" type="String"> - </argument> - <argument index="1" name="idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="menu_root" type="String" /> + <argument index="1" name="idx" type="int" /> <description> </description> </method> <method name="global_menu_get_item_tag"> - <return type="Variant"> - </return> - <argument index="0" name="menu_root" type="String"> - </argument> - <argument index="1" name="idx" type="int"> - </argument> + <return type="Variant" /> + <argument index="0" name="menu_root" type="String" /> + <argument index="1" name="idx" type="int" /> <description> </description> </method> <method name="global_menu_get_item_text"> - <return type="String"> - </return> - <argument index="0" name="menu_root" type="String"> - </argument> - <argument index="1" name="idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="menu_root" type="String" /> + <argument index="1" name="idx" type="int" /> <description> </description> </method> <method name="global_menu_is_item_checkable" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="menu_root" type="String"> - </argument> - <argument index="1" name="idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="menu_root" type="String" /> + <argument index="1" name="idx" type="int" /> <description> </description> </method> <method name="global_menu_is_item_checked" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="menu_root" type="String"> - </argument> - <argument index="1" name="idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="menu_root" type="String" /> + <argument index="1" name="idx" type="int" /> <description> </description> </method> <method name="global_menu_remove_item"> - <return type="void"> - </return> - <argument index="0" name="menu_root" type="String"> - </argument> - <argument index="1" name="idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="menu_root" type="String" /> + <argument index="1" name="idx" type="int" /> <description> </description> </method> <method name="global_menu_set_item_callback"> - <return type="void"> - </return> - <argument index="0" name="menu_root" type="String"> - </argument> - <argument index="1" name="idx" type="int"> - </argument> - <argument index="2" name="callback" type="Callable"> - </argument> + <return type="void" /> + <argument index="0" name="menu_root" type="String" /> + <argument index="1" name="idx" type="int" /> + <argument index="2" name="callback" type="Callable" /> <description> </description> </method> <method name="global_menu_set_item_checkable"> - <return type="void"> - </return> - <argument index="0" name="menu_root" type="String"> - </argument> - <argument index="1" name="idx" type="int"> - </argument> - <argument index="2" name="checkable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="menu_root" type="String" /> + <argument index="1" name="idx" type="int" /> + <argument index="2" name="checkable" type="bool" /> <description> </description> </method> <method name="global_menu_set_item_checked"> - <return type="void"> - </return> - <argument index="0" name="menu_root" type="String"> - </argument> - <argument index="1" name="idx" type="int"> - </argument> - <argument index="2" name="checked" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="menu_root" type="String" /> + <argument index="1" name="idx" type="int" /> + <argument index="2" name="checked" type="bool" /> <description> </description> </method> <method name="global_menu_set_item_submenu"> - <return type="void"> - </return> - <argument index="0" name="menu_root" type="String"> - </argument> - <argument index="1" name="idx" type="int"> - </argument> - <argument index="2" name="submenu" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="menu_root" type="String" /> + <argument index="1" name="idx" type="int" /> + <argument index="2" name="submenu" type="String" /> <description> </description> </method> <method name="global_menu_set_item_tag"> - <return type="void"> - </return> - <argument index="0" name="menu_root" type="String"> - </argument> - <argument index="1" name="idx" type="int"> - </argument> - <argument index="2" name="tag" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="menu_root" type="String" /> + <argument index="1" name="idx" type="int" /> + <argument index="2" name="tag" type="Variant" /> <description> </description> </method> <method name="global_menu_set_item_text"> - <return type="void"> - </return> - <argument index="0" name="menu_root" type="String"> - </argument> - <argument index="1" name="idx" type="int"> - </argument> - <argument index="2" name="text" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="menu_root" type="String" /> + <argument index="1" name="idx" type="int" /> + <argument index="2" name="text" type="String" /> <description> </description> </method> <method name="has_feature" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="feature" type="int" enum="DisplayServer.Feature"> - </argument> + <return type="bool" /> + <argument index="0" name="feature" type="int" enum="DisplayServer.Feature" /> <description> </description> </method> <method name="ime_get_selection" qualifiers="const"> - <return type="Vector2i"> - </return> + <return type="Vector2i" /> <description> </description> </method> <method name="ime_get_text" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> </description> </method> <method name="is_console_visible" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> </description> </method> <method name="keyboard_get_current_layout" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns active keyboard layout index. [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="keyboard_get_layout_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of keyboard layouts. [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="keyboard_get_layout_language" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="index" type="int" /> <description> Returns the ISO-639/BCP-47 language code of the keyboard layout at position [code]index[/code]. [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="keyboard_get_layout_name" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="index" type="int" /> <description> Returns the localized name of the keyboard layout at position [code]index[/code]. [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="keyboard_set_current_layout"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> <description> Sets active keyboard layout. [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="mouse_get_absolute_position" qualifiers="const"> - <return type="Vector2i"> - </return> + <return type="Vector2i" /> <description> </description> </method> <method name="mouse_get_button_state" qualifiers="const"> - <return type="int" enum="MouseButton"> - </return> + <return type="int" enum="MouseButton" /> <description> </description> </method> <method name="mouse_get_mode" qualifiers="const"> - <return type="int" enum="DisplayServer.MouseMode"> - </return> + <return type="int" enum="DisplayServer.MouseMode" /> <description> </description> </method> <method name="mouse_get_position" qualifiers="const"> - <return type="Vector2i"> - </return> + <return type="Vector2i" /> <description> </description> </method> <method name="mouse_set_mode"> - <return type="void"> - </return> - <argument index="0" name="mouse_mode" type="int" enum="DisplayServer.MouseMode"> - </argument> + <return type="void" /> + <argument index="0" name="mouse_mode" type="int" enum="DisplayServer.MouseMode" /> <description> </description> </method> <method name="mouse_warp_to_position"> - <return type="void"> - </return> - <argument index="0" name="position" type="Vector2i"> - </argument> + <return type="void" /> + <argument index="0" name="position" type="Vector2i" /> <description> </description> </method> <method name="process_events"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> <method name="screen_get_dpi" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="screen" type="int" default="-1"> - </argument> + <return type="int" /> + <argument index="0" name="screen" type="int" default="-1" /> <description> Returns the dots per inch density of the specified screen. If [code]screen[/code] is [/code]SCREEN_OF_MAIN_WINDOW[/code] (the default value), a screen with the main window will be used. [b]Note:[/b] On macOS, returned value is inaccurate if fractional display scaling mode is used. @@ -498,8 +363,7 @@ </description> </method> <method name="screen_get_max_scale" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Return the greatest scale factor of all screens. [b]Note:[/b] On macOS returned value is [code]2.0[/code] if there is at least one hiDPI (Retina) screen in the system, and [code]1.0[/code] in all other cases. @@ -507,26 +371,20 @@ </description> </method> <method name="screen_get_orientation" qualifiers="const"> - <return type="int" enum="DisplayServer.ScreenOrientation"> - </return> - <argument index="0" name="screen" type="int" default="-1"> - </argument> + <return type="int" enum="DisplayServer.ScreenOrientation" /> + <argument index="0" name="screen" type="int" default="-1" /> <description> </description> </method> <method name="screen_get_position" qualifiers="const"> - <return type="Vector2i"> - </return> - <argument index="0" name="screen" type="int" default="-1"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="screen" type="int" default="-1" /> <description> </description> </method> <method name="screen_get_scale" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="screen" type="int" default="-1"> - </argument> + <return type="float" /> + <argument index="0" name="screen" type="int" default="-1" /> <description> Return the scale factor of the specified screen by index. [b]Note:[/b] On macOS returned value is [code]2.0[/code] for hiDPI (Retina) screen, and [code]1.0[/code] for all other cases. @@ -534,134 +392,103 @@ </description> </method> <method name="screen_get_size" qualifiers="const"> - <return type="Vector2i"> - </return> - <argument index="0" name="screen" type="int" default="-1"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="screen" type="int" default="-1" /> <description> </description> </method> <method name="screen_get_usable_rect" qualifiers="const"> - <return type="Rect2i"> - </return> - <argument index="0" name="screen" type="int" default="-1"> - </argument> + <return type="Rect2i" /> + <argument index="0" name="screen" type="int" default="-1" /> <description> </description> </method> <method name="screen_is_kept_on" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> </description> </method> <method name="screen_is_touchscreen" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="screen" type="int" default="-1"> - </argument> + <return type="bool" /> + <argument index="0" name="screen" type="int" default="-1" /> <description> </description> </method> <method name="screen_set_keep_on"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enable" type="bool" /> <description> </description> </method> <method name="screen_set_orientation"> - <return type="void"> - </return> - <argument index="0" name="orientation" type="int" enum="DisplayServer.ScreenOrientation"> - </argument> - <argument index="1" name="screen" type="int" default="-1"> - </argument> + <return type="void" /> + <argument index="0" name="orientation" type="int" enum="DisplayServer.ScreenOrientation" /> + <argument index="1" name="screen" type="int" default="-1" /> <description> </description> </method> <method name="set_icon"> - <return type="void"> - </return> - <argument index="0" name="image" type="Image"> - </argument> + <return type="void" /> + <argument index="0" name="image" type="Image" /> <description> </description> </method> <method name="set_native_icon"> - <return type="void"> - </return> - <argument index="0" name="filename" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="filename" type="String" /> <description> </description> </method> <method name="tablet_get_current_driver" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns current active tablet driver name. [b]Note:[/b] This method is implemented on Windows. </description> </method> <method name="tablet_get_driver_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the total number of available tablet drivers. [b]Note:[/b] This method is implemented on Windows. </description> </method> <method name="tablet_get_driver_name" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="idx" type="int" /> <description> Returns the tablet driver name for the given index. [b]Note:[/b] This method is implemented on Windows. </description> </method> <method name="tablet_set_current_driver"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> <description> Set active tablet driver name. [b]Note:[/b] This method is implemented on Windows. </description> </method> <method name="virtual_keyboard_get_height" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the on-screen keyboard's height in pixels. Returns 0 if there is no keyboard or if it is currently hidden. </description> </method> <method name="virtual_keyboard_hide"> - <return type="void"> - </return> + <return type="void" /> <description> Hides the virtual keyboard if it is shown, does nothing otherwise. </description> </method> <method name="virtual_keyboard_show"> - <return type="void"> - </return> - <argument index="0" name="existing_text" type="String"> - </argument> - <argument index="1" name="position" type="Rect2" default="Rect2i(0, 0, 0, 0)"> - </argument> - <argument index="2" name="multiline" type="bool" default="false"> - </argument> - <argument index="3" name="max_length" type="int" default="-1"> - </argument> - <argument index="4" name="cursor_start" type="int" default="-1"> - </argument> - <argument index="5" name="cursor_end" type="int" default="-1"> - </argument> + <return type="void" /> + <argument index="0" name="existing_text" type="String" /> + <argument index="1" name="position" type="Rect2" default="Rect2i(0, 0, 0, 0)" /> + <argument index="2" name="multiline" type="bool" default="false" /> + <argument index="3" name="max_length" type="int" default="-1" /> + <argument index="4" name="cursor_start" type="int" default="-1" /> + <argument index="5" name="cursor_end" type="int" default="-1" /> <description> Shows the virtual keyboard if the platform has one. [code]existing_text[/code] parameter is useful for implementing your own [LineEdit] or [TextEdit], as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions). @@ -674,231 +501,169 @@ </description> </method> <method name="window_attach_instance_id"> - <return type="void"> - </return> - <argument index="0" name="instance_id" type="int"> - </argument> - <argument index="1" name="window_id" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="instance_id" type="int" /> + <argument index="1" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_can_draw" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="window_id" type="int" default="0"> - </argument> + <return type="bool" /> + <argument index="0" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_get_attached_instance_id" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="window_id" type="int" default="0"> - </argument> + <return type="int" /> + <argument index="0" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_get_current_screen" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="window_id" type="int" default="0"> - </argument> + <return type="int" /> + <argument index="0" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_get_flag" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="flag" type="int" enum="DisplayServer.WindowFlags"> - </argument> - <argument index="1" name="window_id" type="int" default="0"> - </argument> + <return type="bool" /> + <argument index="0" name="flag" type="int" enum="DisplayServer.WindowFlags" /> + <argument index="1" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_get_max_size" qualifiers="const"> - <return type="Vector2i"> - </return> - <argument index="0" name="window_id" type="int" default="0"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_get_min_size" qualifiers="const"> - <return type="Vector2i"> - </return> - <argument index="0" name="window_id" type="int" default="0"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_get_mode" qualifiers="const"> - <return type="int" enum="DisplayServer.WindowMode"> - </return> - <argument index="0" name="window_id" type="int" default="0"> - </argument> + <return type="int" enum="DisplayServer.WindowMode" /> + <argument index="0" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_get_position" qualifiers="const"> - <return type="Vector2i"> - </return> - <argument index="0" name="window_id" type="int" default="0"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_get_real_size" qualifiers="const"> - <return type="Vector2i"> - </return> - <argument index="0" name="window_id" type="int" default="0"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_get_size" qualifiers="const"> - <return type="Vector2i"> - </return> - <argument index="0" name="window_id" type="int" default="0"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_get_vsync_mode" qualifiers="const"> - <return type="int" enum="DisplayServer.VSyncMode"> - </return> - <argument index="0" name="window_id" type="int" default="0"> - </argument> + <return type="int" enum="DisplayServer.VSyncMode" /> + <argument index="0" name="window_id" type="int" default="0" /> <description> Returns the VSync mode of the given window. </description> </method> <method name="window_move_to_foreground"> - <return type="void"> - </return> - <argument index="0" name="window_id" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_request_attention"> - <return type="void"> - </return> - <argument index="0" name="window_id" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_set_current_screen"> - <return type="void"> - </return> - <argument index="0" name="screen" type="int"> - </argument> - <argument index="1" name="window_id" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="screen" type="int" /> + <argument index="1" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_set_drop_files_callback"> - <return type="void"> - </return> - <argument index="0" name="callback" type="Callable"> - </argument> - <argument index="1" name="window_id" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="callback" type="Callable" /> + <argument index="1" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_set_flag"> - <return type="void"> - </return> - <argument index="0" name="flag" type="int" enum="DisplayServer.WindowFlags"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> - <argument index="2" name="window_id" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="flag" type="int" enum="DisplayServer.WindowFlags" /> + <argument index="1" name="enabled" type="bool" /> + <argument index="2" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_set_ime_active"> - <return type="void"> - </return> - <argument index="0" name="active" type="bool"> - </argument> - <argument index="1" name="window_id" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="active" type="bool" /> + <argument index="1" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_set_ime_position"> - <return type="void"> - </return> - <argument index="0" name="position" type="Vector2i"> - </argument> - <argument index="1" name="window_id" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="position" type="Vector2i" /> + <argument index="1" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_set_input_event_callback"> - <return type="void"> - </return> - <argument index="0" name="callback" type="Callable"> - </argument> - <argument index="1" name="window_id" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="callback" type="Callable" /> + <argument index="1" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_set_input_text_callback"> - <return type="void"> - </return> - <argument index="0" name="callback" type="Callable"> - </argument> - <argument index="1" name="window_id" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="callback" type="Callable" /> + <argument index="1" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_set_max_size"> - <return type="void"> - </return> - <argument index="0" name="max_size" type="Vector2i"> - </argument> - <argument index="1" name="window_id" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="max_size" type="Vector2i" /> + <argument index="1" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_set_min_size"> - <return type="void"> - </return> - <argument index="0" name="min_size" type="Vector2i"> - </argument> - <argument index="1" name="window_id" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="min_size" type="Vector2i" /> + <argument index="1" name="window_id" type="int" default="0" /> <description> + Sets the minimum size for the given window to [code]min_size[/code] (in pixels). + [b]Note:[/b] By default, the main window has a minimum size of [code]Vector2i(64, 64)[/code]. This prevents issues that can arise when the window is resized to a near-zero size. </description> </method> <method name="window_set_mode"> - <return type="void"> - </return> - <argument index="0" name="mode" type="int" enum="DisplayServer.WindowMode"> - </argument> - <argument index="1" name="window_id" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="mode" type="int" enum="DisplayServer.WindowMode" /> + <argument index="1" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_set_mouse_passthrough"> - <return type="void"> - </return> - <argument index="0" name="region" type="PackedVector2Array"> - </argument> - <argument index="1" name="window_id" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="region" type="PackedVector2Array" /> + <argument index="1" name="window_id" type="int" default="0" /> <description> Sets a polygonal region of the window which accepts mouse events. Mouse events outside the region will be passed through. Passing an empty array will disable passthrough support (all mouse events will be intercepted by the window, which is the default behavior). @@ -929,62 +694,44 @@ </description> </method> <method name="window_set_position"> - <return type="void"> - </return> - <argument index="0" name="position" type="Vector2i"> - </argument> - <argument index="1" name="window_id" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="position" type="Vector2i" /> + <argument index="1" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_set_rect_changed_callback"> - <return type="void"> - </return> - <argument index="0" name="callback" type="Callable"> - </argument> - <argument index="1" name="window_id" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="callback" type="Callable" /> + <argument index="1" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_set_size"> - <return type="void"> - </return> - <argument index="0" name="size" type="Vector2i"> - </argument> - <argument index="1" name="window_id" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="size" type="Vector2i" /> + <argument index="1" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_set_title"> - <return type="void"> - </return> - <argument index="0" name="title" type="String"> - </argument> - <argument index="1" name="window_id" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="title" type="String" /> + <argument index="1" name="window_id" type="int" default="0" /> <description> </description> </method> <method name="window_set_transient"> - <return type="void"> - </return> - <argument index="0" name="window_id" type="int"> - </argument> - <argument index="1" name="parent_window_id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="window_id" type="int" /> + <argument index="1" name="parent_window_id" type="int" /> <description> </description> </method> <method name="window_set_vsync_mode"> - <return type="void"> - </return> - <argument index="0" name="vsync_mode" type="int" enum="DisplayServer.VSyncMode"> - </argument> - <argument index="1" name="window_id" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="vsync_mode" type="int" enum="DisplayServer.VSyncMode" /> + <argument index="1" name="window_id" type="int" default="0" /> <description> Sets the VSync mode of the given window. See [enum DisplayServer.VSyncMode] for possible values and how they affect the behavior of your application. @@ -992,12 +739,9 @@ </description> </method> <method name="window_set_window_event_callback"> - <return type="void"> - </return> - <argument index="0" name="callback" type="Callable"> - </argument> - <argument index="1" name="window_id" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="callback" type="Callable" /> + <argument index="1" name="window_id" type="int" default="0" /> <description> </description> </method> diff --git a/doc/classes/EditorCommandPalette.xml b/doc/classes/EditorCommandPalette.xml new file mode 100644 index 0000000000..743c59eec2 --- /dev/null +++ b/doc/classes/EditorCommandPalette.xml @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="EditorCommandPalette" inherits="ConfirmationDialog" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="add_command"> + <return type="void" /> + <argument index="0" name="command_name" type="String" /> + <argument index="1" name="key_name" type="String" /> + <argument index="2" name="binded_callable" type="Callable" /> + <argument index="3" name="shortcut_text" type="String" default=""None"" /> + <description> + </description> + </method> + <method name="remove_command"> + <return type="void" /> + <argument index="0" name="key_name" type="String" /> + <description> + </description> + </method> + </methods> + <members> + <member name="dialog_hide_on_ok" type="bool" setter="set_hide_on_ok" getter="get_hide_on_ok" override="true" default="false" /> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/EditorDebuggerPlugin.xml b/doc/classes/EditorDebuggerPlugin.xml index 9484d33252..d67df8dfee 100644 --- a/doc/classes/EditorDebuggerPlugin.xml +++ b/doc/classes/EditorDebuggerPlugin.xml @@ -12,63 +12,50 @@ </tutorials> <methods> <method name="has_capture"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> <description> Returns [code]true[/code] if a message capture with given name is present otherwise [code]false[/code]. </description> </method> <method name="is_breaked"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the game is in break state otherwise [code]false[/code]. </description> </method> <method name="is_debuggable"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the game can be debugged otherwise [code]false[/code]. </description> </method> <method name="is_session_active"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if there is an instance of the game running with the attached debugger otherwise [code]false[/code]. </description> </method> <method name="register_message_capture"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="callable" type="Callable"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="callable" type="Callable" /> <description> Registers a message capture with given [code]name[/code]. If [code]name[/code] is "my_message" then messages starting with "my_message:" will be called with the given callable. Callable must accept a message string and a data array as argument. If the message and data are valid then callable must return [code]true[/code] otherwise [code]false[/code]. </description> </method> <method name="send_message"> - <return type="void"> - </return> - <argument index="0" name="message" type="String"> - </argument> - <argument index="1" name="data" type="Array"> - </argument> + <return type="void" /> + <argument index="0" name="message" type="String" /> + <argument index="1" name="data" type="Array" /> <description> Sends a message with given [code]message[/code] and [code]data[/code] array. </description> </method> <method name="unregister_message_capture"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> <description> Unregisters the message capture with given name. </description> @@ -76,8 +63,7 @@ </methods> <signals> <signal name="breaked"> - <argument index="0" name="can_debug" type="bool"> - </argument> + <argument index="0" name="can_debug" type="bool" /> <description> Emitted when the game enters a break state. </description> diff --git a/doc/classes/EditorExportPlugin.xml b/doc/classes/EditorExportPlugin.xml index d9e3003fbb..16c50b4d3e 100644 --- a/doc/classes/EditorExportPlugin.xml +++ b/doc/classes/EditorExportPlugin.xml @@ -10,77 +10,57 @@ </tutorials> <methods> <method name="_export_begin" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="features" type="PackedStringArray"> - </argument> - <argument index="1" name="is_debug" type="bool"> - </argument> - <argument index="2" name="path" type="String"> - </argument> - <argument index="3" name="flags" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="features" type="PackedStringArray" /> + <argument index="1" name="is_debug" type="bool" /> + <argument index="2" name="path" type="String" /> + <argument index="3" name="flags" type="int" /> <description> Virtual method to be overridden by the user. It is called when the export starts and provides all information about the export. [code]features[/code] is the list of features for the export, [code]is_debug[/code] is [code]true[/code] for debug builds, [code]path[/code] is the target path for the exported project. [code]flags[/code] is only used when running a runnable profile, e.g. when using native run on Android. </description> </method> <method name="_export_end" qualifiers="virtual"> - <return type="void"> - </return> + <return type="void" /> <description> Virtual method to be overridden by the user. Called when the export is finished. </description> </method> <method name="_export_file" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="type" type="String"> - </argument> - <argument index="2" name="features" type="PackedStringArray"> - </argument> + <return type="void" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="type" type="String" /> + <argument index="2" name="features" type="PackedStringArray" /> <description> Virtual method to be overridden by the user. Called for each exported file, providing arguments that can be used to identify the file. [code]path[/code] is the path of the file, [code]type[/code] is the [Resource] represented by the file (e.g. [PackedScene]) and [code]features[/code] is the list of features for the export. Calling [method skip] inside this callback will make the file not included in the export. </description> </method> <method name="add_file"> - <return type="void"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="file" type="PackedByteArray"> - </argument> - <argument index="2" name="remap" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="file" type="PackedByteArray" /> + <argument index="2" name="remap" type="bool" /> <description> Adds a custom file to be exported. [code]path[/code] is the virtual path that can be used to load the file, [code]file[/code] is the binary data of the file. If [code]remap[/code] is [code]true[/code], file will not be exported, but instead remapped to the given [code]path[/code]. </description> </method> <method name="add_ios_bundle_file"> - <return type="void"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="path" type="String" /> <description> Adds an iOS bundle file from the given [code]path[/code] to the exported project. </description> </method> <method name="add_ios_cpp_code"> - <return type="void"> - </return> - <argument index="0" name="code" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="code" type="String" /> <description> Adds a C++ code to the iOS export. The final code is created from the code appended by each active export plugin. </description> </method> <method name="add_ios_embedded_framework"> - <return type="void"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="path" type="String" /> <description> Adds a dynamic library (*.dylib, *.framework) to Linking Phase in iOS's Xcode project and embeds it into resulting binary. [b]Note:[/b] For static libraries (*.a) works in same way as [code]add_ios_framework[/code]. @@ -88,55 +68,43 @@ </description> </method> <method name="add_ios_framework"> - <return type="void"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="path" type="String" /> <description> Adds a static library (*.a) or dynamic library (*.dylib, *.framework) to Linking Phase in iOS's Xcode project. </description> </method> <method name="add_ios_linker_flags"> - <return type="void"> - </return> - <argument index="0" name="flags" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="flags" type="String" /> <description> Adds linker flags for the iOS export. </description> </method> <method name="add_ios_plist_content"> - <return type="void"> - </return> - <argument index="0" name="plist_content" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="plist_content" type="String" /> <description> Adds content for iOS Property List files. </description> </method> <method name="add_ios_project_static_lib"> - <return type="void"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="path" type="String" /> <description> Adds a static lib from the given [code]path[/code] to the iOS project. </description> </method> <method name="add_shared_object"> - <return type="void"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="tags" type="PackedStringArray"> - </argument> + <return type="void" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="tags" type="PackedStringArray" /> <description> Adds a shared object with the given [code]tags[/code] and destination [code]path[/code]. </description> </method> <method name="skip"> - <return type="void"> - </return> + <return type="void" /> <description> To be called inside [method _export_file]. Skips the current file, so it's not included in the export. </description> diff --git a/doc/classes/EditorFeatureProfile.xml b/doc/classes/EditorFeatureProfile.xml index 0cd839f370..a41730d5d0 100644 --- a/doc/classes/EditorFeatureProfile.xml +++ b/doc/classes/EditorFeatureProfile.xml @@ -11,112 +11,84 @@ </tutorials> <methods> <method name="get_feature_name"> - <return type="String"> - </return> - <argument index="0" name="feature" type="int" enum="EditorFeatureProfile.Feature"> - </argument> + <return type="String" /> + <argument index="0" name="feature" type="int" enum="EditorFeatureProfile.Feature" /> <description> Returns the specified [code]feature[/code]'s human-readable name. </description> </method> <method name="is_class_disabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="class_name" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="class_name" type="StringName" /> <description> Returns [code]true[/code] if the class specified by [code]class_name[/code] is disabled. When disabled, the class won't appear in the Create New Node dialog. </description> </method> <method name="is_class_editor_disabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="class_name" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="class_name" type="StringName" /> <description> Returns [code]true[/code] if editing for the class specified by [code]class_name[/code] is disabled. When disabled, the class will still appear in the Create New Node dialog but the inspector will be read-only when selecting a node that extends the class. </description> </method> <method name="is_class_property_disabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="class_name" type="StringName"> - </argument> - <argument index="1" name="property" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="class_name" type="StringName" /> + <argument index="1" name="property" type="StringName" /> <description> Returns [code]true[/code] if [code]property[/code] is disabled in the class specified by [code]class_name[/code]. When a property is disabled, it won't appear in the inspector when selecting a node that extends the class specified by [code]class_name[/code]. </description> </method> <method name="is_feature_disabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="feature" type="int" enum="EditorFeatureProfile.Feature"> - </argument> + <return type="bool" /> + <argument index="0" name="feature" type="int" enum="EditorFeatureProfile.Feature" /> <description> Returns [code]true[/code] if the [code]feature[/code] is disabled. When a feature is disabled, it will disappear from the editor entirely. </description> </method> <method name="load_from_file"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> <description> Loads an editor feature profile from a file. The file must follow the JSON format obtained by using the feature profile manager's [b]Export[/b] button or the [method save_to_file] method. </description> </method> <method name="save_to_file"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> <description> Saves the editor feature profile to a file in JSON format. It can then be imported using the feature profile manager's [b]Import[/b] button or the [method load_from_file] button. </description> </method> <method name="set_disable_class"> - <return type="void"> - </return> - <argument index="0" name="class_name" type="StringName"> - </argument> - <argument index="1" name="disable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="class_name" type="StringName" /> + <argument index="1" name="disable" type="bool" /> <description> If [code]disable[/code] is [code]true[/code], disables the class specified by [code]class_name[/code]. When disabled, the class won't appear in the Create New Node dialog. </description> </method> <method name="set_disable_class_editor"> - <return type="void"> - </return> - <argument index="0" name="class_name" type="StringName"> - </argument> - <argument index="1" name="disable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="class_name" type="StringName" /> + <argument index="1" name="disable" type="bool" /> <description> If [code]disable[/code] is [code]true[/code], disables editing for the class specified by [code]class_name[/code]. When disabled, the class will still appear in the Create New Node dialog but the inspector will be read-only when selecting a node that extends the class. </description> </method> <method name="set_disable_class_property"> - <return type="void"> - </return> - <argument index="0" name="class_name" type="StringName"> - </argument> - <argument index="1" name="property" type="StringName"> - </argument> - <argument index="2" name="disable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="class_name" type="StringName" /> + <argument index="1" name="property" type="StringName" /> + <argument index="2" name="disable" type="bool" /> <description> If [code]disable[/code] is [code]true[/code], disables editing for [code]property[/code] in the class specified by [code]class_name[/code]. When a property is disabled, it won't appear in the inspector when selecting a node that extends the class specified by [code]class_name[/code]. </description> </method> <method name="set_disable_feature"> - <return type="void"> - </return> - <argument index="0" name="feature" type="int" enum="EditorFeatureProfile.Feature"> - </argument> - <argument index="1" name="disable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="feature" type="int" enum="EditorFeatureProfile.Feature" /> + <argument index="1" name="disable" type="bool" /> <description> If [code]disable[/code] is [code]true[/code], disables the editor feature specified in [code]feature[/code]. When a feature is disabled, it will disappear from the editor entirely. </description> diff --git a/doc/classes/EditorFileDialog.xml b/doc/classes/EditorFileDialog.xml index 084459e518..53fba9f3b8 100644 --- a/doc/classes/EditorFileDialog.xml +++ b/doc/classes/EditorFileDialog.xml @@ -9,32 +9,27 @@ </tutorials> <methods> <method name="add_filter"> - <return type="void"> - </return> - <argument index="0" name="filter" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="filter" type="String" /> <description> Adds a comma-delimited file extension filter option to the [EditorFileDialog] with an optional semi-colon-delimited label. For example, [code]"*.tscn, *.scn; Scenes"[/code] results in filter text "Scenes (*.tscn, *.scn)". </description> </method> <method name="clear_filters"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all filters except for "All Files (*)". </description> </method> <method name="get_vbox"> - <return type="VBoxContainer"> - </return> + <return type="VBoxContainer" /> <description> Returns the [code]VBoxContainer[/code] used to display the file system. </description> </method> <method name="invalidate"> - <return type="void"> - </return> + <return type="void" /> <description> Notify the [EditorFileDialog] that its view of the data is no longer accurate. Updates the view contents on next view update. </description> @@ -70,22 +65,19 @@ </members> <signals> <signal name="dir_selected"> - <argument index="0" name="dir" type="String"> - </argument> + <argument index="0" name="dir" type="String" /> <description> Emitted when a directory is selected. </description> </signal> <signal name="file_selected"> - <argument index="0" name="path" type="String"> - </argument> + <argument index="0" name="path" type="String" /> <description> Emitted when a file is selected. </description> </signal> <signal name="files_selected"> - <argument index="0" name="paths" type="PackedStringArray"> - </argument> + <argument index="0" name="paths" type="PackedStringArray" /> <description> Emitted when multiple files are selected. </description> diff --git a/doc/classes/EditorFileSystem.xml b/doc/classes/EditorFileSystem.xml index 3a045817c2..6befe32e7a 100644 --- a/doc/classes/EditorFileSystem.xml +++ b/doc/classes/EditorFileSystem.xml @@ -11,70 +11,58 @@ </tutorials> <methods> <method name="get_file_type" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="String" /> + <argument index="0" name="path" type="String" /> <description> - Gets the type of the file, given the full path. + Returns the resource type of the file, given the full path. This returns a string such as [code]"Resource"[/code] or [code]"GDScript"[/code], [i]not[/i] a file extension such as [code]".gd"[/code]. </description> </method> <method name="get_filesystem"> - <return type="EditorFileSystemDirectory"> - </return> + <return type="EditorFileSystemDirectory" /> <description> Gets the root directory object. </description> </method> <method name="get_filesystem_path"> - <return type="EditorFileSystemDirectory"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="EditorFileSystemDirectory" /> + <argument index="0" name="path" type="String" /> <description> Returns a view into the filesystem at [code]path[/code]. </description> </method> <method name="get_scanning_progress" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the scan progress for 0 to 1 if the FS is being scanned. </description> </method> <method name="is_scanning" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] of the filesystem is being scanned. </description> </method> <method name="scan"> - <return type="void"> - </return> + <return type="void" /> <description> Scan the filesystem for changes. </description> </method> <method name="scan_sources"> - <return type="void"> - </return> + <return type="void" /> <description> Check if the source of any imported resource changed. </description> </method> <method name="update_file"> - <return type="void"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="path" type="String" /> <description> Update a file information. Call this if an external program (not Godot) modified the file. </description> </method> <method name="update_script_classes"> - <return type="void"> - </return> + <return type="void" /> <description> Scans the script files and updates the list of custom class names. </description> @@ -87,22 +75,19 @@ </description> </signal> <signal name="resources_reimported"> - <argument index="0" name="resources" type="PackedStringArray"> - </argument> + <argument index="0" name="resources" type="PackedStringArray" /> <description> Emitted if a resource is reimported. </description> </signal> <signal name="resources_reload"> - <argument index="0" name="resources" type="PackedStringArray"> - </argument> + <argument index="0" name="resources" type="PackedStringArray" /> <description> Emitted if at least one resource is reloaded when the filesystem is scanned. </description> </signal> <signal name="sources_changed"> - <argument index="0" name="exist" type="bool"> - </argument> + <argument index="0" name="exist" type="bool" /> <description> Emitted if the source of any imported file changed. </description> diff --git a/doc/classes/EditorFileSystemDirectory.xml b/doc/classes/EditorFileSystemDirectory.xml index b852ae1063..a8f94101a7 100644 --- a/doc/classes/EditorFileSystemDirectory.xml +++ b/doc/classes/EditorFileSystemDirectory.xml @@ -10,117 +10,94 @@ </tutorials> <methods> <method name="find_dir_index" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="name" type="String" /> <description> Returns the index of the directory with name [code]name[/code] or [code]-1[/code] if not found. </description> </method> <method name="find_file_index" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="name" type="String" /> <description> Returns the index of the file with name [code]name[/code] or [code]-1[/code] if not found. </description> </method> <method name="get_file" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="idx" type="int" /> <description> Returns the name of the file at index [code]idx[/code]. </description> </method> <method name="get_file_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of files in this directory. </description> </method> <method name="get_file_import_is_valid" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="idx" type="int" /> <description> Returns [code]true[/code] if the file at index [code]idx[/code] imported properly. </description> </method> <method name="get_file_path" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="idx" type="int" /> <description> Returns the path to the file at index [code]idx[/code]. </description> </method> <method name="get_file_script_class_extends" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="idx" type="int" /> <description> Returns the base class of the script class defined in the file at index [code]idx[/code]. If the file doesn't define a script class using the [code]class_name[/code] syntax, this will return an empty string. </description> </method> <method name="get_file_script_class_name" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="idx" type="int" /> <description> Returns the name of the script class defined in the file at index [code]idx[/code]. If the file doesn't define a script class using the [code]class_name[/code] syntax, this will return an empty string. </description> </method> <method name="get_file_type" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="StringName" /> + <argument index="0" name="idx" type="int" /> <description> - Returns the file extension of the file at index [code]idx[/code]. + Returns the resource type of the file at index [code]idx[/code]. This returns a string such as [code]"Resource"[/code] or [code]"GDScript"[/code], [i]not[/i] a file extension such as [code]".gd"[/code]. </description> </method> <method name="get_name"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the name of this directory. </description> </method> <method name="get_parent"> - <return type="EditorFileSystemDirectory"> - </return> + <return type="EditorFileSystemDirectory" /> <description> Returns the parent directory for this directory or [code]null[/code] if called on a directory at [code]res://[/code] or [code]user://[/code]. </description> </method> <method name="get_path" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the path to this directory. </description> </method> <method name="get_subdir"> - <return type="EditorFileSystemDirectory"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="EditorFileSystemDirectory" /> + <argument index="0" name="idx" type="int" /> <description> Returns the subdirectory at index [code]idx[/code]. </description> </method> <method name="get_subdir_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of subdirectories in this directory. </description> diff --git a/doc/classes/EditorImportPlugin.xml b/doc/classes/EditorImportPlugin.xml index a532e9bc2b..da6738d6b7 100644 --- a/doc/classes/EditorImportPlugin.xml +++ b/doc/classes/EditorImportPlugin.xml @@ -113,36 +113,29 @@ <link title="Import plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/import_plugins.html</link> </tutorials> <methods> - <method name="_get_import_options" qualifiers="virtual"> - <return type="Array"> - </return> - <argument index="0" name="preset" type="int"> - </argument> + <method name="_get_import_options" qualifiers="virtual const"> + <return type="Array" /> + <argument index="0" name="preset_index" type="int" /> <description> Gets the options and default values for the preset at this index. Returns an Array of Dictionaries with the following keys: [code]name[/code], [code]default_value[/code], [code]property_hint[/code] (optional), [code]hint_string[/code] (optional), [code]usage[/code] (optional). </description> </method> - <method name="_get_import_order" qualifiers="virtual"> - <return type="int"> - </return> + <method name="_get_import_order" qualifiers="virtual const"> + <return type="int" /> <description> - Gets the order of this importer to be run when importing resources. Higher values will be called later. Use this to ensure the importer runs after the dependencies are already imported. + Gets the order of this importer to be run when importing resources. Importers with [i]lower[/i] import orders will be called first, and higher values will be called later. Use this to ensure the importer runs after the dependencies are already imported. The default import order is [code]0[/code] unless overridden by a specific importer. See [enum ResourceImporter.ImportOrder] for some predefined values. </description> </method> - <method name="_get_importer_name" qualifiers="virtual"> - <return type="String"> - </return> + <method name="_get_importer_name" qualifiers="virtual const"> + <return type="String" /> <description> Gets the unique name of the importer. </description> </method> - <method name="_get_option_visibility" qualifiers="virtual"> - <return type="bool"> - </return> - <argument index="0" name="option" type="String"> - </argument> - <argument index="1" name="options" type="Dictionary"> - </argument> + <method name="_get_option_visibility" qualifiers="virtual const"> + <return type="bool" /> + <argument index="0" name="option_name" type="StringName" /> + <argument index="1" name="options" type="Dictionary" /> <description> This method can be overridden to hide specific import options if conditions are met. This is mainly useful for hiding options that depend on others if one of them is disabled. For example: [codeblocks] @@ -170,70 +163,56 @@ Return [code]true[/code] to make all options always visible. </description> </method> - <method name="_get_preset_count" qualifiers="virtual"> - <return type="int"> - </return> + <method name="_get_preset_count" qualifiers="virtual const"> + <return type="int" /> <description> Gets the number of initial presets defined by the plugin. Use [method _get_import_options] to get the default options for the preset and [method _get_preset_name] to get the name of the preset. </description> </method> - <method name="_get_preset_name" qualifiers="virtual"> - <return type="String"> - </return> - <argument index="0" name="preset" type="int"> - </argument> + <method name="_get_preset_name" qualifiers="virtual const"> + <return type="String" /> + <argument index="0" name="preset_index" type="int" /> <description> Gets the name of the options preset at this index. </description> </method> - <method name="_get_priority" qualifiers="virtual"> - <return type="float"> - </return> + <method name="_get_priority" qualifiers="virtual const"> + <return type="float" /> <description> Gets the priority of this plugin for the recognized extension. Higher priority plugins will be preferred. The default priority is [code]1.0[/code]. </description> </method> - <method name="_get_recognized_extensions" qualifiers="virtual"> - <return type="Array"> - </return> + <method name="_get_recognized_extensions" qualifiers="virtual const"> + <return type="PackedStringArray" /> <description> Gets the list of file extensions to associate with this loader (case-insensitive). e.g. [code]["obj"][/code]. </description> </method> - <method name="_get_resource_type" qualifiers="virtual"> - <return type="String"> - </return> + <method name="_get_resource_type" qualifiers="virtual const"> + <return type="String" /> <description> Gets the Godot resource type associated with this loader. e.g. [code]"Mesh"[/code] or [code]"Animation"[/code]. </description> </method> - <method name="_get_save_extension" qualifiers="virtual"> - <return type="String"> - </return> + <method name="_get_save_extension" qualifiers="virtual const"> + <return type="String" /> <description> Gets the extension used to save this resource in the [code].godot/imported[/code] directory. </description> </method> - <method name="_get_visible_name" qualifiers="virtual"> - <return type="String"> - </return> + <method name="_get_visible_name" qualifiers="virtual const"> + <return type="String" /> <description> Gets the name to display in the import window. You should choose this name as a continuation to "Import as", e.g. "Import as Special Mesh". </description> </method> - <method name="_import" qualifiers="virtual"> - <return type="int"> - </return> - <argument index="0" name="source_file" type="String"> - </argument> - <argument index="1" name="save_path" type="String"> - </argument> - <argument index="2" name="options" type="Dictionary"> - </argument> - <argument index="3" name="platform_variants" type="Array"> - </argument> - <argument index="4" name="gen_files" type="Array"> - </argument> + <method name="_import" qualifiers="virtual const"> + <return type="int" /> + <argument index="0" name="source_file" type="String" /> + <argument index="1" name="save_path" type="String" /> + <argument index="2" name="options" type="Dictionary" /> + <argument index="3" name="platform_variants" type="Array" /> + <argument index="4" name="gen_files" type="Array" /> <description> Imports [code]source_file[/code] into [code]save_path[/code] with the import [code]options[/code] specified. The [code]platform_variants[/code] and [code]gen_files[/code] arrays will be modified by this function. This method must be overridden to do the actual importing work. See this class' description for an example of overriding this method. diff --git a/doc/classes/EditorInspector.xml b/doc/classes/EditorInspector.xml index d85f95baff..515c4b4d32 100644 --- a/doc/classes/EditorInspector.xml +++ b/doc/classes/EditorInspector.xml @@ -16,55 +16,46 @@ </members> <signals> <signal name="object_id_selected"> - <argument index="0" name="id" type="int"> - </argument> + <argument index="0" name="id" type="int" /> <description> Emitted when the Edit button of an [Object] has been pressed in the inspector. This is mainly used in the remote scene tree inspector. </description> </signal> <signal name="property_deleted"> - <argument index="0" name="property" type="String"> - </argument> + <argument index="0" name="property" type="String" /> <description> Emitted when a property is removed from the inspector. </description> </signal> <signal name="property_edited"> - <argument index="0" name="property" type="String"> - </argument> + <argument index="0" name="property" type="String" /> <description> Emitted when a property is edited in the inspector. </description> </signal> <signal name="property_keyed"> - <argument index="0" name="property" type="String"> - </argument> + <argument index="0" name="property" type="String" /> <description> Emitted when a property is keyed in the inspector. Properties can be keyed by clicking the "key" icon next to a property when the Animation panel is toggled. </description> </signal> <signal name="property_selected"> - <argument index="0" name="property" type="String"> - </argument> + <argument index="0" name="property" type="String" /> <description> Emitted when a property is selected in the inspector. </description> </signal> <signal name="property_toggled"> - <argument index="0" name="property" type="String"> - </argument> - <argument index="1" name="checked" type="bool"> - </argument> + <argument index="0" name="property" type="String" /> + <argument index="1" name="checked" type="bool" /> <description> Emitted when a boolean property is toggled in the inspector. [b]Note:[/b] This signal is never emitted if the internal [code]autoclear[/code] property enabled. Since this property is always enabled in the editor inspector, this signal is never emitted by the editor itself. </description> </signal> <signal name="resource_selected"> - <argument index="0" name="res" type="Object"> - </argument> - <argument index="1" name="prop" type="String"> - </argument> + <argument index="0" name="res" type="Object" /> + <argument index="1" name="prop" type="String" /> <description> Emitted when a resource is selected in the inspector. </description> diff --git a/doc/classes/EditorInspectorPlugin.xml b/doc/classes/EditorInspectorPlugin.xml index c992d0fbb4..ee93379210 100644 --- a/doc/classes/EditorInspectorPlugin.xml +++ b/doc/classes/EditorInspectorPlugin.xml @@ -13,88 +13,70 @@ On each of these calls, the "add" functions can be called. </description> <tutorials> + <link title="Inspector plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/inspector_plugins.html</link> </tutorials> <methods> - <method name="_can_handle" qualifiers="virtual"> - <return type="bool"> - </return> - <argument index="0" name="object" type="Object"> - </argument> + <method name="_can_handle" qualifiers="virtual const"> + <return type="bool" /> + <argument index="0" name="object" type="Variant" /> <description> Returns [code]true[/code] if this object can be handled by this plugin. </description> </method> <method name="_parse_begin" qualifiers="virtual"> - <return type="void"> - </return> + <return type="void" /> <description> Called to allow adding controls at the beginning of the list. </description> </method> <method name="_parse_category" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="category" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="object" type="Object" /> + <argument index="1" name="category" type="String" /> <description> - Called to allow adding controls at the beginning of the category. </description> </method> <method name="_parse_end" qualifiers="virtual"> - <return type="void"> - </return> + <return type="void" /> <description> Called to allow adding controls at the end of the list. </description> </method> <method name="_parse_property" qualifiers="virtual"> - <return type="bool"> - </return> - <argument index="0" name="type" type="int"> - </argument> - <argument index="1" name="path" type="String"> - </argument> - <argument index="2" name="hint" type="int"> - </argument> - <argument index="3" name="hint_text" type="String"> - </argument> - <argument index="4" name="usage" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="object" type="Object" /> + <argument index="1" name="type" type="int" /> + <argument index="2" name="name" type="String" /> + <argument index="3" name="hint_type" type="int" /> + <argument index="4" name="hint_string" type="String" /> + <argument index="5" name="usage_flags" type="int" /> + <argument index="6" name="wide" type="bool" /> <description> Called to allow adding property specific editors to the inspector. Usually these inherit [EditorProperty]. Returning [code]true[/code] removes the built-in editor for this property, otherwise allows to insert a custom editor before the built-in one. </description> </method> <method name="add_custom_control"> - <return type="void"> - </return> - <argument index="0" name="control" type="Control"> - </argument> + <return type="void" /> + <argument index="0" name="control" type="Control" /> <description> - Adds a custom control, not necessarily a property editor. + Adds a custom control, which is not necessarily a property editor. </description> </method> <method name="add_property_editor"> - <return type="void"> - </return> - <argument index="0" name="property" type="String"> - </argument> - <argument index="1" name="editor" type="Control"> - </argument> + <return type="void" /> + <argument index="0" name="property" type="String" /> + <argument index="1" name="editor" type="Control" /> <description> - Adds a property editor, this must inherit [EditorProperty]. + Adds a property editor for an individual property. The [code]editor[/code] control must extend [EditorProperty]. </description> </method> <method name="add_property_editor_for_multiple_properties"> - <return type="void"> - </return> - <argument index="0" name="label" type="String"> - </argument> - <argument index="1" name="properties" type="PackedStringArray"> - </argument> - <argument index="2" name="editor" type="Control"> - </argument> + <return type="void" /> + <argument index="0" name="label" type="String" /> + <argument index="1" name="properties" type="PackedStringArray" /> + <argument index="2" name="editor" type="Control" /> <description> - Adds an editor that allows modifying multiple properties, this must inherit [EditorProperty]. + Adds an editor that allows modifying multiple properties. The [code]editor[/code] control must extend [EditorProperty]. </description> </method> </methods> diff --git a/doc/classes/EditorInterface.xml b/doc/classes/EditorInterface.xml index 3f324bf1a0..91e1dfbf57 100644 --- a/doc/classes/EditorInterface.xml +++ b/doc/classes/EditorInterface.xml @@ -11,267 +11,222 @@ </tutorials> <methods> <method name="edit_node"> - <return type="void"> - </return> - <argument index="0" name="node" type="Node"> - </argument> + <return type="void" /> + <argument index="0" name="node" type="Node" /> <description> Edits the given [Node]. The node will be also selected if it's inside the scene tree. </description> </method> <method name="edit_resource"> - <return type="void"> - </return> - <argument index="0" name="resource" type="Resource"> - </argument> + <return type="void" /> + <argument index="0" name="resource" type="Resource" /> <description> Edits the given [Resource]. </description> </method> <method name="get_base_control"> - <return type="Control"> - </return> + <return type="Control" /> <description> Returns the main container of Godot editor's window. For example, you can use it to retrieve the size of the container and place your controls accordingly. </description> </method> + <method name="get_command_palette" qualifiers="const"> + <return type="EditorCommandPalette" /> + <description> + </description> + </method> <method name="get_current_path" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the current path being viewed in the [FileSystemDock]. </description> </method> <method name="get_edited_scene_root"> - <return type="Node"> - </return> + <return type="Node" /> <description> Returns the edited (current) scene's root [Node]. </description> </method> <method name="get_editor_main_control"> - <return type="Control"> - </return> + <return type="Control" /> <description> Returns the main editor control. Use this as a parent for main screens. [b]Note:[/b] This returns the main editor control containing the whole editor, not the 2D or 3D viewports specifically. </description> </method> <method name="get_editor_paths"> - <return type="EditorPaths"> - </return> + <return type="EditorPaths" /> <description> </description> </method> <method name="get_editor_scale" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the actual scale of the editor UI ([code]1.0[/code] being 100% scale). This can be used to adjust position and dimensions of the UI added by plugins. [b]Note:[/b] This value is set via the [code]interface/editor/display_scale[/code] and [code]interface/editor/custom_display_scale[/code] editor settings. Editor must be restarted for changes to be properly applied. </description> </method> <method name="get_editor_settings"> - <return type="EditorSettings"> - </return> + <return type="EditorSettings" /> <description> Returns the editor's [EditorSettings] instance. </description> </method> <method name="get_file_system_dock"> - <return type="FileSystemDock"> - </return> + <return type="FileSystemDock" /> <description> Returns the editor's [FileSystemDock] instance. </description> </method> <method name="get_inspector" qualifiers="const"> - <return type="EditorInspector"> - </return> + <return type="EditorInspector" /> <description> Returns the editor's [EditorInspector] instance. </description> </method> <method name="get_open_scenes" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns an [Array] with the file paths of the currently opened scenes. </description> </method> <method name="get_playing_scene" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the name of the scene that is being played. If no scene is currently being played, returns an empty string. </description> </method> <method name="get_resource_filesystem"> - <return type="EditorFileSystem"> - </return> + <return type="EditorFileSystem" /> <description> Returns the editor's [EditorFileSystem] instance. </description> </method> <method name="get_resource_previewer"> - <return type="EditorResourcePreview"> - </return> + <return type="EditorResourcePreview" /> <description> Returns the editor's [EditorResourcePreview] instance. </description> </method> <method name="get_script_editor"> - <return type="ScriptEditor"> - </return> + <return type="ScriptEditor" /> <description> Returns the editor's [ScriptEditor] instance. </description> </method> <method name="get_selected_path" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the path of the directory currently selected in the [FileSystemDock]. If a file is selected, its base directory will be returned using [method String.get_base_dir] instead. </description> </method> <method name="get_selection"> - <return type="EditorSelection"> - </return> + <return type="EditorSelection" /> <description> Returns the editor's [EditorSelection] instance. </description> </method> <method name="inspect_object"> - <return type="void"> - </return> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="for_property" type="String" default=""""> - </argument> - <argument index="2" name="inspector_only" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="object" type="Object" /> + <argument index="1" name="for_property" type="String" default="""" /> + <argument index="2" name="inspector_only" type="bool" default="false" /> <description> Shows the given property on the given [code]object[/code] in the editor's Inspector dock. If [code]inspector_only[/code] is [code]true[/code], plugins will not attempt to edit [code]object[/code]. </description> </method> <method name="is_playing_scene" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if a scene is currently being played, [code]false[/code] otherwise. Paused scenes are considered as being played. </description> </method> <method name="is_plugin_enabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="plugin" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="plugin" type="String" /> <description> Returns [code]true[/code] if the specified [code]plugin[/code] is enabled. The plugin name is the same as its directory name. </description> </method> <method name="make_mesh_previews"> - <return type="Array"> - </return> - <argument index="0" name="meshes" type="Array"> - </argument> - <argument index="1" name="preview_size" type="int"> - </argument> + <return type="Array" /> + <argument index="0" name="meshes" type="Array" /> + <argument index="1" name="preview_size" type="int" /> <description> Returns mesh previews rendered at the given size as an [Array] of [Texture2D]s. </description> </method> <method name="open_scene_from_path"> - <return type="void"> - </return> - <argument index="0" name="scene_filepath" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="scene_filepath" type="String" /> <description> Opens the scene at the given path. </description> </method> <method name="play_current_scene"> - <return type="void"> - </return> + <return type="void" /> <description> Plays the currently active scene. </description> </method> <method name="play_custom_scene"> - <return type="void"> - </return> - <argument index="0" name="scene_filepath" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="scene_filepath" type="String" /> <description> Plays the scene specified by its filepath. </description> </method> <method name="play_main_scene"> - <return type="void"> - </return> + <return type="void" /> <description> Plays the main scene. </description> </method> <method name="reload_scene_from_path"> - <return type="void"> - </return> - <argument index="0" name="scene_filepath" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="scene_filepath" type="String" /> <description> Reloads the scene at the given path. </description> </method> <method name="save_scene"> - <return type="int" enum="Error"> - </return> + <return type="int" enum="Error" /> <description> Saves the scene. Returns either [code]OK[/code] or [code]ERR_CANT_CREATE[/code] (see [@GlobalScope] constants). </description> </method> <method name="save_scene_as"> - <return type="void"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="with_preview" type="bool" default="true"> - </argument> + <return type="void" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="with_preview" type="bool" default="true" /> <description> Saves the scene as a file at [code]path[/code]. </description> </method> <method name="select_file"> - <return type="void"> - </return> - <argument index="0" name="file" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="file" type="String" /> <description> Selects the file, with the path provided by [code]file[/code], in the FileSystem dock. </description> </method> <method name="set_main_screen_editor"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> <description> Sets the editor's current main screen to the one specified in [code]name[/code]. [code]name[/code] must match the text of the tab in question exactly ([code]2D[/code], [code]3D[/code], [code]Script[/code], [code]AssetLib[/code]). </description> </method> <method name="set_plugin_enabled"> - <return type="void"> - </return> - <argument index="0" name="plugin" type="String"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="plugin" type="String" /> + <argument index="1" name="enabled" type="bool" /> <description> Sets the enabled status of a plugin. The plugin name is the same as its directory name. </description> </method> <method name="stop_playing_scene"> - <return type="void"> - </return> + <return type="void" /> <description> Stops the scene that is currently playing. </description> diff --git a/doc/classes/EditorNode3DGizmo.xml b/doc/classes/EditorNode3DGizmo.xml index 221b5e44d6..91e024cc1c 100644 --- a/doc/classes/EditorNode3DGizmo.xml +++ b/doc/classes/EditorNode3DGizmo.xml @@ -1,189 +1,198 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="EditorNode3DGizmo" inherits="Node3DGizmo" version="4.0"> <brief_description> - Custom gizmo for editing Node3D objects. + Gizmo for editing Node3D objects. </brief_description> <description> - Custom gizmo that is used for providing custom visualization and editing (handles) for Node3D objects. See [EditorNode3DGizmoPlugin] for more information. + Gizmo that is used for providing custom visualization and editing (handles and subgizmos) for Node3D objects. Can be overridden to create custom gizmos, but for simple gizmos creating a [EditorNode3DGizmoPlugin] is usually recommended. </description> <tutorials> </tutorials> <methods> <method name="_commit_handle" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="restore" type="Variant"> - </argument> - <argument index="2" name="cancel" type="bool" default="false"> - </argument> - <description> - Commit a handle being edited (handles must have been previously added by [method add_handles]). - If the [code]cancel[/code] parameter is [code]true[/code], an option to restore the edited value to the original is provided. - </description> - </method> - <method name="_get_handle_name" qualifiers="virtual"> - <return type="String"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <description> - Gets the name of an edited handle (handles must have been previously added by [method add_handles]). + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="restore" type="Variant" /> + <argument index="2" name="cancel" type="bool" /> + <description> + Override this method to commit a handle being edited (handles must have been previously added by [method add_handles]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [code]restore[/code] argument as "undo". + If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] value should be directly set, without any [UndoRedo] action. + </description> + </method> + <method name="_commit_subgizmos" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="ids" type="PackedInt32Array" /> + <argument index="1" name="restores" type="Transform3D[]" /> + <argument index="2" name="cancel" type="bool" /> + <description> + Override this method to commit a group of subgizmos being edited (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). This usually means creating an [UndoRedo] action for the change, using the current transforms as "do" and the [code]restore[/code] transforms as "undo". + If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] transforms should be directly set, without any [UndoRedo] action. + </description> + </method> + <method name="_get_handle_name" qualifiers="virtual const"> + <return type="String" /> + <argument index="0" name="id" type="int" /> + <description> + Override this method to return the name of an edited handle (handles must have been previously added by [method add_handles]). Handles can be named for reference to the user when editing. </description> </method> - <method name="_get_handle_value" qualifiers="virtual"> - <return type="Variant"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <method name="_get_handle_value" qualifiers="virtual const"> + <return type="Variant" /> + <argument index="0" name="id" type="int" /> <description> - Gets actual value of a handle. This value can be anything and used for eventually undoing the motion when calling [method _commit_handle]. + Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the [code]restore[/code] argument in [method _commit_handle]. </description> </method> - <method name="_is_handle_highlighted" qualifiers="virtual"> - <return type="bool"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <method name="_get_subgizmo_transform" qualifiers="virtual const"> + <return type="Transform3D" /> + <argument index="0" name="id" type="int" /> <description> - Returns [code]true[/code] if the handle at index [code]index[/code] is highlighted by being hovered with the mouse. + Override this method to return the current transform of a subgizmo. This transform will be requested at the start of an edit and used as the [code]restore[/code] argument in [method _commit_subgizmos]. + </description> + </method> + <method name="_is_handle_highlighted" qualifiers="virtual const"> + <return type="bool" /> + <argument index="0" name="id" type="int" /> + <description> + Override this method to return [code]true[/code] whenever the given handle should be highlighted in the editor. </description> </method> <method name="_redraw" qualifiers="virtual"> - <return type="void"> - </return> + <return type="void" /> <description> - This function is called when the [Node3D] this gizmo refers to changes (the [method Node3D.update_gizmo] is called). + Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call [method clear] at the beginning of this method and then add visual elements depending on the node's properties. </description> </method> <method name="_set_handle" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="camera" type="Camera3D"> - </argument> - <argument index="2" name="point" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="camera" type="Camera3D" /> + <argument index="2" name="point" type="Vector2" /> + <description> + Override this method to update the node properties when the user drags a gizmo handle (previously added with [method add_handles]). The provided [code]point[/code] is the mouse position in screen coordinates and the [code]camera[/code] can be used to convert it to raycasts. + </description> + </method> + <method name="_set_subgizmo_transform" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="transform" type="Transform3D" /> <description> - This function is used when the user drags a gizmo handle (previously added with [method add_handles]) in screen coordinates. - The [Camera3D] is also provided so screen coordinates can be converted to raycasts. + Override this method to update the node properties during subgizmo editing (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). The [code]transform[/code] is given in the Node3D's local coordinate system. + </description> + </method> + <method name="_subgizmos_intersect_frustum" qualifiers="virtual const"> + <return type="PackedInt32Array" /> + <argument index="0" name="camera" type="Camera3D" /> + <argument index="1" name="frustum" type="Plane[]" /> + <description> + Override this method to allow selecting subgizmos using mouse drag box selection. Given a [code]camera[/code] and a [code]frustum[/code], this method should return which subgizmos are contained within the frustum. The [code]frustum[/code] argument consists of an [code]Array[/code] with all the [code]Plane[/code]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. + </description> + </method> + <method name="_subgizmos_intersect_ray" qualifiers="virtual const"> + <return type="int" /> + <argument index="0" name="camera" type="Camera3D" /> + <argument index="1" name="point" type="Vector2" /> + <description> + Override this method to allow selecting subgizmos using mouse clicks. Given a [code]camera[/code] and a [code]point[/code] in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. </description> </method> <method name="add_collision_segments"> - <return type="void"> - </return> - <argument index="0" name="segments" type="PackedVector3Array"> - </argument> + <return type="void" /> + <argument index="0" name="segments" type="PackedVector3Array" /> <description> - Adds the specified [code]segments[/code] to the gizmo's collision shape for picking. Call this function during [method _redraw]. + Adds the specified [code]segments[/code] to the gizmo's collision shape for picking. Call this method during [method _redraw]. </description> </method> <method name="add_collision_triangles"> - <return type="void"> - </return> - <argument index="0" name="triangles" type="TriangleMesh"> - </argument> + <return type="void" /> + <argument index="0" name="triangles" type="TriangleMesh" /> <description> - Adds collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this function during [method _redraw]. + Adds collision triangles to the gizmo for picking. A [TriangleMesh] can be generated from a regular [Mesh] too. Call this method during [method _redraw]. </description> </method> <method name="add_handles"> - <return type="void"> - </return> - <argument index="0" name="handles" type="PackedVector3Array"> - </argument> - <argument index="1" name="material" type="Material"> - </argument> - <argument index="2" name="billboard" type="bool" default="false"> - </argument> - <argument index="3" name="secondary" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="handles" type="PackedVector3Array" /> + <argument index="1" name="material" type="Material" /> + <argument index="2" name="ids" type="PackedInt32Array" /> + <argument index="3" name="billboard" type="bool" default="false" /> + <argument index="4" name="secondary" type="bool" default="false" /> <description> - Adds a list of handles (points) which can be used to deform the object being edited. - There are virtual functions which will be called upon editing of these handles. Call this function during [method _redraw]. + Adds a list of handles (points) which can be used to edit the properties of the gizmo's Node3D. The [code]ids[/code] argument can be used to specify a custom identifier for each handle, if an empty [code]Array[/code] is passed, the ids will be assigned automatically from the [code]handles[/code] argument order. + There are virtual methods which will be called upon editing of these handles. Call this method during [method _redraw]. </description> </method> <method name="add_lines"> - <return type="void"> - </return> - <argument index="0" name="lines" type="PackedVector3Array"> - </argument> - <argument index="1" name="material" type="Material"> - </argument> - <argument index="2" name="billboard" type="bool" default="false"> - </argument> - <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> - </argument> + <return type="void" /> + <argument index="0" name="lines" type="PackedVector3Array" /> + <argument index="1" name="material" type="Material" /> + <argument index="2" name="billboard" type="bool" default="false" /> + <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> <description> - Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this function during [method _redraw]. + Adds lines to the gizmo (as sets of 2 points), with a given material. The lines are used for visualizing the gizmo. Call this method during [method _redraw]. </description> </method> <method name="add_mesh"> - <return type="void"> - </return> - <argument index="0" name="mesh" type="ArrayMesh"> - </argument> - <argument index="1" name="billboard" type="bool" default="false"> - </argument> - <argument index="2" name="skeleton" type="SkinReference" default="null"> - </argument> - <argument index="3" name="material" type="Material" default="null"> - </argument> + <return type="void" /> + <argument index="0" name="mesh" type="ArrayMesh" /> + <argument index="1" name="material" type="Material" default="null" /> + <argument index="2" name="transform" type="Transform3D" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)" /> + <argument index="3" name="skeleton" type="SkinReference" default="null" /> <description> - Adds a mesh to the gizmo with the specified [code]billboard[/code] state, [code]skeleton[/code] and [code]material[/code]. If [code]billboard[/code] is [code]true[/code], the mesh will rotate to always face the camera. Call this function during [method _redraw]. + Adds a mesh to the gizmo with the specified [code]material[/code], local [code]transform[/code] and [code]skeleton[/code]. Call this method during [method _redraw]. </description> </method> <method name="add_unscaled_billboard"> - <return type="void"> - </return> - <argument index="0" name="material" type="Material"> - </argument> - <argument index="1" name="default_scale" type="float" default="1"> - </argument> - <argument index="2" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> - </argument> + <return type="void" /> + <argument index="0" name="material" type="Material" /> + <argument index="1" name="default_scale" type="float" default="1" /> + <argument index="2" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> <description> - Adds an unscaled billboard for visualization. Call this function during [method _redraw]. + Adds an unscaled billboard for visualization and selection. Call this method during [method _redraw]. </description> </method> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> Removes everything in the gizmo including meshes, collisions and handles. </description> </method> <method name="get_plugin" qualifiers="const"> - <return type="EditorNode3DGizmoPlugin"> - </return> + <return type="EditorNode3DGizmoPlugin" /> <description> Returns the [EditorNode3DGizmoPlugin] that owns this gizmo. It's useful to retrieve materials using [method EditorNode3DGizmoPlugin.get_material]. </description> </method> <method name="get_spatial_node" qualifiers="const"> - <return type="Node3D"> - </return> + <return type="Node3D" /> <description> Returns the Node3D node associated with this gizmo. </description> </method> + <method name="get_subgizmo_selection" qualifiers="const"> + <return type="PackedInt32Array" /> + <description> + Returns a list of the currently selected subgizmos. Can be used to highlight selected elements during [method _redraw]. + </description> + </method> + <method name="is_subgizmo_selected" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="arg0" type="int" /> + <description> + Returns [code]true[/code] if the given subgizmo is currently selected. Can be used to highlight selected elements during [method _redraw]. + </description> + </method> <method name="set_hidden"> - <return type="void"> - </return> - <argument index="0" name="hidden" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="hidden" type="bool" /> <description> Sets the gizmo's hidden state. If [code]true[/code], the gizmo will be hidden. If [code]false[/code], it will be shown. </description> </method> <method name="set_spatial_node"> - <return type="void"> - </return> - <argument index="0" name="node" type="Node"> - </argument> + <return type="void" /> + <argument index="0" name="node" type="Node" /> <description> Sets the reference [Node3D] node for the gizmo. [code]node[/code] must inherit from [Node3D]. </description> diff --git a/doc/classes/EditorNode3DGizmoPlugin.xml b/doc/classes/EditorNode3DGizmoPlugin.xml index 41c94cbbc6..4ba455a336 100644 --- a/doc/classes/EditorNode3DGizmoPlugin.xml +++ b/doc/classes/EditorNode3DGizmoPlugin.xml @@ -10,189 +10,186 @@ <link title="Spatial gizmo plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/spatial_gizmos.html</link> </tutorials> <methods> - <method name="_can_be_hidden" qualifiers="virtual"> - <return type="bool"> - </return> + <method name="_can_be_hidden" qualifiers="virtual const"> + <return type="bool" /> <description> - Override this method to define whether the gizmo can be hidden or not. Returns [code]true[/code] if not overridden. + Override this method to define whether the gizmos handled by this plugin can be hidden or not. Returns [code]true[/code] if not overridden. </description> </method> <method name="_commit_handle" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="gizmo" type="EditorNode3DGizmo"> - </argument> - <argument index="1" name="index" type="int"> - </argument> - <argument index="2" name="restore" type="Variant"> - </argument> - <argument index="3" name="cancel" type="bool" default="false"> - </argument> - <description> - Override this method to commit gizmo handles. Called for this plugin's active gizmos. - </description> - </method> - <method name="_create_gizmo" qualifiers="virtual"> - <return type="EditorNode3DGizmo"> - </return> - <argument index="0" name="spatial" type="Node3D"> - </argument> + <return type="void" /> + <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> + <argument index="1" name="handle_id" type="int" /> + <argument index="2" name="restore" type="Variant" /> + <argument index="3" name="cancel" type="bool" /> + <description> + Override this method to commit a handle being edited (handles must have been previously added by [method EditorNode3DGizmo.add_handles] during [method _redraw]). This usually means creating an [UndoRedo] action for the change, using the current handle value as "do" and the [code]restore[/code] argument as "undo". + If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] value should be directly set, without any [UndoRedo] action. Called for this plugin's active gizmos. + </description> + </method> + <method name="_commit_subgizmos" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> + <argument index="1" name="ids" type="PackedInt32Array" /> + <argument index="2" name="restores" type="Transform3D[]" /> + <argument index="3" name="cancel" type="bool" /> + <description> + Override this method to commit a group of subgizmos being edited (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). This usually means creating an [UndoRedo] action for the change, using the current transforms as "do" and the [code]restore[/code] transforms as "undo". + If the [code]cancel[/code] argument is [code]true[/code], the [code]restore[/code] transforms should be directly set, without any [UndoRedo] action. As with all subgizmo methods, transforms are given in local space respect to the gizmo's Node3D. Called for this plugin's active gizmos. + </description> + </method> + <method name="_create_gizmo" qualifiers="virtual const"> + <return type="EditorNode3DGizmo" /> + <argument index="0" name="for_node_3d" type="Node3D" /> <description> Override this method to return a custom [EditorNode3DGizmo] for the spatial nodes of your choice, return [code]null[/code] for the rest of nodes. See also [method _has_gizmo]. </description> </method> - <method name="_get_gizmo_name" qualifiers="virtual"> - <return type="String"> - </return> + <method name="_get_gizmo_name" qualifiers="virtual const"> + <return type="String" /> <description> Override this method to provide the name that will appear in the gizmo visibility menu. </description> </method> - <method name="_get_handle_name" qualifiers="virtual"> - <return type="String"> - </return> - <argument index="0" name="gizmo" type="EditorNode3DGizmo"> - </argument> - <argument index="1" name="index" type="int"> - </argument> + <method name="_get_handle_name" qualifiers="virtual const"> + <return type="String" /> + <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> + <argument index="1" name="handle_id" type="int" /> <description> Override this method to provide gizmo's handle names. Called for this plugin's active gizmos. </description> </method> - <method name="_get_handle_value" qualifiers="virtual"> - <return type="Variant"> - </return> - <argument index="0" name="gizmo" type="EditorNode3DGizmo"> - </argument> - <argument index="1" name="index" type="int"> - </argument> + <method name="_get_handle_value" qualifiers="virtual const"> + <return type="Variant" /> + <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> + <argument index="1" name="handle_id" type="int" /> + <description> + Override this method to return the current value of a handle. This value will be requested at the start of an edit and used as the [code]restore[/code] argument in [method _commit_handle]. Called for this plugin's active gizmos. + </description> + </method> + <method name="_get_priority" qualifiers="virtual const"> + <return type="int" /> <description> - Gets actual value of a handle from gizmo. Called for this plugin's active gizmos. + Override this method to set the gizmo's priority. Gizmos with higher priority will have precedence when processing inputs like handles or subgizmos selection. + All built-in editor gizmos return a priority of [code]-1[/code]. If not overridden, this method will return [code]0[/code], which means custom gizmos will automatically get higher priority than built-in gizmos. </description> </method> - <method name="_get_priority" qualifiers="virtual"> - <return type="int"> - </return> + <method name="_get_subgizmo_transform" qualifiers="virtual const"> + <return type="Transform3D" /> + <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> + <argument index="1" name="subgizmo_id" type="int" /> <description> - Override this method to set the gizmo's priority. Higher values correspond to higher priority. If a gizmo with higher priority conflicts with another gizmo, only the gizmo with higher priority will be used. - All built-in editor gizmos return a priority of [code]-1[/code]. If not overridden, this method will return [code]0[/code], which means custom gizmos will automatically override built-in gizmos. + Override this method to return the current transform of a subgizmo. As with all subgizmo methods, the transform should be in local space respect to the gizmo's Node3D. This transform will be requested at the start of an edit and used in the [code]restore[/code] argument in [method _commit_subgizmos]. Called for this plugin's active gizmos. </description> </method> - <method name="_has_gizmo" qualifiers="virtual"> - <return type="bool"> - </return> - <argument index="0" name="spatial" type="Node3D"> - </argument> + <method name="_has_gizmo" qualifiers="virtual const"> + <return type="bool" /> + <argument index="0" name="for_node_3d" type="Node3D" /> <description> Override this method to define which Node3D nodes have a gizmo from this plugin. Whenever a [Node3D] node is added to a scene this method is called, if it returns [code]true[/code] the node gets a generic [EditorNode3DGizmo] assigned and is added to this plugin's list of active gizmos. </description> </method> - <method name="_is_handle_highlighted" qualifiers="virtual"> - <return type="bool"> - </return> - <argument index="0" name="gizmo" type="EditorNode3DGizmo"> - </argument> - <argument index="1" name="index" type="int"> - </argument> + <method name="_is_handle_highlighted" qualifiers="virtual const"> + <return type="bool" /> + <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> + <argument index="1" name="handle_id" type="int" /> <description> - Gets whether a handle is highlighted or not. Called for this plugin's active gizmos. + Override this method to return [code]true[/code] whenever to given handle should be highlighted in the editor. Called for this plugin's active gizmos. </description> </method> - <method name="_is_selectable_when_hidden" qualifiers="virtual"> - <return type="bool"> - </return> + <method name="_is_selectable_when_hidden" qualifiers="virtual const"> + <return type="bool" /> <description> Override this method to define whether Node3D with this gizmo should be selectable even when the gizmo is hidden. </description> </method> <method name="_redraw" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="gizmo" type="EditorNode3DGizmo"> - </argument> + <return type="void" /> + <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> <description> - Callback to redraw the provided gizmo. Called for this plugin's active gizmos. + Override this method to add all the gizmo elements whenever a gizmo update is requested. It's common to call [method EditorNode3DGizmo.clear] at the beginning of this method and then add visual elements depending on the node's properties. </description> </method> <method name="_set_handle" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="gizmo" type="EditorNode3DGizmo"> - </argument> - <argument index="1" name="index" type="int"> - </argument> - <argument index="2" name="camera" type="Camera3D"> - </argument> - <argument index="3" name="point" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> + <argument index="1" name="handle_id" type="int" /> + <argument index="2" name="camera" type="Camera3D" /> + <argument index="3" name="screen_pos" type="Vector2" /> + <description> + Override this method to update the node's properties when the user drags a gizmo handle (previously added with [method EditorNode3DGizmo.add_handles]). The provided [code]point[/code] is the mouse position in screen coordinates and the [code]camera[/code] can be used to convert it to raycasts. Called for this plugin's active gizmos. + </description> + </method> + <method name="_set_subgizmo_transform" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> + <argument index="1" name="subgizmo_id" type="int" /> + <argument index="2" name="transform" type="Transform3D" /> + <description> + Override this method to update the node properties during subgizmo editing (see [method _subgizmos_intersect_ray] and [method _subgizmos_intersect_frustum]). The [code]transform[/code] is given in the Node3D's local coordinate system. Called for this plugin's active gizmos. + </description> + </method> + <method name="_subgizmos_intersect_frustum" qualifiers="virtual const"> + <return type="PackedInt32Array" /> + <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> + <argument index="1" name="camera" type="Camera3D" /> + <argument index="2" name="frustum_planes" type="Plane[]" /> + <description> + Override this method to allow selecting subgizmos using mouse drag box selection. Given a [code]camera[/code] and a [code]frustum[/code], this method should return which subgizmos are contained within the frustum. The [code]frustum[/code] argument consists of an [code]Array[/code] with all the [code]Plane[/code]s that make up the selection frustum. The returned value should contain a list of unique subgizmo identifiers, these identifiers can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos. + </description> + </method> + <method name="_subgizmos_intersect_ray" qualifiers="virtual const"> + <return type="int" /> + <argument index="0" name="gizmo" type="EditorNode3DGizmo" /> + <argument index="1" name="camera" type="Camera3D" /> + <argument index="2" name="screen_pos" type="Vector2" /> <description> - Update the value of a handle after it has been updated. Called for this plugin's active gizmos. + Override this method to allow selecting subgizmos using mouse clicks. Given a [code]camera[/code] and a [code]point[/code] in screen coordinates, this method should return which subgizmo should be selected. The returned value should be a unique subgizmo identifier, which can have any non-negative value and will be used in other virtual methods like [method _get_subgizmo_transform] or [method _commit_subgizmos]. Called for this plugin's active gizmos. </description> </method> <method name="add_material"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> - <argument index="1" name="material" type="StandardMaterial3D"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> + <argument index="1" name="material" type="StandardMaterial3D" /> <description> Adds a new material to the internal material list for the plugin. It can then be accessed with [method get_material]. Should not be overridden. </description> </method> <method name="create_handle_material"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> - <argument index="1" name="billboard" type="bool" default="false"> - </argument> - <argument index="2" name="texture" type="Texture2D" default="null"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> + <argument index="1" name="billboard" type="bool" default="false" /> + <argument index="2" name="texture" type="Texture2D" default="null" /> <description> Creates a handle material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_handles]. Should not be overridden. You can optionally provide a texture to use instead of the default icon. </description> </method> <method name="create_icon_material"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> - <argument index="1" name="texture" type="Texture2D"> - </argument> - <argument index="2" name="on_top" type="bool" default="false"> - </argument> - <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> + <argument index="1" name="texture" type="Texture2D" /> + <argument index="2" name="on_top" type="bool" default="false" /> + <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" /> <description> Creates an icon material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_unscaled_billboard]. Should not be overridden. </description> </method> <method name="create_material"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> - <argument index="2" name="billboard" type="bool" default="false"> - </argument> - <argument index="3" name="on_top" type="bool" default="false"> - </argument> - <argument index="4" name="use_vertex_color" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> + <argument index="1" name="color" type="Color" /> + <argument index="2" name="billboard" type="bool" default="false" /> + <argument index="3" name="on_top" type="bool" default="false" /> + <argument index="4" name="use_vertex_color" type="bool" default="false" /> <description> Creates an unshaded material with its variants (selected and/or editable) and adds them to the internal material list. They can then be accessed with [method get_material] and used in [method EditorNode3DGizmo.add_mesh] and [method EditorNode3DGizmo.add_lines]. Should not be overridden. </description> </method> <method name="get_material"> - <return type="StandardMaterial3D"> - </return> - <argument index="0" name="name" type="String"> - </argument> - <argument index="1" name="gizmo" type="EditorNode3DGizmo" default="null"> - </argument> + <return type="StandardMaterial3D" /> + <argument index="0" name="name" type="String" /> + <argument index="1" name="gizmo" type="EditorNode3DGizmo" default="null" /> <description> Gets material from the internal list of materials. If an [EditorNode3DGizmo] is provided, it will try to get the corresponding variant (selected and/or editable). </description> diff --git a/doc/classes/EditorPaths.xml b/doc/classes/EditorPaths.xml index d0d785dbb8..28a8314857 100644 --- a/doc/classes/EditorPaths.xml +++ b/doc/classes/EditorPaths.xml @@ -8,32 +8,27 @@ </tutorials> <methods> <method name="get_cache_dir" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> </description> </method> <method name="get_config_dir" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> </description> </method> <method name="get_data_dir" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> </description> </method> <method name="get_self_contained_file" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> </description> </method> <method name="is_self_contained" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> </description> </method> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index 753227513b..b8436be76a 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -11,65 +11,56 @@ </tutorials> <methods> <method name="_apply_changes" qualifiers="virtual"> - <return type="void"> - </return> + <return type="void" /> <description> This method is called when the editor is about to save the project, switch to another tab, etc. It asks the plugin to apply any pending state changes to ensure consistency. This is used, for example, in shader editors to let the plugin know that it must apply the shader code being written by the user to the object. </description> </method> <method name="_build" qualifiers="virtual"> - <return type="bool"> - </return> + <return type="bool" /> <description> This method is called when the editor is about to run the project. The plugin can then perform required operations before the project runs. This method must return a boolean. If this method returns [code]false[/code], the project will not run. The run is aborted immediately, so this also prevents all other plugins' [method _build] methods from running. </description> </method> <method name="_clear" qualifiers="virtual"> - <return type="void"> - </return> + <return type="void" /> <description> Clear all the state and reset the object being edited to zero. This ensures your plugin does not keep editing a currently existing node, or a node from the wrong scene. </description> </method> <method name="_disable_plugin" qualifiers="virtual"> - <return type="void"> - </return> + <return type="void" /> <description> Called by the engine when the user disables the [EditorPlugin] in the Plugin tab of the project settings window. </description> </method> <method name="_edit" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="object" type="Object"> - </argument> + <return type="void" /> + <argument index="0" name="object" type="Variant" /> <description> This function is used for plugins that edit specific object types (nodes or resources). It requests the editor to edit the given object. </description> </method> <method name="_enable_plugin" qualifiers="virtual"> - <return type="void"> - </return> + <return type="void" /> <description> Called by the engine when the user enables the [EditorPlugin] in the Plugin tab of the project settings window. </description> </method> - <method name="_forward_canvas_draw_over_viewport" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="overlay" type="Control"> - </argument> + <method name="_forward_3d_draw_over_viewport" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="viewport_control" type="Control" /> <description> - Called by the engine when the 2D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays]. + Called by the engine when the 3D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays]. [codeblocks] [gdscript] - func _forward_canvas_draw_over_viewport(overlay): + func _forward_3d_draw_over_viewport(overlay): # Draw a circle at cursor position. - overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.white) + overlay.draw_circle(overlay.get_local_mouse_position(), 64) - func _forward_canvas_gui_input(event): + func _forward_3d_gui_input(camera, event): if event is InputEventMouseMotion: # Redraw viewport when cursor is moved. update_overlays() @@ -77,13 +68,13 @@ return false [/gdscript] [csharp] - public override void ForwardCanvasDrawOverViewport(Godot.Control overlay) + public override void _Forward3dDrawOverViewport(Godot.Control overlay) { // Draw a circle at cursor position. overlay.DrawCircle(overlay.GetLocalMousePosition(), 64, Colors.White); } - public override bool ForwardCanvasGuiInput(InputEvent @event) + public override bool _Forward3dGuiInput(Godot.Camera3D camera, InputEvent @event) { if (@event is InputEventMouseMotion) { @@ -96,32 +87,29 @@ [/codeblocks] </description> </method> - <method name="_forward_canvas_force_draw_over_viewport" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="overlay" type="Control"> - </argument> + <method name="_forward_3d_force_draw_over_viewport" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="viewport_control" type="Control" /> <description> - This method is the same as [method _forward_canvas_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else. + This method is the same as [method _forward_3d_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else. You need to enable calling of this method by using [method set_force_draw_over_forwarding_enabled]. </description> </method> - <method name="_forward_canvas_gui_input" qualifiers="virtual"> - <return type="bool"> - </return> - <argument index="0" name="event" type="InputEvent"> - </argument> + <method name="_forward_3d_gui_input" qualifiers="virtual"> + <return type="bool" /> + <argument index="0" name="viewport_camera" type="Camera3D" /> + <argument index="1" name="event" type="InputEvent" /> <description> - Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 2D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example: + Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 3D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example: [codeblocks] [gdscript] - # Prevents the InputEvent to reach other Editor classes - func _forward_canvas_gui_input(event): + # Prevents the InputEvent to reach other Editor classes. + func _forward_3d_gui_input(camera, event): return true [/gdscript] [csharp] - // Prevents the InputEvent to reach other Editor classes - public override bool ForwardCanvasGuiInput(InputEvent @event) + // Prevents the InputEvent to reach other Editor classes. + public override bool _Forward3dGuiInput(Camera3D camera, InputEvent @event) { return true; } @@ -131,12 +119,12 @@ [codeblocks] [gdscript] # Consumes InputEventMouseMotion and forwards other InputEvent types. - func _forward_canvas_gui_input(event): + func _forward_3d_gui_input(camera, event): return event is InputEventMouseMotion [/gdscript] [csharp] // Consumes InputEventMouseMotion and forwards other InputEvent types. - public override bool ForwardCanvasGuiInput(InputEvent @event) + public override bool _Forward3dGuiInput(Camera3D camera, InputEvent @event) { return @event is InputEventMouseMotion; } @@ -144,20 +132,18 @@ [/codeblocks] </description> </method> - <method name="_forward_spatial_draw_over_viewport" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="overlay" type="Control"> - </argument> + <method name="_forward_canvas_draw_over_viewport" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="viewport_control" type="Control" /> <description> - Called by the engine when the 3D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays]. + Called by the engine when the 2D editor's viewport is updated. Use the [code]overlay[/code] [Control] for drawing. You can update the viewport manually by calling [method update_overlays]. [codeblocks] [gdscript] - func _forward_spatial_draw_over_viewport(overlay): + func _forward_canvas_draw_over_viewport(overlay): # Draw a circle at cursor position. - overlay.draw_circle(overlay.get_local_mouse_position(), 64) + overlay.draw_circle(overlay.get_local_mouse_position(), 64, Color.white) - func _forward_spatial_gui_input(camera, event): + func _forward_canvas_gui_input(event): if event is InputEventMouseMotion: # Redraw viewport when cursor is moved. update_overlays() @@ -165,13 +151,13 @@ return false [/gdscript] [csharp] - public override void ForwardSpatialDrawOverViewport(Godot.Control overlay) + public override void ForwardCanvasDrawOverViewport(Godot.Control overlay) { // Draw a circle at cursor position. overlay.DrawCircle(overlay.GetLocalMousePosition(), 64, Colors.White); } - public override bool ForwardSpatialGuiInput(Godot.Camera3D camera, InputEvent @event) + public override bool ForwardCanvasGuiInput(InputEvent @event) { if (@event is InputEventMouseMotion) { @@ -184,34 +170,28 @@ [/codeblocks] </description> </method> - <method name="_forward_spatial_force_draw_over_viewport" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="overlay" type="Control"> - </argument> + <method name="_forward_canvas_force_draw_over_viewport" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="viewport_control" type="Control" /> <description> - This method is the same as [method _forward_spatial_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else. + This method is the same as [method _forward_canvas_draw_over_viewport], except it draws on top of everything. Useful when you need an extra layer that shows over anything else. You need to enable calling of this method by using [method set_force_draw_over_forwarding_enabled]. </description> </method> - <method name="_forward_spatial_gui_input" qualifiers="virtual"> - <return type="bool"> - </return> - <argument index="0" name="camera" type="Camera3D"> - </argument> - <argument index="1" name="event" type="InputEvent"> - </argument> + <method name="_forward_canvas_gui_input" qualifiers="virtual"> + <return type="bool" /> + <argument index="0" name="event" type="InputEvent" /> <description> - Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 3D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example: + Called when there is a root node in the current edited scene, [method _handles] is implemented and an [InputEvent] happens in the 2D viewport. Intercepts the [InputEvent], if [code]return true[/code] [EditorPlugin] consumes the [code]event[/code], otherwise forwards [code]event[/code] to other Editor classes. Example: [codeblocks] [gdscript] - # Prevents the InputEvent to reach other Editor classes. - func _forward_spatial_gui_input(camera, event): + # Prevents the InputEvent to reach other Editor classes + func _forward_canvas_gui_input(event): return true [/gdscript] [csharp] - // Prevents the InputEvent to reach other Editor classes. - public override bool ForwardSpatialGuiInput(Camera3D camera, InputEvent @event) + // Prevents the InputEvent to reach other Editor classes + public override bool ForwardCanvasGuiInput(InputEvent @event) { return true; } @@ -221,12 +201,12 @@ [codeblocks] [gdscript] # Consumes InputEventMouseMotion and forwards other InputEvent types. - func _forward_spatial_gui_input(camera, event): + func _forward_canvas_gui_input(event): return event is InputEventMouseMotion [/gdscript] [csharp] // Consumes InputEventMouseMotion and forwards other InputEvent types. - public override bool ForwardSpatialGuiInput(Camera3D camera, InputEvent @event) + public override bool ForwardCanvasGuiInput(InputEvent @event) { return @event is InputEventMouseMotion; } @@ -234,16 +214,14 @@ [/codeblocks] </description> </method> - <method name="_get_breakpoints" qualifiers="virtual"> - <return type="PackedStringArray"> - </return> + <method name="_get_breakpoints" qualifiers="virtual const"> + <return type="PackedStringArray" /> <description> This is for editors that edit script-based objects. You can return a list of breakpoints in the format ([code]script:line[/code]), for example: [code]res://path_to_script.gd:25[/code]. </description> </method> - <method name="_get_plugin_icon" qualifiers="virtual"> - <return type="Texture2D"> - </return> + <method name="_get_plugin_icon" qualifiers="virtual const"> + <return type="Texture2D" /> <description> Override this method in your plugin to return a [Texture2D] in order to give it an icon. For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons. @@ -268,110 +246,87 @@ [/codeblocks] </description> </method> - <method name="_get_plugin_name" qualifiers="virtual"> - <return type="String"> - </return> + <method name="_get_plugin_name" qualifiers="virtual const"> + <return type="String" /> <description> Override this method in your plugin to provide the name of the plugin when displayed in the Godot editor. For main screen plugins, this appears at the top of the screen, to the right of the "2D", "3D", "Script", and "AssetLib" buttons. </description> </method> - <method name="_get_state" qualifiers="virtual"> - <return type="Dictionary"> - </return> + <method name="_get_state" qualifiers="virtual const"> + <return type="Dictionary" /> <description> Gets the state of your plugin editor. This is used when saving the scene (so state is kept when opening it again) and for switching tabs (so state can be restored when the tab returns). </description> </method> <method name="_get_window_layout" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="layout" type="ConfigFile"> - </argument> + <return type="void" /> + <argument index="0" name="configuration" type="ConfigFile" /> <description> Gets the GUI layout of the plugin. This is used to save the project's editor layout when [method queue_save_layout] is called or the editor layout was changed(For example changing the position of a dock). </description> </method> - <method name="_handles" qualifiers="virtual"> - <return type="bool"> - </return> - <argument index="0" name="object" type="Object"> - </argument> + <method name="_handles" qualifiers="virtual const"> + <return type="bool" /> + <argument index="0" name="object" type="Variant" /> <description> - Implement this function if your plugin edits a specific type of object (Resource or Node). If you return [code]true[/code], then you will get the functions [method _edit] and [method _make_visible] called when the editor requests them. If you have declared the methods [method _forward_canvas_gui_input] and [method _forward_spatial_gui_input] these will be called too. + Implement this function if your plugin edits a specific type of object (Resource or Node). If you return [code]true[/code], then you will get the functions [method _edit] and [method _make_visible] called when the editor requests them. If you have declared the methods [method _forward_canvas_gui_input] and [method _forward_3d_gui_input] these will be called too. </description> </method> - <method name="_has_main_screen" qualifiers="virtual"> - <return type="bool"> - </return> + <method name="_has_main_screen" qualifiers="virtual const"> + <return type="bool" /> <description> Returns [code]true[/code] if this is a main screen editor plugin (it goes in the workspace selector together with [b]2D[/b], [b]3D[/b], [b]Script[/b] and [b]AssetLib[/b]). </description> </method> <method name="_make_visible" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="visible" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="visible" type="bool" /> <description> This function will be called when the editor is requested to become visible. It is used for plugins that edit a specific object type. Remember that you have to manage the visibility of all your editor controls manually. </description> </method> <method name="_save_external_data" qualifiers="virtual"> - <return type="void"> - </return> + <return type="void" /> <description> This method is called after the editor saves the project or when it's closed. It asks the plugin to save edited external scenes/resources. </description> </method> <method name="_set_state" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="state" type="Dictionary"> - </argument> + <return type="void" /> + <argument index="0" name="state" type="Dictionary" /> <description> Restore the state saved by [method _get_state]. </description> </method> <method name="_set_window_layout" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="layout" type="ConfigFile"> - </argument> + <return type="void" /> + <argument index="0" name="configuration" type="ConfigFile" /> <description> Restore the plugin GUI layout saved by [method _get_window_layout]. </description> </method> <method name="add_autoload_singleton"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> - <argument index="1" name="path" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> + <argument index="1" name="path" type="String" /> <description> Adds a script at [code]path[/code] to the Autoload list as [code]name[/code]. </description> </method> <method name="add_control_to_bottom_panel"> - <return type="Button"> - </return> - <argument index="0" name="control" type="Control"> - </argument> - <argument index="1" name="title" type="String"> - </argument> + <return type="Button" /> + <argument index="0" name="control" type="Control" /> + <argument index="1" name="title" type="String" /> <description> Adds a control to the bottom panel (together with Output, Debug, Animation, etc). Returns a reference to the button added. It's up to you to hide/show the button when needed. When your plugin is deactivated, make sure to remove your custom control with [method remove_control_from_bottom_panel] and free it with [method Node.queue_free]. </description> </method> <method name="add_control_to_container"> - <return type="void"> - </return> - <argument index="0" name="container" type="int" enum="EditorPlugin.CustomControlContainer"> - </argument> - <argument index="1" name="control" type="Control"> - </argument> + <return type="void" /> + <argument index="0" name="container" type="int" enum="EditorPlugin.CustomControlContainer" /> + <argument index="1" name="control" type="Control" /> <description> Adds a custom control to a container (see [enum CustomControlContainer]). There are many locations where custom controls can be added in the editor UI. Please remember that you have to manage the visibility of your custom controls yourself (and likely hide it after adding it). @@ -379,12 +334,9 @@ </description> </method> <method name="add_control_to_dock"> - <return type="void"> - </return> - <argument index="0" name="slot" type="int" enum="EditorPlugin.DockSlot"> - </argument> - <argument index="1" name="control" type="Control"> - </argument> + <return type="void" /> + <argument index="0" name="slot" type="int" enum="EditorPlugin.DockSlot" /> + <argument index="1" name="control" type="Control" /> <description> Adds the control to a specific dock slot (see [enum DockSlot] for options). If the dock is repositioned and as long as the plugin is active, the editor will save the dock position on further sessions. @@ -392,47 +344,36 @@ </description> </method> <method name="add_custom_type"> - <return type="void"> - </return> - <argument index="0" name="type" type="String"> - </argument> - <argument index="1" name="base" type="String"> - </argument> - <argument index="2" name="script" type="Script"> - </argument> - <argument index="3" name="icon" type="Texture2D"> - </argument> + <return type="void" /> + <argument index="0" name="type" type="String" /> + <argument index="1" name="base" type="String" /> + <argument index="2" name="script" type="Script" /> + <argument index="3" name="icon" type="Texture2D" /> <description> Adds a custom type, which will appear in the list of nodes or resources. An icon can be optionally passed. - When given node or resource is selected, the base type will be instantiated (e.g. "Node3D", "Control", "Resource"), then the script will be loaded and set to this object. + When a given node or resource is selected, the base type will be instantiated (e.g. "Node3D", "Control", "Resource"), then the script will be loaded and set to this object. You can use the virtual method [method _handles] to check if your custom object is being edited by checking the script or using the [code]is[/code] keyword. During run-time, this will be a simple object with a script so this function does not need to be called then. </description> </method> <method name="add_debugger_plugin"> - <return type="void"> - </return> - <argument index="0" name="script" type="Script"> - </argument> + <return type="void" /> + <argument index="0" name="script" type="Script" /> <description> Adds a [Script] as debugger plugin to the Debugger. The script must extend [EditorDebuggerPlugin]. </description> </method> <method name="add_export_plugin"> - <return type="void"> - </return> - <argument index="0" name="plugin" type="EditorExportPlugin"> - </argument> + <return type="void" /> + <argument index="0" name="plugin" type="EditorExportPlugin" /> <description> Registers a new [EditorExportPlugin]. Export plugins are used to perform tasks when the project is being exported. See [method add_inspector_plugin] for an example of how to register a plugin. </description> </method> <method name="add_import_plugin"> - <return type="void"> - </return> - <argument index="0" name="importer" type="EditorImportPlugin"> - </argument> + <return type="void" /> + <argument index="0" name="importer" type="EditorImportPlugin" /> <description> Registers a new [EditorImportPlugin]. Import plugins are used to import custom and unsupported assets as a custom [Resource] type. [b]Note:[/b] If you want to import custom 3D asset formats use [method add_scene_import_plugin] instead. @@ -440,10 +381,8 @@ </description> </method> <method name="add_inspector_plugin"> - <return type="void"> - </return> - <argument index="0" name="plugin" type="EditorInspectorPlugin"> - </argument> + <return type="void" /> + <argument index="0" name="plugin" type="EditorInspectorPlugin" /> <description> Registers a new [EditorInspectorPlugin]. Inspector plugins are used to extend [EditorInspector] and provide custom configuration tools for your object's properties. [b]Note:[/b] Always use [method remove_inspector_plugin] to remove the registered [EditorInspectorPlugin] when your [EditorPlugin] is disabled to prevent leaks and an unexpected behavior. @@ -462,264 +401,210 @@ </description> </method> <method name="add_scene_import_plugin"> - <return type="void"> - </return> - <argument index="0" name="scene_importer" type="EditorSceneImporter"> - </argument> + <return type="void" /> + <argument index="0" name="scene_importer" type="EditorSceneImporter" /> <description> Registers a new [EditorSceneImporter]. Scene importers are used to import custom 3D asset formats as scenes. </description> </method> <method name="add_spatial_gizmo_plugin"> - <return type="void"> - </return> - <argument index="0" name="plugin" type="EditorNode3DGizmoPlugin"> - </argument> + <return type="void" /> + <argument index="0" name="plugin" type="EditorNode3DGizmoPlugin" /> <description> Registers a new [EditorNode3DGizmoPlugin]. Gizmo plugins are used to add custom gizmos to the 3D preview viewport for a [Node3D]. See [method add_inspector_plugin] for an example of how to register a plugin. </description> </method> <method name="add_tool_menu_item"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> - <argument index="1" name="callable" type="Callable"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> + <argument index="1" name="callable" type="Callable" /> <description> Adds a custom menu item to [b]Project > Tools[/b] named [code]name[/code]. When clicked, the provided [code]callable[/code] will be called. </description> </method> <method name="add_tool_submenu_item"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> - <argument index="1" name="submenu" type="Object"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> + <argument index="1" name="submenu" type="Object" /> <description> Adds a custom submenu under [b]Project > Tools >[/b] [code]name[/code]. [code]submenu[/code] should be an object of class [PopupMenu]. Use [code]remove_tool_menu_item(name)[/code] on plugin clean up to remove the menu. </description> </method> <method name="add_translation_parser_plugin"> - <return type="void"> - </return> - <argument index="0" name="parser" type="EditorTranslationParserPlugin"> - </argument> + <return type="void" /> + <argument index="0" name="parser" type="EditorTranslationParserPlugin" /> <description> Registers a custom translation parser plugin for extracting translatable strings from custom files. </description> </method> <method name="add_undo_redo_inspector_hook_callback"> - <return type="void"> - </return> - <argument index="0" name="callable" type="Callable"> - </argument> + <return type="void" /> + <argument index="0" name="callable" type="Callable" /> <description> Hooks a callback into the undo/redo action creation when a property is modified in the inspector. This allows, for example, to save other properties that may be lost when a given property is modified. The callback should have 4 arguments: [Object] [code]undo_redo[/code], [Object] [code]modified_object[/code], [String] [code]property[/code] and [Variant] [code]new_value[/code]. They are, respectively, the [UndoRedo] object used by the inspector, the currently modified object, the name of the modified property and the new value the property is about to take. </description> </method> <method name="get_editor_interface"> - <return type="EditorInterface"> - </return> + <return type="EditorInterface" /> <description> Returns the [EditorInterface] object that gives you control over Godot editor's window and its functionalities. </description> </method> <method name="get_script_create_dialog"> - <return type="ScriptCreateDialog"> - </return> + <return type="ScriptCreateDialog" /> <description> Gets the Editor's dialogue used for making scripts. [b]Note:[/b] Users can configure it before use. </description> </method> <method name="get_undo_redo"> - <return type="UndoRedo"> - </return> + <return type="UndoRedo" /> <description> Gets the undo/redo object. Most actions in the editor can be undoable, so use this object to make sure this happens when it's worth it. </description> </method> <method name="hide_bottom_panel"> - <return type="void"> - </return> + <return type="void" /> <description> Minimizes the bottom panel. </description> </method> <method name="make_bottom_panel_item_visible"> - <return type="void"> - </return> - <argument index="0" name="item" type="Control"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="Control" /> <description> Makes a specific item in the bottom panel visible. </description> </method> <method name="queue_save_layout"> - <return type="void"> - </return> + <return type="void" /> <description> Queue save the project's editor layout. </description> </method> <method name="remove_autoload_singleton"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> <description> Removes an Autoload [code]name[/code] from the list. </description> </method> <method name="remove_control_from_bottom_panel"> - <return type="void"> - </return> - <argument index="0" name="control" type="Control"> - </argument> + <return type="void" /> + <argument index="0" name="control" type="Control" /> <description> Removes the control from the bottom panel. You have to manually [method Node.queue_free] the control. </description> </method> <method name="remove_control_from_container"> - <return type="void"> - </return> - <argument index="0" name="container" type="int" enum="EditorPlugin.CustomControlContainer"> - </argument> - <argument index="1" name="control" type="Control"> - </argument> + <return type="void" /> + <argument index="0" name="container" type="int" enum="EditorPlugin.CustomControlContainer" /> + <argument index="1" name="control" type="Control" /> <description> Removes the control from the specified container. You have to manually [method Node.queue_free] the control. </description> </method> <method name="remove_control_from_docks"> - <return type="void"> - </return> - <argument index="0" name="control" type="Control"> - </argument> + <return type="void" /> + <argument index="0" name="control" type="Control" /> <description> Removes the control from the dock. You have to manually [method Node.queue_free] the control. </description> </method> <method name="remove_custom_type"> - <return type="void"> - </return> - <argument index="0" name="type" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="type" type="String" /> <description> Removes a custom type added by [method add_custom_type]. </description> </method> <method name="remove_debugger_plugin"> - <return type="void"> - </return> - <argument index="0" name="script" type="Script"> - </argument> + <return type="void" /> + <argument index="0" name="script" type="Script" /> <description> Removes the debugger plugin with given script from the Debugger. </description> </method> <method name="remove_export_plugin"> - <return type="void"> - </return> - <argument index="0" name="plugin" type="EditorExportPlugin"> - </argument> + <return type="void" /> + <argument index="0" name="plugin" type="EditorExportPlugin" /> <description> Removes an export plugin registered by [method add_export_plugin]. </description> </method> <method name="remove_import_plugin"> - <return type="void"> - </return> - <argument index="0" name="importer" type="EditorImportPlugin"> - </argument> + <return type="void" /> + <argument index="0" name="importer" type="EditorImportPlugin" /> <description> Removes an import plugin registered by [method add_import_plugin]. </description> </method> <method name="remove_inspector_plugin"> - <return type="void"> - </return> - <argument index="0" name="plugin" type="EditorInspectorPlugin"> - </argument> + <return type="void" /> + <argument index="0" name="plugin" type="EditorInspectorPlugin" /> <description> Removes an inspector plugin registered by [method add_import_plugin] </description> </method> <method name="remove_scene_import_plugin"> - <return type="void"> - </return> - <argument index="0" name="scene_importer" type="EditorSceneImporter"> - </argument> + <return type="void" /> + <argument index="0" name="scene_importer" type="EditorSceneImporter" /> <description> Removes a scene importer registered by [method add_scene_import_plugin]. </description> </method> <method name="remove_spatial_gizmo_plugin"> - <return type="void"> - </return> - <argument index="0" name="plugin" type="EditorNode3DGizmoPlugin"> - </argument> + <return type="void" /> + <argument index="0" name="plugin" type="EditorNode3DGizmoPlugin" /> <description> Removes a gizmo plugin registered by [method add_spatial_gizmo_plugin]. </description> </method> <method name="remove_tool_menu_item"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> <description> Removes a menu [code]name[/code] from [b]Project > Tools[/b]. </description> </method> <method name="remove_translation_parser_plugin"> - <return type="void"> - </return> - <argument index="0" name="parser" type="EditorTranslationParserPlugin"> - </argument> + <return type="void" /> + <argument index="0" name="parser" type="EditorTranslationParserPlugin" /> <description> Removes a custom translation parser plugin registered by [method add_translation_parser_plugin]. </description> </method> <method name="remove_undo_redo_inspector_hook_callback"> - <return type="void"> - </return> - <argument index="0" name="callable" type="Callable"> - </argument> + <return type="void" /> + <argument index="0" name="callable" type="Callable" /> <description> Removes a callback previsously added by [method add_undo_redo_inspector_hook_callback]. </description> </method> <method name="set_force_draw_over_forwarding_enabled"> - <return type="void"> - </return> + <return type="void" /> <description> - Enables calling of [method _forward_canvas_force_draw_over_viewport] for the 2D editor and [method _forward_spatial_force_draw_over_viewport] for the 3D editor when their viewports are updated. You need to call this method only once and it will work permanently for this plugin. + Enables calling of [method _forward_canvas_force_draw_over_viewport] for the 2D editor and [method _forward_3d_force_draw_over_viewport] for the 3D editor when their viewports are updated. You need to call this method only once and it will work permanently for this plugin. </description> </method> <method name="set_input_event_forwarding_always_enabled"> - <return type="void"> - </return> + <return type="void" /> <description> - Use this method if you always want to receive inputs from 3D view screen inside [method _forward_spatial_gui_input]. It might be especially usable if your plugin will want to use raycast in the scene. + Use this method if you always want to receive inputs from 3D view screen inside [method _forward_3d_gui_input]. It might be especially usable if your plugin will want to use raycast in the scene. </description> </method> <method name="update_overlays" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> - Updates the overlays of the 2D and 3D editor viewport. Causes methods [method _forward_canvas_draw_over_viewport], [method _forward_canvas_force_draw_over_viewport], [method _forward_spatial_draw_over_viewport] and [method _forward_spatial_force_draw_over_viewport] to be called. + Updates the overlays of the 2D and 3D editor viewport. Causes methods [method _forward_canvas_draw_over_viewport], [method _forward_canvas_force_draw_over_viewport], [method _forward_3d_draw_over_viewport] and [method _forward_3d_force_draw_over_viewport] to be called. </description> </method> </methods> <signals> <signal name="main_screen_changed"> - <argument index="0" name="screen_name" type="String"> - </argument> + <argument index="0" name="screen_name" type="String" /> <description> Emitted when user changes the workspace ([b]2D[/b], [b]3D[/b], [b]Script[/b], [b]AssetLib[/b]). Also works with custom screens defined by plugins. </description> @@ -729,21 +614,18 @@ </description> </signal> <signal name="resource_saved"> - <argument index="0" name="resource" type="Resource"> - </argument> + <argument index="0" name="resource" type="Resource" /> <description> </description> </signal> <signal name="scene_changed"> - <argument index="0" name="scene_root" type="Node"> - </argument> + <argument index="0" name="scene_root" type="Node" /> <description> Emitted when the scene is changed in the editor. The argument will return the root node of the scene that has just become active. If this scene is new and empty, the argument will be [code]null[/code]. </description> </signal> <signal name="scene_closed"> - <argument index="0" name="filepath" type="String"> - </argument> + <argument index="0" name="filepath" type="String" /> <description> Emitted when user closes a scene. The argument is file path to a closed scene. </description> diff --git a/doc/classes/EditorProperty.xml b/doc/classes/EditorProperty.xml index 549d2c1628..822bcfd255 100644 --- a/doc/classes/EditorProperty.xml +++ b/doc/classes/EditorProperty.xml @@ -10,64 +10,56 @@ </tutorials> <methods> <method name="_update_property" qualifiers="virtual"> - <return type="void"> - </return> + <return type="void" /> <description> When this virtual function is called, you must update your editor. </description> </method> <method name="add_focusable"> - <return type="void"> - </return> - <argument index="0" name="control" type="Control"> - </argument> + <return type="void" /> + <argument index="0" name="control" type="Control" /> <description> If any of the controls added can gain keyboard focus, add it here. This ensures that focus will be restored if the inspector is refreshed. </description> </method> <method name="emit_changed"> - <return type="void"> - </return> - <argument index="0" name="property" type="StringName"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> - <argument index="2" name="field" type="StringName" default="&"""> - </argument> - <argument index="3" name="changing" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="property" type="StringName" /> + <argument index="1" name="value" type="Variant" /> + <argument index="2" name="field" type="StringName" default="&""" /> + <argument index="3" name="changing" type="bool" default="false" /> <description> If one or several properties have changed, this must be called. [code]field[/code] is used in case your editor can modify fields separately (as an example, Vector3.x). The [code]changing[/code] argument avoids the editor requesting this property to be refreshed (leave as [code]false[/code] if unsure). </description> </method> <method name="get_edited_object"> - <return type="Object"> - </return> + <return type="Object" /> <description> Gets the edited object. </description> </method> <method name="get_edited_property"> - <return type="StringName"> - </return> + <return type="StringName" /> <description> Gets the edited property. If your editor is for a single property (added via [method EditorInspectorPlugin._parse_property]), then this will return the property. </description> </method> <method name="get_tooltip_text" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> - Override if you want to allow a custom tooltip over your property. + Must be implemented to provide a custom tooltip to the property editor. </description> </method> <method name="set_bottom_editor"> - <return type="void"> - </return> - <argument index="0" name="editor" type="Control"> - </argument> + <return type="void" /> + <argument index="0" name="editor" type="Control" /> + <description> + Puts the [code]editor[/code] control below the property label. The control must be previously added using [method Node.add_child]. + </description> + </method> + <method name="update_property"> + <return type="void" /> <description> - Adds controls with this function if you want them on the bottom (below the label). </description> </method> </methods> @@ -96,78 +88,62 @@ </members> <signals> <signal name="multiple_properties_changed"> - <argument index="0" name="properties" type="PackedStringArray"> - </argument> - <argument index="1" name="value" type="Array"> - </argument> + <argument index="0" name="properties" type="PackedStringArray" /> + <argument index="1" name="value" type="Array" /> <description> Emit it if you want multiple properties modified at the same time. Do not use if added via [method EditorInspectorPlugin._parse_property]. </description> </signal> <signal name="object_id_selected"> - <argument index="0" name="property" type="StringName"> - </argument> - <argument index="1" name="id" type="int"> - </argument> + <argument index="0" name="property" type="StringName" /> + <argument index="1" name="id" type="int" /> <description> Used by sub-inspectors. Emit it if what was selected was an Object ID. </description> </signal> <signal name="property_changed"> - <argument index="0" name="property" type="StringName"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> + <argument index="0" name="property" type="StringName" /> + <argument index="1" name="value" type="Variant" /> <description> Do not emit this manually, use the [method emit_changed] method instead. </description> </signal> <signal name="property_checked"> - <argument index="0" name="property" type="StringName"> - </argument> - <argument index="1" name="bool" type="String"> - </argument> + <argument index="0" name="property" type="StringName" /> + <argument index="1" name="bool" type="String" /> <description> Emitted when a property was checked. Used internally. </description> </signal> <signal name="property_deleted"> - <argument index="0" name="property" type="StringName"> - </argument> + <argument index="0" name="property" type="StringName" /> <description> Emitted when a property was deleted. Used internally. </description> </signal> <signal name="property_keyed"> - <argument index="0" name="property" type="StringName"> - </argument> + <argument index="0" name="property" type="StringName" /> <description> Emit it if you want to add this value as an animation key (check for keying being enabled first). </description> </signal> <signal name="property_keyed_with_value"> - <argument index="0" name="property" type="StringName"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> + <argument index="0" name="property" type="StringName" /> + <argument index="1" name="value" type="Variant" /> <description> Emit it if you want to key a property with a single value. </description> </signal> <signal name="resource_selected"> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="resource" type="Resource"> - </argument> + <argument index="0" name="path" type="String" /> + <argument index="1" name="resource" type="Resource" /> <description> If you want a sub-resource to be edited, emit this signal with the resource. </description> </signal> <signal name="selected"> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="focusable_idx" type="int"> - </argument> + <argument index="0" name="path" type="String" /> + <argument index="1" name="focusable_idx" type="int" /> <description> Emitted when selected. Used internally. </description> diff --git a/doc/classes/EditorResourceConversionPlugin.xml b/doc/classes/EditorResourceConversionPlugin.xml index 1d7e98c99d..8543afa4ae 100644 --- a/doc/classes/EditorResourceConversionPlugin.xml +++ b/doc/classes/EditorResourceConversionPlugin.xml @@ -7,17 +7,20 @@ <tutorials> </tutorials> <methods> - <method name="_convert" qualifiers="virtual"> - <return type="Resource"> - </return> - <argument index="0" name="resource" type="Resource"> - </argument> + <method name="_convert" qualifiers="virtual const"> + <return type="Resource" /> + <argument index="0" name="resource" type="Resource" /> <description> </description> </method> - <method name="_converts_to" qualifiers="virtual"> - <return type="String"> - </return> + <method name="_converts_to" qualifiers="virtual const"> + <return type="String" /> + <description> + </description> + </method> + <method name="_handles" qualifiers="virtual const"> + <return type="bool" /> + <argument index="0" name="resource" type="Resource" /> <description> </description> </method> diff --git a/doc/classes/EditorResourcePicker.xml b/doc/classes/EditorResourcePicker.xml index 0029955819..a0f2df1f0c 100644 --- a/doc/classes/EditorResourcePicker.xml +++ b/doc/classes/EditorResourcePicker.xml @@ -11,36 +11,29 @@ </tutorials> <methods> <method name="_handle_menu_selected" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> <description> This virtual method can be implemented to handle context menu items not handled by default. See [method _set_create_options]. </description> </method> <method name="_set_create_options" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="menu_node" type="Object"> - </argument> + <return type="void" /> + <argument index="0" name="menu_node" type="Object" /> <description> This virtual method is called when updating the context menu of [EditorResourcePicker]. Implement this method to override the "New ..." items with your own options. [code]menu_node[/code] is a reference to the [PopupMenu] node. [b]Note:[/b] Implement [method _handle_menu_selected] to handle these custom items. </description> </method> <method name="get_allowed_types" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns a list of all allowed types and subtypes corresponding to the [member base_type]. If the [member base_type] is empty, an empty list is returned. </description> </method> <method name="set_toggle_pressed"> - <return type="void"> - </return> - <argument index="0" name="pressed" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="pressed" type="bool" /> <description> Sets the toggle mode state for the main button. Works only if [member toggle_mode] is set to [code]true[/code]. </description> @@ -62,15 +55,13 @@ </members> <signals> <signal name="resource_changed"> - <argument index="0" name="resource" type="Resource"> - </argument> + <argument index="0" name="resource" type="Resource" /> <description> Emitted when the value of the edited resource was changed. </description> </signal> <signal name="resource_selected"> - <argument index="0" name="resource" type="Resource"> - </argument> + <argument index="0" name="resource" type="Resource" /> <description> Emitted when the resource value was set and user clicked to edit it. </description> diff --git a/doc/classes/EditorResourcePreview.xml b/doc/classes/EditorResourcePreview.xml index 3239a75ada..c2693b4e1e 100644 --- a/doc/classes/EditorResourcePreview.xml +++ b/doc/classes/EditorResourcePreview.xml @@ -11,60 +11,44 @@ </tutorials> <methods> <method name="add_preview_generator"> - <return type="void"> - </return> - <argument index="0" name="generator" type="EditorResourcePreviewGenerator"> - </argument> + <return type="void" /> + <argument index="0" name="generator" type="EditorResourcePreviewGenerator" /> <description> Create an own, custom preview generator. </description> </method> <method name="check_for_invalidation"> - <return type="void"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="path" type="String" /> <description> Check if the resource changed, if so, it will be invalidated and the corresponding signal emitted. </description> </method> <method name="queue_edited_resource_preview"> - <return type="void"> - </return> - <argument index="0" name="resource" type="Resource"> - </argument> - <argument index="1" name="receiver" type="Object"> - </argument> - <argument index="2" name="receiver_func" type="StringName"> - </argument> - <argument index="3" name="userdata" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="resource" type="Resource" /> + <argument index="1" name="receiver" type="Object" /> + <argument index="2" name="receiver_func" type="StringName" /> + <argument index="3" name="userdata" type="Variant" /> <description> Queue the [code]resource[/code] being edited for preview. Once the preview is ready, the [code]receiver[/code]'s [code]receiver_func[/code] will be called. The [code]receiver_func[/code] must take the following four arguments: [String] path, [Texture2D] preview, [Texture2D] thumbnail_preview, [Variant] userdata. [code]userdata[/code] can be anything, and will be returned when [code]receiver_func[/code] is called. [b]Note[/b]: If it was not possible to create the preview the [code]receiver_func[/code] will still be called, but the preview will be null. </description> </method> <method name="queue_resource_preview"> - <return type="void"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="receiver" type="Object"> - </argument> - <argument index="2" name="receiver_func" type="StringName"> - </argument> - <argument index="3" name="userdata" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="receiver" type="Object" /> + <argument index="2" name="receiver_func" type="StringName" /> + <argument index="3" name="userdata" type="Variant" /> <description> Queue a resource file located at [code]path[/code] for preview. Once the preview is ready, the [code]receiver[/code]'s [code]receiver_func[/code] will be called. The [code]receiver_func[/code] must take the following four arguments: [String] path, [Texture2D] preview, [Texture2D] thumbnail_preview, [Variant] userdata. [code]userdata[/code] can be anything, and will be returned when [code]receiver_func[/code] is called. [b]Note[/b]: If it was not possible to create the preview the [code]receiver_func[/code] will still be called, but the preview will be null. </description> </method> <method name="remove_preview_generator"> - <return type="void"> - </return> - <argument index="0" name="generator" type="EditorResourcePreviewGenerator"> - </argument> + <return type="void" /> + <argument index="0" name="generator" type="EditorResourcePreviewGenerator" /> <description> Removes a custom preview generator. </description> @@ -72,8 +56,7 @@ </methods> <signals> <signal name="preview_invalidated"> - <argument index="0" name="path" type="String"> - </argument> + <argument index="0" name="path" type="String" /> <description> Emitted if a preview was invalidated (changed). [code]path[/code] corresponds to the path of the preview. </description> diff --git a/doc/classes/EditorResourcePreviewGenerator.xml b/doc/classes/EditorResourcePreviewGenerator.xml index 3594474e36..033e03c5b5 100644 --- a/doc/classes/EditorResourcePreviewGenerator.xml +++ b/doc/classes/EditorResourcePreviewGenerator.xml @@ -9,53 +9,43 @@ <tutorials> </tutorials> <methods> - <method name="_can_generate_small_preview" qualifiers="virtual"> - <return type="bool"> - </return> + <method name="_can_generate_small_preview" qualifiers="virtual const"> + <return type="bool" /> <description> If this function returns [code]true[/code], the generator will call [method _generate] or [method _generate_from_path] for small previews as well. By default, it returns [code]false[/code]. </description> </method> - <method name="_generate" qualifiers="virtual"> - <return type="Texture2D"> - </return> - <argument index="0" name="from" type="Resource"> - </argument> - <argument index="1" name="size" type="Vector2"> - </argument> + <method name="_generate" qualifiers="virtual const"> + <return type="Texture2D" /> + <argument index="0" name="resource" type="Resource" /> + <argument index="1" name="size" type="Vector2i" /> <description> Generate a preview from a given resource with the specified size. This must always be implemented. Returning an empty texture is an OK way to fail and let another generator take care. Care must be taken because this function is always called from a thread (not the main thread). </description> </method> - <method name="_generate_from_path" qualifiers="virtual"> - <return type="Texture2D"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="size" type="Vector2"> - </argument> + <method name="_generate_from_path" qualifiers="virtual const"> + <return type="Texture2D" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="size" type="Vector2i" /> <description> Generate a preview directly from a path with the specified size. Implementing this is optional, as default code will load and call [method _generate]. Returning an empty texture is an OK way to fail and let another generator take care. Care must be taken because this function is always called from a thread (not the main thread). </description> </method> - <method name="_generate_small_preview_automatically" qualifiers="virtual"> - <return type="bool"> - </return> + <method name="_generate_small_preview_automatically" qualifiers="virtual const"> + <return type="bool" /> <description> If this function returns [code]true[/code], the generator will automatically generate the small previews from the normal preview texture generated by the methods [method _generate] or [method _generate_from_path]. By default, it returns [code]false[/code]. </description> </method> - <method name="_handles" qualifiers="virtual"> - <return type="bool"> - </return> - <argument index="0" name="type" type="String"> - </argument> + <method name="_handles" qualifiers="virtual const"> + <return type="bool" /> + <argument index="0" name="type" type="String" /> <description> Returns [code]true[/code] if your generator supports the resource of type [code]type[/code]. </description> diff --git a/doc/classes/EditorSceneImporter.xml b/doc/classes/EditorSceneImporter.xml index 8df3091057..a400db551f 100644 --- a/doc/classes/EditorSceneImporter.xml +++ b/doc/classes/EditorSceneImporter.xml @@ -8,63 +8,45 @@ <tutorials> </tutorials> <methods> - <method name="_get_extensions" qualifiers="virtual"> - <return type="Array"> - </return> + <method name="_get_extensions" qualifiers="virtual const"> + <return type="PackedStringArray" /> <description> </description> </method> - <method name="_get_import_flags" qualifiers="virtual"> - <return type="int"> - </return> + <method name="_get_import_flags" qualifiers="virtual const"> + <return type="int" /> <description> </description> </method> <method name="_import_animation" qualifiers="virtual"> - <return type="Animation"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="flags" type="int"> - </argument> - <argument index="2" name="bake_fps" type="int"> - </argument> + <return type="Animation" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="flags" type="int" /> + <argument index="2" name="bake_fps" type="int" /> <description> </description> </method> <method name="_import_scene" qualifiers="virtual"> - <return type="Node"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="flags" type="int"> - </argument> - <argument index="2" name="bake_fps" type="int"> - </argument> + <return type="Object" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="flags" type="int" /> + <argument index="2" name="bake_fps" type="int" /> <description> </description> </method> <method name="import_animation_from_other_importer"> - <return type="Animation"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="flags" type="int"> - </argument> - <argument index="2" name="bake_fps" type="int"> - </argument> + <return type="Animation" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="flags" type="int" /> + <argument index="2" name="bake_fps" type="int" /> <description> </description> </method> <method name="import_scene_from_other_importer"> - <return type="Node"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="flags" type="int"> - </argument> - <argument index="2" name="bake_fps" type="int"> - </argument> + <return type="Node" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="flags" type="int" /> + <argument index="2" name="bake_fps" type="int" /> <description> </description> </method> diff --git a/doc/classes/EditorSceneImporterMesh.xml b/doc/classes/EditorSceneImporterMesh.xml index 90eca9072b..b0f233da2f 100644 --- a/doc/classes/EditorSceneImporterMesh.xml +++ b/doc/classes/EditorSceneImporterMesh.xml @@ -1,169 +1,171 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="EditorSceneImporterMesh" inherits="Resource" version="4.0"> <brief_description> + A [Resource] that contains vertex array-based geometry during the import process. </brief_description> <description> + EditorSceneImporterMesh is a type of [Resource] analogous to [ArrayMesh]. It contains vertex array-based geometry, divided in [i]surfaces[/i]. Each surface contains a completely separate array and a material used to draw it. Design wise, a mesh with multiple surfaces is preferred to a single surface, because objects created in 3D editing software commonly contain multiple materials. + + Unlike its runtime counterpart, [EditorSceneImporterMesh] contains mesh data before various import steps, such as lod and shadow mesh generation, have taken place. Modify surface data by calling [method clear], followed by [method add_surface] for each surface. </description> <tutorials> </tutorials> <methods> <method name="add_blend_shape"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> <description> + Adds name for a blend shape that will be added with [method add_surface]. Must be called before surface is added. </description> </method> <method name="add_surface"> - <return type="void"> - </return> - <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType"> - </argument> - <argument index="1" name="arrays" type="Array"> - </argument> - <argument index="2" name="blend_shapes" type="Array" default="[]"> - </argument> + <return type="void" /> + <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType" /> + <argument index="1" name="arrays" type="Array" /> + <argument index="2" name="blend_shapes" type="Array" default="[]" /> <argument index="3" name="lods" type="Dictionary" default="{ -}"> - </argument> - <argument index="4" name="material" type="Material" default="null"> - </argument> - <argument index="5" name="name" type="String" default=""""> - </argument> +}" /> + <argument index="4" name="material" type="Material" default="null" /> + <argument index="5" name="name" type="String" default="""" /> <description> + Creates a new surface, analogous to [method ArrayMesh.add_surface_from_arrays]. + Surfaces are created to be rendered using a [code]primitive[/code], which may be any of the types defined in [enum Mesh.PrimitiveType]. (As a note, when using indices, it is recommended to only use points, lines, or triangles.) [method Mesh.get_surface_count] will become the [code]surf_idx[/code] for this new surface. + The [code]arrays[/code] argument is an array of arrays. See [enum Mesh.ArrayType] for the values used in this array. For example, [code]arrays[0][/code] is the array of vertices. That first vertex sub-array is always required; the others are optional. Adding an index array puts this function into "index mode" where the vertex and other arrays become the sources of data and the index array defines the vertex order. All sub-arrays must have the same length as the vertex array or be empty, except for [constant Mesh.ARRAY_INDEX] if it is used. </description> </method> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> + Removes all surfaces and blend shapes from this [EditorSceneImporterMesh]. </description> </method> <method name="get_blend_shape_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> + Returns the number of blend shapes that the mesh holds. </description> </method> <method name="get_blend_shape_mode" qualifiers="const"> - <return type="int" enum="Mesh.BlendShapeMode"> - </return> + <return type="int" enum="Mesh.BlendShapeMode" /> <description> + Returns the blend shape mode for this Mesh. </description> </method> <method name="get_blend_shape_name" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="blend_shape_idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="blend_shape_idx" type="int" /> <description> + Returns the name of the blend shape at this index. </description> </method> <method name="get_lightmap_size_hint" qualifiers="const"> - <return type="Vector2i"> - </return> + <return type="Vector2i" /> <description> + Returns the size hint of this mesh for lightmap-unwrapping in UV-space. </description> </method> <method name="get_mesh"> - <return type="ArrayMesh"> - </return> - <argument index="0" name="arg0" type="Mesh"> - </argument> + <return type="ArrayMesh" /> + <argument index="0" name="base_mesh" type="ArrayMesh" default="null" /> <description> + Returns the mesh data represented by this [EditorSceneImporterMesh] as a usable [ArrayMesh]. + This method caches the returned mesh, and subsequent calls will return the cached data until [method clear] is called. + If not yet cached and [code]base_mesh[/code] is provided, [code]base_mesh[/code] will be used and mutated. </description> </method> <method name="get_surface_arrays" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="surface_idx" type="int"> - </argument> + <return type="Array" /> + <argument index="0" name="surface_idx" type="int" /> <description> + Returns the arrays for the vertices, normals, uvs, etc. that make up the requested surface. See [method add_surface]. </description> </method> <method name="get_surface_blend_shape_arrays" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="surface_idx" type="int"> - </argument> - <argument index="1" name="blend_shape_idx" type="int"> - </argument> + <return type="Array" /> + <argument index="0" name="surface_idx" type="int" /> + <argument index="1" name="blend_shape_idx" type="int" /> <description> + Returns a single set of blend shape arrays for the requested blend shape index for a surface. </description> </method> <method name="get_surface_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> + Returns the amount of surfaces that the mesh holds. </description> </method> <method name="get_surface_lod_count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="surface_idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="surface_idx" type="int" /> <description> + Returns the amount of lods that the mesh holds on a given surface. </description> </method> <method name="get_surface_lod_indices" qualifiers="const"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="surface_idx" type="int"> - </argument> - <argument index="1" name="lod_idx" type="int"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="surface_idx" type="int" /> + <argument index="1" name="lod_idx" type="int" /> <description> + Returns the index buffer of a lod for a surface. </description> </method> <method name="get_surface_lod_size" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="surface_idx" type="int"> - </argument> - <argument index="1" name="lod_idx" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="surface_idx" type="int" /> + <argument index="1" name="lod_idx" type="int" /> <description> + Returns the screen ratio which activates a lod for a surface. </description> </method> <method name="get_surface_material" qualifiers="const"> - <return type="Material"> - </return> - <argument index="0" name="surface_idx" type="int"> - </argument> + <return type="Material" /> + <argument index="0" name="surface_idx" type="int" /> <description> + Returns a [Material] in a given surface. Surface is rendered using this material. </description> </method> <method name="get_surface_name" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="surface_idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="surface_idx" type="int" /> <description> + Gets the name assigned to this surface. </description> </method> <method name="get_surface_primitive_type"> - <return type="int" enum="Mesh.PrimitiveType"> - </return> - <argument index="0" name="surface_idx" type="int"> - </argument> + <return type="int" enum="Mesh.PrimitiveType" /> + <argument index="0" name="surface_idx" type="int" /> <description> + Returns the primitive type of the requested surface (see [method add_surface]). </description> </method> <method name="set_blend_shape_mode"> - <return type="void"> - </return> - <argument index="0" name="mode" type="int" enum="Mesh.BlendShapeMode"> - </argument> + <return type="void" /> + <argument index="0" name="mode" type="int" enum="Mesh.BlendShapeMode" /> <description> + Sets the blend shape mode to one of [enum Mesh.BlendShapeMode]. </description> </method> <method name="set_lightmap_size_hint"> - <return type="void"> - </return> - <argument index="0" name="size" type="Vector2i"> - </argument> + <return type="void" /> + <argument index="0" name="size" type="Vector2i" /> <description> + Sets the size hint of this mesh for lightmap-unwrapping in UV-space. + </description> + </method> + <method name="set_surface_material"> + <return type="void" /> + <argument index="0" name="surface_idx" type="int" /> + <argument index="1" name="material" type="Material" /> + <description> + Sets a [Material] for a given surface. Surface will be rendered using this material. + </description> + </method> + <method name="set_surface_name"> + <return type="void" /> + <argument index="0" name="surface_idx" type="int" /> + <argument index="1" name="name" type="String" /> + <description> + Sets a name for a given surface. </description> </method> </methods> diff --git a/doc/classes/EditorScenePostImport.xml b/doc/classes/EditorScenePostImport.xml index d2b5e84ff7..43ca3db5fa 100644 --- a/doc/classes/EditorScenePostImport.xml +++ b/doc/classes/EditorScenePostImport.xml @@ -56,17 +56,14 @@ </tutorials> <methods> <method name="_post_import" qualifiers="virtual"> - <return type="Object"> - </return> - <argument index="0" name="scene" type="Object"> - </argument> + <return type="Object" /> + <argument index="0" name="scene" type="Node" /> <description> Called after the scene was imported. This method must return the modified version of the scene. </description> </method> <method name="get_source_file" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the source file path which got imported (e.g. [code]res://scene.dae[/code]). </description> diff --git a/doc/classes/EditorScript.xml b/doc/classes/EditorScript.xml index a91ea0eb14..6d793fe961 100644 --- a/doc/classes/EditorScript.xml +++ b/doc/classes/EditorScript.xml @@ -35,32 +35,27 @@ </tutorials> <methods> <method name="_run" qualifiers="virtual"> - <return type="void"> - </return> + <return type="void" /> <description> This method is executed by the Editor when [b]File > Run[/b] is used. </description> </method> <method name="add_root_node"> - <return type="void"> - </return> - <argument index="0" name="node" type="Node"> - </argument> + <return type="void" /> + <argument index="0" name="node" type="Node" /> <description> Adds [code]node[/code] as a child of the root node in the editor context. [b]Warning:[/b] The implementation of this method is currently disabled. </description> </method> <method name="get_editor_interface"> - <return type="EditorInterface"> - </return> + <return type="EditorInterface" /> <description> Returns the [EditorInterface] singleton instance. </description> </method> <method name="get_scene"> - <return type="Node"> - </return> + <return type="Node" /> <description> Returns the Editor's currently active scene. </description> diff --git a/doc/classes/EditorSelection.xml b/doc/classes/EditorSelection.xml index 63e89750c3..69ae865d5d 100644 --- a/doc/classes/EditorSelection.xml +++ b/doc/classes/EditorSelection.xml @@ -11,41 +11,34 @@ </tutorials> <methods> <method name="add_node"> - <return type="void"> - </return> - <argument index="0" name="node" type="Node"> - </argument> + <return type="void" /> + <argument index="0" name="node" type="Node" /> <description> Adds a node to the selection. [b]Note:[/b] The newly selected node will not be automatically edited in the inspector. If you want to edit a node, use [method EditorInterface.edit_node]. </description> </method> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> Clear the selection. </description> </method> <method name="get_selected_nodes"> - <return type="Node[]"> - </return> + <return type="Node[]" /> <description> Gets the list of selected nodes. </description> </method> <method name="get_transformable_selected_nodes"> - <return type="Array"> - </return> + <return type="Array" /> <description> Gets the list of selected nodes, optimized for transform operations (i.e. moving them, rotating, etc). This list avoids situations where a node is selected and also child/grandchild. </description> </method> <method name="remove_node"> - <return type="void"> - </return> - <argument index="0" name="node" type="Node"> - </argument> + <return type="void" /> + <argument index="0" name="node" type="Node" /> <description> Removes a node from the selection. </description> diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index e732223516..ad63abafa6 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -31,10 +31,8 @@ </tutorials> <methods> <method name="add_property_info"> - <return type="void"> - </return> - <argument index="0" name="info" type="Dictionary"> - </argument> + <return type="void" /> + <argument index="0" name="info" type="Dictionary" /> <description> Adds a custom property info to a property. The dictionary must contain: - [code]name[/code]: [String] (the name of the property) @@ -73,145 +71,110 @@ </description> </method> <method name="erase"> - <return type="void"> - </return> - <argument index="0" name="property" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="property" type="String" /> <description> Erases the setting whose name is specified by [code]property[/code]. </description> </method> <method name="get_favorites" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns the list of favorite files and directories for this project. </description> </method> <method name="get_project_metadata" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="section" type="String"> - </argument> - <argument index="1" name="key" type="String"> - </argument> - <argument index="2" name="default" type="Variant" default="null"> - </argument> + <return type="Variant" /> + <argument index="0" name="section" type="String" /> + <argument index="1" name="key" type="String" /> + <argument index="2" name="default" type="Variant" default="null" /> <description> Returns project-specific metadata for the [code]section[/code] and [code]key[/code] specified. If the metadata doesn't exist, [code]default[/code] will be returned instead. See also [method set_project_metadata]. </description> </method> <method name="get_project_settings_dir" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the project-specific settings path. Projects all have a unique subdirectory inside the settings path where project-specific settings are saved. </description> </method> <method name="get_recent_dirs" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns the list of recently visited folders in the file dialog for this project. </description> </method> <method name="get_setting" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="Variant" /> + <argument index="0" name="name" type="String" /> <description> Returns the value of the setting specified by [code]name[/code]. This is equivalent to using [method Object.get] on the EditorSettings instance. </description> </method> <method name="has_setting" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="String" /> <description> Returns [code]true[/code] if the setting specified by [code]name[/code] exists, [code]false[/code] otherwise. </description> </method> <method name="property_can_revert"> - <return type="bool"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="String" /> <description> Returns [code]true[/code] if the setting specified by [code]name[/code] can have its value reverted to the default value, [code]false[/code] otherwise. When this method returns [code]true[/code], a Revert button will display next to the setting in the Editor Settings. </description> </method> <method name="property_get_revert"> - <return type="Variant"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="Variant" /> + <argument index="0" name="name" type="String" /> <description> Returns the default value of the setting specified by [code]name[/code]. This is the value that would be applied when clicking the Revert button in the Editor Settings. </description> </method> <method name="set_builtin_action_override"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> - <argument index="1" name="actions_list" type="Array"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> + <argument index="1" name="actions_list" type="Array" /> <description> </description> </method> <method name="set_favorites"> - <return type="void"> - </return> - <argument index="0" name="dirs" type="PackedStringArray"> - </argument> + <return type="void" /> + <argument index="0" name="dirs" type="PackedStringArray" /> <description> Sets the list of favorite files and directories for this project. </description> </method> <method name="set_initial_value"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> - <argument index="2" name="update_current" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="value" type="Variant" /> + <argument index="2" name="update_current" type="bool" /> <description> Sets the initial value of the setting specified by [code]name[/code] to [code]value[/code]. This is used to provide a value for the Revert button in the Editor Settings. If [code]update_current[/code] is true, the current value of the setting will be set to [code]value[/code] as well. </description> </method> <method name="set_project_metadata"> - <return type="void"> - </return> - <argument index="0" name="section" type="String"> - </argument> - <argument index="1" name="key" type="String"> - </argument> - <argument index="2" name="data" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="section" type="String" /> + <argument index="1" name="key" type="String" /> + <argument index="2" name="data" type="Variant" /> <description> Sets project-specific metadata with the [code]section[/code], [code]key[/code] and [code]data[/code] specified. This metadata is stored outside the project folder and therefore won't be checked into version control. See also [method get_project_metadata]. </description> </method> <method name="set_recent_dirs"> - <return type="void"> - </return> - <argument index="0" name="dirs" type="PackedStringArray"> - </argument> + <return type="void" /> + <argument index="0" name="dirs" type="PackedStringArray" /> <description> Sets the list of recently visited folders in the file dialog for this project. </description> </method> <method name="set_setting"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> + <argument index="1" name="value" type="Variant" /> <description> Sets the [code]value[/code] of the setting specified by [code]name[/code]. This is equivalent to using [method Object.set] on the EditorSettings instance. </description> diff --git a/doc/classes/EditorSyntaxHighlighter.xml b/doc/classes/EditorSyntaxHighlighter.xml index d81b25345f..394a4ada46 100644 --- a/doc/classes/EditorSyntaxHighlighter.xml +++ b/doc/classes/EditorSyntaxHighlighter.xml @@ -5,28 +5,19 @@ </brief_description> <description> Base syntax highlighter resource all editor syntax highlighters extend from, it is used in the [ScriptEditor]. - Add a syntax highlighter to an individual script by calling [method ScriptEditorBase._add_syntax_highlighter]. To apply to all scripts on open, call [method ScriptEditor.register_syntax_highlighter] + Add a syntax highlighter to an individual script by calling ScriptEditorBase._add_syntax_highlighter (currently not working). To apply to all scripts on open, call [method ScriptEditor.register_syntax_highlighter] </description> <tutorials> </tutorials> <methods> - <method name="_get_name" qualifiers="virtual"> - <return type="String"> - </return> + <method name="_get_name" qualifiers="virtual const"> + <return type="String" /> <description> Virtual method which can be overridden to return the syntax highlighter name. </description> </method> - <method name="_get_supported_extentions" qualifiers="virtual"> - <return type="Array"> - </return> - <description> - Virtual method which can be overridden to return the supported file extensions. - </description> - </method> - <method name="_get_supported_languages" qualifiers="virtual"> - <return type="Array"> - </return> + <method name="_get_supported_languages" qualifiers="virtual const"> + <return type="Array" /> <description> Virtual method which can be overridden to return the supported language names. </description> diff --git a/doc/classes/EditorTranslationParserPlugin.xml b/doc/classes/EditorTranslationParserPlugin.xml index a9f4e90e72..94e96e985f 100644 --- a/doc/classes/EditorTranslationParserPlugin.xml +++ b/doc/classes/EditorTranslationParserPlugin.xml @@ -102,22 +102,17 @@ <tutorials> </tutorials> <methods> - <method name="_get_recognized_extensions" qualifiers="virtual"> - <return type="Array"> - </return> + <method name="_get_recognized_extensions" qualifiers="virtual const"> + <return type="PackedStringArray" /> <description> Gets the list of file extensions to associate with this parser, e.g. [code]["csv"][/code]. </description> </method> <method name="_parse_file" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="msgids" type="Array"> - </argument> - <argument index="2" name="msgids_context_plural" type="Array"> - </argument> + <return type="void" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="msgids" type="Array" /> + <argument index="2" name="msgids_context_plural" type="Array" /> <description> Override this method to define a custom parsing logic to extract the translatable strings. </description> diff --git a/doc/classes/EditorVCSInterface.xml b/doc/classes/EditorVCSInterface.xml index 0056b5ce16..5dd4901e3e 100644 --- a/doc/classes/EditorVCSInterface.xml +++ b/doc/classes/EditorVCSInterface.xml @@ -10,19 +10,15 @@ </tutorials> <methods> <method name="commit"> - <return type="void"> - </return> - <argument index="0" name="msg" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="msg" type="String" /> <description> Creates a version commit if the addon is initialized, else returns without doing anything. Uses the files which have been staged previously, with the commit message set to a value as provided as in the argument. </description> </method> <method name="get_file_diff"> - <return type="Array"> - </return> - <argument index="0" name="file_path" type="String"> - </argument> + <return type="Array" /> + <argument index="0" name="file_path" type="String" /> <description> Returns an [Array] of [Dictionary] objects containing the diff output from the VCS in use, if a VCS addon is initialized, else returns an empty [Array] object. The diff contents also consist of some contextual lines which provide context to the observed line change in the file. Each [Dictionary] object has the line diff contents under the keys: @@ -35,8 +31,7 @@ </description> </method> <method name="get_modified_files_data"> - <return type="Dictionary"> - </return> + <return type="Dictionary" /> <description> Returns a [Dictionary] containing the path of the detected file change mapped to an integer signifying what kind of change the corresponding file has experienced. The following integer values are being used to signify that the detected file is: @@ -48,63 +43,52 @@ </description> </method> <method name="get_project_name"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the project name of the VCS working directory. </description> </method> <method name="get_vcs_name"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the name of the VCS if the VCS has been initialized, else return an empty string. </description> </method> <method name="initialize"> - <return type="bool"> - </return> - <argument index="0" name="project_root_path" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="project_root_path" type="String" /> <description> Initializes the VCS addon if not already. Uses the argument value as the path to the working directory of the project. Creates the initial commit if required. Returns [code]true[/code] if no failure occurs, else returns [code]false[/code]. </description> </method> <method name="is_addon_ready"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the addon is ready to respond to function calls, else returns [code]false[/code]. </description> </method> <method name="is_vcs_initialized"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the VCS addon has been initialized, else returns [code]false[/code]. </description> </method> <method name="shut_down"> - <return type="bool"> - </return> + <return type="bool" /> <description> Shuts down the VCS addon to allow cleanup code to run on call. Returns [code]true[/code] is no failure occurs, else returns [code]false[/code]. </description> </method> <method name="stage_file"> - <return type="void"> - </return> - <argument index="0" name="file_path" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="file_path" type="String" /> <description> Stages the file which should be committed when [method EditorVCSInterface.commit] is called. Argument should contain the absolute path. </description> </method> <method name="unstage_file"> - <return type="void"> - </return> - <argument index="0" name="file_path" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="file_path" type="String" /> <description> Unstages the file which was staged previously to be committed, so that it is no longer committed when [method EditorVCSInterface.commit] is called. Argument should contain the absolute path. </description> diff --git a/doc/classes/Engine.xml b/doc/classes/Engine.xml index c0a8407ece..8b399f64c9 100644 --- a/doc/classes/Engine.xml +++ b/doc/classes/Engine.xml @@ -10,8 +10,7 @@ </tutorials> <methods> <method name="get_author_info" qualifiers="const"> - <return type="Dictionary"> - </return> + <return type="Dictionary" /> <description> Returns engine author information in a Dictionary. [code]lead_developers[/code] - Array of Strings, lead developer names @@ -21,8 +20,7 @@ </description> </method> <method name="get_copyright_info" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns an Array of copyright information Dictionaries. [code]name[/code] - String, component name @@ -30,81 +28,74 @@ </description> </method> <method name="get_donor_info" qualifiers="const"> - <return type="Dictionary"> - </return> + <return type="Dictionary" /> <description> Returns a Dictionary of Arrays of donor names. {[code]platinum_sponsors[/code], [code]gold_sponsors[/code], [code]silver_sponsors[/code], [code]bronze_sponsors[/code], [code]mini_sponsors[/code], [code]gold_donors[/code], [code]silver_donors[/code], [code]bronze_donors[/code]} </description> </method> <method name="get_frames_drawn"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the total number of frames drawn. If the render loop is disabled with [code]--disable-render-loop[/code] via command line, this returns [code]0[/code]. See also [method get_process_frames]. </description> </method> <method name="get_frames_per_second" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the frames per second of the running game. </description> </method> <method name="get_license_info" qualifiers="const"> - <return type="Dictionary"> - </return> + <return type="Dictionary" /> <description> Returns Dictionary of licenses used by Godot and included third party components. </description> </method> <method name="get_license_text" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns Godot license text. </description> </method> <method name="get_main_loop" qualifiers="const"> - <return type="MainLoop"> - </return> + <return type="MainLoop" /> <description> Returns the main loop object (see [MainLoop] and [SceneTree]). </description> </method> <method name="get_physics_frames" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the total number of frames passed since engine initialization which is advanced on each [b]physics frame[/b]. </description> </method> <method name="get_physics_interpolation_fraction" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the fraction through the current physics tick we are at the time of rendering the frame. This can be used to implement fixed timestep interpolation. </description> </method> <method name="get_process_frames" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the total number of frames passed since engine initialization which is advanced on each [b]process frame[/b], regardless of whether the render loop is enabled. See also [method get_frames_drawn]. </description> </method> <method name="get_singleton" qualifiers="const"> - <return type="Object"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="Object" /> + <argument index="0" name="name" type="StringName" /> <description> Returns a global singleton with given [code]name[/code]. Often used for plugins, e.g. GodotPayments. </description> </method> + <method name="get_singleton_list" qualifiers="const"> + <return type="PackedStringArray" /> + <description> + </description> + </method> <method name="get_version_info" qualifiers="const"> - <return type="Dictionary"> - </return> + <return type="Dictionary" /> <description> Returns the current engine version information in a Dictionary. [code]major[/code] - Holds the major version number as an int @@ -138,21 +129,31 @@ </description> </method> <method name="has_singleton" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> <description> Returns [code]true[/code] if a singleton with given [code]name[/code] exists in global scope. </description> </method> <method name="is_in_physics_frame" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the game is inside the fixed process and physics phase of the game loop. </description> </method> + <method name="register_singleton"> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="instance" type="Object" /> + <description> + </description> + </method> + <method name="unregister_singleton"> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <description> + </description> + </method> </methods> <members> <member name="editor_hint" type="bool" setter="set_editor_hint" getter="is_editor_hint" default="true"> @@ -166,20 +167,20 @@ See [url=https://docs.godotengine.org/en/latest/tutorials/plugins/running_code_in_the_editor.html]Running code in the editor[/url] in the documentation for more information. [b]Note:[/b] To detect whether the script is run from an editor [i]build[/i] (e.g. when pressing [kbd]F5[/kbd]), use [method OS.has_feature] with the [code]"editor"[/code] argument instead. [code]OS.has_feature("editor")[/code] will evaluate to [code]true[/code] both when the code is running in the editor and when running the project from the editor, but it will evaluate to [code]false[/code] when the code is run from an exported project. </member> - <member name="iterations_per_second" type="int" setter="set_iterations_per_second" getter="get_iterations_per_second" default="60"> - The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. This value should generally always be set to [code]60[/code] or above, as Godot doesn't interpolate the physics step. As a result, values lower than [code]60[/code] will look stuttery. This value can be increased to make input more reactive or work around tunneling issues, but keep in mind doing so will increase CPU usage. - </member> <member name="physics_jitter_fix" type="float" setter="set_physics_jitter_fix" getter="get_physics_jitter_fix" default="0.5"> - Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows smoothing out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended. + Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of the in-game clock and real clock but smooth out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended. [b]Note:[/b] For best results, when using a custom physics interpolation solution, the physics jitter fix should be disabled by setting [member physics_jitter_fix] to [code]0[/code]. </member> + <member name="physics_ticks_per_second" type="int" setter="set_physics_ticks_per_second" getter="get_physics_ticks_per_second" default="60"> + The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. This value should generally always be set to [code]60[/code] or above, as Godot doesn't interpolate the physics step. As a result, values lower than [code]60[/code] will look stuttery. This value can be increased to make input more reactive or work around tunneling issues, but keep in mind doing so will increase CPU usage. See also [member target_fps]. + </member> <member name="print_error_messages" type="bool" setter="set_print_error_messages" getter="is_printing_error_messages" default="true"> If [code]false[/code], stops printing error and warning messages to the console and editor Output log. This can be used to hide error and warning messages during unit test suite runs. This property is equivalent to the [member ProjectSettings.application/run/disable_stderr] project setting. [b]Warning:[/b] If you set this to [code]false[/code] anywhere in the project, important error messages may be hidden even if they are emitted from other scripts. If this is set to [code]false[/code] in a [code]@tool[/code] script, this will also impact the editor itself. Do [i]not[/i] report bugs before ensuring error messages are enabled (as they are by default). [b]Note:[/b] This property does not impact the editor's Errors tab when running a project from the editor. </member> <member name="target_fps" type="int" setter="set_target_fps" getter="get_target_fps" default="0"> - The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit. + The desired frames per second. If the hardware cannot keep up, this setting may not be respected. A value of 0 means no limit. See also [member physics_ticks_per_second]. </member> <member name="time_scale" type="float" setter="set_time_scale" getter="get_time_scale" default="1.0"> Controls how fast or slow the in-game clock ticks versus the real life one. It defaults to 1.0. A value of 2.0 means the game moves twice as fast as real life, whilst a value of 0.5 means the game moves at half the regular speed. diff --git a/doc/classes/EngineDebugger.xml b/doc/classes/EngineDebugger.xml index 50ccb6b075..30d5193384 100644 --- a/doc/classes/EngineDebugger.xml +++ b/doc/classes/EngineDebugger.xml @@ -10,86 +10,64 @@ </tutorials> <methods> <method name="has_capture"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> <description> Returns [code]true[/code] if a capture with the given name is present otherwise [code]false[/code]. </description> </method> <method name="has_profiler"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> <description> Returns [code]true[/code] if a profiler with the given name is present otherwise [code]false[/code]. </description> </method> <method name="is_active"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the debugger is active otherwise [code]false[/code]. </description> </method> <method name="is_profiling"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> <description> Returns [code]true[/code] if a profiler with the given name is present and active otherwise [code]false[/code]. </description> </method> <method name="profiler_add_frame_data"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="data" type="Array"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="data" type="Array" /> <description> Calls the [code]add[/code] callable of the profiler with given [code]name[/code] and [code]data[/code]. </description> </method> <method name="profiler_enable"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> - <argument index="2" name="arguments" type="Array" default="[]"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="enable" type="bool" /> + <argument index="2" name="arguments" type="Array" default="[]" /> <description> Calls the [code]toggle[/code] callable of the profiler with given [code]name[/code] and [code]arguments[/code]. Enables/Disables the same profiler depending on [code]enable[/code] argument. </description> </method> <method name="register_message_capture"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="callable" type="Callable"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="callable" type="Callable" /> <description> Registers a message capture with given [code]name[/code]. If [code]name[/code] is "my_message" then messages starting with "my_message:" will be called with the given callable. Callable must accept a message string and a data array as argument. If the message and data are valid then callable must return [code]true[/code] otherwise [code]false[/code]. </description> </method> <method name="register_profiler"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="toggle" type="Callable"> - </argument> - <argument index="2" name="add" type="Callable"> - </argument> - <argument index="3" name="tick" type="Callable"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="toggle" type="Callable" /> + <argument index="2" name="add" type="Callable" /> + <argument index="3" name="tick" type="Callable" /> <description> Registers a profiler with the given [code]name[/code]. [code]toggle[/code] callable is called when the profiler is enabled/disabled. It must take an argument array as an argument. @@ -98,30 +76,23 @@ </description> </method> <method name="send_message"> - <return type="void"> - </return> - <argument index="0" name="message" type="String"> - </argument> - <argument index="1" name="data" type="Array"> - </argument> + <return type="void" /> + <argument index="0" name="message" type="String" /> + <argument index="1" name="data" type="Array" /> <description> Sends a message with given [code]message[/code] and [code]data[/code] array. </description> </method> <method name="unregister_message_capture"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> <description> Unregisters the message capture with given [code]name[/code]. </description> </method> <method name="unregister_profiler"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> <description> Unregisters a profiler with given [code]name[/code]. </description> diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index ae87a62c84..2c4e5ea886 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -19,21 +19,16 @@ </tutorials> <methods> <method name="get_glow_level" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="idx" type="int" /> <description> Returns the intensity of the glow level [code]idx[/code]. </description> </method> <method name="set_glow_level"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="intensity" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="intensity" type="float" /> <description> Sets the intensity of the glow level [code]idx[/code]. A value above [code]0.0[/code] enables the level. Each level relies on the previous level. This means that enabling higher glow levels will slow down the glow effect rendering, even if previous levels aren't enabled. </description> diff --git a/doc/classes/Expression.xml b/doc/classes/Expression.xml index 640b45dca4..809a5bb80c 100644 --- a/doc/classes/Expression.xml +++ b/doc/classes/Expression.xml @@ -52,40 +52,31 @@ </tutorials> <methods> <method name="execute"> - <return type="Variant"> - </return> - <argument index="0" name="inputs" type="Array" default="[]"> - </argument> - <argument index="1" name="base_instance" type="Object" default="null"> - </argument> - <argument index="2" name="show_error" type="bool" default="true"> - </argument> + <return type="Variant" /> + <argument index="0" name="inputs" type="Array" default="[]" /> + <argument index="1" name="base_instance" type="Object" default="null" /> + <argument index="2" name="show_error" type="bool" default="true" /> <description> Executes the expression that was previously parsed by [method parse] and returns the result. Before you use the returned object, you should check if the method failed by calling [method has_execute_failed]. If you defined input variables in [method parse], you can specify their values in the inputs array, in the same order. </description> </method> <method name="get_error_text" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the error text if [method parse] has failed. </description> </method> <method name="has_execute_failed" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if [method execute] has failed. </description> </method> <method name="parse"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="expression" type="String"> - </argument> - <argument index="1" name="input_names" type="PackedStringArray" default="PackedStringArray()"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="expression" type="String" /> + <argument index="1" name="input_names" type="PackedStringArray" default="PackedStringArray()" /> <description> Parses the expression and returns an [enum Error] code. You can optionally specify names of variables that may appear in the expression with [code]input_names[/code], so that you can bind them when it gets executed. diff --git a/doc/classes/File.xml b/doc/classes/File.xml index f98c31dc7f..8ecdc8b220 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -50,285 +50,238 @@ </tutorials> <methods> <method name="close"> - <return type="void"> - </return> + <return type="void" /> <description> Closes the currently opened file and prevents subsequent read/write operations. Use [method flush] to persist the data to disk without closing the file. </description> </method> <method name="eof_reached" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the file cursor has read past the end of the file. [b]Note:[/b] This function will still return [code]false[/code] while at the end of the file and only activates when reading past it. This can be confusing but it conforms to how low-level file access works in all operating systems. There is always [method get_length] and [method get_position] to implement a custom logic. </description> </method> <method name="file_exists" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="path" type="String" /> <description> Returns [code]true[/code] if the file exists in the given path. [b]Note:[/b] Many resources types are imported (e.g. textures or sound files), and their source asset will not be included in the exported game, as only the imported version is used. See [method ResourceLoader.exists] for an alternative approach that takes resource remapping into account. </description> </method> <method name="flush"> - <return type="void"> - </return> + <return type="void" /> <description> Writes the file's buffer to disk. Flushing is automatically performed when the file is closed. This means you don't need to call [method flush] manually before closing a file using [method close]. Still, calling [method flush] can be used to ensure the data is safe even if the project crashes instead of being closed gracefully. [b]Note:[/b] Only call [method flush] when you actually need it. Otherwise, it will decrease performance due to constant disk writes. </description> </method> <method name="get_16" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the next 16 bits from the file as an integer. See [method store_16] for details on what values can be stored and retrieved this way. </description> </method> <method name="get_32" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the next 32 bits from the file as an integer. See [method store_32] for details on what values can be stored and retrieved this way. </description> </method> <method name="get_64" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the next 64 bits from the file as an integer. See [method store_64] for details on what values can be stored and retrieved this way. </description> </method> <method name="get_8" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the next 8 bits from the file as an integer. See [method store_8] for details on what values can be stored and retrieved this way. </description> </method> <method name="get_as_text" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the whole file as a [String]. Text is interpreted as being UTF-8 encoded. </description> </method> <method name="get_buffer" qualifiers="const"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="length" type="int"> - </argument> + <return type="PackedByteArray" /> + <argument index="0" name="length" type="int" /> <description> Returns next [code]length[/code] bytes of the file as a [PackedByteArray]. </description> </method> <method name="get_csv_line" qualifiers="const"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="delim" type="String" default="",""> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="delim" type="String" default="","" /> <description> - Returns the next value of the file in CSV (Comma-Separated Values) format. You can pass a different delimiter [code]delim[/code] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long. - Text is interpreted as being UTF-8 encoded. + Returns the next value of the file in CSV (Comma-Separated Values) format. You can pass a different delimiter [code]delim[/code] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long, and cannot be a double quotation mark. + Text is interpreted as being UTF-8 encoded. Text values must be enclosed in double quotes if they include the delimiter character. Double quotes within a text value can be escaped by doubling their occurrence. + For example, the following CSV lines are valid and will be properly parsed as two strings each: + [codeblock] + Alice,"Hello, Bob!" + Bob,Alice! What a surprise! + Alice,"I thought you'd reply with ""Hello, world""." + [/codeblock] + Note how the second line can omit the enclosing quotes as it does not include the delimiter. However it [i]could[/i] very well use quotes, it was only written without for demonstration purposes. The third line must use [code]""[/code] for each quotation mark that needs to be interpreted as such instead of the end of a text value. </description> </method> <method name="get_double" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the next 64 bits from the file as a floating-point number. </description> </method> <method name="get_error" qualifiers="const"> - <return type="int" enum="Error"> - </return> + <return type="int" enum="Error" /> <description> Returns the last error that happened when trying to perform operations. Compare with the [code]ERR_FILE_*[/code] constants from [enum Error]. </description> </method> <method name="get_float" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the next 32 bits from the file as a floating-point number. </description> </method> <method name="get_length" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the size of the file in bytes. </description> </method> <method name="get_line" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the next line of the file as a [String]. Text is interpreted as being UTF-8 encoded. </description> </method> <method name="get_md5" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="String" /> + <argument index="0" name="path" type="String" /> <description> Returns an MD5 String representing the file at the given path or an empty [String] on failure. </description> </method> <method name="get_modified_time" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="file" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="file" type="String" /> <description> Returns the last time the [code]file[/code] was modified in Unix timestamp format or returns a [String] "ERROR IN [code]file[/code]". This Unix timestamp can be converted to another format using the [Time] singleton. </description> </method> <method name="get_pascal_string"> - <return type="String"> - </return> + <return type="String" /> <description> Returns a [String] saved in Pascal format from the file. Text is interpreted as being UTF-8 encoded. </description> </method> <method name="get_path" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the path as a [String] for the current open file. </description> </method> <method name="get_path_absolute" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the absolute path as a [String] for the current open file. </description> </method> <method name="get_position" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the file cursor's position. </description> </method> <method name="get_real" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the next bits from the file as a floating-point number. </description> </method> <method name="get_sha256" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="String" /> + <argument index="0" name="path" type="String" /> <description> Returns a SHA-256 [String] representing the file at the given path or an empty [String] on failure. </description> </method> <method name="get_var" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="allow_objects" type="bool" default="false"> - </argument> + <return type="Variant" /> + <argument index="0" name="allow_objects" type="bool" default="false" /> <description> Returns the next [Variant] value from the file. If [code]allow_objects[/code] is [code]true[/code], decoding objects is allowed. [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. </description> </method> <method name="is_open" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the file is currently opened. </description> </method> <method name="open"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="flags" type="int" enum="File.ModeFlags"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="flags" type="int" enum="File.ModeFlags" /> <description> Opens the file for writing or reading, depending on the flags. </description> </method> <method name="open_compressed"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="mode_flags" type="int" enum="File.ModeFlags"> - </argument> - <argument index="2" name="compression_mode" type="int" enum="File.CompressionMode" default="0"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="mode_flags" type="int" enum="File.ModeFlags" /> + <argument index="2" name="compression_mode" type="int" enum="File.CompressionMode" default="0" /> <description> Opens a compressed file for reading or writing. [b]Note:[/b] [method open_compressed] can only read files that were saved by Godot, not third-party compression formats. See [url=https://github.com/godotengine/godot/issues/28999]GitHub issue #28999[/url] for a workaround. </description> </method> <method name="open_encrypted"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="mode_flags" type="int" enum="File.ModeFlags"> - </argument> - <argument index="2" name="key" type="PackedByteArray"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="mode_flags" type="int" enum="File.ModeFlags" /> + <argument index="2" name="key" type="PackedByteArray" /> <description> Opens an encrypted file in write or read mode. You need to pass a binary key to encrypt/decrypt it. [b]Note:[/b] The provided key must be 32 bytes long. </description> </method> <method name="open_encrypted_with_pass"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="mode_flags" type="int" enum="File.ModeFlags"> - </argument> - <argument index="2" name="pass" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="mode_flags" type="int" enum="File.ModeFlags" /> + <argument index="2" name="pass" type="String" /> <description> Opens an encrypted file in write or read mode. You need to pass a password to encrypt/decrypt it. </description> </method> <method name="seek"> - <return type="void"> - </return> - <argument index="0" name="position" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="position" type="int" /> <description> Changes the file reading/writing cursor to the specified position (in bytes from the beginning of the file). </description> </method> <method name="seek_end"> - <return type="void"> - </return> - <argument index="0" name="position" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="position" type="int" default="0" /> <description> Changes the file reading/writing cursor to the specified position (in bytes from the end of the file). [b]Note:[/b] This is an offset, so you should use negative numbers or the cursor will be at the end of the file. </description> </method> <method name="store_16"> - <return type="void"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="int" /> <description> Stores an integer as 16 bits in the file. [b]Note:[/b] The [code]value[/code] should lie in the interval [code][0, 2^16 - 1][/code]. Any other value will overflow and wrap around. @@ -370,10 +323,8 @@ </description> </method> <method name="store_32"> - <return type="void"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="int" /> <description> Stores an integer as 32 bits in the file. [b]Note:[/b] The [code]value[/code] should lie in the interval [code][0, 2^32 - 1][/code]. Any other value will overflow and wrap around. @@ -381,20 +332,16 @@ </description> </method> <method name="store_64"> - <return type="void"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="int" /> <description> Stores an integer as 64 bits in the file. [b]Note:[/b] The [code]value[/code] must lie in the interval [code][-2^63, 2^63 - 1][/code] (i.e. be a valid [int] value). </description> </method> <method name="store_8"> - <return type="void"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="int" /> <description> Stores an integer as 8 bits in the file. [b]Note:[/b] The [code]value[/code] should lie in the interval [code][0, 255][/code]. Any other value will overflow and wrap around. @@ -402,88 +349,68 @@ </description> </method> <method name="store_buffer"> - <return type="void"> - </return> - <argument index="0" name="buffer" type="PackedByteArray"> - </argument> + <return type="void" /> + <argument index="0" name="buffer" type="PackedByteArray" /> <description> Stores the given array of bytes in the file. </description> </method> <method name="store_csv_line"> - <return type="void"> - </return> - <argument index="0" name="values" type="PackedStringArray"> - </argument> - <argument index="1" name="delim" type="String" default="",""> - </argument> + <return type="void" /> + <argument index="0" name="values" type="PackedStringArray" /> + <argument index="1" name="delim" type="String" default="","" /> <description> Store the given [PackedStringArray] in the file as a line formatted in the CSV (Comma-Separated Values) format. You can pass a different delimiter [code]delim[/code] to use other than the default [code]","[/code] (comma). This delimiter must be one-character long. Text will be encoded as UTF-8. </description> </method> <method name="store_double"> - <return type="void"> - </return> - <argument index="0" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="float" /> <description> Stores a floating-point number as 64 bits in the file. </description> </method> <method name="store_float"> - <return type="void"> - </return> - <argument index="0" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="float" /> <description> Stores a floating-point number as 32 bits in the file. </description> </method> <method name="store_line"> - <return type="void"> - </return> - <argument index="0" name="line" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="line" type="String" /> <description> Appends [code]line[/code] to the file followed by a line return character ([code]\n[/code]), encoding the text as UTF-8. </description> </method> <method name="store_pascal_string"> - <return type="void"> - </return> - <argument index="0" name="string" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="string" type="String" /> <description> Stores the given [String] as a line in the file in Pascal format (i.e. also store the length of the string). Text will be encoded as UTF-8. </description> </method> <method name="store_real"> - <return type="void"> - </return> - <argument index="0" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="float" /> <description> Stores a floating-point number in the file. </description> </method> <method name="store_string"> - <return type="void"> - </return> - <argument index="0" name="string" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="string" type="String" /> <description> Appends [code]string[/code] to the file without a line return, encoding the text as UTF-8. </description> </method> <method name="store_var"> - <return type="void"> - </return> - <argument index="0" name="value" type="Variant"> - </argument> - <argument index="1" name="full_objects" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="Variant" /> + <argument index="1" name="full_objects" type="bool" default="false" /> <description> Stores any Variant value in the file. If [code]full_objects[/code] is [code]true[/code], encoding objects is allowed (and can potentially include code). [b]Note:[/b] Not all properties are included. Only properties that are configured with the [constant PROPERTY_USAGE_STORAGE] flag set will be serialized. You can add a new usage flag to a property by overriding the [method Object._get_property_list] method in your class. You can also check how property usage is configured by calling [method Object._get_property_list]. See [enum PropertyUsageFlags] for the possible usage flags. @@ -511,7 +438,7 @@ Opens the file for read and write operations. The file is created if it does not exist, and truncated if it does. The cursor is positioned at the beginning of the file. </constant> <constant name="COMPRESSION_FASTLZ" value="0" enum="CompressionMode"> - Uses the [url=http://fastlz.org/]FastLZ[/url] compression method. + Uses the [url=https://fastlz.org/]FastLZ[/url] compression method. </constant> <constant name="COMPRESSION_DEFLATE" value="1" enum="CompressionMode"> Uses the [url=https://en.wikipedia.org/wiki/DEFLATE]DEFLATE[/url] compression method. diff --git a/doc/classes/FileDialog.xml b/doc/classes/FileDialog.xml index 8ccee1c82e..22b5c72fa9 100644 --- a/doc/classes/FileDialog.xml +++ b/doc/classes/FileDialog.xml @@ -10,45 +10,38 @@ </tutorials> <methods> <method name="add_filter"> - <return type="void"> - </return> - <argument index="0" name="filter" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="filter" type="String" /> <description> Adds [code]filter[/code] as a custom filter; [code]filter[/code] should be of the form [code]"filename.extension ; Description"[/code]. For example, [code]"*.png ; PNG Images"[/code]. </description> </method> <method name="clear_filters"> - <return type="void"> - </return> + <return type="void" /> <description> Clear all the added filters in the dialog. </description> </method> <method name="deselect_all"> - <return type="void"> - </return> + <return type="void" /> <description> Clear all currently selected items in the dialog. </description> </method> <method name="get_line_edit"> - <return type="LineEdit"> - </return> + <return type="LineEdit" /> <description> Returns the LineEdit for the selected file. </description> </method> <method name="get_vbox"> - <return type="VBoxContainer"> - </return> + <return type="VBoxContainer" /> <description> Returns the vertical box container of the dialog, custom controls can be added to it. </description> </method> <method name="invalidate"> - <return type="void"> - </return> + <return type="void" /> <description> Invalidate and update the current dialog content list. </description> @@ -85,22 +78,19 @@ </members> <signals> <signal name="dir_selected"> - <argument index="0" name="dir" type="String"> - </argument> + <argument index="0" name="dir" type="String" /> <description> Emitted when the user selects a directory. </description> </signal> <signal name="file_selected"> - <argument index="0" name="path" type="String"> - </argument> + <argument index="0" name="path" type="String" /> <description> Emitted when the user selects a file by double-clicking it or pressing the [b]OK[/b] button. </description> </signal> <signal name="files_selected"> - <argument index="0" name="paths" type="PackedStringArray"> - </argument> + <argument index="0" name="paths" type="PackedStringArray" /> <description> Emitted when the user selects multiple files. </description> @@ -133,34 +123,34 @@ </constant> </constants> <theme_items> - <theme_item name="back_folder" type="Texture2D"> + <theme_item name="back_folder" data_type="icon" type="Texture2D"> Custom icon for the back arrow. </theme_item> - <theme_item name="file" type="Texture2D"> + <theme_item name="file" data_type="icon" type="Texture2D"> Custom icon for files. </theme_item> - <theme_item name="file_icon_modulate" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="file_icon_modulate" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The color modulation applied to the file icon. </theme_item> - <theme_item name="files_disabled" type="Color" default="Color(0, 0, 0, 0.7)"> + <theme_item name="files_disabled" data_type="color" type="Color" default="Color(0, 0, 0, 0.7)"> The color tint for disabled files (when the [FileDialog] is used in open folder mode). </theme_item> - <theme_item name="folder" type="Texture2D"> + <theme_item name="folder" data_type="icon" type="Texture2D"> Custom icon for folders. </theme_item> - <theme_item name="folder_icon_modulate" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="folder_icon_modulate" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The color modulation applied to the folder icon. </theme_item> - <theme_item name="forward_folder" type="Texture2D"> + <theme_item name="forward_folder" data_type="icon" type="Texture2D"> Custom icon for the forward arrow. </theme_item> - <theme_item name="parent_folder" type="Texture2D"> + <theme_item name="parent_folder" data_type="icon" type="Texture2D"> Custom icon for the parent folder arrow. </theme_item> - <theme_item name="reload" type="Texture2D"> + <theme_item name="reload" data_type="icon" type="Texture2D"> Custom icon for the reload button. </theme_item> - <theme_item name="toggle_hidden" type="Texture2D"> + <theme_item name="toggle_hidden" data_type="icon" type="Texture2D"> Custom icon for the toggle hidden button. </theme_item> </theme_items> diff --git a/doc/classes/FileSystemDock.xml b/doc/classes/FileSystemDock.xml index 15f92e90e3..a164415245 100644 --- a/doc/classes/FileSystemDock.xml +++ b/doc/classes/FileSystemDock.xml @@ -8,10 +8,8 @@ </tutorials> <methods> <method name="navigate_to_path"> - <return type="void"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="path" type="String" /> <description> </description> </method> @@ -22,42 +20,34 @@ </description> </signal> <signal name="file_removed"> - <argument index="0" name="file" type="String"> - </argument> + <argument index="0" name="file" type="String" /> <description> </description> </signal> <signal name="files_moved"> - <argument index="0" name="old_file" type="String"> - </argument> - <argument index="1" name="new_file" type="String"> - </argument> + <argument index="0" name="old_file" type="String" /> + <argument index="1" name="new_file" type="String" /> <description> </description> </signal> <signal name="folder_moved"> - <argument index="0" name="old_folder" type="String"> - </argument> - <argument index="1" name="new_file" type="String"> - </argument> + <argument index="0" name="old_folder" type="String" /> + <argument index="1" name="new_file" type="String" /> <description> </description> </signal> <signal name="folder_removed"> - <argument index="0" name="folder" type="String"> - </argument> + <argument index="0" name="folder" type="String" /> <description> </description> </signal> <signal name="inherit"> - <argument index="0" name="file" type="String"> - </argument> + <argument index="0" name="file" type="String" /> <description> </description> </signal> <signal name="instance"> - <argument index="0" name="files" type="PackedStringArray"> - </argument> + <argument index="0" name="files" type="PackedStringArray" /> <description> </description> </signal> diff --git a/doc/classes/Font.xml b/doc/classes/Font.xml index 186bfbb931..aa70856e32 100644 --- a/doc/classes/Font.xml +++ b/doc/classes/Font.xml @@ -64,188 +64,147 @@ </tutorials> <methods> <method name="add_data"> - <return type="void"> - </return> - <argument index="0" name="data" type="FontData"> - </argument> + <return type="void" /> + <argument index="0" name="data" type="FontData" /> <description> Add font data source to the set. </description> </method> + <method name="clear_data"> + <return type="void" /> + <description> + Removes all font data sourcers for the set. + </description> + </method> <method name="draw_char" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="canvas_item" type="RID"> - </argument> - <argument index="1" name="pos" type="Vector2"> - </argument> - <argument index="2" name="char" type="int"> - </argument> - <argument index="3" name="next" type="int" default="0"> - </argument> - <argument index="4" name="size" type="int" default="-1"> - </argument> - <argument index="5" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <argument index="6" name="outline_size" type="int" default="0"> - </argument> - <argument index="7" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)"> - </argument> + <return type="float" /> + <argument index="0" name="canvas_item" type="RID" /> + <argument index="1" name="pos" type="Vector2" /> + <argument index="2" name="char" type="int" /> + <argument index="3" name="next" type="int" default="0" /> + <argument index="4" name="size" type="int" default="-1" /> + <argument index="5" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> + <argument index="6" name="outline_size" type="int" default="0" /> + <argument index="7" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" /> <description> Draw a single Unicode character [code]char[/code] into a canvas item using the font, at a given position, with [code]modulate[/code] color, and optionally kerning if [code]next[/code] is passed. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. [b]Note:[/b] Do not use this function to draw strings character by character, use [method draw_string] or [TextLine] instead. </description> </method> <method name="draw_multiline_string" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="canvas_item" type="RID"> - </argument> - <argument index="1" name="pos" type="Vector2"> - </argument> - <argument index="2" name="text" type="String"> - </argument> - <argument index="3" name="align" type="int" enum="HAlign" default="0"> - </argument> - <argument index="4" name="width" type="float" default="-1"> - </argument> - <argument index="5" name="max_lines" type="int" default="-1"> - </argument> - <argument index="6" name="size" type="int" default="-1"> - </argument> - <argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <argument index="8" name="outline_size" type="int" default="0"> - </argument> - <argument index="9" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)"> - </argument> - <argument index="10" name="flags" type="int" default="51"> - </argument> + <return type="void" /> + <argument index="0" name="canvas_item" type="RID" /> + <argument index="1" name="pos" type="Vector2" /> + <argument index="2" name="text" type="String" /> + <argument index="3" name="align" type="int" enum="HAlign" default="0" /> + <argument index="4" name="width" type="float" default="-1" /> + <argument index="5" name="max_lines" type="int" default="-1" /> + <argument index="6" name="size" type="int" default="-1" /> + <argument index="7" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> + <argument index="8" name="outline_size" type="int" default="0" /> + <argument index="9" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" /> + <argument index="10" name="flags" type="int" default="51" /> <description> Breaks [code]text[/code] to the lines using rules specified by [code]flags[/code] and draws it into a canvas item using the font, at a given position, with [code]modulate[/code] color, optionally clipping the width and aligning horizontally. [code]position[/code] specifies the baseline of the first line, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. See also [method CanvasItem.draw_multiline_string]. </description> </method> <method name="draw_string" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="canvas_item" type="RID"> - </argument> - <argument index="1" name="pos" type="Vector2"> - </argument> - <argument index="2" name="text" type="String"> - </argument> - <argument index="3" name="align" type="int" enum="HAlign" default="0"> - </argument> - <argument index="4" name="width" type="float" default="-1"> - </argument> - <argument index="5" name="size" type="int" default="-1"> - </argument> - <argument index="6" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <argument index="7" name="outline_size" type="int" default="0"> - </argument> - <argument index="8" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)"> - </argument> - <argument index="9" name="flags" type="int" default="3"> - </argument> + <return type="void" /> + <argument index="0" name="canvas_item" type="RID" /> + <argument index="1" name="pos" type="Vector2" /> + <argument index="2" name="text" type="String" /> + <argument index="3" name="align" type="int" enum="HAlign" default="0" /> + <argument index="4" name="width" type="float" default="-1" /> + <argument index="5" name="size" type="int" default="-1" /> + <argument index="6" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> + <argument index="7" name="outline_size" type="int" default="0" /> + <argument index="8" name="outline_modulate" type="Color" default="Color(1, 1, 1, 0)" /> + <argument index="9" name="flags" type="int" default="3" /> <description> Draw [code]text[/code] into a canvas item using the font, at a given position, with [code]modulate[/code] color, optionally clipping the width and aligning horizontally. [code]position[/code] specifies the baseline, not the top. To draw from the top, [i]ascent[/i] must be added to the Y axis. See also [method CanvasItem.draw_string]. </description> </method> <method name="get_ascent" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="size" type="int" default="-1"> - </argument> + <return type="float" /> + <argument index="0" name="size" type="int" default="-1" /> <description> Returns the average font ascent (number of pixels above the baseline). [b]Note:[/b] Real ascent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the ascent of empty line). </description> </method> <method name="get_char_size" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="char" type="int"> - </argument> - <argument index="1" name="next" type="int" default="0"> - </argument> - <argument index="2" name="size" type="int" default="-1"> - </argument> + <return type="Vector2" /> + <argument index="0" name="char" type="int" /> + <argument index="1" name="next" type="int" default="0" /> + <argument index="2" name="size" type="int" default="-1" /> <description> Returns the size of a character, optionally taking kerning into account if the next character is provided. [b]Note:[/b] Do not use this function to calculate width of the string character by character, use [method get_string_size] or [TextLine] instead. The height returned is the font height (see also [method get_height]) and has no relation to the glyph height. </description> </method> <method name="get_data" qualifiers="const"> - <return type="FontData"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="FontData" /> + <argument index="0" name="idx" type="int" /> <description> Returns the font data source at index [code]idx[/code]. If the index does not exist, returns [code]null[/code]. </description> </method> <method name="get_data_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of font data sources. </description> </method> + <method name="get_data_rid" qualifiers="const"> + <return type="RID" /> + <argument index="0" name="idx" type="int" /> + <description> + Returns TextServer RID of the font data resources. + </description> + </method> <method name="get_descent" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="size" type="int" default="-1"> - </argument> + <return type="float" /> + <argument index="0" name="size" type="int" default="-1" /> <description> Returns the average font descent (number of pixels below the baseline). [b]Note:[/b] Real descent of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the descent of empty line). </description> </method> <method name="get_height" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="size" type="int" default="-1"> - </argument> + <return type="float" /> + <argument index="0" name="size" type="int" default="-1" /> <description> Returns the total average font height (ascent plus descent) in pixels. [b]Note:[/b] Real height of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate (e.g. as the height of empty line). </description> </method> <method name="get_multiline_string_size" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="text" type="String"> - </argument> - <argument index="1" name="width" type="float" default="-1"> - </argument> - <argument index="2" name="size" type="int" default="-1"> - </argument> - <argument index="3" name="flags" type="int" default="48"> - </argument> + <return type="Vector2" /> + <argument index="0" name="text" type="String" /> + <argument index="1" name="width" type="float" default="-1" /> + <argument index="2" name="size" type="int" default="-1" /> + <argument index="3" name="flags" type="int" default="48" /> <description> Returns the size of a bounding box of a string broken into the lines, taking kerning and advance into account. See also [method draw_multiline_string]. </description> </method> <method name="get_spacing" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="type" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="spacing" type="int" enum="TextServer.SpacingType" /> <description> - Returns the spacing for the given [code]type[/code] (see [enum SpacingType]). + Returns the spacing for the given [code]type[/code] (see [enum TextServer.SpacingType]). </description> </method> <method name="get_string_size" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="text" type="String"> - </argument> - <argument index="1" name="size" type="int" default="-1"> - </argument> + <return type="Vector2" /> + <argument index="0" name="text" type="String" /> + <argument index="1" name="size" type="int" default="-1" /> + <argument index="2" name="align" type="int" enum="HAlign" default="0" /> + <argument index="3" name="width" type="float" default="-1" /> + <argument index="4" name="flags" type="int" default="3" /> <description> Returns the size of a bounding box of a string, taking kerning and advance into account. [b]Note:[/b] Real height of the string is context-dependent and can be significantly different from the value returned by [method get_height]. @@ -253,95 +212,79 @@ </description> </method> <method name="get_supported_chars" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns a string containing all the characters available in the font. If a given character is included in more than one font data source, it appears only once in the returned string. </description> </method> <method name="get_underline_position" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="size" type="int" default="-1"> - </argument> + <return type="float" /> + <argument index="0" name="size" type="int" default="-1" /> <description> Return average pixel offset of the underline below the baseline. [b]Note:[/b] Real underline position of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate. </description> </method> <method name="get_underline_thickness" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="size" type="int" default="-1"> - </argument> + <return type="float" /> + <argument index="0" name="size" type="int" default="-1" /> <description> Return average thickness of the underline. [b]Note:[/b] Real underline thickness of the string is context-dependent and can be significantly different from the value returned by this function. Use it only as rough estimate. </description> </method> <method name="has_char" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="char" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="char" type="int" /> <description> Return [code]true[/code] if a Unicode [code]char[/code] is available in the font. </description> </method> <method name="remove_data"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> <description> Removes the font data source at index [code]idx[/code]. If the index does not exist, nothing happens. </description> </method> <method name="set_data"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="data" type="FontData"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="data" type="FontData" /> <description> Sets the font data source at index [code]idx[/code]. If the index does not exist, nothing happens. </description> </method> <method name="set_spacing"> - <return type="void"> - </return> - <argument index="0" name="type" type="int"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="spacing" type="int" enum="TextServer.SpacingType" /> + <argument index="1" name="value" type="int" /> <description> - Sets the spacing for [code]type[/code] (see [enum SpacingType]) to [code]value[/code] in pixels (not relative to the font size). + Sets the spacing for [code]type[/code] (see [enum TextServer.SpacingType]) to [code]value[/code] in pixels (not relative to the font size). </description> </method> <method name="update_changes"> - <return type="void"> - </return> + <return type="void" /> <description> After editing a font (changing data sources, etc.). Call this function to propagate changes to controls that might use it. </description> </method> </methods> <members> - <member name="extra_spacing_bottom" type="int" setter="set_spacing" getter="get_spacing" default="0"> + <member name="base_size" type="int" setter="set_base_size" getter="get_base_size" default="16"> + Default font size. + </member> + <member name="spacing_bottom" type="int" setter="set_spacing" getter="get_spacing" default="0"> Extra spacing at the bottom of the line in pixels. </member> - <member name="extra_spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0"> + <member name="spacing_top" type="int" setter="set_spacing" getter="get_spacing" default="0"> Extra spacing at the top of the line in pixels. </member> + <member name="variation_coordinates" type="Dictionary" setter="set_variation_coordinates" getter="get_variation_coordinates" default="{}"> + Default font [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url]. + </member> </members> <constants> - <constant name="SPACING_TOP" value="0" enum="SpacingType"> - Spacing at the top of the line. - </constant> - <constant name="SPACING_BOTTOM" value="1" enum="SpacingType"> - Spacing at the bottom of the line. - </constant> </constants> </class> diff --git a/doc/classes/FontData.xml b/doc/classes/FontData.xml index 0a2fb03750..72af7ca485 100644 --- a/doc/classes/FontData.xml +++ b/doc/classes/FontData.xml @@ -1,416 +1,647 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="FontData" inherits="Resource" version="4.0"> <brief_description> - Font data source, file or memory buffer. + Font source data and prerendered glyph cache, imported from dynamic or bitmap font. + Supported font formats: + - Dynamic font importer: TrueType (.ttf), OpenType (.otf), WOFF (.woff), Type 1 (.pfb, .pfm). + - Bitmap font importer: AngelCode BMFont (.fnt, .font), text and binary (version 3) format variants. + - Monospace image font importer: All supported image formats. </brief_description> <description> - Built-in text servers support font data sources of the following formats: - - Bitmap fonts in the [url=https://www.angelcode.com/products/bmfont/]BMFont[/url] format. Handles [code].fnt, *.font[/code] fonts containing texture atlases. Non-scalable. Supports distance fields. Complex text shaping support is limited. - - Dynamic fonts using the [url=https://www.freetype.org/]FreeType[/url] and [url=https://github.com/silnrsi/graphite/]Graphite[/url] library for rasterization. Handles [code]*.ttf, *.otf[/code] fonts. Scalable. Doesn't support distance fields. Supports complex text shaping and OpenType features. </description> <tutorials> </tutorials> <methods> - <method name="bitmap_add_char"> - <return type="void"> - </return> - <argument index="0" name="char" type="int"> - </argument> - <argument index="1" name="texture_idx" type="int"> - </argument> - <argument index="2" name="rect" type="Rect2"> - </argument> - <argument index="3" name="align" type="Vector2"> - </argument> - <argument index="4" name="advance" type="float"> - </argument> - <description> - Adds a character to the font, where [code]character[/code] is the Unicode value, [code]texture[/code] is the texture index, [code]rect[/code] is the region in the texture (in pixels!), [code]align[/code] is the (optional) alignment for the character and [code]advance[/code] is the (optional) advance. - </description> - </method> - <method name="bitmap_add_kerning_pair"> - <return type="void"> - </return> - <argument index="0" name="A" type="int"> - </argument> - <argument index="1" name="B" type="int"> - </argument> - <argument index="2" name="kerning" type="int"> - </argument> - <description> - Adds a kerning pair to the bitmap font as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character. - </description> - </method> - <method name="bitmap_add_texture"> - <return type="void"> - </return> - <argument index="0" name="texture" type="Texture"> - </argument> - <description> - Adds a texture to the bitmap font. - </description> - </method> - <method name="draw_glyph" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="canvas" type="RID"> - </argument> - <argument index="1" name="size" type="int"> - </argument> - <argument index="2" name="pos" type="Vector2"> - </argument> - <argument index="3" name="index" type="int"> - </argument> - <argument index="4" name="color" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <description> - Draws single glyph into a canvas item at the position, using [code]font[/code] at the size [code]size[/code]. - Returns advance of the glyph for horizontal and vertical layouts. - Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data. - </description> - </method> - <method name="draw_glyph_outline" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="canvas" type="RID"> - </argument> - <argument index="1" name="size" type="int"> - </argument> - <argument index="2" name="outline_size" type="int"> - </argument> - <argument index="3" name="pos" type="Vector2"> - </argument> - <argument index="4" name="index" type="int"> - </argument> - <argument index="5" name="color" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <description> - Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font[/code] at the size [code]size[/code]. If outline drawing is not supported, nothing is drawn. - Returns advance of the glyph for horizontal and vertical layouts (regardless of outline drawing support). - Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data. + <method name="clear_cache"> + <return type="void" /> + <description> + Removes all font cache entries. + </description> + </method> + <method name="clear_glyphs"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <description> + Removes all rendered glyphs information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually. + </description> + </method> + <method name="clear_kerning_map"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <description> + Removes all kerning overrides. + </description> + </method> + <method name="clear_size_cache"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <description> + Removes all font sizes from the cache entry + </description> + </method> + <method name="clear_textures"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <description> + Removes all textures from font cache entry. Note: This function will not remove glyphs associated with the texture, use [method remove_glyph] to remove them manually. + </description> + </method> + <method name="find_cache" qualifiers="const"> + <return type="RID" /> + <argument index="0" name="variation_coordinates" type="Dictionary" /> + <description> + Returns existing or creates a new font cache entry for the specified variation coordinates. </description> </method> <method name="get_ascent" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="size" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> <description> Returns the font ascent (number of pixels above the baseline). </description> </method> - <method name="get_base_size" qualifiers="const"> - <return type="float"> - </return> + <method name="get_cache_count" qualifiers="const"> + <return type="int" /> <description> - Returns the base size of the font (the only size supported for non-scalable fonts, meaningless for scalable fonts). + Returns number of the font cache entries. + </description> + </method> + <method name="get_cache_rid" qualifiers="const"> + <return type="RID" /> + <argument index="0" name="cache_index" type="int" /> + <description> + Returns text server font cache entry resource id. + </description> + </method> + <method name="get_data" qualifiers="const"> + <return type="PackedByteArray" /> + <description> + Returns contents of the dynamic font source file. </description> </method> <method name="get_descent" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="size" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> <description> - Returns the font descent (number of pixels below the baseline). + Returns font descent (number of pixels below the baseline). </description> </method> <method name="get_glyph_advance" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="size" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="glyph" type="int" /> <description> - Returns advance of the glyph for horizontal and vertical layouts. - Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data. + Returns glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved. </description> </method> <method name="get_glyph_index" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="char" type="int"> - </argument> - <argument index="1" name="variation_selector" type="int" default="0"> - </argument> + <return type="int" /> + <argument index="0" name="char" type="int" /> + <argument index="1" name="variation_selector" type="int" /> + <argument index="2" name="arg2" type="int" /> + <description> + Returns the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code]. + </description> + </method> + <method name="get_glyph_list" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <description> + Returns list of rendered glyphs in the cache entry. + </description> + </method> + <method name="get_glyph_offset" qualifiers="const"> + <return type="Vector2" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <description> + Returns glyph offset from the baseline. + </description> + </method> + <method name="get_glyph_size" qualifiers="const"> + <return type="Vector2" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <description> + Returns glyph size. + </description> + </method> + <method name="get_glyph_texture_idx" qualifiers="const"> + <return type="int" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <description> + Returns index of the cache texture containing the glyph. + </description> + </method> + <method name="get_glyph_uv_rect" qualifiers="const"> + <return type="Rect2" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <description> + Returns rectangle in the cache texture containing the glyph. + </description> + </method> + <method name="get_hinting" qualifiers="const"> + <return type="int" enum="TextServer.Hinting" /> <description> - Return the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code]. + Returns the font hinting mode. Used by dynamic fonts only. </description> </method> - <method name="get_glyph_kerning" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="index_a" type="int"> - </argument> - <argument index="1" name="index_b" type="int"> - </argument> - <argument index="2" name="size" type="int"> - </argument> + <method name="get_kerning" qualifiers="const"> + <return type="Vector2" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="glyph_pair" type="Vector2i" /> <description> - Returns a kerning of the pair of glyphs for horizontal and vertical layouts. - Note: Glyph index is bound to the font data, use only glyphs indices returned by [method TextServer.shaped_text_get_glyphs] or [method get_glyph_index] for this font data. + Returns kerning for the pair of glyphs. </description> </method> - <method name="get_height" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="size" type="int"> - </argument> + <method name="get_kerning_list" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> <description> - Returns the total font height (ascent plus descent) in pixels. + Returns list of the kerning overrides. </description> </method> <method name="get_language_support_override" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="language" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="language" type="String" /> <description> Returns [code]true[/code] if support override is enabled for the [code]language[/code]. </description> </method> <method name="get_language_support_overrides" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns list of language support overrides. </description> </method> + <method name="get_msdf_pixel_range" qualifiers="const"> + <return type="int" /> + <description> + Returns the width of the range around the shape between the minimum and maximum representable signed distance. + </description> + </method> + <method name="get_msdf_size" qualifiers="const"> + <return type="int" /> + <description> + Returns source font size used to generate MSDF textures. + </description> + </method> + <method name="get_oversampling" qualifiers="const"> + <return type="float" /> + <description> + Returns font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only. + </description> + </method> + <method name="get_scale" qualifiers="const"> + <return type="float" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <description> + Returns scaling factor of the color bitmap font. + </description> + </method> <method name="get_script_support_override" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="script" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="script" type="String" /> <description> Returns [code]true[/code] if support override is enabled for the [code]script[/code]. </description> </method> <method name="get_script_support_overrides" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns list of script support overrides. </description> </method> + <method name="get_size_cache_list" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="cache_index" type="int" /> + <description> + Return list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size. + </description> + </method> <method name="get_spacing" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="type" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="arg2" type="int" enum="TextServer.SpacingType" /> <description> - Returns the spacing for the given [code]type[/code] (see [enum SpacingType]). + Returns extra spacing added between glyphs in pixels. </description> </method> <method name="get_supported_chars" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns a string containing all the characters available in the font. </description> </method> - <method name="get_underline_position" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="size" type="int"> - </argument> + <method name="get_supported_feature_list" qualifiers="const"> + <return type="Dictionary" /> <description> - Returns underline offset (number of pixels below the baseline). + Returns list of OpenType features supported by font. </description> </method> - <method name="get_underline_thickness" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="size" type="int"> - </argument> + <method name="get_supported_variation_list" qualifiers="const"> + <return type="Dictionary" /> <description> - Returns underline thickness in pixels. + Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code]. + Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant. </description> </method> - <method name="get_variation" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="tag" type="String"> - </argument> + <method name="get_texture_count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> <description> - Returns variation coordinate [code]tag[/code]. + Returns number of textures used by font cache entry. </description> </method> - <method name="get_variation_list" qualifiers="const"> - <return type="Dictionary"> - </return> + <method name="get_texture_image" qualifiers="const"> + <return type="Image" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="texture_index" type="int" /> <description> - Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code]. - Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant. + Returns a copy of the font cache texture image. + </description> + </method> + <method name="get_texture_offsets" qualifiers="const"> + <return type="PackedInt32Array" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="texture_index" type="int" /> + <description> + Returns a copy of the array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty. + </description> + </method> + <method name="get_underline_position" qualifiers="const"> + <return type="float" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <description> + Returns pixel offset of the underline below the baseline. + </description> + </method> + <method name="get_underline_thickness" qualifiers="const"> + <return type="float" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <description> + Returns thickness of the underline in pixels. + </description> + </method> + <method name="get_variation_coordinates" qualifiers="const"> + <return type="Dictionary" /> + <argument index="0" name="cache_index" type="int" /> + <description> + Returns variation coordinates for the specified font cache entry. See [method get_supported_variation_list] for more info. </description> </method> <method name="has_char" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="char" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="char" type="int" /> <description> Return [code]true[/code] if a Unicode [code]char[/code] is available in the font. </description> </method> - <method name="has_outline" qualifiers="const"> - <return type="bool"> - </return> + <method name="is_antialiased" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if font 8-bit anitialiased glyph rendering is supported and enabled. + </description> + </method> + <method name="is_force_autohinter" qualifiers="const"> + <return type="bool" /> <description> - Returns [code]true[/code], if font supports drawing glyph outlines. + Returns [code]true[/code] if auto-hinting is supported and preffered over font built-in hinting. Used by dynamic fonts only. </description> </method> <method name="is_language_supported" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="language" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="language" type="String" /> <description> Returns [code]true[/code], if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code). </description> </method> + <method name="is_multichannel_signed_distance_field" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. + </description> + </method> <method name="is_script_supported" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="script" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="script" type="String" /> <description> Returns [code]true[/code], if font supports given script ([url=https://en.wikipedia.org/wiki/ISO_15924]ISO 15924[/url] code). </description> </method> - <method name="load_memory"> - <return type="void"> - </return> - <argument index="0" name="data" type="PackedByteArray"> - </argument> - <argument index="1" name="type" type="String"> - </argument> - <argument index="2" name="base_size" type="int" default="16"> - </argument> + <method name="remove_cache"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> <description> - Creates new font from the data in memory. - Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method get_base_size] to check actual font size. + Removes specified font cache entry. </description> </method> - <method name="load_resource"> - <return type="void"> - </return> - <argument index="0" name="filename" type="String"> - </argument> - <argument index="1" name="base_size" type="int" default="16"> - </argument> + <method name="remove_glyph"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> <description> - Creates new font from the file. - Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method get_base_size] to check actual font size. + Removes specified rendered glyph information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method remove_texture] to remove them manually. </description> </method> - <method name="new_bitmap"> - <return type="void"> - </return> - <argument index="0" name="height" type="float"> - </argument> - <argument index="1" name="ascent" type="float"> - </argument> - <argument index="2" name="base_size" type="int"> - </argument> + <method name="remove_kerning"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="glyph_pair" type="Vector2i" /> <description> - Creates new, empty bitmap font. + Removes kerning override for the pair of glyphs. </description> </method> <method name="remove_language_support_override"> - <return type="void"> - </return> - <argument index="0" name="language" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="language" type="String" /> <description> Remove language support override. </description> </method> <method name="remove_script_support_override"> - <return type="void"> - </return> - <argument index="0" name="script" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="script" type="String" /> <description> Removes script support override. </description> </method> + <method name="remove_size_cache"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <description> + Removes specified font size from the cache entry. + </description> + </method> + <method name="remove_texture"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="texture_index" type="int" /> + <description> + Removes specified texture from font cache entry. Note: This function will not remove glyphs associated with the texture, remove them manually, using [method remove_glyph]. + </description> + </method> + <method name="render_glyph"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="index" type="int" /> + <description> + Renders specified glyph the the font cache texture. + </description> + </method> + <method name="render_range"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="start" type="int" /> + <argument index="3" name="end" type="int" /> + <description> + Renders the range of characters to the font cache texture. + </description> + </method> + <method name="set_antialiased"> + <return type="void" /> + <argument index="0" name="antialiased" type="bool" /> + <description> + If set to [code]true[/code], 8-bit antialiased glyph rendering is used, otherwise 1-bit rendering is used. Used by dynamic fonts only. + </description> + </method> + <method name="set_ascent"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="ascent" type="float" /> + <description> + Sets the font ascent (number of pixels above the baseline). + </description> + </method> + <method name="set_data"> + <return type="void" /> + <argument index="0" name="data" type="PackedByteArray" /> + <description> + Sets font source data, e.g contents of the dynamic font source file. + </description> + </method> + <method name="set_descent"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="descent" type="float" /> + <description> + Sets the font descent (number of pixels below the baseline). + </description> + </method> + <method name="set_force_autohinter"> + <return type="void" /> + <argument index="0" name="force_autohinter" type="bool" /> + <description> + If set to [code]true[/code] auto-hinting is preffered over font built-in hinting. + </description> + </method> + <method name="set_glyph_advance"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="glyph" type="int" /> + <argument index="3" name="advance" type="Vector2" /> + <description> + Sets glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved. + </description> + </method> + <method name="set_glyph_offset"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <argument index="3" name="offset" type="Vector2" /> + <description> + Sets glyph offset from the baseline. + </description> + </method> + <method name="set_glyph_size"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <argument index="3" name="gl_size" type="Vector2" /> + <description> + Sets glyph size. + </description> + </method> + <method name="set_glyph_texture_idx"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <argument index="3" name="texture_idx" type="int" /> + <description> + Sets index of the cache texture containing the glyph. + </description> + </method> + <method name="set_glyph_uv_rect"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <argument index="3" name="uv_rect" type="Rect2" /> + <description> + Sets rectangle in the cache texture containing the glyph. + </description> + </method> + <method name="set_hinting"> + <return type="void" /> + <argument index="0" name="hinting" type="int" enum="TextServer.Hinting" /> + <description> + Sets font hinting mode. Used by dynamic fonts only. + </description> + </method> + <method name="set_kerning"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="glyph_pair" type="Vector2i" /> + <argument index="3" name="kerning" type="Vector2" /> + <description> + Sets kerning for the pair of glyphs. + </description> + </method> <method name="set_language_support_override"> - <return type="void"> - </return> - <argument index="0" name="language" type="String"> - </argument> - <argument index="1" name="supported" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="language" type="String" /> + <argument index="1" name="supported" type="bool" /> <description> Adds override for [method is_language_supported]. </description> </method> + <method name="set_msdf_pixel_range"> + <return type="void" /> + <argument index="0" name="msdf_pixel_range" type="int" /> + <description> + Sets the width of the range around the shape between the minimum and maximum representable signed distance. + </description> + </method> + <method name="set_msdf_size"> + <return type="void" /> + <argument index="0" name="msdf_size" type="int" /> + <description> + Sets source font size used to generate MSDF textures. + </description> + </method> + <method name="set_multichannel_signed_distance_field"> + <return type="void" /> + <argument index="0" name="msdf" type="bool" /> + <description> + If set to [code]true[/code], glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. + </description> + </method> + <method name="set_oversampling"> + <return type="void" /> + <argument index="0" name="oversampling" type="float" /> + <description> + Sets font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only. + </description> + </method> + <method name="set_scale"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="scale" type="float" /> + <description> + Sets scaling factor of the color bitmap font. + </description> + </method> <method name="set_script_support_override"> - <return type="void"> - </return> - <argument index="0" name="script" type="String"> - </argument> - <argument index="1" name="supported" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="script" type="String" /> + <argument index="1" name="supported" type="bool" /> <description> Adds override for [method is_script_supported]. </description> </method> <method name="set_spacing"> - <return type="void"> - </return> - <argument index="0" name="type" type="int"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" /> + <argument index="3" name="arg3" type="int" /> + <description> + Sets extra spacing added between glyphs in pixels. + </description> + </method> + <method name="set_texture_image"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="texture_index" type="int" /> + <argument index="3" name="image" type="Image" /> + <description> + Sets font cache texture image. + </description> + </method> + <method name="set_texture_offsets"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="texture_index" type="int" /> + <argument index="3" name="offset" type="PackedInt32Array" /> + <description> + Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty (for the fonts without dynamic glyph generation support). + </description> + </method> + <method name="set_underline_position"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="underline_position" type="float" /> + <description> + Sets pixel offset of the underline below the baseline. + </description> + </method> + <method name="set_underline_thickness"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="underline_thickness" type="float" /> <description> - Sets the spacing for [code]type[/code] (see [enum SpacingType]) to [code]value[/code] in pixels (not relative to the font size). + Sets thickness of the underline in pixels. </description> </method> - <method name="set_variation"> - <return type="void"> - </return> - <argument index="0" name="tag" type="String"> - </argument> - <argument index="1" name="value" type="float"> - </argument> + <method name="set_variation_coordinates"> + <return type="void" /> + <argument index="0" name="cache_index" type="int" /> + <argument index="1" name="variation_coordinates" type="Dictionary" /> <description> - Sets variation coordinate [code]tag[/code]. + Sets variation coordinates for the specified font cache entry. See [method get_supported_variation_list] for more info. </description> </method> </methods> - <members> - <member name="antialiased" type="bool" setter="set_antialiased" getter="get_antialiased" default="false"> - If [code]true[/code], the font is rendered with anti-aliasing. - </member> - <member name="data_path" type="String" setter="set_data_path" getter="get_data_path" default=""""> - The path to the font data file. If font data was loaded from memory location is set to [code]"(Memory)"[/code]. - </member> - <member name="distance_field_hint" type="bool" setter="set_distance_field_hint" getter="get_distance_field_hint" default="false"> - If [code]true[/code], distance field hint is enabled. - </member> - <member name="extra_spacing_glyph" type="int" setter="set_spacing" getter="get_spacing" default="0"> - Extra spacing for each glyph in pixels. - This can be a negative number to make the distance between glyphs smaller. - </member> - <member name="extra_spacing_space" type="int" setter="set_spacing" getter="get_spacing" default="0"> - Extra spacing for the space character in pixels. - This can be a negative number to make the distance between words smaller. - </member> - <member name="force_autohinter" type="bool" setter="set_force_autohinter" getter="get_force_autohinter" default="false"> - If [code]true[/code], default autohinter is used for font hinting. - </member> - <member name="hinting" type="int" setter="set_hinting" getter="get_hinting" enum="TextServer.Hinting" default="0"> - The font hinting mode used by FreeType. See [enum TextServer.Hinting] for options. - </member> - </members> <constants> - <constant name="SPACING_GLYPH" value="0" enum="SpacingType"> - Spacing for each glyph. - </constant> - <constant name="SPACING_SPACE" value="1" enum="SpacingType"> - Spacing for the space character. - </constant> </constants> </class> diff --git a/doc/classes/GPUParticles2D.xml b/doc/classes/GPUParticles2D.xml index 8684a7f41a..72bd6a6411 100644 --- a/doc/classes/GPUParticles2D.xml +++ b/doc/classes/GPUParticles2D.xml @@ -13,15 +13,13 @@ </tutorials> <methods> <method name="capture_rect" qualifiers="const"> - <return type="Rect2"> - </return> + <return type="Rect2" /> <description> Returns a rectangle containing the positions of all existing particles. </description> </method> <method name="restart"> - <return type="void"> - </return> + <return type="void" /> <description> Restarts all the existing particles. </description> diff --git a/doc/classes/GPUParticles3D.xml b/doc/classes/GPUParticles3D.xml index 55e9b33aa8..3f7b20f274 100644 --- a/doc/classes/GPUParticles3D.xml +++ b/doc/classes/GPUParticles3D.xml @@ -13,51 +13,38 @@ </tutorials> <methods> <method name="capture_aabb" qualifiers="const"> - <return type="AABB"> - </return> + <return type="AABB" /> <description> Returns the axis-aligned bounding box that contains all the particles that are active in the current frame. </description> </method> <method name="emit_particle"> - <return type="void"> - </return> - <argument index="0" name="xform" type="Transform3D"> - </argument> - <argument index="1" name="velocity" type="Vector3"> - </argument> - <argument index="2" name="color" type="Color"> - </argument> - <argument index="3" name="custom" type="Color"> - </argument> - <argument index="4" name="flags" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="xform" type="Transform3D" /> + <argument index="1" name="velocity" type="Vector3" /> + <argument index="2" name="color" type="Color" /> + <argument index="3" name="custom" type="Color" /> + <argument index="4" name="flags" type="int" /> <description> </description> </method> <method name="get_draw_pass_mesh" qualifiers="const"> - <return type="Mesh"> - </return> - <argument index="0" name="pass" type="int"> - </argument> + <return type="Mesh" /> + <argument index="0" name="pass" type="int" /> <description> Returns the [Mesh] that is drawn at index [code]pass[/code]. </description> </method> <method name="restart"> - <return type="void"> - </return> + <return type="void" /> <description> Restarts the particle emission, clearing existing particles. </description> </method> <method name="set_draw_pass_mesh"> - <return type="void"> - </return> - <argument index="0" name="pass" type="int"> - </argument> - <argument index="1" name="mesh" type="Mesh"> - </argument> + <return type="void" /> + <argument index="0" name="pass" type="int" /> + <argument index="1" name="mesh" type="Mesh" /> <description> Sets the [Mesh] that is drawn at index [code]pass[/code]. </description> diff --git a/doc/classes/Generic6DOFJoint3D.xml b/doc/classes/Generic6DOFJoint3D.xml index 79b861dfb8..ebfcaa7678 100644 --- a/doc/classes/Generic6DOFJoint3D.xml +++ b/doc/classes/Generic6DOFJoint3D.xml @@ -10,110 +10,80 @@ </tutorials> <methods> <method name="get_flag_x" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag"> - </argument> + <return type="bool" /> + <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag" /> <description> </description> </method> <method name="get_flag_y" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag"> - </argument> + <return type="bool" /> + <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag" /> <description> </description> </method> <method name="get_flag_z" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag"> - </argument> + <return type="bool" /> + <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag" /> <description> </description> </method> <method name="get_param_x" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param"> - </argument> + <return type="float" /> + <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param" /> <description> </description> </method> <method name="get_param_y" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param"> - </argument> + <return type="float" /> + <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param" /> <description> </description> </method> <method name="get_param_z" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param"> - </argument> + <return type="float" /> + <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param" /> <description> </description> </method> <method name="set_flag_x"> - <return type="void"> - </return> - <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag"> - </argument> - <argument index="1" name="value" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag" /> + <argument index="1" name="value" type="bool" /> <description> </description> </method> <method name="set_flag_y"> - <return type="void"> - </return> - <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag"> - </argument> - <argument index="1" name="value" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag" /> + <argument index="1" name="value" type="bool" /> <description> </description> </method> <method name="set_flag_z"> - <return type="void"> - </return> - <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag"> - </argument> - <argument index="1" name="value" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="flag" type="int" enum="Generic6DOFJoint3D.Flag" /> + <argument index="1" name="value" type="bool" /> <description> </description> </method> <method name="set_param_x"> - <return type="void"> - </return> - <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param"> - </argument> - <argument index="1" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param" /> + <argument index="1" name="value" type="float" /> <description> </description> </method> <method name="set_param_y"> - <return type="void"> - </return> - <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param"> - </argument> - <argument index="1" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param" /> + <argument index="1" name="value" type="float" /> <description> </description> </method> <method name="set_param_z"> - <return type="void"> - </return> - <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param"> - </argument> - <argument index="1" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="param" type="int" enum="Generic6DOFJoint3D.Param" /> + <argument index="1" name="value" type="float" /> <description> </description> </method> diff --git a/doc/classes/Geometry2D.xml b/doc/classes/Geometry2D.xml index 13354ec19e..157124cded 100644 --- a/doc/classes/Geometry2D.xml +++ b/doc/classes/Geometry2D.xml @@ -10,192 +10,139 @@ </tutorials> <methods> <method name="clip_polygons"> - <return type="Array"> - </return> - <argument index="0" name="polygon_a" type="PackedVector2Array"> - </argument> - <argument index="1" name="polygon_b" type="PackedVector2Array"> - </argument> + <return type="Array" /> + <argument index="0" name="polygon_a" type="PackedVector2Array" /> + <argument index="1" name="polygon_b" type="PackedVector2Array" /> <description> Clips [code]polygon_a[/code] against [code]polygon_b[/code] and returns an array of clipped polygons. This performs [constant OPERATION_DIFFERENCE] between polygons. Returns an empty array if [code]polygon_b[/code] completely overlaps [code]polygon_a[/code]. If [code]polygon_b[/code] is enclosed by [code]polygon_a[/code], returns an outer polygon (boundary) and inner polygon (hole) which could be distinguished by calling [method is_polygon_clockwise]. </description> </method> <method name="clip_polyline_with_polygon"> - <return type="Array"> - </return> - <argument index="0" name="polyline" type="PackedVector2Array"> - </argument> - <argument index="1" name="polygon" type="PackedVector2Array"> - </argument> + <return type="Array" /> + <argument index="0" name="polyline" type="PackedVector2Array" /> + <argument index="1" name="polygon" type="PackedVector2Array" /> <description> Clips [code]polyline[/code] against [code]polygon[/code] and returns an array of clipped polylines. This performs [constant OPERATION_DIFFERENCE] between the polyline and the polygon. This operation can be thought of as cutting a line with a closed shape. </description> </method> <method name="convex_hull"> - <return type="PackedVector2Array"> - </return> - <argument index="0" name="points" type="PackedVector2Array"> - </argument> + <return type="PackedVector2Array" /> + <argument index="0" name="points" type="PackedVector2Array" /> <description> Given an array of [Vector2]s, returns the convex hull as a list of points in counterclockwise order. The last point is the same as the first one. </description> </method> <method name="exclude_polygons"> - <return type="Array"> - </return> - <argument index="0" name="polygon_a" type="PackedVector2Array"> - </argument> - <argument index="1" name="polygon_b" type="PackedVector2Array"> - </argument> + <return type="Array" /> + <argument index="0" name="polygon_a" type="PackedVector2Array" /> + <argument index="1" name="polygon_b" type="PackedVector2Array" /> <description> Mutually excludes common area defined by intersection of [code]polygon_a[/code] and [code]polygon_b[/code] (see [method intersect_polygons]) and returns an array of excluded polygons. This performs [constant OPERATION_XOR] between polygons. In other words, returns all but common area between polygons. The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise]. </description> </method> <method name="get_closest_point_to_segment"> - <return type="Vector2"> - </return> - <argument index="0" name="point" type="Vector2"> - </argument> - <argument index="1" name="s1" type="Vector2"> - </argument> - <argument index="2" name="s2" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="point" type="Vector2" /> + <argument index="1" name="s1" type="Vector2" /> + <argument index="2" name="s2" type="Vector2" /> <description> Returns the 2D point on the 2D segment ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point will always be inside the specified segment. </description> </method> <method name="get_closest_point_to_segment_uncapped"> - <return type="Vector2"> - </return> - <argument index="0" name="point" type="Vector2"> - </argument> - <argument index="1" name="s1" type="Vector2"> - </argument> - <argument index="2" name="s2" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="point" type="Vector2" /> + <argument index="1" name="s1" type="Vector2" /> + <argument index="2" name="s2" type="Vector2" /> <description> Returns the 2D point on the 2D line defined by ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point can be inside the segment ([code]s1[/code], [code]s2[/code]) or outside of it, i.e. somewhere on the line extending from the segment. </description> </method> <method name="get_closest_points_between_segments"> - <return type="PackedVector2Array"> - </return> - <argument index="0" name="p1" type="Vector2"> - </argument> - <argument index="1" name="q1" type="Vector2"> - </argument> - <argument index="2" name="p2" type="Vector2"> - </argument> - <argument index="3" name="q2" type="Vector2"> - </argument> + <return type="PackedVector2Array" /> + <argument index="0" name="p1" type="Vector2" /> + <argument index="1" name="q1" type="Vector2" /> + <argument index="2" name="p2" type="Vector2" /> + <argument index="3" name="q2" type="Vector2" /> <description> Given the two 2D segments ([code]p1[/code], [code]q1[/code]) and ([code]p2[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector2Array] that contains this point on ([code]p1[/code], [code]q1[/code]) as well the accompanying point on ([code]p2[/code], [code]q2[/code]). </description> </method> <method name="intersect_polygons"> - <return type="Array"> - </return> - <argument index="0" name="polygon_a" type="PackedVector2Array"> - </argument> - <argument index="1" name="polygon_b" type="PackedVector2Array"> - </argument> + <return type="Array" /> + <argument index="0" name="polygon_a" type="PackedVector2Array" /> + <argument index="1" name="polygon_b" type="PackedVector2Array" /> <description> Intersects [code]polygon_a[/code] with [code]polygon_b[/code] and returns an array of intersected polygons. This performs [constant OPERATION_INTERSECTION] between polygons. In other words, returns common area shared by polygons. Returns an empty array if no intersection occurs. The operation may result in an outer polygon (boundary) and inner polygon (hole) produced which could be distinguished by calling [method is_polygon_clockwise]. </description> </method> <method name="intersect_polyline_with_polygon"> - <return type="Array"> - </return> - <argument index="0" name="polyline" type="PackedVector2Array"> - </argument> - <argument index="1" name="polygon" type="PackedVector2Array"> - </argument> + <return type="Array" /> + <argument index="0" name="polyline" type="PackedVector2Array" /> + <argument index="1" name="polygon" type="PackedVector2Array" /> <description> Intersects [code]polyline[/code] with [code]polygon[/code] and returns an array of intersected polylines. This performs [constant OPERATION_INTERSECTION] between the polyline and the polygon. This operation can be thought of as chopping a line with a closed shape. </description> </method> <method name="is_point_in_circle"> - <return type="bool"> - </return> - <argument index="0" name="point" type="Vector2"> - </argument> - <argument index="1" name="circle_position" type="Vector2"> - </argument> - <argument index="2" name="circle_radius" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="point" type="Vector2" /> + <argument index="1" name="circle_position" type="Vector2" /> + <argument index="2" name="circle_radius" type="float" /> <description> Returns [code]true[/code] if [code]point[/code] is inside the circle or if it's located exactly [i]on[/i] the circle's boundary, otherwise returns [code]false[/code]. </description> </method> <method name="is_point_in_polygon"> - <return type="bool"> - </return> - <argument index="0" name="point" type="Vector2"> - </argument> - <argument index="1" name="polygon" type="PackedVector2Array"> - </argument> + <return type="bool" /> + <argument index="0" name="point" type="Vector2" /> + <argument index="1" name="polygon" type="PackedVector2Array" /> <description> Returns [code]true[/code] if [code]point[/code] is inside [code]polygon[/code] or if it's located exactly [i]on[/i] polygon's boundary, otherwise returns [code]false[/code]. </description> </method> <method name="is_polygon_clockwise"> - <return type="bool"> - </return> - <argument index="0" name="polygon" type="PackedVector2Array"> - </argument> + <return type="bool" /> + <argument index="0" name="polygon" type="PackedVector2Array" /> <description> Returns [code]true[/code] if [code]polygon[/code]'s vertices are ordered in clockwise order, otherwise returns [code]false[/code]. </description> </method> <method name="line_intersects_line"> - <return type="Variant"> - </return> - <argument index="0" name="from_a" type="Vector2"> - </argument> - <argument index="1" name="dir_a" type="Vector2"> - </argument> - <argument index="2" name="from_b" type="Vector2"> - </argument> - <argument index="3" name="dir_b" type="Vector2"> - </argument> + <return type="Variant" /> + <argument index="0" name="from_a" type="Vector2" /> + <argument index="1" name="dir_a" type="Vector2" /> + <argument index="2" name="from_b" type="Vector2" /> + <argument index="3" name="dir_b" type="Vector2" /> <description> Checks if the two lines ([code]from_a[/code], [code]dir_a[/code]) and ([code]from_b[/code], [code]dir_b[/code]) intersect. If yes, return the point of intersection as [Vector2]. If no intersection takes place, returns an empty [Variant]. [b]Note:[/b] The lines are specified using direction vectors, not end points. </description> </method> <method name="make_atlas"> - <return type="Dictionary"> - </return> - <argument index="0" name="sizes" type="PackedVector2Array"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="sizes" type="PackedVector2Array" /> <description> Given an array of [Vector2]s representing tiles, builds an atlas. The returned dictionary has two keys: [code]points[/code] is a vector of [Vector2] that specifies the positions of each tile, [code]size[/code] contains the overall size of the whole atlas as [Vector2]. </description> </method> <method name="merge_polygons"> - <return type="Array"> - </return> - <argument index="0" name="polygon_a" type="PackedVector2Array"> - </argument> - <argument index="1" name="polygon_b" type="PackedVector2Array"> - </argument> + <return type="Array" /> + <argument index="0" name="polygon_a" type="PackedVector2Array" /> + <argument index="1" name="polygon_b" type="PackedVector2Array" /> <description> Merges (combines) [code]polygon_a[/code] and [code]polygon_b[/code] and returns an array of merged polygons. This performs [constant OPERATION_UNION] between polygons. The operation may result in an outer polygon (boundary) and multiple inner polygons (holes) produced which could be distinguished by calling [method is_polygon_clockwise]. </description> </method> <method name="offset_polygon"> - <return type="Array"> - </return> - <argument index="0" name="polygon" type="PackedVector2Array"> - </argument> - <argument index="1" name="delta" type="float"> - </argument> - <argument index="2" name="join_type" type="int" enum="Geometry2D.PolyJoinType" default="0"> - </argument> + <return type="Array" /> + <argument index="0" name="polygon" type="PackedVector2Array" /> + <argument index="1" name="delta" type="float" /> + <argument index="2" name="join_type" type="int" enum="Geometry2D.PolyJoinType" default="0" /> <description> Inflates or deflates [code]polygon[/code] by [code]delta[/code] units (pixels). If [code]delta[/code] is positive, makes the polygon grow outward. If [code]delta[/code] is negative, shrinks the polygon inward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. Returns an empty array if [code]delta[/code] is negative and the absolute value of it approximately exceeds the minimum bounding rectangle dimensions of the polygon. Each polygon's vertices will be rounded as determined by [code]join_type[/code], see [enum PolyJoinType]. @@ -219,16 +166,11 @@ </description> </method> <method name="offset_polyline"> - <return type="Array"> - </return> - <argument index="0" name="polyline" type="PackedVector2Array"> - </argument> - <argument index="1" name="delta" type="float"> - </argument> - <argument index="2" name="join_type" type="int" enum="Geometry2D.PolyJoinType" default="0"> - </argument> - <argument index="3" name="end_type" type="int" enum="Geometry2D.PolyEndType" default="3"> - </argument> + <return type="Array" /> + <argument index="0" name="polyline" type="PackedVector2Array" /> + <argument index="1" name="delta" type="float" /> + <argument index="2" name="join_type" type="int" enum="Geometry2D.PolyJoinType" default="0" /> + <argument index="3" name="end_type" type="int" enum="Geometry2D.PolyEndType" default="3" /> <description> Inflates or deflates [code]polyline[/code] by [code]delta[/code] units (pixels), producing polygons. If [code]delta[/code] is positive, makes the polyline grow outward. Returns an array of polygons because inflating/deflating may result in multiple discrete polygons. If [code]delta[/code] is negative, returns an empty array. Each polygon's vertices will be rounded as determined by [code]join_type[/code], see [enum PolyJoinType]. @@ -237,49 +179,35 @@ </description> </method> <method name="point_is_inside_triangle" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="point" type="Vector2"> - </argument> - <argument index="1" name="a" type="Vector2"> - </argument> - <argument index="2" name="b" type="Vector2"> - </argument> - <argument index="3" name="c" type="Vector2"> - </argument> + <return type="bool" /> + <argument index="0" name="point" type="Vector2" /> + <argument index="1" name="a" type="Vector2" /> + <argument index="2" name="b" type="Vector2" /> + <argument index="3" name="c" type="Vector2" /> <description> Returns if [code]point[/code] is inside the triangle specified by [code]a[/code], [code]b[/code] and [code]c[/code]. </description> </method> <method name="segment_intersects_segment"> - <return type="Variant"> - </return> - <argument index="0" name="from_a" type="Vector2"> - </argument> - <argument index="1" name="to_a" type="Vector2"> - </argument> - <argument index="2" name="from_b" type="Vector2"> - </argument> - <argument index="3" name="to_b" type="Vector2"> - </argument> + <return type="Variant" /> + <argument index="0" name="from_a" type="Vector2" /> + <argument index="1" name="to_a" type="Vector2" /> + <argument index="2" name="from_b" type="Vector2" /> + <argument index="3" name="to_b" type="Vector2" /> <description> Checks if the two segments ([code]from_a[/code], [code]to_a[/code]) and ([code]from_b[/code], [code]to_b[/code]) intersect. If yes, return the point of intersection as [Vector2]. If no intersection takes place, returns an empty [Variant]. </description> </method> <method name="triangulate_delaunay"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="points" type="PackedVector2Array"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="points" type="PackedVector2Array" /> <description> Triangulates the area specified by discrete set of [code]points[/code] such that no point is inside the circumcircle of any resulting triangle. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [code]points[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PackedInt32Array] is returned. </description> </method> <method name="triangulate_polygon"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="polygon" type="PackedVector2Array"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="polygon" type="PackedVector2Array" /> <description> Triangulates the polygon specified by the points in [code]polygon[/code]. Returns a [PackedInt32Array] where each triangle consists of three consecutive point indices into [code]polygon[/code] (i.e. the returned array will have [code]n * 3[/code] elements, with [code]n[/code] being the number of found triangles). If the triangulation did not succeed, an empty [PackedInt32Array] is returned. </description> diff --git a/doc/classes/Geometry3D.xml b/doc/classes/Geometry3D.xml index 9f012008e3..9d0234529a 100644 --- a/doc/classes/Geometry3D.xml +++ b/doc/classes/Geometry3D.xml @@ -10,171 +10,116 @@ </tutorials> <methods> <method name="build_box_planes"> - <return type="Array"> - </return> - <argument index="0" name="extents" type="Vector3"> - </argument> + <return type="Array" /> + <argument index="0" name="extents" type="Vector3" /> <description> Returns an array with 6 [Plane]s that describe the sides of a box centered at the origin. The box size is defined by [code]extents[/code], which represents one (positive) corner of the box (i.e. half its actual size). </description> </method> <method name="build_capsule_planes"> - <return type="Array"> - </return> - <argument index="0" name="radius" type="float"> - </argument> - <argument index="1" name="height" type="float"> - </argument> - <argument index="2" name="sides" type="int"> - </argument> - <argument index="3" name="lats" type="int"> - </argument> - <argument index="4" name="axis" type="int" enum="Vector3.Axis" default="2"> - </argument> + <return type="Array" /> + <argument index="0" name="radius" type="float" /> + <argument index="1" name="height" type="float" /> + <argument index="2" name="sides" type="int" /> + <argument index="3" name="lats" type="int" /> + <argument index="4" name="axis" type="int" enum="Vector3.Axis" default="2" /> <description> Returns an array of [Plane]s closely bounding a faceted capsule centered at the origin with radius [code]radius[/code] and height [code]height[/code]. The parameter [code]sides[/code] defines how many planes will be generated for the side part of the capsule, whereas [code]lats[/code] gives the number of latitudinal steps at the bottom and top of the capsule. The parameter [code]axis[/code] describes the axis along which the capsule is oriented (0 for X, 1 for Y, 2 for Z). </description> </method> <method name="build_cylinder_planes"> - <return type="Array"> - </return> - <argument index="0" name="radius" type="float"> - </argument> - <argument index="1" name="height" type="float"> - </argument> - <argument index="2" name="sides" type="int"> - </argument> - <argument index="3" name="axis" type="int" enum="Vector3.Axis" default="2"> - </argument> + <return type="Array" /> + <argument index="0" name="radius" type="float" /> + <argument index="1" name="height" type="float" /> + <argument index="2" name="sides" type="int" /> + <argument index="3" name="axis" type="int" enum="Vector3.Axis" default="2" /> <description> Returns an array of [Plane]s closely bounding a faceted cylinder centered at the origin with radius [code]radius[/code] and height [code]height[/code]. The parameter [code]sides[/code] defines how many planes will be generated for the round part of the cylinder. The parameter [code]axis[/code] describes the axis along which the cylinder is oriented (0 for X, 1 for Y, 2 for Z). </description> </method> <method name="clip_polygon"> - <return type="PackedVector3Array"> - </return> - <argument index="0" name="points" type="PackedVector3Array"> - </argument> - <argument index="1" name="plane" type="Plane"> - </argument> + <return type="PackedVector3Array" /> + <argument index="0" name="points" type="PackedVector3Array" /> + <argument index="1" name="plane" type="Plane" /> <description> Clips the polygon defined by the points in [code]points[/code] against the [code]plane[/code] and returns the points of the clipped polygon. </description> </method> <method name="get_closest_point_to_segment"> - <return type="Vector3"> - </return> - <argument index="0" name="point" type="Vector3"> - </argument> - <argument index="1" name="s1" type="Vector3"> - </argument> - <argument index="2" name="s2" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="point" type="Vector3" /> + <argument index="1" name="s1" type="Vector3" /> + <argument index="2" name="s2" type="Vector3" /> <description> Returns the 3D point on the 3D segment ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point will always be inside the specified segment. </description> </method> <method name="get_closest_point_to_segment_uncapped"> - <return type="Vector3"> - </return> - <argument index="0" name="point" type="Vector3"> - </argument> - <argument index="1" name="s1" type="Vector3"> - </argument> - <argument index="2" name="s2" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="point" type="Vector3" /> + <argument index="1" name="s1" type="Vector3" /> + <argument index="2" name="s2" type="Vector3" /> <description> Returns the 3D point on the 3D line defined by ([code]s1[/code], [code]s2[/code]) that is closest to [code]point[/code]. The returned point can be inside the segment ([code]s1[/code], [code]s2[/code]) or outside of it, i.e. somewhere on the line extending from the segment. </description> </method> <method name="get_closest_points_between_segments"> - <return type="PackedVector3Array"> - </return> - <argument index="0" name="p1" type="Vector3"> - </argument> - <argument index="1" name="p2" type="Vector3"> - </argument> - <argument index="2" name="q1" type="Vector3"> - </argument> - <argument index="3" name="q2" type="Vector3"> - </argument> + <return type="PackedVector3Array" /> + <argument index="0" name="p1" type="Vector3" /> + <argument index="1" name="p2" type="Vector3" /> + <argument index="2" name="q1" type="Vector3" /> + <argument index="3" name="q2" type="Vector3" /> <description> Given the two 3D segments ([code]p1[/code], [code]p2[/code]) and ([code]q1[/code], [code]q2[/code]), finds those two points on the two segments that are closest to each other. Returns a [PackedVector3Array] that contains this point on ([code]p1[/code], [code]p2[/code]) as well the accompanying point on ([code]q1[/code], [code]q2[/code]). </description> </method> <method name="ray_intersects_triangle"> - <return type="Variant"> - </return> - <argument index="0" name="from" type="Vector3"> - </argument> - <argument index="1" name="dir" type="Vector3"> - </argument> - <argument index="2" name="a" type="Vector3"> - </argument> - <argument index="3" name="b" type="Vector3"> - </argument> - <argument index="4" name="c" type="Vector3"> - </argument> + <return type="Variant" /> + <argument index="0" name="from" type="Vector3" /> + <argument index="1" name="dir" type="Vector3" /> + <argument index="2" name="a" type="Vector3" /> + <argument index="3" name="b" type="Vector3" /> + <argument index="4" name="c" type="Vector3" /> <description> Tests if the 3D ray starting at [code]from[/code] with the direction of [code]dir[/code] intersects the triangle specified by [code]a[/code], [code]b[/code] and [code]c[/code]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, an empty [Variant] is returned. </description> </method> <method name="segment_intersects_convex"> - <return type="PackedVector3Array"> - </return> - <argument index="0" name="from" type="Vector3"> - </argument> - <argument index="1" name="to" type="Vector3"> - </argument> - <argument index="2" name="planes" type="Array"> - </argument> + <return type="PackedVector3Array" /> + <argument index="0" name="from" type="Vector3" /> + <argument index="1" name="to" type="Vector3" /> + <argument index="2" name="planes" type="Array" /> <description> Given a convex hull defined though the [Plane]s in the array [code]planes[/code], tests if the segment ([code]from[/code], [code]to[/code]) intersects with that hull. If an intersection is found, returns a [PackedVector3Array] containing the point the intersection and the hull's normal. Otherwise, returns an empty array. </description> </method> <method name="segment_intersects_cylinder"> - <return type="PackedVector3Array"> - </return> - <argument index="0" name="from" type="Vector3"> - </argument> - <argument index="1" name="to" type="Vector3"> - </argument> - <argument index="2" name="height" type="float"> - </argument> - <argument index="3" name="radius" type="float"> - </argument> + <return type="PackedVector3Array" /> + <argument index="0" name="from" type="Vector3" /> + <argument index="1" name="to" type="Vector3" /> + <argument index="2" name="height" type="float" /> + <argument index="3" name="radius" type="float" /> <description> Checks if the segment ([code]from[/code], [code]to[/code]) intersects the cylinder with height [code]height[/code] that is centered at the origin and has radius [code]radius[/code]. If no, returns an empty [PackedVector3Array]. If an intersection takes place, the returned array contains the point of intersection and the cylinder's normal at the point of intersection. </description> </method> <method name="segment_intersects_sphere"> - <return type="PackedVector3Array"> - </return> - <argument index="0" name="from" type="Vector3"> - </argument> - <argument index="1" name="to" type="Vector3"> - </argument> - <argument index="2" name="sphere_position" type="Vector3"> - </argument> - <argument index="3" name="sphere_radius" type="float"> - </argument> + <return type="PackedVector3Array" /> + <argument index="0" name="from" type="Vector3" /> + <argument index="1" name="to" type="Vector3" /> + <argument index="2" name="sphere_position" type="Vector3" /> + <argument index="3" name="sphere_radius" type="float" /> <description> Checks if the segment ([code]from[/code], [code]to[/code]) intersects the sphere that is located at [code]sphere_position[/code] and has radius [code]sphere_radius[/code]. If no, returns an empty [PackedVector3Array]. If yes, returns a [PackedVector3Array] containing the point of intersection and the sphere's normal at the point of intersection. </description> </method> <method name="segment_intersects_triangle"> - <return type="Variant"> - </return> - <argument index="0" name="from" type="Vector3"> - </argument> - <argument index="1" name="to" type="Vector3"> - </argument> - <argument index="2" name="a" type="Vector3"> - </argument> - <argument index="3" name="b" type="Vector3"> - </argument> - <argument index="4" name="c" type="Vector3"> - </argument> + <return type="Variant" /> + <argument index="0" name="from" type="Vector3" /> + <argument index="1" name="to" type="Vector3" /> + <argument index="2" name="a" type="Vector3" /> + <argument index="3" name="b" type="Vector3" /> + <argument index="4" name="c" type="Vector3" /> <description> Tests if the segment ([code]from[/code], [code]to[/code]) intersects the triangle [code]a[/code], [code]b[/code], [code]c[/code]. If yes, returns the point of intersection as [Vector3]. If no intersection takes place, an empty [Variant] is returned. </description> diff --git a/doc/classes/GeometryInstance3D.xml b/doc/classes/GeometryInstance3D.xml index 667ca2dacf..97cef205c3 100644 --- a/doc/classes/GeometryInstance3D.xml +++ b/doc/classes/GeometryInstance3D.xml @@ -10,29 +10,22 @@ </tutorials> <methods> <method name="get_shader_instance_uniform" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="uniform" type="StringName"> - </argument> + <return type="Variant" /> + <argument index="0" name="uniform" type="StringName" /> <description> </description> </method> <method name="set_custom_aabb"> - <return type="void"> - </return> - <argument index="0" name="aabb" type="AABB"> - </argument> + <return type="void" /> + <argument index="0" name="aabb" type="AABB" /> <description> Overrides the bounding box of this node with a custom one. To remove it, set an [AABB] with all fields set to zero. </description> </method> <method name="set_shader_instance_uniform"> - <return type="void"> - </return> - <argument index="0" name="uniform" type="StringName"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="uniform" type="StringName" /> + <argument index="1" name="value" type="Variant" /> <description> </description> </method> diff --git a/doc/classes/Gradient.xml b/doc/classes/Gradient.xml index 1f1f266c59..a9577fda90 100644 --- a/doc/classes/Gradient.xml +++ b/doc/classes/Gradient.xml @@ -10,77 +10,59 @@ </tutorials> <methods> <method name="add_point"> - <return type="void"> - </return> - <argument index="0" name="offset" type="float"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="offset" type="float" /> + <argument index="1" name="color" type="Color" /> <description> Adds the specified color to the end of the gradient, with the specified offset. </description> </method> <method name="get_color"> - <return type="Color"> - </return> - <argument index="0" name="point" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="point" type="int" /> <description> Returns the color of the gradient color at index [code]point[/code]. </description> </method> <method name="get_offset"> - <return type="float"> - </return> - <argument index="0" name="point" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="point" type="int" /> <description> Returns the offset of the gradient color at index [code]point[/code]. </description> </method> <method name="get_point_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of colors in the gradient. </description> </method> <method name="interpolate"> - <return type="Color"> - </return> - <argument index="0" name="offset" type="float"> - </argument> + <return type="Color" /> + <argument index="0" name="offset" type="float" /> <description> Returns the interpolated color specified by [code]offset[/code]. </description> </method> <method name="remove_point"> - <return type="void"> - </return> - <argument index="0" name="point" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="point" type="int" /> <description> Removes the color at the index [code]point[/code]. </description> </method> <method name="set_color"> - <return type="void"> - </return> - <argument index="0" name="point" type="int"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="point" type="int" /> + <argument index="1" name="color" type="Color" /> <description> Sets the color of the gradient color at index [code]point[/code]. </description> </method> <method name="set_offset"> - <return type="void"> - </return> - <argument index="0" name="point" type="int"> - </argument> - <argument index="1" name="offset" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="point" type="int" /> + <argument index="1" name="offset" type="float" /> <description> Sets the offset for the gradient color at index [code]point[/code]. </description> diff --git a/doc/classes/GradientTexture.xml b/doc/classes/GradientTexture.xml index 242a78b2e4..44da042dd4 100644 --- a/doc/classes/GradientTexture.xml +++ b/doc/classes/GradientTexture.xml @@ -14,6 +14,9 @@ <member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient"> The [Gradient] that will be used to fill the texture. </member> + <member name="use_hdr" type="bool" setter="set_use_hdr" getter="is_using_hdr" default="false"> + If [code]true[/code], the generated texture will support high dynamic range ([constant Image.FORMAT_RGBAF] format). This allows for glow effects to work if [member Environment.glow_enabled] is [code]true[/code]. If [code]false[/code], the generated texture will use low dynamic range; overbright colors will be clamped ([constant Image.FORMAT_RGBA8] format). + </member> <member name="width" type="int" setter="set_width" getter="get_width" default="2048"> The number of color samples that will be obtained from the [Gradient]. </member> diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index 65701b3a6a..c870026d58 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -10,164 +10,143 @@ <tutorials> </tutorials> <methods> + <method name="_get_connection_line" qualifiers="virtual const"> + <return type="PackedVector2Array" /> + <argument index="0" name="from" type="Vector2" /> + <argument index="1" name="to" type="Vector2" /> + <description> + Virtual method which can be overridden to customize how connections are drawn. + </description> + </method> <method name="add_valid_connection_type"> - <return type="void"> - </return> - <argument index="0" name="from_type" type="int"> - </argument> - <argument index="1" name="to_type" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="from_type" type="int" /> + <argument index="1" name="to_type" type="int" /> <description> Makes possible the connection between two different slot types. The type is defined with the [method GraphNode.set_slot] method. </description> </method> <method name="add_valid_left_disconnect_type"> - <return type="void"> - </return> - <argument index="0" name="type" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="type" type="int" /> <description> Makes possible to disconnect nodes when dragging from the slot at the left if it has the specified type. </description> </method> <method name="add_valid_right_disconnect_type"> - <return type="void"> - </return> - <argument index="0" name="type" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="type" type="int" /> <description> Makes possible to disconnect nodes when dragging from the slot at the right if it has the specified type. </description> </method> + <method name="arrange_nodes"> + <return type="void" /> + <description> + Rearranges selected nodes in a layout with minimum crossings between connections and uniform horizontal and vertical gap between nodes. + </description> + </method> <method name="clear_connections"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all connections between nodes. </description> </method> <method name="connect_node"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="from" type="StringName"> - </argument> - <argument index="1" name="from_port" type="int"> - </argument> - <argument index="2" name="to" type="StringName"> - </argument> - <argument index="3" name="to_port" type="int"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="from" type="StringName" /> + <argument index="1" name="from_port" type="int" /> + <argument index="2" name="to" type="StringName" /> + <argument index="3" name="to_port" type="int" /> <description> Create a connection between the [code]from_port[/code] slot of the [code]from[/code] GraphNode and the [code]to_port[/code] slot of the [code]to[/code] GraphNode. If the connection already exists, no connection is created. </description> </method> <method name="disconnect_node"> - <return type="void"> - </return> - <argument index="0" name="from" type="StringName"> - </argument> - <argument index="1" name="from_port" type="int"> - </argument> - <argument index="2" name="to" type="StringName"> - </argument> - <argument index="3" name="to_port" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="from" type="StringName" /> + <argument index="1" name="from_port" type="int" /> + <argument index="2" name="to" type="StringName" /> + <argument index="3" name="to_port" type="int" /> <description> Removes the connection between the [code]from_port[/code] slot of the [code]from[/code] GraphNode and the [code]to_port[/code] slot of the [code]to[/code] GraphNode. If the connection does not exist, no connection is removed. </description> </method> + <method name="get_connection_line"> + <return type="PackedVector2Array" /> + <argument index="0" name="from" type="Vector2" /> + <argument index="1" name="to" type="Vector2" /> + <description> + Returns the points which would make up a connection between [code]from[/code] and [code]to[/code]. + </description> + </method> <method name="get_connection_list" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns an Array containing the list of connections. A connection consists in a structure of the form [code]{ from_port: 0, from: "GraphNode name 0", to_port: 1, to: "GraphNode name 1" }[/code]. </description> </method> <method name="get_zoom_hbox"> - <return type="HBoxContainer"> - </return> + <return type="HBoxContainer" /> <description> Gets the [HBoxContainer] that contains the zooming and grid snap controls in the top left of the graph. Warning: The intended usage of this function is to allow you to reposition or add your own custom controls to the container. This is an internal control and as such should not be freed. If you wish to hide this or any of its children, use their [member CanvasItem.visible] property instead. </description> </method> <method name="is_node_connected"> - <return type="bool"> - </return> - <argument index="0" name="from" type="StringName"> - </argument> - <argument index="1" name="from_port" type="int"> - </argument> - <argument index="2" name="to" type="StringName"> - </argument> - <argument index="3" name="to_port" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="from" type="StringName" /> + <argument index="1" name="from_port" type="int" /> + <argument index="2" name="to" type="StringName" /> + <argument index="3" name="to_port" type="int" /> <description> Returns [code]true[/code] if the [code]from_port[/code] slot of the [code]from[/code] GraphNode is connected to the [code]to_port[/code] slot of the [code]to[/code] GraphNode. </description> </method> <method name="is_valid_connection_type" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="from_type" type="int"> - </argument> - <argument index="1" name="to_type" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="from_type" type="int" /> + <argument index="1" name="to_type" type="int" /> <description> Returns whether it's possible to connect slots of the specified types. </description> </method> <method name="remove_valid_connection_type"> - <return type="void"> - </return> - <argument index="0" name="from_type" type="int"> - </argument> - <argument index="1" name="to_type" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="from_type" type="int" /> + <argument index="1" name="to_type" type="int" /> <description> Makes it not possible to connect between two different slot types. The type is defined with the [method GraphNode.set_slot] method. </description> </method> <method name="remove_valid_left_disconnect_type"> - <return type="void"> - </return> - <argument index="0" name="type" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="type" type="int" /> <description> Removes the possibility to disconnect nodes when dragging from the slot at the left if it has the specified type. </description> </method> <method name="remove_valid_right_disconnect_type"> - <return type="void"> - </return> - <argument index="0" name="type" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="type" type="int" /> <description> Removes the possibility to disconnect nodes when dragging from the slot at the right if it has the specified type. </description> </method> <method name="set_connection_activity"> - <return type="void"> - </return> - <argument index="0" name="from" type="StringName"> - </argument> - <argument index="1" name="from_port" type="int"> - </argument> - <argument index="2" name="to" type="StringName"> - </argument> - <argument index="3" name="to_port" type="int"> - </argument> - <argument index="4" name="amount" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="from" type="StringName" /> + <argument index="1" name="from_port" type="int" /> + <argument index="2" name="to" type="StringName" /> + <argument index="3" name="to_port" type="int" /> + <argument index="4" name="amount" type="float" /> <description> Sets the coloration of the connection between [code]from[/code]'s [code]from_port[/code] and [code]to[/code]'s [code]to_port[/code] with the color provided in the [code]activity[/code] theme property. </description> </method> <method name="set_selected"> - <return type="void"> - </return> - <argument index="0" name="node" type="Node"> - </argument> + <return type="void" /> + <argument index="0" name="node" type="Node" /> <description> Sets the specified [code]node[/code] as the one selected. </description> @@ -226,36 +205,26 @@ </description> </signal> <signal name="connection_from_empty"> - <argument index="0" name="to" type="StringName"> - </argument> - <argument index="1" name="to_slot" type="int"> - </argument> - <argument index="2" name="release_position" type="Vector2"> - </argument> + <argument index="0" name="to" type="StringName" /> + <argument index="1" name="to_slot" type="int" /> + <argument index="2" name="release_position" type="Vector2" /> <description> Emitted when user dragging connection from input port into empty space of the graph. </description> </signal> <signal name="connection_request"> - <argument index="0" name="from" type="StringName"> - </argument> - <argument index="1" name="from_slot" type="int"> - </argument> - <argument index="2" name="to" type="StringName"> - </argument> - <argument index="3" name="to_slot" type="int"> - </argument> + <argument index="0" name="from" type="StringName" /> + <argument index="1" name="from_slot" type="int" /> + <argument index="2" name="to" type="StringName" /> + <argument index="3" name="to_slot" type="int" /> <description> Emitted to the GraphEdit when the connection between the [code]from_slot[/code] slot of the [code]from[/code] GraphNode and the [code]to_slot[/code] slot of the [code]to[/code] GraphNode is attempted to be created. </description> </signal> <signal name="connection_to_empty"> - <argument index="0" name="from" type="StringName"> - </argument> - <argument index="1" name="from_slot" type="int"> - </argument> - <argument index="2" name="release_position" type="Vector2"> - </argument> + <argument index="0" name="from" type="StringName" /> + <argument index="1" name="from_slot" type="int" /> + <argument index="2" name="release_position" type="Vector2" /> <description> Emitted when user dragging connection from output port into empty space of the graph. </description> @@ -271,14 +240,10 @@ </description> </signal> <signal name="disconnection_request"> - <argument index="0" name="from" type="StringName"> - </argument> - <argument index="1" name="from_slot" type="int"> - </argument> - <argument index="2" name="to" type="StringName"> - </argument> - <argument index="3" name="to_slot" type="int"> - </argument> + <argument index="0" name="from" type="StringName" /> + <argument index="1" name="from_slot" type="int" /> + <argument index="2" name="to" type="StringName" /> + <argument index="3" name="to_slot" type="int" /> <description> Emitted to the GraphEdit when the connection between [code]from_slot[/code] slot of [code]from[/code] GraphNode and [code]to_slot[/code] slot of [code]to[/code] GraphNode is attempted to be removed. </description> @@ -294,14 +259,12 @@ </description> </signal> <signal name="node_deselected"> - <argument index="0" name="node" type="Node"> - </argument> + <argument index="0" name="node" type="Node" /> <description> </description> </signal> <signal name="node_selected"> - <argument index="0" name="node" type="Node"> - </argument> + <argument index="0" name="node" type="Node" /> <description> Emitted when a GraphNode is selected. </description> @@ -312,15 +275,13 @@ </description> </signal> <signal name="popup_request"> - <argument index="0" name="position" type="Vector2"> - </argument> + <argument index="0" name="position" type="Vector2" /> <description> Emitted when a popup is requested. Happens on right-clicking in the GraphEdit. [code]position[/code] is the position of the mouse pointer when the signal is sent. </description> </signal> <signal name="scroll_offset_changed"> - <argument index="0" name="ofs" type="Vector2"> - </argument> + <argument index="0" name="ofs" type="Vector2" /> <description> Emitted when the scroll offset is changed by the user. It will not be emitted when changed in code. </description> @@ -329,45 +290,47 @@ <constants> </constants> <theme_items> - <theme_item name="activity" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="activity" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> </theme_item> - <theme_item name="bezier_len_neg" type="int" default="160"> + <theme_item name="bezier_len_neg" data_type="constant" type="int" default="160"> </theme_item> - <theme_item name="bezier_len_pos" type="int" default="80"> + <theme_item name="bezier_len_pos" data_type="constant" type="int" default="80"> </theme_item> - <theme_item name="bg" type="StyleBox"> + <theme_item name="bg" data_type="style" type="StyleBox"> The background drawn under the grid. </theme_item> - <theme_item name="grid_major" type="Color" default="Color(1, 1, 1, 0.2)"> + <theme_item name="grid_major" data_type="color" type="Color" default="Color(1, 1, 1, 0.2)"> Color of major grid lines. </theme_item> - <theme_item name="grid_minor" type="Color" default="Color(1, 1, 1, 0.05)"> + <theme_item name="grid_minor" data_type="color" type="Color" default="Color(1, 1, 1, 0.05)"> Color of minor grid lines. </theme_item> - <theme_item name="minimap" type="Texture2D"> + <theme_item name="layout" data_type="icon" type="Texture2D"> + </theme_item> + <theme_item name="minimap" data_type="icon" type="Texture2D"> </theme_item> - <theme_item name="minus" type="Texture2D"> + <theme_item name="minus" data_type="icon" type="Texture2D"> The icon for the zoom out button. </theme_item> - <theme_item name="more" type="Texture2D"> + <theme_item name="more" data_type="icon" type="Texture2D"> The icon for the zoom in button. </theme_item> - <theme_item name="port_grab_distance_horizontal" type="int" default="48"> + <theme_item name="port_grab_distance_horizontal" data_type="constant" type="int" default="24"> The horizontal range within which a port can be grabbed (on both sides). </theme_item> - <theme_item name="port_grab_distance_vertical" type="int" default="6"> + <theme_item name="port_grab_distance_vertical" data_type="constant" type="int" default="6"> The vertical range within which a port can be grabbed (on both sides). </theme_item> - <theme_item name="reset" type="Texture2D"> + <theme_item name="reset" data_type="icon" type="Texture2D"> The icon for the zoom reset button. </theme_item> - <theme_item name="selection_fill" type="Color" default="Color(1, 1, 1, 0.3)"> + <theme_item name="selection_fill" data_type="color" type="Color" default="Color(1, 1, 1, 0.3)"> The fill color of the selection rectangle. </theme_item> - <theme_item name="selection_stroke" type="Color" default="Color(1, 1, 1, 0.8)"> + <theme_item name="selection_stroke" data_type="color" type="Color" default="Color(1, 1, 1, 0.8)"> The outline color of the selection rectangle. </theme_item> - <theme_item name="snap" type="Texture2D"> + <theme_item name="snap" data_type="icon" type="Texture2D"> The icon for the snap toggle button. </theme_item> </theme_items> diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index 84eda7fcea..ff6271d2aa 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -12,191 +12,146 @@ </tutorials> <methods> <method name="clear_all_slots"> - <return type="void"> - </return> + <return type="void" /> <description> Disables all input and output slots of the GraphNode. </description> </method> <method name="clear_opentype_features"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all OpenType features. </description> </method> <method name="clear_slot"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> <description> Disables input and output slot whose index is [code]idx[/code]. </description> </method> <method name="get_connection_input_color"> - <return type="Color"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="idx" type="int" /> <description> Returns the [Color] of the input connection [code]idx[/code]. </description> </method> <method name="get_connection_input_count"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of enabled input slots (connections) to the GraphNode. </description> </method> <method name="get_connection_input_position"> - <return type="Vector2"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="idx" type="int" /> <description> Returns the position of the input connection [code]idx[/code]. </description> </method> <method name="get_connection_input_type"> - <return type="int"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="idx" type="int" /> <description> Returns the type of the input connection [code]idx[/code]. </description> </method> <method name="get_connection_output_color"> - <return type="Color"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="idx" type="int" /> <description> Returns the [Color] of the output connection [code]idx[/code]. </description> </method> <method name="get_connection_output_count"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of enabled output slots (connections) of the GraphNode. </description> </method> <method name="get_connection_output_position"> - <return type="Vector2"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="idx" type="int" /> <description> Returns the position of the output connection [code]idx[/code]. </description> </method> <method name="get_connection_output_type"> - <return type="int"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="idx" type="int" /> <description> Returns the type of the output connection [code]idx[/code]. </description> </method> <method name="get_opentype_feature" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="tag" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="tag" type="String" /> <description> Returns OpenType feature [code]tag[/code]. </description> </method> <method name="get_slot_color_left" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="idx" type="int" /> <description> Returns the left (input) [Color] of the slot [code]idx[/code]. </description> </method> <method name="get_slot_color_right" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="idx" type="int" /> <description> Returns the right (output) [Color] of the slot [code]idx[/code]. </description> </method> <method name="get_slot_type_left" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="idx" type="int" /> <description> Returns the left (input) type of the slot [code]idx[/code]. </description> </method> <method name="get_slot_type_right" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="idx" type="int" /> <description> Returns the right (output) type of the slot [code]idx[/code]. </description> </method> <method name="is_slot_enabled_left" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="idx" type="int" /> <description> Returns [code]true[/code] if left (input) side of the slot [code]idx[/code] is enabled. </description> </method> <method name="is_slot_enabled_right" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="idx" type="int" /> <description> Returns [code]true[/code] if right (output) side of the slot [code]idx[/code] is enabled. </description> </method> <method name="set_opentype_feature"> - <return type="void"> - </return> - <argument index="0" name="tag" type="String"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="tag" type="String" /> + <argument index="1" name="value" type="int" /> <description> Sets OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. </description> </method> <method name="set_slot"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="enable_left" type="bool"> - </argument> - <argument index="2" name="type_left" type="int"> - </argument> - <argument index="3" name="color_left" type="Color"> - </argument> - <argument index="4" name="enable_right" type="bool"> - </argument> - <argument index="5" name="type_right" type="int"> - </argument> - <argument index="6" name="color_right" type="Color"> - </argument> - <argument index="7" name="custom_left" type="Texture2D" default="null"> - </argument> - <argument index="8" name="custom_right" type="Texture2D" default="null"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="enable_left" type="bool" /> + <argument index="2" name="type_left" type="int" /> + <argument index="3" name="color_left" type="Color" /> + <argument index="4" name="enable_right" type="bool" /> + <argument index="5" name="type_right" type="int" /> + <argument index="6" name="color_right" type="Color" /> + <argument index="7" name="custom_left" type="Texture2D" default="null" /> + <argument index="8" name="custom_right" type="Texture2D" default="null" /> <description> Sets properties of the slot with ID [code]idx[/code]. If [code]enable_left[/code]/[code]right[/code], a port will appear and the slot will be able to be connected from this side. @@ -208,67 +163,49 @@ </description> </method> <method name="set_slot_color_left"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="color_left" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="color_left" type="Color" /> <description> Sets the [Color] of the left (input) side of the slot [code]idx[/code] to [code]color_left[/code]. </description> </method> <method name="set_slot_color_right"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="color_right" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="color_right" type="Color" /> <description> Sets the [Color] of the right (output) side of the slot [code]idx[/code] to [code]color_right[/code]. </description> </method> <method name="set_slot_enabled_left"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="enable_left" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="enable_left" type="bool" /> <description> Toggles the left (input) side of the slot [code]idx[/code]. If [code]enable_left[/code] is [code]true[/code], a port will appear on the left side and the slot will be able to be connected from this side. </description> </method> <method name="set_slot_enabled_right"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="enable_right" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="enable_right" type="bool" /> <description> Toggles the right (output) side of the slot [code]idx[/code]. If [code]enable_right[/code] is [code]true[/code], a port will appear on the right side and the slot will be able to be connected from this side. </description> </method> <method name="set_slot_type_left"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="type_left" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="type_left" type="int" /> <description> Sets the left (input) type of the slot [code]idx[/code] to [code]type_left[/code]. </description> </method> <method name="set_slot_type_right"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="type_right" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="type_right" type="int" /> <description> Sets the right (output) type of the slot [code]idx[/code] to [code]type_right[/code]. </description> @@ -314,10 +251,8 @@ </description> </signal> <signal name="dragged"> - <argument index="0" name="from" type="Vector2"> - </argument> - <argument index="1" name="to" type="Vector2"> - </argument> + <argument index="0" name="from" type="Vector2" /> + <argument index="1" name="to" type="Vector2" /> <description> Emitted when the GraphNode is dragged. </description> @@ -333,15 +268,13 @@ </description> </signal> <signal name="resize_request"> - <argument index="0" name="new_minsize" type="Vector2"> - </argument> + <argument index="0" name="new_minsize" type="Vector2" /> <description> Emitted when the GraphNode is requested to be resized. Happens on dragging the resizer handle (see [member resizable]). </description> </signal> <signal name="slot_updated"> - <argument index="0" name="idx" type="int"> - </argument> + <argument index="0" name="idx" type="int" /> <description> Emitted when any GraphNode's slot is updated. </description> @@ -359,59 +292,59 @@ </constant> </constants> <theme_items> - <theme_item name="breakpoint" type="StyleBox"> + <theme_item name="breakpoint" data_type="style" type="StyleBox"> The background used when [member overlay] is set to [constant OVERLAY_BREAKPOINT]. </theme_item> - <theme_item name="close" type="Texture2D"> + <theme_item name="close" data_type="icon" type="Texture2D"> The icon for the close button, visible when [member show_close] is enabled. </theme_item> - <theme_item name="close_color" type="Color" default="Color(0, 0, 0, 1)"> + <theme_item name="close_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> The color modulation applied to the close button icon. </theme_item> - <theme_item name="close_offset" type="int" default="18"> + <theme_item name="close_offset" data_type="constant" type="int" default="18"> The vertical offset of the close button. </theme_item> - <theme_item name="comment" type="StyleBox"> + <theme_item name="comment" data_type="style" type="StyleBox"> The [StyleBox] used when [member comment] is enabled. </theme_item> - <theme_item name="commentfocus" type="StyleBox"> + <theme_item name="commentfocus" data_type="style" type="StyleBox"> The [StyleBox] used when [member comment] is enabled and the [GraphNode] is focused. </theme_item> - <theme_item name="defaultfocus" type="StyleBox"> + <theme_item name="defaultfocus" data_type="style" type="StyleBox"> </theme_item> - <theme_item name="defaultframe" type="StyleBox"> + <theme_item name="defaultframe" data_type="style" type="StyleBox"> </theme_item> - <theme_item name="frame" type="StyleBox"> + <theme_item name="frame" data_type="style" type="StyleBox"> The default background for [GraphNode]. </theme_item> - <theme_item name="port" type="Texture2D"> + <theme_item name="port" data_type="icon" type="Texture2D"> The icon used for representing ports. </theme_item> - <theme_item name="port_offset" type="int" default="3"> + <theme_item name="port_offset" data_type="constant" type="int" default="3"> Horizontal offset for the ports. </theme_item> - <theme_item name="position" type="StyleBox"> + <theme_item name="position" data_type="style" type="StyleBox"> The background used when [member overlay] is set to [constant OVERLAY_POSITION]. </theme_item> - <theme_item name="resizer" type="Texture2D"> + <theme_item name="resizer" data_type="icon" type="Texture2D"> The icon used for resizer, visible when [member resizable] is enabled. </theme_item> - <theme_item name="resizer_color" type="Color" default="Color(0, 0, 0, 1)"> + <theme_item name="resizer_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> The color modulation applied to the resizer icon. </theme_item> - <theme_item name="selectedframe" type="StyleBox"> + <theme_item name="selectedframe" data_type="style" type="StyleBox"> The background used when the [GraphNode] is selected. </theme_item> - <theme_item name="separation" type="int" default="1"> + <theme_item name="separation" data_type="constant" type="int" default="1"> The vertical distance between ports. </theme_item> - <theme_item name="title_color" type="Color" default="Color(0, 0, 0, 1)"> + <theme_item name="title_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> Color of the title text. </theme_item> - <theme_item name="title_font" type="Font"> + <theme_item name="title_font" data_type="font" type="Font"> Font used for the title text. </theme_item> - <theme_item name="title_offset" type="int" default="20"> + <theme_item name="title_offset" data_type="constant" type="int" default="20"> Vertical offset of the title text. </theme_item> </theme_items> diff --git a/doc/classes/GridContainer.xml b/doc/classes/GridContainer.xml index ca6b4e69c3..34e7cbcd79 100644 --- a/doc/classes/GridContainer.xml +++ b/doc/classes/GridContainer.xml @@ -21,10 +21,10 @@ <constants> </constants> <theme_items> - <theme_item name="hseparation" type="int" default="4"> + <theme_item name="hseparation" data_type="constant" type="int" default="4"> The horizontal separation of children nodes. </theme_item> - <theme_item name="vseparation" type="int" default="4"> + <theme_item name="vseparation" data_type="constant" type="int" default="4"> The vertical separation of children nodes. </theme_item> </theme_items> diff --git a/doc/classes/HBoxContainer.xml b/doc/classes/HBoxContainer.xml index 7c76b8b001..9c3efb384e 100644 --- a/doc/classes/HBoxContainer.xml +++ b/doc/classes/HBoxContainer.xml @@ -13,7 +13,7 @@ <constants> </constants> <theme_items> - <theme_item name="separation" type="int" default="4"> + <theme_item name="separation" data_type="constant" type="int" default="4"> The horizontal space between the [HBoxContainer]'s elements. </theme_item> </theme_items> diff --git a/doc/classes/HMACContext.xml b/doc/classes/HMACContext.xml index 9fa96e5ddf..88d3c5e2f3 100644 --- a/doc/classes/HMACContext.xml +++ b/doc/classes/HMACContext.xml @@ -56,28 +56,22 @@ </tutorials> <methods> <method name="finish"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> Returns the resulting HMAC. If the HMAC failed, an empty [PackedByteArray] is returned. </description> </method> <method name="start"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="hash_type" type="int" enum="HashingContext.HashType"> - </argument> - <argument index="1" name="key" type="PackedByteArray"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="hash_type" type="int" enum="HashingContext.HashType" /> + <argument index="1" name="key" type="PackedByteArray" /> <description> Initializes the HMACContext. This method cannot be called again on the same HMACContext until [method finish] has been called. </description> </method> <method name="update"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="data" type="PackedByteArray"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="data" type="PackedByteArray" /> <description> Updates the message to be HMACed. This can be called multiple times before [method finish] is called to append [code]data[/code] to the message, but cannot be called until [method start] has been called. </description> diff --git a/doc/classes/HScrollBar.xml b/doc/classes/HScrollBar.xml index 963454dab8..3bdd739cdf 100644 --- a/doc/classes/HScrollBar.xml +++ b/doc/classes/HScrollBar.xml @@ -13,31 +13,31 @@ <constants> </constants> <theme_items> - <theme_item name="decrement" type="Texture2D"> + <theme_item name="decrement" data_type="icon" type="Texture2D"> Icon used as a button to scroll the [ScrollBar] left. Supports custom step using the [member ScrollBar.custom_step] property. </theme_item> - <theme_item name="decrement_highlight" type="Texture2D"> + <theme_item name="decrement_highlight" data_type="icon" type="Texture2D"> Displayed when the mouse cursor hovers over the decrement button. </theme_item> - <theme_item name="grabber" type="StyleBox"> + <theme_item name="grabber" data_type="style" type="StyleBox"> Used as texture for the grabber, the draggable element representing current scroll. </theme_item> - <theme_item name="grabber_highlight" type="StyleBox"> + <theme_item name="grabber_highlight" data_type="style" type="StyleBox"> Used when the mouse hovers over the grabber. </theme_item> - <theme_item name="grabber_pressed" type="StyleBox"> + <theme_item name="grabber_pressed" data_type="style" type="StyleBox"> Used when the grabber is being dragged. </theme_item> - <theme_item name="increment" type="Texture2D"> + <theme_item name="increment" data_type="icon" type="Texture2D"> Icon used as a button to scroll the [ScrollBar] right. Supports custom step using the [member ScrollBar.custom_step] property. </theme_item> - <theme_item name="increment_highlight" type="Texture2D"> + <theme_item name="increment_highlight" data_type="icon" type="Texture2D"> Displayed when the mouse cursor hovers over the increment button. </theme_item> - <theme_item name="scroll" type="StyleBox"> + <theme_item name="scroll" data_type="style" type="StyleBox"> Used as background of this [ScrollBar]. </theme_item> - <theme_item name="scroll_focus" type="StyleBox"> + <theme_item name="scroll_focus" data_type="style" type="StyleBox"> Used as background when the [ScrollBar] has the GUI focus. </theme_item> </theme_items> diff --git a/doc/classes/HSeparator.xml b/doc/classes/HSeparator.xml index 5b418d6428..24495d208e 100644 --- a/doc/classes/HSeparator.xml +++ b/doc/classes/HSeparator.xml @@ -13,10 +13,10 @@ <constants> </constants> <theme_items> - <theme_item name="separation" type="int" default="4"> + <theme_item name="separation" data_type="constant" type="int" default="4"> The height of the area covered by the separator. Effectively works like a minimum height. </theme_item> - <theme_item name="separator" type="StyleBox"> + <theme_item name="separator" data_type="style" type="StyleBox"> The style for the separator line. Works best with [StyleBoxLine]. </theme_item> </theme_items> diff --git a/doc/classes/HSlider.xml b/doc/classes/HSlider.xml index 0cbb4fd455..37aa968161 100644 --- a/doc/classes/HSlider.xml +++ b/doc/classes/HSlider.xml @@ -14,24 +14,24 @@ <constants> </constants> <theme_items> - <theme_item name="grabber" type="Texture2D"> + <theme_item name="grabber" data_type="icon" type="Texture2D"> The texture for the grabber (the draggable element). </theme_item> - <theme_item name="grabber_area" type="StyleBox"> + <theme_item name="grabber_area" data_type="style" type="StyleBox"> The background of the area to the left of the grabber. </theme_item> - <theme_item name="grabber_area_highlight" type="StyleBox"> + <theme_item name="grabber_area_highlight" data_type="style" type="StyleBox"> </theme_item> - <theme_item name="grabber_disabled" type="Texture2D"> + <theme_item name="grabber_disabled" data_type="icon" type="Texture2D"> The texture for the grabber when it's disabled. </theme_item> - <theme_item name="grabber_highlight" type="Texture2D"> + <theme_item name="grabber_highlight" data_type="icon" type="Texture2D"> The texture for the grabber when it's focused. </theme_item> - <theme_item name="slider" type="StyleBox"> + <theme_item name="slider" data_type="style" type="StyleBox"> The background for the whole slider. Determines the height of the [code]grabber_area[/code]. </theme_item> - <theme_item name="tick" type="Texture2D"> + <theme_item name="tick" data_type="icon" type="Texture2D"> The texture for the ticks, visible when [member Slider.tick_count] is greater than 0. </theme_item> </theme_items> diff --git a/doc/classes/HSplitContainer.xml b/doc/classes/HSplitContainer.xml index f6e9f33c20..6bc9913344 100644 --- a/doc/classes/HSplitContainer.xml +++ b/doc/classes/HSplitContainer.xml @@ -13,15 +13,15 @@ <constants> </constants> <theme_items> - <theme_item name="autohide" type="int" default="1"> + <theme_item name="autohide" data_type="constant" type="int" default="1"> Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible. </theme_item> - <theme_item name="bg" type="StyleBox"> + <theme_item name="bg" data_type="style" type="StyleBox"> </theme_item> - <theme_item name="grabber" type="Texture2D"> + <theme_item name="grabber" data_type="icon" type="Texture2D"> The icon used for the grabber drawn in the middle area. </theme_item> - <theme_item name="separation" type="int" default="12"> + <theme_item name="separation" data_type="constant" type="int" default="12"> The space between sides of the container. </theme_item> </theme_items> diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index a549994a69..29aaf3c756 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -8,8 +8,10 @@ [b]Note:[/b] This client only needs to connect to a host once (see [method connect_to_host]) to send multiple requests. Because of this, methods that take URLs usually take just the part after the host instead of the full URL, as the client is already connected to a host. See [method request] for a full example and to get started. A [HTTPClient] should be reused between multiple requests or to connect to different hosts instead of creating one client per request. Supports SSL and SSL server certificate verification. HTTP status codes in the 2xx range indicate success, 3xx redirection (i.e. "try again, but over here"), 4xx something was wrong with the request, and 5xx something went wrong on the server's side. For more information on HTTP, see https://developer.mozilla.org/en-US/docs/Web/HTTP (or read RFC 2616 to get it straight from the source: https://tools.ietf.org/html/rfc2616). + [b]Note:[/b] It's recommended to use transport encryption (SSL/TLS) and to avoid sending sensitive information (such as login credentials) in HTTP GET URL parameters. Consider using HTTP POST requests or HTTP headers for such information instead. [b]Note:[/b] When performing HTTP requests from a project exported to HTML5, keep in mind the remote server may not allow requests from foreign origins due to [url=https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS]CORS[/url]. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the [code]Access-Control-Allow-Origin: *[/code] HTTP header. [b]Note:[/b] SSL/TLS support is currently limited to TLS 1.0, TLS 1.1, and TLS 1.2. Attempting to connect to a TLS 1.3-only server will return an error. + [b]Warning:[/b] SSL/TLS certificate revocation and certificate pinning are currently not supported. Revoked certificates are accepted as long as they are otherwise valid. If this is a concern, you may want to use automatically managed certificates with a short validity period. </description> <tutorials> <link title="HTTP client class">https://docs.godotengine.org/en/latest/tutorials/networking/http_client_class.html</link> @@ -17,23 +19,17 @@ </tutorials> <methods> <method name="close"> - <return type="void"> - </return> + <return type="void" /> <description> Closes the current connection, allowing reuse of this [HTTPClient]. </description> </method> <method name="connect_to_host"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="host" type="String"> - </argument> - <argument index="1" name="port" type="int" default="-1"> - </argument> - <argument index="2" name="use_ssl" type="bool" default="false"> - </argument> - <argument index="3" name="verify_host" type="bool" default="true"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="host" type="String" /> + <argument index="1" name="port" type="int" default="-1" /> + <argument index="2" name="use_ssl" type="bool" default="false" /> + <argument index="3" name="verify_host" type="bool" default="true" /> <description> Connects to a host. This needs to be done before any requests are sent. The host should not have http:// prepended but will strip the protocol identifier if provided. @@ -42,30 +38,26 @@ </description> </method> <method name="get_response_body_length" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the response's body length. [b]Note:[/b] Some Web servers may not send a body length. In this case, the value returned will be [code]-1[/code]. If using chunked transfer encoding, the body length will also be [code]-1[/code]. </description> </method> <method name="get_response_code" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the response's HTTP status code. </description> </method> <method name="get_response_headers"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns the response headers. </description> </method> <method name="get_response_headers_as_dictionary"> - <return type="Dictionary"> - </return> + <return type="Dictionary" /> <description> Returns all response headers as a Dictionary of structure [code]{ "key": "value1; value2" }[/code] where the case-sensitivity of the keys and values is kept like the server delivers it. A value is a simple String, this string can have more than one value where "; " is used as separator. [b]Example:[/b] @@ -78,38 +70,32 @@ </description> </method> <method name="get_status" qualifiers="const"> - <return type="int" enum="HTTPClient.Status"> - </return> + <return type="int" enum="HTTPClient.Status" /> <description> Returns a [enum Status] constant. Need to call [method poll] in order to get status updates. </description> </method> <method name="has_response" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> If [code]true[/code], this [HTTPClient] has a response available. </description> </method> <method name="is_response_chunked" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> If [code]true[/code], this [HTTPClient] has a response that is chunked. </description> </method> <method name="poll"> - <return type="int" enum="Error"> - </return> + <return type="int" enum="Error" /> <description> This needs to be called in order to have any request processed. Check results with [method get_status]. </description> </method> <method name="query_string_from_dict"> - <return type="String"> - </return> - <argument index="0" name="fields" type="Dictionary"> - </argument> + <return type="String" /> + <argument index="0" name="fields" type="Dictionary" /> <description> Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.: [codeblocks] @@ -140,25 +126,20 @@ </description> </method> <method name="read_response_body_chunk"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> Reads one chunk from the response. </description> </method> <method name="request"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="method" type="int" enum="HTTPClient.Method"> - </argument> - <argument index="1" name="url" type="String"> - </argument> - <argument index="2" name="headers" type="PackedStringArray"> - </argument> - <argument index="3" name="body" type="String" default=""""> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="method" type="int" enum="HTTPClient.Method" /> + <argument index="1" name="url" type="String" /> + <argument index="2" name="headers" type="PackedStringArray" /> + <argument index="3" name="body" type="String" default="""" /> <description> - Sends a request to the connected host. The URL parameter is just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]index.php[/code]. + Sends a request to the connected host. + The URL parameter is usually just the part after the host, so for [code]https://somehost.com/index.php[/code], it is [code]/index.php[/code]. When sending requests to an HTTP proxy server, it should be an absolute URL. For [constant HTTPClient.METHOD_OPTIONS] requests, [code]*[/code] is also allowed. For [constant HTTPClient.METHOD_CONNECT] requests, it should be the authority component ([code]host:port[/code]). Headers are HTTP request headers. For available HTTP methods, see [enum Method]. To create a POST request with query strings to push to the server, do: [codeblocks] @@ -166,7 +147,7 @@ var fields = {"username" : "user", "password" : "pass"} var query_string = http_client.query_string_from_dict(fields) var headers = ["Content-Type: application/x-www-form-urlencoded", "Content-Length: " + str(query_string.length())] - var result = http_client.request(http_client.METHOD_POST, "index.php", headers, query_string) + var result = http_client.request(http_client.METHOD_POST, "/index.php", headers, query_string) [/gdscript] [csharp] var fields = new Godot.Collections.Dictionary { { "username", "user" }, { "password", "pass" } }; @@ -179,18 +160,14 @@ </description> </method> <method name="request_raw"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="method" type="int" enum="HTTPClient.Method"> - </argument> - <argument index="1" name="url" type="String"> - </argument> - <argument index="2" name="headers" type="PackedStringArray"> - </argument> - <argument index="3" name="body" type="PackedByteArray"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="method" type="int" enum="HTTPClient.Method" /> + <argument index="1" name="url" type="String" /> + <argument index="2" name="headers" type="PackedStringArray" /> + <argument index="3" name="body" type="PackedByteArray" /> <description> - Sends a raw request to the connected host. The URL parameter is just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]index.php[/code]. + Sends a raw request to the connected host. + The URL parameter is usually just the part after the host, so for [code]https://somehost.com/index.php[/code], it is [code]/index.php[/code]. When sending requests to an HTTP proxy server, it should be an absolute URL. For [constant HTTPClient.METHOD_OPTIONS] requests, [code]*[/code] is also allowed. For [constant HTTPClient.METHOD_CONNECT] requests, it should be the authority component ([code]host:port[/code]). Headers are HTTP request headers. For available HTTP methods, see [enum Method]. Sends the body data raw, as a byte array and does not encode it in any way. </description> diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index 908e355db3..00927b98c5 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -6,6 +6,7 @@ <description> A node with the ability to send HTTP requests. Uses [HTTPClient] internally. Can be used to make HTTP requests, i.e. download or upload files or web content via HTTP. + [b]Warning:[/b] See the notes and warnings on [HTTPClient] for limitations, especially regarding SSL security. [b]Example of contacting a REST API and printing one of its returned fields:[/b] [codeblocks] [gdscript] @@ -150,8 +151,6 @@ [/codeblocks] [b]Gzipped response bodies[/b]: HTTPRequest will automatically handle decompression of response bodies. A [code]Accept-Encoding[/code] header will be automatically added to each of your requests, unless one is already specified. Any response with a [code]Content-Encoding: gzip[/code] header will automatically be decompressed and delivered to you as uncompressed bytes. - [b]Note:[/b] When performing HTTP requests from a project exported to HTML5, keep in mind the remote server may not allow requests from foreign origins due to [url=https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS]CORS[/url]. If you host the server in question, you should modify its backend to allow requests from foreign origins by adding the [code]Access-Control-Allow-Origin: *[/code] HTTP header. - [b]Note:[/b] SSL/TLS support is currently limited to TLS 1.0, TLS 1.1, and TLS 1.2. Attempting to connect to a TLS 1.3-only server will return an error. </description> <tutorials> <link title="Making HTTP requests">https://docs.godotengine.org/en/latest/tutorials/networking/http_request_class.html</link> @@ -159,66 +158,51 @@ </tutorials> <methods> <method name="cancel_request"> - <return type="void"> - </return> + <return type="void" /> <description> Cancels the current request. </description> </method> <method name="get_body_size" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the response body length. [b]Note:[/b] Some Web servers may not send a body length. In this case, the value returned will be [code]-1[/code]. If using chunked transfer encoding, the body length will also be [code]-1[/code]. </description> </method> <method name="get_downloaded_bytes" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the amount of bytes this HTTPRequest downloaded. </description> </method> <method name="get_http_client_status" qualifiers="const"> - <return type="int" enum="HTTPClient.Status"> - </return> + <return type="int" enum="HTTPClient.Status" /> <description> Returns the current status of the underlying [HTTPClient]. See [enum HTTPClient.Status]. </description> </method> <method name="request"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="url" type="String"> - </argument> - <argument index="1" name="custom_headers" type="PackedStringArray" default="PackedStringArray()"> - </argument> - <argument index="2" name="ssl_validate_domain" type="bool" default="true"> - </argument> - <argument index="3" name="method" type="int" enum="HTTPClient.Method" default="0"> - </argument> - <argument index="4" name="request_data" type="String" default=""""> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="url" type="String" /> + <argument index="1" name="custom_headers" type="PackedStringArray" default="PackedStringArray()" /> + <argument index="2" name="ssl_validate_domain" type="bool" default="true" /> + <argument index="3" name="method" type="int" enum="HTTPClient.Method" default="0" /> + <argument index="4" name="request_data" type="String" default="""" /> <description> Creates request on the underlying [HTTPClient]. If there is no configuration errors, it tries to connect using [method HTTPClient.connect_to_host] and passes parameters onto [method HTTPClient.request]. Returns [constant OK] if request is successfully created. (Does not imply that the server has responded), [constant ERR_UNCONFIGURED] if not in the tree, [constant ERR_BUSY] if still processing previous request, [constant ERR_INVALID_PARAMETER] if given string is not a valid URL format, or [constant ERR_CANT_CONNECT] if not using thread and the [HTTPClient] cannot connect to host. - [b]Note:[/b] The [code]request_data[/code] parameter is ignored if [code]method[/code] is [constant HTTPClient.METHOD_GET]. This is because GET methods can't contain request data. As a workaround, you can pass request data as a query string in the URL. See [method String.uri_encode] for an example. + [b]Note:[/b] When [code]method[/code] is [constant HTTPClient.METHOD_GET], the payload sent via [code]request_data[/code] might be ignored by the server or even cause the server to reject the request (check [url=https://datatracker.ietf.org/doc/html/rfc7231#section-4.3.1]RFC 7231 section 4.3.1[/url] for more details). As a workaround, you can send data as a query string in the URL (see [method String.uri_encode] for an example). + [b]Note:[/b] It's recommended to use transport encryption (SSL/TLS) and to avoid sending sensitive information (such as login credentials) in HTTP GET URL parameters. Consider using HTTP POST requests or HTTP headers for such information instead. </description> </method> <method name="request_raw"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="url" type="String"> - </argument> - <argument index="1" name="custom_headers" type="PackedStringArray" default="PackedStringArray()"> - </argument> - <argument index="2" name="ssl_validate_domain" type="bool" default="true"> - </argument> - <argument index="3" name="method" type="int" enum="HTTPClient.Method" default="0"> - </argument> - <argument index="4" name="request_data_raw" type="PackedByteArray" default="PackedByteArray()"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="url" type="String" /> + <argument index="1" name="custom_headers" type="PackedStringArray" default="PackedStringArray()" /> + <argument index="2" name="ssl_validate_domain" type="bool" default="true" /> + <argument index="3" name="method" type="int" enum="HTTPClient.Method" default="0" /> + <argument index="4" name="request_data_raw" type="PackedByteArray" default="PackedByteArray()" /> <description> Creates request on the underlying [HTTPClient] using a raw array of bytes for the request body. If there is no configuration errors, it tries to connect using [method HTTPClient.connect_to_host] and passes parameters onto [method HTTPClient.request]. Returns [constant OK] if request is successfully created. (Does not imply that the server has responded), [constant ERR_UNCONFIGURED] if not in the tree, [constant ERR_BUSY] if still processing previous request, [constant ERR_INVALID_PARAMETER] if given string is not a valid URL format, or [constant ERR_CANT_CONNECT] if not using thread and the [HTTPClient] cannot connect to host. @@ -253,14 +237,10 @@ </members> <signals> <signal name="request_completed"> - <argument index="0" name="result" type="int"> - </argument> - <argument index="1" name="response_code" type="int"> - </argument> - <argument index="2" name="headers" type="PackedStringArray"> - </argument> - <argument index="3" name="body" type="PackedByteArray"> - </argument> + <argument index="0" name="result" type="int" /> + <argument index="1" name="response_code" type="int" /> + <argument index="2" name="headers" type="PackedStringArray" /> + <argument index="3" name="body" type="PackedByteArray" /> <description> Emitted when a request is completed. </description> diff --git a/doc/classes/HashingContext.xml b/doc/classes/HashingContext.xml index 1c7b7ca937..f470f1611d 100644 --- a/doc/classes/HashingContext.xml +++ b/doc/classes/HashingContext.xml @@ -63,26 +63,21 @@ </tutorials> <methods> <method name="finish"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> Closes the current context, and return the computed hash. </description> </method> <method name="start"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="type" type="int" enum="HashingContext.HashType"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="type" type="int" enum="HashingContext.HashType" /> <description> Starts a new hash computation of the given [code]type[/code] (e.g. [constant HASH_SHA256] to start computation of a SHA-256). </description> </method> <method name="update"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="chunk" type="PackedByteArray"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="chunk" type="PackedByteArray" /> <description> Updates the computation with the given [code]chunk[/code] of data. </description> diff --git a/doc/classes/HingeJoint3D.xml b/doc/classes/HingeJoint3D.xml index f2c652d51a..a8e7f343ff 100644 --- a/doc/classes/HingeJoint3D.xml +++ b/doc/classes/HingeJoint3D.xml @@ -10,41 +10,31 @@ </tutorials> <methods> <method name="get_flag" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="flag" type="int" enum="HingeJoint3D.Flag"> - </argument> + <return type="bool" /> + <argument index="0" name="flag" type="int" enum="HingeJoint3D.Flag" /> <description> Returns the value of the specified flag. </description> </method> <method name="get_param" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="param" type="int" enum="HingeJoint3D.Param"> - </argument> + <return type="float" /> + <argument index="0" name="param" type="int" enum="HingeJoint3D.Param" /> <description> Returns the value of the specified parameter. </description> </method> <method name="set_flag"> - <return type="void"> - </return> - <argument index="0" name="flag" type="int" enum="HingeJoint3D.Flag"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="flag" type="int" enum="HingeJoint3D.Flag" /> + <argument index="1" name="enabled" type="bool" /> <description> If [code]true[/code], enables the specified flag. </description> </method> <method name="set_param"> - <return type="void"> - </return> - <argument index="0" name="param" type="int" enum="HingeJoint3D.Param"> - </argument> - <argument index="1" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="param" type="int" enum="HingeJoint3D.Param" /> + <argument index="1" name="value" type="float" /> <description> Sets the value of the specified parameter. </description> diff --git a/doc/classes/IP.xml b/doc/classes/IP.xml index b3ce1abaeb..8eb994a913 100644 --- a/doc/classes/IP.xml +++ b/doc/classes/IP.xml @@ -10,33 +10,27 @@ </tutorials> <methods> <method name="clear_cache"> - <return type="void"> - </return> - <argument index="0" name="hostname" type="String" default=""""> - </argument> + <return type="void" /> + <argument index="0" name="hostname" type="String" default="""" /> <description> Removes all of a [code]hostname[/code]'s cached references. If no [code]hostname[/code] is given, all cached IP addresses are removed. </description> </method> <method name="erase_resolve_item"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> <description> Removes a given item [code]id[/code] from the queue. This should be used to free a queue after it has completed to enable more queries to happen. </description> </method> <method name="get_local_addresses" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns all the user's current IPv4 and IPv6 addresses as an array. </description> </method> <method name="get_local_interfaces" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns all network adapters as an array. Each adapter is a dictionary of the form: @@ -51,61 +45,46 @@ </description> </method> <method name="get_resolve_item_address" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="id" type="int" /> <description> Returns a queued hostname's IP address, given its queue [code]id[/code]. Returns an empty string on error or if resolution hasn't happened yet (see [method get_resolve_item_status]). </description> </method> <method name="get_resolve_item_addresses" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="Array" /> + <argument index="0" name="id" type="int" /> <description> Returns resolved addresses, or an empty array if an error happened or resolution didn't happen yet (see [method get_resolve_item_status]). </description> </method> <method name="get_resolve_item_status" qualifiers="const"> - <return type="int" enum="IP.ResolverStatus"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="int" enum="IP.ResolverStatus" /> + <argument index="0" name="id" type="int" /> <description> Returns a queued hostname's status as a [enum ResolverStatus] constant, given its queue [code]id[/code]. </description> </method> <method name="resolve_hostname"> - <return type="String"> - </return> - <argument index="0" name="host" type="String"> - </argument> - <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3"> - </argument> + <return type="String" /> + <argument index="0" name="host" type="String" /> + <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3" /> <description> Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the [enum Type] constant given as [code]ip_type[/code]. </description> </method> <method name="resolve_hostname_addresses"> - <return type="Array"> - </return> - <argument index="0" name="host" type="String"> - </argument> - <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3"> - </argument> + <return type="Array" /> + <argument index="0" name="host" type="String" /> + <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3" /> <description> Resolves a given hostname in a blocking way. Addresses are returned as an [Array] of IPv4 or IPv6 addresses depending on [code]ip_type[/code]. </description> </method> <method name="resolve_hostname_queue_item"> - <return type="int"> - </return> - <argument index="0" name="host" type="String"> - </argument> - <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3"> - </argument> + <return type="int" /> + <argument index="0" name="host" type="String" /> + <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3" /> <description> Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the [enum Type] constant given as [code]ip_type[/code]. Returns the queue ID if successful, or [constant RESOLVER_INVALID_ID] on error. </description> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index 167b90ea73..5d79e22c49 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -13,352 +13,270 @@ </tutorials> <methods> <method name="adjust_bcs"> - <return type="void"> - </return> - <argument index="0" name="brightness" type="float"> - </argument> - <argument index="1" name="contrast" type="float"> - </argument> - <argument index="2" name="saturation" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="brightness" type="float" /> + <argument index="1" name="contrast" type="float" /> + <argument index="2" name="saturation" type="float" /> <description> </description> </method> <method name="blend_rect"> - <return type="void"> - </return> - <argument index="0" name="src" type="Image"> - </argument> - <argument index="1" name="src_rect" type="Rect2"> - </argument> - <argument index="2" name="dst" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="src" type="Image" /> + <argument index="1" name="src_rect" type="Rect2" /> + <argument index="2" name="dst" type="Vector2" /> <description> Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image at coordinates [code]dest[/code]. </description> </method> <method name="blend_rect_mask"> - <return type="void"> - </return> - <argument index="0" name="src" type="Image"> - </argument> - <argument index="1" name="mask" type="Image"> - </argument> - <argument index="2" name="src_rect" type="Rect2"> - </argument> - <argument index="3" name="dst" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="src" type="Image" /> + <argument index="1" name="mask" type="Image" /> + <argument index="2" name="src_rect" type="Rect2" /> + <argument index="3" name="dst" type="Vector2" /> <description> Alpha-blends [code]src_rect[/code] from [code]src[/code] image to this image using [code]mask[/code] image at coordinates [code]dst[/code]. Alpha channels are required for both [code]src[/code] and [code]mask[/code]. [code]dst[/code] pixels and [code]src[/code] pixels will blend if the corresponding mask pixel's alpha value is not 0. [code]src[/code] image and [code]mask[/code] image [b]must[/b] have the same size (width and height) but they can have different formats. </description> </method> <method name="blit_rect"> - <return type="void"> - </return> - <argument index="0" name="src" type="Image"> - </argument> - <argument index="1" name="src_rect" type="Rect2"> - </argument> - <argument index="2" name="dst" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="src" type="Image" /> + <argument index="1" name="src_rect" type="Rect2" /> + <argument index="2" name="dst" type="Vector2" /> <description> Copies [code]src_rect[/code] from [code]src[/code] image to this image at coordinates [code]dst[/code]. </description> </method> <method name="blit_rect_mask"> - <return type="void"> - </return> - <argument index="0" name="src" type="Image"> - </argument> - <argument index="1" name="mask" type="Image"> - </argument> - <argument index="2" name="src_rect" type="Rect2"> - </argument> - <argument index="3" name="dst" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="src" type="Image" /> + <argument index="1" name="mask" type="Image" /> + <argument index="2" name="src_rect" type="Rect2" /> + <argument index="3" name="dst" type="Vector2" /> <description> Blits [code]src_rect[/code] area from [code]src[/code] image to this image at the coordinates given by [code]dst[/code]. [code]src[/code] pixel is copied onto [code]dst[/code] if the corresponding [code]mask[/code] pixel's alpha value is not 0. [code]src[/code] image and [code]mask[/code] image [b]must[/b] have the same size (width and height) but they can have different formats. </description> </method> <method name="bump_map_to_normal_map"> - <return type="void"> - </return> - <argument index="0" name="bump_scale" type="float" default="1.0"> - </argument> + <return type="void" /> + <argument index="0" name="bump_scale" type="float" default="1.0" /> <description> Converts a bump map to a normal map. A bump map provides a height offset per-pixel, while a normal map provides a normal direction per pixel. </description> </method> <method name="clear_mipmaps"> - <return type="void"> - </return> + <return type="void" /> <description> Removes the image's mipmaps. </description> </method> <method name="compress"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="mode" type="int" enum="Image.CompressMode"> - </argument> - <argument index="1" name="source" type="int" enum="Image.CompressSource" default="0"> - </argument> - <argument index="2" name="lossy_quality" type="float" default="0.7"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="mode" type="int" enum="Image.CompressMode" /> + <argument index="1" name="source" type="int" enum="Image.CompressSource" default="0" /> + <argument index="2" name="lossy_quality" type="float" default="0.7" /> <description> Compresses the image to use less memory. Can not directly access pixel data while the image is compressed. Returns error if the chosen compression mode is not available. See [enum CompressMode] and [enum CompressSource] constants. </description> </method> <method name="compress_from_channels"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="mode" type="int" enum="Image.CompressMode"> - </argument> - <argument index="1" name="channels" type="int" enum="Image.UsedChannels"> - </argument> - <argument index="2" name="lossy_quality" type="float" default="0.7"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="mode" type="int" enum="Image.CompressMode" /> + <argument index="1" name="channels" type="int" enum="Image.UsedChannels" /> + <argument index="2" name="lossy_quality" type="float" default="0.7" /> <description> </description> </method> <method name="convert"> - <return type="void"> - </return> - <argument index="0" name="format" type="int" enum="Image.Format"> - </argument> + <return type="void" /> + <argument index="0" name="format" type="int" enum="Image.Format" /> <description> Converts the image's format. See [enum Format] constants. </description> </method> <method name="copy_from"> - <return type="void"> - </return> - <argument index="0" name="src" type="Image"> - </argument> + <return type="void" /> + <argument index="0" name="src" type="Image" /> <description> Copies [code]src[/code] image to this image. </description> </method> <method name="create"> - <return type="void"> - </return> - <argument index="0" name="width" type="int"> - </argument> - <argument index="1" name="height" type="int"> - </argument> - <argument index="2" name="use_mipmaps" type="bool"> - </argument> - <argument index="3" name="format" type="int" enum="Image.Format"> - </argument> + <return type="void" /> + <argument index="0" name="width" type="int" /> + <argument index="1" name="height" type="int" /> + <argument index="2" name="use_mipmaps" type="bool" /> + <argument index="3" name="format" type="int" enum="Image.Format" /> <description> Creates an empty image of given size and format. See [enum Format] constants. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps]. </description> </method> <method name="create_from_data"> - <return type="void"> - </return> - <argument index="0" name="width" type="int"> - </argument> - <argument index="1" name="height" type="int"> - </argument> - <argument index="2" name="use_mipmaps" type="bool"> - </argument> - <argument index="3" name="format" type="int" enum="Image.Format"> - </argument> - <argument index="4" name="data" type="PackedByteArray"> - </argument> + <return type="void" /> + <argument index="0" name="width" type="int" /> + <argument index="1" name="height" type="int" /> + <argument index="2" name="use_mipmaps" type="bool" /> + <argument index="3" name="format" type="int" enum="Image.Format" /> + <argument index="4" name="data" type="PackedByteArray" /> <description> Creates a new image of given size and format. See [enum Format] constants. Fills the image with the given raw data. If [code]use_mipmaps[/code] is [code]true[/code] then loads mipmaps for this image from [code]data[/code]. See [method generate_mipmaps]. </description> </method> <method name="crop"> - <return type="void"> - </return> - <argument index="0" name="width" type="int"> - </argument> - <argument index="1" name="height" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="width" type="int" /> + <argument index="1" name="height" type="int" /> <description> Crops the image to the given [code]width[/code] and [code]height[/code]. If the specified size is larger than the current size, the extra area is filled with black pixels. </description> </method> <method name="decompress"> - <return type="int" enum="Error"> - </return> + <return type="int" enum="Error" /> <description> Decompresses the image if it is VRAM compressed in a supported format. Returns [constant OK] if the format is supported, otherwise [constant ERR_UNAVAILABLE]. [b]Note:[/b] The following formats can be decompressed: DXT, RGTC, BPTC, PVRTC1. The formats ETC1 and ETC2 are not supported. </description> </method> <method name="detect_alpha" qualifiers="const"> - <return type="int" enum="Image.AlphaMode"> - </return> + <return type="int" enum="Image.AlphaMode" /> <description> Returns [constant ALPHA_BLEND] if the image has data for alpha values. Returns [constant ALPHA_BIT] if all the alpha values are stored in a single bit. Returns [constant ALPHA_NONE] if no data for alpha values is found. </description> </method> <method name="detect_used_channels"> - <return type="int" enum="Image.UsedChannels"> - </return> - <argument index="0" name="source" type="int" enum="Image.CompressSource" default="0"> - </argument> + <return type="int" enum="Image.UsedChannels" /> + <argument index="0" name="source" type="int" enum="Image.CompressSource" default="0" /> <description> </description> </method> <method name="fill"> - <return type="void"> - </return> - <argument index="0" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="color" type="Color" /> <description> Fills the image with a given [Color]. </description> </method> <method name="fix_alpha_edges"> - <return type="void"> - </return> + <return type="void" /> <description> Blends low-alpha pixels with nearby pixels. </description> </method> <method name="flip_x"> - <return type="void"> - </return> + <return type="void" /> <description> Flips the image horizontally. </description> </method> <method name="flip_y"> - <return type="void"> - </return> + <return type="void" /> <description> Flips the image vertically. </description> </method> <method name="generate_mipmaps"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="renormalize" type="bool" default="false"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="renormalize" type="bool" default="false" /> <description> - Generates mipmaps for the image. Mipmaps are precalculated and lower resolution copies of the image. Mipmaps are automatically used if the image needs to be scaled down when rendered. This improves image quality and the performance of the rendering. Returns an error if the image is compressed, in a custom format or if the image's width/height is 0. + Generates mipmaps for the image. Mipmaps are precalculated lower-resolution copies of the image that are automatically used if the image needs to be scaled down when rendered. They help improve image quality and performance when rendering. This method returns an error if the image is compressed, in a custom format, or if the image's width/height is [code]0[/code]. + [b]Note:[/b] Mipmap generation is done on the CPU, is single-threaded and is [i]always[/i] done on the main thread. This means generating mipmaps will result in noticeable stuttering during gameplay, even if [method generate_mipmaps] is called from a [Thread]. </description> </method> <method name="get_data" qualifiers="const"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> Returns a copy of the image's raw data. </description> </method> <method name="get_format" qualifiers="const"> - <return type="int" enum="Image.Format"> - </return> + <return type="int" enum="Image.Format" /> <description> Returns the image's format. See [enum Format] constants. </description> </method> <method name="get_height" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the image's height. </description> </method> <method name="get_mipmap_offset" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="mipmap" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="mipmap" type="int" /> <description> Returns the offset where the image's mipmap with index [code]mipmap[/code] is stored in the [code]data[/code] dictionary. </description> </method> <method name="get_pixel" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="x" type="int"> - </argument> - <argument index="1" name="y" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="x" type="int" /> + <argument index="1" name="y" type="int" /> <description> Returns the color of the pixel at [code](x, y)[/code]. This is the same as [method get_pixelv], but with two integer arguments instead of a [Vector2i] argument. </description> </method> <method name="get_pixelv" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="point" type="Vector2i"> - </argument> + <return type="Color" /> + <argument index="0" name="point" type="Vector2i" /> <description> Returns the color of the pixel at [code]point[/code]. This is the same as [method get_pixel], but with a [Vector2i] argument instead of two integer arguments. </description> </method> <method name="get_rect" qualifiers="const"> - <return type="Image"> - </return> - <argument index="0" name="rect" type="Rect2"> - </argument> + <return type="Image" /> + <argument index="0" name="rect" type="Rect2" /> <description> Returns a new image that is a copy of the image's area specified with [code]rect[/code]. </description> </method> <method name="get_size" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the image's size (width and height). </description> </method> <method name="get_used_rect" qualifiers="const"> - <return type="Rect2"> - </return> + <return type="Rect2" /> <description> Returns a [Rect2] enclosing the visible portion of the image, considering each pixel with a non-zero alpha channel as visible. </description> </method> <method name="get_width" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the image's width. </description> </method> <method name="has_mipmaps" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the image has generated mipmaps. </description> </method> <method name="is_compressed" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the image is compressed. </description> </method> <method name="is_empty" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the image has no data. </description> </method> <method name="is_invisible" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if all the image's pixels have an alpha value of 0. Returns [code]false[/code] if any pixel has an alpha value higher than 0. </description> </method> <method name="load"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> <description> Loads an image from file [code]path[/code]. See [url=https://docs.godotengine.org/en/latest/getting_started/workflow/assets/importing_images.html#supported-image-formats]Supported image formats[/url] for a list of supported image formats and limitations. [b]Warning:[/b] This method should only be used in the editor or in cases when you need to load external images at run-time, such as images located at the [code]user://[/code] directory, and may not work in exported projects. @@ -366,131 +284,102 @@ </description> </method> <method name="load_bmp_from_buffer"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="buffer" type="PackedByteArray"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="buffer" type="PackedByteArray" /> <description> Loads an image from the binary contents of a BMP file. [b]Note:[/b] Godot's BMP module doesn't support 16-bit per pixel images. Only 1-bit, 4-bit, 8-bit, 24-bit, and 32-bit per pixel images are supported. </description> </method> <method name="load_jpg_from_buffer"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="buffer" type="PackedByteArray"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="buffer" type="PackedByteArray" /> <description> Loads an image from the binary contents of a JPEG file. </description> </method> <method name="load_png_from_buffer"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="buffer" type="PackedByteArray"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="buffer" type="PackedByteArray" /> <description> Loads an image from the binary contents of a PNG file. </description> </method> <method name="load_tga_from_buffer"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="buffer" type="PackedByteArray"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="buffer" type="PackedByteArray" /> <description> Loads an image from the binary contents of a TGA file. </description> </method> <method name="load_webp_from_buffer"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="buffer" type="PackedByteArray"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="buffer" type="PackedByteArray" /> <description> Loads an image from the binary contents of a WebP file. </description> </method> <method name="normal_map_to_xy"> - <return type="void"> - </return> + <return type="void" /> <description> Converts the image's data to represent coordinates on a 3D plane. This is used when the image represents a normal map. A normal map can add lots of detail to a 3D surface without increasing the polygon count. </description> </method> <method name="premultiply_alpha"> - <return type="void"> - </return> + <return type="void" /> <description> Multiplies color values with alpha values. Resulting color values for a pixel are [code](color * alpha)/256[/code]. </description> </method> <method name="resize"> - <return type="void"> - </return> - <argument index="0" name="width" type="int"> - </argument> - <argument index="1" name="height" type="int"> - </argument> - <argument index="2" name="interpolation" type="int" enum="Image.Interpolation" default="1"> - </argument> + <return type="void" /> + <argument index="0" name="width" type="int" /> + <argument index="1" name="height" type="int" /> + <argument index="2" name="interpolation" type="int" enum="Image.Interpolation" default="1" /> <description> Resizes the image to the given [code]width[/code] and [code]height[/code]. New pixels are calculated using the [code]interpolation[/code] mode defined via [enum Interpolation] constants. </description> </method> <method name="resize_to_po2"> - <return type="void"> - </return> - <argument index="0" name="square" type="bool" default="false"> - </argument> - <argument index="1" name="interpolation" type="int" enum="Image.Interpolation" default="1"> - </argument> + <return type="void" /> + <argument index="0" name="square" type="bool" default="false" /> + <argument index="1" name="interpolation" type="int" enum="Image.Interpolation" default="1" /> <description> Resizes the image to the nearest power of 2 for the width and height. If [code]square[/code] is [code]true[/code] then set width and height to be the same. New pixels are calculated using the [code]interpolation[/code] mode defined via [enum Interpolation] constants. </description> </method> <method name="rgbe_to_srgb"> - <return type="Image"> - </return> + <return type="Image" /> <description> Converts a standard RGBE (Red Green Blue Exponent) image to an sRGB image. </description> </method> <method name="save_exr" qualifiers="const"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="grayscale" type="bool" default="false"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="grayscale" type="bool" default="false" /> <description> Saves the image as an EXR file to [code]path[/code]. If [code]grayscale[/code] is [code]true[/code] and the image has only one channel, it will be saved explicitly as monochrome rather than one red channel. This function will return [constant ERR_UNAVAILABLE] if Godot was compiled without the TinyEXR module. + [b]Note:[/b] The TinyEXR module is disabled in non-editor builds, which means [method save_exr] will return [constant ERR_UNAVAILABLE] when it is called from an exported project. </description> </method> <method name="save_png" qualifiers="const"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> <description> Saves the image as a PNG file to [code]path[/code]. </description> </method> <method name="save_png_to_buffer" qualifiers="const"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> </description> </method> <method name="set_pixel"> - <return type="void"> - </return> - <argument index="0" name="x" type="int"> - </argument> - <argument index="1" name="y" type="int"> - </argument> - <argument index="2" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="x" type="int" /> + <argument index="1" name="y" type="int" /> + <argument index="2" name="color" type="Color" /> <description> Sets the [Color] of the pixel at [code](x, y)[/code] to [code]color[/code]. Example: [codeblocks] @@ -515,12 +404,9 @@ </description> </method> <method name="set_pixelv"> - <return type="void"> - </return> - <argument index="0" name="point" type="Vector2i"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="point" type="Vector2i" /> + <argument index="1" name="color" type="Color" /> <description> Sets the [Color] of the pixel at [code]point[/code] to [code]color[/code]. Example: [codeblocks] @@ -545,15 +431,13 @@ </description> </method> <method name="shrink_x2"> - <return type="void"> - </return> + <return type="void" /> <description> Shrinks the image by a factor of 2. </description> </method> <method name="srgb_to_linear"> - <return type="void"> - </return> + <return type="void" /> <description> Converts the raw data from the sRGB colorspace to a linear scale. </description> @@ -710,7 +594,7 @@ </constant> <constant name="INTERPOLATE_TRILINEAR" value="3" enum="Interpolation"> Performs bilinear separately on the two most-suited mipmap levels, then linearly interpolates between them. - It's slower than [constant INTERPOLATE_BILINEAR], but produces higher-quality results with much less aliasing artifacts. + It's slower than [constant INTERPOLATE_BILINEAR], but produces higher-quality results with far fewer aliasing artifacts. If the image does not have mipmaps, they will be generated and used internally, but no mipmaps will be generated on the resulting image. [b]Note:[/b] If you intend to scale multiple copies of the original image, it's better to call [method generate_mipmaps]] on it in advance, to avoid wasting processing power in generating them again and again. On the other hand, if the image already has mipmaps, they will be used, and a new set will be generated for the resulting image. diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml index f89b6ad57b..435fec6a50 100644 --- a/doc/classes/ImageTexture.xml +++ b/doc/classes/ImageTexture.xml @@ -32,35 +32,28 @@ </tutorials> <methods> <method name="create_from_image"> - <return type="void"> - </return> - <argument index="0" name="image" type="Image"> - </argument> + <return type="void" /> + <argument index="0" name="image" type="Image" /> <description> Initializes the texture by allocating and setting the data from an [Image]. </description> </method> <method name="get_format" qualifiers="const"> - <return type="int" enum="Image.Format"> - </return> + <return type="int" enum="Image.Format" /> <description> Returns the format of the texture, one of [enum Image.Format]. </description> </method> <method name="set_size_override"> - <return type="void"> - </return> - <argument index="0" name="size" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="size" type="Vector2" /> <description> Resizes the texture to the specified dimensions. </description> </method> <method name="update"> - <return type="void"> - </return> - <argument index="0" name="image" type="Image"> - </argument> + <return type="void" /> + <argument index="0" name="image" type="Image" /> <description> Replaces the texture's data with a new [Image]. [b]Note:[/b] The texture has to be initialized first with the [method create_from_image] method before it can be updated. The new image dimensions, format, and mipmaps configuration should match the existing texture's image configuration, otherwise it has to be re-created with the [method create_from_image] method. diff --git a/doc/classes/ImageTexture3D.xml b/doc/classes/ImageTexture3D.xml index d05082487d..538a836c1c 100644 --- a/doc/classes/ImageTexture3D.xml +++ b/doc/classes/ImageTexture3D.xml @@ -8,28 +8,19 @@ </tutorials> <methods> <method name="create"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="format" type="int" enum="Image.Format"> - </argument> - <argument index="1" name="width" type="int"> - </argument> - <argument index="2" name="height" type="int"> - </argument> - <argument index="3" name="depth" type="int"> - </argument> - <argument index="4" name="use_mipmaps" type="bool"> - </argument> - <argument index="5" name="data" type="Image[]"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="format" type="int" enum="Image.Format" /> + <argument index="1" name="width" type="int" /> + <argument index="2" name="height" type="int" /> + <argument index="3" name="depth" type="int" /> + <argument index="4" name="use_mipmaps" type="bool" /> + <argument index="5" name="data" type="Image[]" /> <description> </description> </method> <method name="update"> - <return type="void"> - </return> - <argument index="0" name="data" type="Image[]"> - </argument> + <return type="void" /> + <argument index="0" name="data" type="Image[]" /> <description> </description> </method> diff --git a/doc/classes/ImageTextureLayered.xml b/doc/classes/ImageTextureLayered.xml index d06b44afa9..1b7400803d 100644 --- a/doc/classes/ImageTextureLayered.xml +++ b/doc/classes/ImageTextureLayered.xml @@ -8,20 +8,15 @@ </tutorials> <methods> <method name="create_from_images"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="images" type="Array"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="images" type="Array" /> <description> </description> </method> <method name="update_layer"> - <return type="void"> - </return> - <argument index="0" name="image" type="Image"> - </argument> - <argument index="1" name="layer" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="image" type="Image" /> + <argument index="1" name="layer" type="int" /> <description> </description> </method> diff --git a/doc/classes/ImmediateMesh.xml b/doc/classes/ImmediateMesh.xml index d2ae091cad..69637d5bdd 100644 --- a/doc/classes/ImmediateMesh.xml +++ b/doc/classes/ImmediateMesh.xml @@ -10,89 +10,70 @@ </tutorials> <methods> <method name="clear_surfaces"> - <return type="void"> - </return> + <return type="void" /> <description> Clear all surfaces. </description> </method> <method name="surface_add_vertex"> - <return type="void"> - </return> - <argument index="0" name="vertex" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="vertex" type="Vector3" /> <description> Add a 3D vertex using the current attributes previously set. </description> </method> <method name="surface_add_vertex_2d"> - <return type="void"> - </return> - <argument index="0" name="vertex" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="vertex" type="Vector2" /> <description> Add a 2D vertex using the current attributes previously set. </description> </method> <method name="surface_begin"> - <return type="void"> - </return> - <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType"> - </argument> - <argument index="1" name="material" type="Material" default="null"> - </argument> + <return type="void" /> + <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType" /> + <argument index="1" name="material" type="Material" default="null" /> <description> Begin a new surface. </description> </method> <method name="surface_end"> - <return type="void"> - </return> + <return type="void" /> <description> End and commit current surface. Note that surface being created will not be visible until this function is called. </description> </method> <method name="surface_set_color"> - <return type="void"> - </return> - <argument index="0" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="color" type="Color" /> <description> Set the color attribute that will be pushed with the next vertex. </description> </method> <method name="surface_set_normal"> - <return type="void"> - </return> - <argument index="0" name="normal" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="normal" type="Vector3" /> <description> Set the normal attribute that will be pushed with the next vertex. </description> </method> <method name="surface_set_tangent"> - <return type="void"> - </return> - <argument index="0" name="tangent" type="Plane"> - </argument> + <return type="void" /> + <argument index="0" name="tangent" type="Plane" /> <description> Set the tangent attribute that will be pushed with the next vertex. </description> </method> <method name="surface_set_uv"> - <return type="void"> - </return> - <argument index="0" name="uv" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="uv" type="Vector2" /> <description> Set the UV attribute that will be pushed with the next vertex. </description> </method> <method name="surface_set_uv2"> - <return type="void"> - </return> - <argument index="0" name="uv2" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="uv2" type="Vector2" /> <description> Set the UV2 attribute that will be pushed with the next vertex. </description> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index b970070659..ebbcd2b894 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -13,12 +13,9 @@ </tutorials> <methods> <method name="action_press"> - <return type="void"> - </return> - <argument index="0" name="action" type="StringName"> - </argument> - <argument index="1" name="strength" type="float" default="1.0"> - </argument> + <return type="void" /> + <argument index="0" name="action" type="StringName" /> + <argument index="1" name="strength" type="float" default="1.0" /> <description> This will simulate pressing the specified action. The strength can be used for non-boolean actions, it's ranged between 0 and 1 representing the intensity of the given action. @@ -26,28 +23,22 @@ </description> </method> <method name="action_release"> - <return type="void"> - </return> - <argument index="0" name="action" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="action" type="StringName" /> <description> If the specified action is already pressed, this will release it. </description> </method> <method name="add_joy_mapping"> - <return type="void"> - </return> - <argument index="0" name="mapping" type="String"> - </argument> - <argument index="1" name="update_existing" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="mapping" type="String" /> + <argument index="1" name="update_existing" type="bool" default="false" /> <description> Adds a new mapping entry (in SDL2 format) to the mapping database. Optionally update already connected devices. </description> </method> <method name="get_accelerometer" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns the acceleration in m/s² of the device's accelerometer sensor, if the device has one. Otherwise, the method returns [constant Vector3.ZERO]. Note this method returns an empty [Vector3] when running from the editor even when your device has an accelerometer. You must export your project to a supported device to read values from the accelerometer. @@ -55,257 +46,203 @@ </description> </method> <method name="get_action_raw_strength" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="action" type="StringName"> - </argument> - <argument index="1" name="exact_match" type="bool" default="false"> - </argument> + <return type="float" /> + <argument index="0" name="action" type="StringName" /> + <argument index="1" name="exact_match" type="bool" default="false" /> <description> Returns a value between 0 and 1 representing the raw intensity of the given action, ignoring the action's deadzone. In most cases, you should use [method get_action_strength] instead. + If [code]exact_match[/code] is [code]false[/code], it ignores the input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. </description> </method> <method name="get_action_strength" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="action" type="StringName"> - </argument> - <argument index="1" name="exact_match" type="bool" default="false"> - </argument> + <return type="float" /> + <argument index="0" name="action" type="StringName" /> + <argument index="1" name="exact_match" type="bool" default="false" /> <description> Returns a value between 0 and 1 representing the intensity of the given action. In a joypad, for example, the further away the axis (analog sticks or L2, R2 triggers) is from the dead zone, the closer the value will be to 1. If the action is mapped to a control that has no axis as the keyboard, the value returned will be 0 or 1. + If [code]exact_match[/code] is [code]false[/code], it ignores the input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. </description> </method> <method name="get_axis" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="negative_action" type="StringName"> - </argument> - <argument index="1" name="positive_action" type="StringName"> - </argument> + <return type="float" /> + <argument index="0" name="negative_action" type="StringName" /> + <argument index="1" name="positive_action" type="StringName" /> <description> Get axis input by specifying two actions, one negative and one positive. This is a shorthand for writing [code]Input.get_action_strength("positive_action") - Input.get_action_strength("negative_action")[/code]. </description> </method> <method name="get_connected_joypads"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns an [Array] containing the device IDs of all currently connected joypads. </description> </method> <method name="get_current_cursor_shape" qualifiers="const"> - <return type="int" enum="Input.CursorShape"> - </return> + <return type="int" enum="Input.CursorShape" /> <description> Returns the currently assigned cursor shape (see [enum CursorShape]). </description> </method> <method name="get_gravity" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns the gravity in m/s² of the device's accelerometer sensor, if the device has one. Otherwise, the method returns [constant Vector3.ZERO]. [b]Note:[/b] This method only works on Android and iOS. On other platforms, it always returns [constant Vector3.ZERO]. </description> </method> <method name="get_gyroscope" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns the rotation rate in rad/s around a device's X, Y, and Z axes of the gyroscope sensor, if the device has one. Otherwise, the method returns [constant Vector3.ZERO]. [b]Note:[/b] This method only works on Android and iOS. On other platforms, it always returns [constant Vector3.ZERO]. </description> </method> <method name="get_joy_axis" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="device" type="int"> - </argument> - <argument index="1" name="axis" type="int" enum="JoyAxis"> - </argument> + <return type="float" /> + <argument index="0" name="device" type="int" /> + <argument index="1" name="axis" type="int" enum="JoyAxis" /> <description> Returns the current value of the joypad axis at given index (see [enum JoyAxis]). </description> </method> <method name="get_joy_guid" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="device" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="device" type="int" /> <description> Returns a SDL2-compatible device GUID on platforms that use gamepad remapping. Returns [code]"Default Gamepad"[/code] otherwise. </description> </method> <method name="get_joy_name"> - <return type="String"> - </return> - <argument index="0" name="device" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="device" type="int" /> <description> Returns the name of the joypad at the specified device index. </description> </method> <method name="get_joy_vibration_duration"> - <return type="float"> - </return> - <argument index="0" name="device" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="device" type="int" /> <description> Returns the duration of the current vibration effect in seconds. </description> </method> <method name="get_joy_vibration_strength"> - <return type="Vector2"> - </return> - <argument index="0" name="device" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="device" type="int" /> <description> Returns the strength of the joypad vibration: x is the strength of the weak motor, and y is the strength of the strong motor. </description> </method> <method name="get_last_mouse_speed" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the mouse speed for the last time the cursor was moved, and this until the next frame where the mouse moves. This means that even if the mouse is not moving, this function will still return the value of the last motion. </description> </method> <method name="get_magnetometer" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns the magnetic field strength in micro-Tesla for all axes of the device's magnetometer sensor, if the device has one. Otherwise, the method returns [constant Vector3.ZERO]. [b]Note:[/b] This method only works on Android, iOS and UWP. On other platforms, it always returns [constant Vector3.ZERO]. </description> </method> <method name="get_mouse_button_mask" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns mouse buttons as a bitmask. If multiple mouse buttons are pressed at the same time, the bits are added together. </description> </method> <method name="get_mouse_mode" qualifiers="const"> - <return type="int" enum="Input.MouseMode"> - </return> + <return type="int" enum="Input.MouseMode" /> <description> Returns the mouse mode. See the constants for more information. </description> </method> <method name="get_vector" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="negative_x" type="StringName"> - </argument> - <argument index="1" name="positive_x" type="StringName"> - </argument> - <argument index="2" name="negative_y" type="StringName"> - </argument> - <argument index="3" name="positive_y" type="StringName"> - </argument> - <argument index="4" name="deadzone" type="float" default="-1.0"> - </argument> - <description> - Get vector input by specifying four actions, two for the X axis and two for the Y axis, negative and positive. + <return type="Vector2" /> + <argument index="0" name="negative_x" type="StringName" /> + <argument index="1" name="positive_x" type="StringName" /> + <argument index="2" name="negative_y" type="StringName" /> + <argument index="3" name="positive_y" type="StringName" /> + <argument index="4" name="deadzone" type="float" default="-1.0" /> + <description> + Gets an input vector by specifying four actions for the positive and negative X and Y axes. This method is useful when getting vector input, such as from a joystick, directional pad, arrows, or WASD. The vector has its length limited to 1 and has a circular deadzone, which is useful for using vector input as movement. By default, the deadzone is automatically calculated from the average of the action deadzones. However, you can override the deadzone to be whatever you want (on the range of 0 to 1). </description> </method> <method name="is_action_just_pressed" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="action" type="StringName"> - </argument> - <argument index="1" name="exact_match" type="bool" default="false"> - </argument> + <return type="bool" /> + <argument index="0" name="action" type="StringName" /> + <argument index="1" name="exact_match" type="bool" default="false" /> <description> Returns [code]true[/code] when the user starts pressing the action event, meaning it's [code]true[/code] only on the frame that the user pressed down the button. This is useful for code that needs to run only once when an action is pressed, instead of every frame while it's pressed. + If [code]exact_match[/code] is [code]false[/code], it ignores the input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. </description> </method> <method name="is_action_just_released" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="action" type="StringName"> - </argument> - <argument index="1" name="exact_match" type="bool" default="false"> - </argument> + <return type="bool" /> + <argument index="0" name="action" type="StringName" /> + <argument index="1" name="exact_match" type="bool" default="false" /> <description> Returns [code]true[/code] when the user stops pressing the action event, meaning it's [code]true[/code] only on the frame that the user released the button. + If [code]exact_match[/code] is [code]false[/code], it ignores the input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. </description> </method> <method name="is_action_pressed" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="action" type="StringName"> - </argument> - <argument index="1" name="exact_match" type="bool" default="false"> - </argument> + <return type="bool" /> + <argument index="0" name="action" type="StringName" /> + <argument index="1" name="exact_match" type="bool" default="false" /> <description> Returns [code]true[/code] if you are pressing the action event. Note that if an action has multiple buttons assigned and more than one of them is pressed, releasing one button will release the action, even if some other button assigned to this action is still pressed. + If [code]exact_match[/code] is [code]false[/code], it ignores the input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. </description> </method> <method name="is_joy_button_pressed" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="device" type="int"> - </argument> - <argument index="1" name="button" type="int" enum="JoyButton"> - </argument> + <return type="bool" /> + <argument index="0" name="device" type="int" /> + <argument index="1" name="button" type="int" enum="JoyButton" /> <description> Returns [code]true[/code] if you are pressing the joypad button (see [enum JoyButton]). </description> </method> <method name="is_joy_known"> - <return type="bool"> - </return> - <argument index="0" name="device" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="device" type="int" /> <description> Returns [code]true[/code] if the system knows the specified device. This means that it sets all button and axis indices. Unknown joypads are not expected to match these constants, but you can still retrieve events from them. </description> </method> <method name="is_key_pressed" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="keycode" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="keycode" type="int" enum="Key" /> <description> Returns [code]true[/code] if you are pressing the key in the current keyboard layout. You can pass a [enum Key] constant. </description> </method> <method name="is_mouse_button_pressed" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="button" type="int" enum="MouseButton"> - </argument> + <return type="bool" /> + <argument index="0" name="button" type="int" enum="MouseButton" /> <description> Returns [code]true[/code] if you are pressing the mouse button specified with [enum MouseButton]. </description> </method> <method name="joy_connection_changed"> - <return type="void"> - </return> - <argument index="0" name="device" type="int"> - </argument> - <argument index="1" name="connected" type="bool"> - </argument> - <argument index="2" name="name" type="String"> - </argument> - <argument index="3" name="guid" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="device" type="int" /> + <argument index="1" name="connected" type="bool" /> + <argument index="2" name="name" type="String" /> + <argument index="3" name="guid" type="String" /> <description> Notifies the [Input] singleton that a connection has changed, to update the state for the [code]device[/code] index. This is used internally and should not have to be called from user scripts. See [signal joy_connection_changed] for the signal emitted when this is triggered internally. </description> </method> <method name="parse_input_event"> - <return type="void"> - </return> - <argument index="0" name="event" type="InputEvent"> - </argument> + <return type="void" /> + <argument index="0" name="event" type="InputEvent" /> <description> Feeds an [InputEvent] to the game. Can be used to artificially trigger input events from code. Also generates [method Node._input] calls. Example: @@ -326,23 +263,17 @@ </description> </method> <method name="remove_joy_mapping"> - <return type="void"> - </return> - <argument index="0" name="guid" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="guid" type="String" /> <description> Removes all mappings from the internal database that match the given GUID. </description> </method> <method name="set_custom_mouse_cursor"> - <return type="void"> - </return> - <argument index="0" name="image" type="Resource"> - </argument> - <argument index="1" name="shape" type="int" enum="Input.CursorShape" default="0"> - </argument> - <argument index="2" name="hotspot" type="Vector2" default="Vector2(0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="image" type="Resource" /> + <argument index="1" name="shape" type="int" enum="Input.CursorShape" default="0" /> + <argument index="2" name="hotspot" type="Vector2" default="Vector2(0, 0)" /> <description> Sets a custom mouse cursor image, which is only visible inside the game window. The hotspot can also be specified. Passing [code]null[/code] to the image parameter resets to the system cursor. See [enum CursorShape] for the list of shapes. [code]image[/code]'s size must be lower than 256×256. @@ -352,10 +283,8 @@ </description> </method> <method name="set_default_cursor_shape"> - <return type="void"> - </return> - <argument index="0" name="shape" type="int" enum="Input.CursorShape" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="shape" type="int" enum="Input.CursorShape" default="0" /> <description> Sets the default cursor shape to be used in the viewport instead of [constant CURSOR_ARROW]. [b]Note:[/b] If you want to change the default cursor shape for [Control]'s nodes, use [member Control.mouse_default_cursor_shape] instead. @@ -363,64 +292,49 @@ </description> </method> <method name="set_mouse_mode"> - <return type="void"> - </return> - <argument index="0" name="mode" type="int" enum="Input.MouseMode"> - </argument> + <return type="void" /> + <argument index="0" name="mode" type="int" enum="Input.MouseMode" /> <description> Sets the mouse mode. See the constants for more information. </description> </method> <method name="set_use_accumulated_input"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enable" type="bool" /> <description> Enables or disables the accumulation of similar input events sent by the operating system. When input accumulation is enabled, all input events generated during a frame will be merged and emitted when the frame is done rendering. Therefore, this limits the number of input method calls per second to the rendering FPS. Input accumulation is enabled by default. It can be disabled to get slightly more precise/reactive input at the cost of increased CPU usage. In applications where drawing freehand lines is required, input accumulation should generally be disabled while the user is drawing the line to get results that closely follow the actual input. </description> </method> <method name="start_joy_vibration"> - <return type="void"> - </return> - <argument index="0" name="device" type="int"> - </argument> - <argument index="1" name="weak_magnitude" type="float"> - </argument> - <argument index="2" name="strong_magnitude" type="float"> - </argument> - <argument index="3" name="duration" type="float" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="device" type="int" /> + <argument index="1" name="weak_magnitude" type="float" /> + <argument index="2" name="strong_magnitude" type="float" /> + <argument index="3" name="duration" type="float" default="0" /> <description> Starts to vibrate the joypad. Joypads usually come with two rumble motors, a strong and a weak one. [code]weak_magnitude[/code] is the strength of the weak motor (between 0 and 1) and [code]strong_magnitude[/code] is the strength of the strong motor (between 0 and 1). [code]duration[/code] is the duration of the effect in seconds (a duration of 0 will try to play the vibration indefinitely). [b]Note:[/b] Not every hardware is compatible with long effect durations; it is recommended to restart an effect if it has to be played for more than a few seconds. </description> </method> <method name="stop_joy_vibration"> - <return type="void"> - </return> - <argument index="0" name="device" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="device" type="int" /> <description> Stops the vibration of the joypad. </description> </method> <method name="vibrate_handheld"> - <return type="void"> - </return> - <argument index="0" name="duration_ms" type="int" default="500"> - </argument> + <return type="void" /> + <argument index="0" name="duration_ms" type="int" default="500" /> <description> Vibrate Android and iOS devices. [b]Note:[/b] It needs [code]VIBRATE[/code] permission for Android at export settings. iOS does not support duration. </description> </method> <method name="warp_mouse_position"> - <return type="void"> - </return> - <argument index="0" name="to" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="to" type="Vector2" /> <description> Sets the mouse position to the specified vector. </description> @@ -428,10 +342,8 @@ </methods> <signals> <signal name="joy_connection_changed"> - <argument index="0" name="device" type="int"> - </argument> - <argument index="1" name="connected" type="bool"> - </argument> + <argument index="0" name="device" type="int" /> + <argument index="1" name="connected" type="bool" /> <description> Emitted when a joypad device has been connected or disconnected. </description> diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml index c28c4c4282..cd14965d1b 100644 --- a/doc/classes/InputEvent.xml +++ b/doc/classes/InputEvent.xml @@ -14,108 +14,87 @@ </tutorials> <methods> <method name="accumulate"> - <return type="bool"> - </return> - <argument index="0" name="with_event" type="InputEvent"> - </argument> + <return type="bool" /> + <argument index="0" name="with_event" type="InputEvent" /> <description> Returns [code]true[/code] if the given input event and this input event can be added together (only for events of type [InputEventMouseMotion]). The given input event's position, global position and speed will be copied. The resulting [code]relative[/code] is a sum of both events. Both events' modifiers have to be identical. </description> </method> <method name="as_text" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns a [String] representation of the event. </description> </method> <method name="get_action_strength" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="action" type="StringName"> - </argument> - <argument index="1" name="exact_match" type="bool" default="false"> - </argument> + <return type="float" /> + <argument index="0" name="action" type="StringName" /> + <argument index="1" name="exact_match" type="bool" default="false" /> <description> Returns a value between 0.0 and 1.0 depending on the given actions' state. Useful for getting the value of events of type [InputEventJoypadMotion]. + If [code]exact_match[/code] is [code]false[/code], it ignores the input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. </description> </method> <method name="is_action" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="action" type="StringName"> - </argument> - <argument index="1" name="exact_match" type="bool" default="false"> - </argument> + <return type="bool" /> + <argument index="0" name="action" type="StringName" /> + <argument index="1" name="exact_match" type="bool" default="false" /> <description> Returns [code]true[/code] if this input event matches a pre-defined action of any type. + If [code]exact_match[/code] is [code]false[/code], it ignores the input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. </description> </method> <method name="is_action_pressed" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="action" type="StringName"> - </argument> - <argument index="1" name="allow_echo" type="bool" default="false"> - </argument> - <argument index="2" name="exact_match" type="bool" default="false"> - </argument> + <return type="bool" /> + <argument index="0" name="action" type="StringName" /> + <argument index="1" name="allow_echo" type="bool" default="false" /> + <argument index="2" name="exact_match" type="bool" default="false" /> <description> Returns [code]true[/code] if the given action is being pressed (and is not an echo event for [InputEventKey] events, unless [code]allow_echo[/code] is [code]true[/code]). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag]. + If [code]exact_match[/code] is [code]false[/code], it ignores the input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. </description> </method> <method name="is_action_released" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="action" type="StringName"> - </argument> - <argument index="1" name="exact_match" type="bool" default="false"> - </argument> + <return type="bool" /> + <argument index="0" name="action" type="StringName" /> + <argument index="1" name="exact_match" type="bool" default="false" /> <description> Returns [code]true[/code] if the given action is released (i.e. not pressed). Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag]. + If [code]exact_match[/code] is [code]false[/code], it ignores the input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. </description> </method> <method name="is_action_type" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if this input event's type is one that can be assigned to an input action. </description> </method> <method name="is_echo" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if this input event is an echo event (only for events of type [InputEventKey]). </description> </method> <method name="is_match" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="event" type="InputEvent"> - </argument> - <argument index="1" name="exact_match" type="bool" default="true"> - </argument> + <return type="bool" /> + <argument index="0" name="event" type="InputEvent" /> + <argument index="1" name="exact_match" type="bool" default="true" /> <description> Returns [code]true[/code] if the specified [code]event[/code] matches this event. Only valid for action events i.e key ([InputEventKey]), button ([InputEventMouseButton] or [InputEventJoypadButton]), axis [InputEventJoypadMotion] or action ([InputEventAction]) events. If [code]exact_match[/code] is [code]false[/code], it ignores the input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. </description> </method> <method name="is_pressed" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if this input event is pressed. Not relevant for events of type [InputEventMouseMotion] or [InputEventScreenDrag]. </description> </method> <method name="xformed_by" qualifiers="const"> - <return type="InputEvent"> - </return> - <argument index="0" name="xform" type="Transform2D"> - </argument> - <argument index="1" name="local_ofs" type="Vector2" default="Vector2(0, 0)"> - </argument> + <return type="InputEvent" /> + <argument index="0" name="xform" type="Transform2D" /> + <argument index="1" name="local_ofs" type="Vector2" default="Vector2(0, 0)" /> <description> Returns a copy of the given input event which has been offset by [code]local_ofs[/code] and transformed by [code]xform[/code]. Relevant for events of type [InputEventMouseButton], [InputEventMouseMotion], [InputEventScreenTouch], [InputEventScreenDrag], [InputEventMagnifyGesture] and [InputEventPanGesture]. </description> diff --git a/doc/classes/InputEventKey.xml b/doc/classes/InputEventKey.xml index 9f2b829823..f670d907fc 100644 --- a/doc/classes/InputEventKey.xml +++ b/doc/classes/InputEventKey.xml @@ -11,16 +11,14 @@ </tutorials> <methods> <method name="get_keycode_with_modifiers" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the keycode combined with modifier keys such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See also [InputEventWithModifiers]. To get a human-readable representation of the [InputEventKey] with modifiers, use [code]OS.get_keycode_string(event.get_keycode_with_modifiers())[/code] where [code]event[/code] is the [InputEventKey]. </description> </method> <method name="get_physical_keycode_with_modifiers" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the physical keycode combined with modifier keys such as [kbd]Shift[/kbd] or [kbd]Alt[/kbd]. See also [InputEventWithModifiers]. To get a human-readable representation of the [InputEventKey] with modifiers, use [code]OS.get_keycode_string(event.get_physical_keycode_with_modifiers())[/code] where [code]event[/code] is the [InputEventKey]. @@ -31,11 +29,11 @@ <member name="echo" type="bool" setter="set_echo" getter="is_echo" default="false"> If [code]true[/code], the key was already pressed before this event. It means the user is holding the key down. </member> - <member name="keycode" type="int" setter="set_keycode" getter="get_keycode" default="0"> + <member name="keycode" type="int" setter="set_keycode" getter="get_keycode" enum="Key" default="0"> The key keycode, which corresponds to one of the [enum Key] constants. Represent key in the current keyboard layout. To get a human-readable representation of the [InputEventKey], use [code]OS.get_keycode_string(event.keycode)[/code] where [code]event[/code] is the [InputEventKey]. </member> - <member name="physical_keycode" type="int" setter="set_physical_keycode" getter="get_physical_keycode" default="0"> + <member name="physical_keycode" type="int" setter="set_physical_keycode" getter="get_physical_keycode" enum="Key" default="0"> Key physical keycode, which corresponds to one of the [enum Key] constants. Represent the physical location of a key on the 101/102-key US QWERTY keyboard. To get a human-readable representation of the [InputEventKey], use [code]OS.get_keycode_string(event.keycode)[/code] where [code]event[/code] is the [InputEventKey]. </member> diff --git a/doc/classes/TextFile.xml b/doc/classes/InputEventShortcut.xml index 1c2c2ff25c..35cca02cf7 100644 --- a/doc/classes/TextFile.xml +++ b/doc/classes/InputEventShortcut.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="TextFile" inherits="Resource" version="4.0"> +<class name="InputEventShortcut" inherits="InputEvent" version="4.0"> <brief_description> </brief_description> <description> @@ -8,6 +8,10 @@ </tutorials> <methods> </methods> + <members> + <member name="shortcut" type="Shortcut" setter="set_shortcut" getter="get_shortcut"> + </member> + </members> <constants> </constants> </class> diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml index 3948ab0208..16c2695613 100644 --- a/doc/classes/InputMap.xml +++ b/doc/classes/InputMap.xml @@ -11,129 +11,99 @@ </tutorials> <methods> <method name="action_add_event"> - <return type="void"> - </return> - <argument index="0" name="action" type="StringName"> - </argument> - <argument index="1" name="event" type="InputEvent"> - </argument> + <return type="void" /> + <argument index="0" name="action" type="StringName" /> + <argument index="1" name="event" type="InputEvent" /> <description> Adds an [InputEvent] to an action. This [InputEvent] will trigger the action. </description> </method> <method name="action_erase_event"> - <return type="void"> - </return> - <argument index="0" name="action" type="StringName"> - </argument> - <argument index="1" name="event" type="InputEvent"> - </argument> + <return type="void" /> + <argument index="0" name="action" type="StringName" /> + <argument index="1" name="event" type="InputEvent" /> <description> Removes an [InputEvent] from an action. </description> </method> <method name="action_erase_events"> - <return type="void"> - </return> - <argument index="0" name="action" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="action" type="StringName" /> <description> Removes all events from an action. </description> </method> <method name="action_get_deadzone"> - <return type="float"> - </return> - <argument index="0" name="action" type="StringName"> - </argument> + <return type="float" /> + <argument index="0" name="action" type="StringName" /> <description> Returns a deadzone value for the action. </description> </method> <method name="action_get_events"> - <return type="Array"> - </return> - <argument index="0" name="action" type="StringName"> - </argument> + <return type="Array" /> + <argument index="0" name="action" type="StringName" /> <description> Returns an array of [InputEvent]s associated with a given action. </description> </method> <method name="action_has_event"> - <return type="bool"> - </return> - <argument index="0" name="action" type="StringName"> - </argument> - <argument index="1" name="event" type="InputEvent"> - </argument> + <return type="bool" /> + <argument index="0" name="action" type="StringName" /> + <argument index="1" name="event" type="InputEvent" /> <description> Returns [code]true[/code] if the action has the given [InputEvent] associated with it. </description> </method> <method name="action_set_deadzone"> - <return type="void"> - </return> - <argument index="0" name="action" type="StringName"> - </argument> - <argument index="1" name="deadzone" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="action" type="StringName" /> + <argument index="1" name="deadzone" type="float" /> <description> Sets a deadzone value for the action. </description> </method> <method name="add_action"> - <return type="void"> - </return> - <argument index="0" name="action" type="StringName"> - </argument> - <argument index="1" name="deadzone" type="float" default="0.5"> - </argument> + <return type="void" /> + <argument index="0" name="action" type="StringName" /> + <argument index="1" name="deadzone" type="float" default="0.5" /> <description> Adds an empty action to the [InputMap] with a configurable [code]deadzone[/code]. An [InputEvent] can then be added to this action with [method action_add_event]. </description> </method> <method name="erase_action"> - <return type="void"> - </return> - <argument index="0" name="action" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="action" type="StringName" /> <description> Removes an action from the [InputMap]. </description> </method> <method name="event_is_action" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="event" type="InputEvent"> - </argument> - <argument index="1" name="action" type="StringName"> - </argument> - <argument index="2" name="exact_match" type="bool" default="false"> - </argument> + <return type="bool" /> + <argument index="0" name="event" type="InputEvent" /> + <argument index="1" name="action" type="StringName" /> + <argument index="2" name="exact_match" type="bool" default="false" /> <description> Returns [code]true[/code] if the given event is part of an existing action. This method ignores keyboard modifiers if the given [InputEvent] is not pressed (for proper release detection). See [method action_has_event] if you don't want this behavior. + If [code]exact_match[/code] is [code]false[/code], it ignores the input modifiers for [InputEventKey] and [InputEventMouseButton] events, and the direction for [InputEventJoypadMotion] events. </description> </method> <method name="get_actions"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns an array of all actions in the [InputMap]. </description> </method> <method name="has_action" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="action" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="action" type="StringName" /> <description> Returns [code]true[/code] if the [InputMap] has a registered action with the given name. </description> </method> <method name="load_from_project_settings"> - <return type="void"> - </return> + <return type="void" /> <description> Clears all [InputEventAction] in the [InputMap] and load it anew from [ProjectSettings]. </description> diff --git a/doc/classes/InstancePlaceholder.xml b/doc/classes/InstancePlaceholder.xml index 934764b461..75892895d7 100644 --- a/doc/classes/InstancePlaceholder.xml +++ b/doc/classes/InstancePlaceholder.xml @@ -11,28 +11,22 @@ </tutorials> <methods> <method name="create_instance"> - <return type="Node"> - </return> - <argument index="0" name="replace" type="bool" default="false"> - </argument> - <argument index="1" name="custom_scene" type="PackedScene" default="null"> - </argument> + <return type="Node" /> + <argument index="0" name="replace" type="bool" default="false" /> + <argument index="1" name="custom_scene" type="PackedScene" default="null" /> <description> Not thread-safe. Use [method Object.call_deferred] if calling from a thread. </description> </method> <method name="get_instance_path" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Gets the path to the [PackedScene] resource file that is loaded by default when calling [method create_instance]. Not thread-safe. Use [method Object.call_deferred] if calling from a thread. </description> </method> <method name="get_stored_values"> - <return type="Dictionary"> - </return> - <argument index="0" name="with_order" type="bool" default="false"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="with_order" type="bool" default="false" /> <description> </description> </method> diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index c639e0b88e..e3e4a9fa7d 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -12,25 +12,18 @@ </tutorials> <methods> <method name="add_icon_item"> - <return type="int"> - </return> - <argument index="0" name="icon" type="Texture2D"> - </argument> - <argument index="1" name="selectable" type="bool" default="true"> - </argument> + <return type="int" /> + <argument index="0" name="icon" type="Texture2D" /> + <argument index="1" name="selectable" type="bool" default="true" /> <description> Adds an item to the item list with no text, only an icon. Returns the index of an added item. </description> </method> <method name="add_item"> - <return type="int"> - </return> - <argument index="0" name="text" type="String"> - </argument> - <argument index="1" name="icon" type="Texture2D" default="null"> - </argument> - <argument index="2" name="selectable" type="bool" default="true"> - </argument> + <return type="int" /> + <argument index="0" name="text" type="String" /> + <argument index="1" name="icon" type="Texture2D" default="null" /> + <argument index="2" name="selectable" type="bool" default="true" /> <description> Adds an item to the item list with specified text. Returns the index of an added item. Specify an [code]icon[/code], or use [code]null[/code] as the [code]icon[/code] for a list item with no icon. @@ -38,433 +31,331 @@ </description> </method> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all items from the list. </description> </method> <method name="clear_item_opentype_features"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> <description> Removes all OpenType features from the item's text. </description> </method> <method name="deselect"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> <description> Ensures the item associated with the specified index is not selected. </description> </method> <method name="deselect_all"> - <return type="void"> - </return> + <return type="void" /> <description> Ensures there are no items selected. </description> </method> <method name="ensure_current_is_visible"> - <return type="void"> - </return> + <return type="void" /> <description> Ensure current selection is visible, adjusting the scroll position as necessary. </description> </method> <method name="get_item_at_position" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="position" type="Vector2"> - </argument> - <argument index="1" name="exact" type="bool" default="false"> - </argument> + <return type="int" /> + <argument index="0" name="position" type="Vector2" /> + <argument index="1" name="exact" type="bool" default="false" /> <description> Returns the item index at the given [code]position[/code]. When there is no item at that point, -1 will be returned if [code]exact[/code] is [code]true[/code], and the closest item index will be returned otherwise. </description> </method> <method name="get_item_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of items currently in the list. </description> </method> <method name="get_item_custom_bg_color" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="idx" type="int" /> <description> Returns the custom background color of the item specified by [code]idx[/code] index. </description> </method> <method name="get_item_custom_fg_color" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="idx" type="int" /> <description> Returns the custom foreground color of the item specified by [code]idx[/code] index. </description> </method> <method name="get_item_icon" qualifiers="const"> - <return type="Texture2D"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Texture2D" /> + <argument index="0" name="idx" type="int" /> <description> Returns the icon associated with the specified index. </description> </method> <method name="get_item_icon_modulate" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="idx" type="int" /> <description> Returns a [Color] modulating item's icon at the specified index. </description> </method> <method name="get_item_icon_region" qualifiers="const"> - <return type="Rect2"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Rect2" /> + <argument index="0" name="idx" type="int" /> <description> Returns the region of item's icon used. The whole icon will be used if the region has no area. </description> </method> <method name="get_item_language" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="idx" type="int" /> <description> Returns item's text language code. </description> </method> <method name="get_item_metadata" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Variant" /> + <argument index="0" name="idx" type="int" /> <description> Returns the metadata value of the specified index. </description> </method> <method name="get_item_opentype_feature" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="tag" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="tag" type="String" /> <description> Returns OpenType feature [code]tag[/code] of the item's text. </description> </method> <method name="get_item_text" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="idx" type="int" /> <description> Returns the text associated with the specified index. </description> </method> <method name="get_item_text_direction" qualifiers="const"> - <return type="int" enum="Control.TextDirection"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="int" enum="Control.TextDirection" /> + <argument index="0" name="idx" type="int" /> <description> Returns item's text base writing direction. </description> </method> <method name="get_item_tooltip" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="idx" type="int" /> <description> Returns the tooltip hint associated with the specified index. </description> </method> <method name="get_selected_items"> - <return type="PackedInt32Array"> - </return> + <return type="PackedInt32Array" /> <description> Returns an array with the indexes of the selected items. </description> </method> <method name="get_v_scroll"> - <return type="VScrollBar"> - </return> + <return type="VScrollBar" /> <description> Returns the [Object] ID associated with the list. </description> </method> <method name="is_anything_selected"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if one or more items are selected. </description> </method> <method name="is_item_disabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="idx" type="int" /> <description> Returns [code]true[/code] if the item at the specified index is disabled. </description> </method> <method name="is_item_icon_transposed" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="idx" type="int" /> <description> Returns [code]true[/code] if the item icon will be drawn transposed, i.e. the X and Y axes are swapped. </description> </method> <method name="is_item_selectable" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="idx" type="int" /> <description> Returns [code]true[/code] if the item at the specified index is selectable. </description> </method> <method name="is_item_tooltip_enabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="idx" type="int" /> <description> Returns [code]true[/code] if the tooltip is enabled for specified item index. </description> </method> <method name="is_selected" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="idx" type="int" /> <description> Returns [code]true[/code] if the item at the specified index is currently selected. </description> </method> <method name="move_item"> - <return type="void"> - </return> - <argument index="0" name="from_idx" type="int"> - </argument> - <argument index="1" name="to_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="from_idx" type="int" /> + <argument index="1" name="to_idx" type="int" /> <description> Moves item from index [code]from_idx[/code] to [code]to_idx[/code]. </description> </method> <method name="remove_item"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> <description> Removes the item specified by [code]idx[/code] index from the list. </description> </method> <method name="select"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="single" type="bool" default="true"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="single" type="bool" default="true" /> <description> Select the item at the specified index. [b]Note:[/b] This method does not trigger the item selection signal. </description> </method> <method name="set_item_custom_bg_color"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="custom_bg_color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="custom_bg_color" type="Color" /> <description> Sets the background color of the item specified by [code]idx[/code] index to the specified [Color]. </description> </method> <method name="set_item_custom_fg_color"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="custom_fg_color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="custom_fg_color" type="Color" /> <description> Sets the foreground color of the item specified by [code]idx[/code] index to the specified [Color]. </description> </method> <method name="set_item_disabled"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="disabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="disabled" type="bool" /> <description> Disables (or enables) the item at the specified index. Disabled items cannot be selected and do not trigger activation signals (when double-clicking or pressing [kbd]Enter[/kbd]). </description> </method> <method name="set_item_icon"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="icon" type="Texture2D"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="icon" type="Texture2D" /> <description> Sets (or replaces) the icon's [Texture2D] associated with the specified index. </description> </method> <method name="set_item_icon_modulate"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="modulate" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="modulate" type="Color" /> <description> Sets a modulating [Color] of the item associated with the specified index. </description> </method> <method name="set_item_icon_region"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="rect" type="Rect2"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="rect" type="Rect2" /> <description> Sets the region of item's icon used. The whole icon will be used if the region has no area. </description> </method> <method name="set_item_icon_transposed"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="transposed" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="transposed" type="bool" /> <description> Sets whether the item icon will be drawn transposed. </description> </method> <method name="set_item_language"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="language" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="language" type="String" /> <description> Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead. </description> </method> <method name="set_item_metadata"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="metadata" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="metadata" type="Variant" /> <description> Sets a value (of any type) to be stored with the item associated with the specified index. </description> </method> <method name="set_item_opentype_feature"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="tag" type="String"> - </argument> - <argument index="2" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="tag" type="String" /> + <argument index="2" name="value" type="int" /> <description> Sets OpenType feature [code]tag[/code] for the item's text. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. </description> </method> <method name="set_item_selectable"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="selectable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="selectable" type="bool" /> <description> Allows or disallows selection of the item associated with the specified index. </description> </method> <method name="set_item_text"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="text" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="text" type="String" /> <description> Sets text of the item associated with the specified index. </description> </method> <method name="set_item_text_direction"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="direction" type="int" enum="Control.TextDirection"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="direction" type="int" enum="Control.TextDirection" /> <description> Sets item's text base writing direction. </description> </method> <method name="set_item_tooltip"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="tooltip" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="tooltip" type="String" /> <description> Sets the tooltip hint for the item associated with the specified index. </description> </method> <method name="set_item_tooltip_enabled"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="enable" type="bool" /> <description> Sets whether the tooltip hint is enabled for specified item index. </description> </method> <method name="sort_items_by_text"> - <return type="void"> - </return> + <return type="void" /> <description> Sorts items in the list by their text. </description> @@ -512,20 +403,20 @@ <member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="ItemList.SelectMode" default="0"> Allows single or multiple item selection. See the [enum SelectMode] constants. </member> + <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextParagraph.OverrunBehavior" default="0"> + Sets the clipping behavior when the text exceeds an item's bounding rectangle. See [enum TextParagraph.OverrunBehavior] for a description of all modes. + </member> </members> <signals> <signal name="item_activated"> - <argument index="0" name="index" type="int"> - </argument> + <argument index="0" name="index" type="int" /> <description> Triggered when specified list item is activated via double-clicking or by pressing [kbd]Enter[/kbd]. </description> </signal> <signal name="item_rmb_selected"> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="at_position" type="Vector2"> - </argument> + <argument index="0" name="index" type="int" /> + <argument index="1" name="at_position" type="Vector2" /> <description> Triggered when specified list item has been selected via right mouse clicking. The click position is also provided to allow appropriate popup of context menus at the correct location. @@ -533,18 +424,15 @@ </description> </signal> <signal name="item_selected"> - <argument index="0" name="index" type="int"> - </argument> + <argument index="0" name="index" type="int" /> <description> Triggered when specified item has been selected. [member allow_reselect] must be enabled to reselect an item. </description> </signal> <signal name="multi_selected"> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="selected" type="bool"> - </argument> + <argument index="0" name="index" type="int" /> + <argument index="1" name="selected" type="bool" /> <description> Triggered when a multiple selection is altered on a list allowing multiple selection. </description> @@ -555,8 +443,7 @@ </description> </signal> <signal name="rmb_clicked"> - <argument index="0" name="at_position" type="Vector2"> - </argument> + <argument index="0" name="at_position" type="Vector2" /> <description> Triggered when a right mouse click is issued within the rect of the list but on empty space. [member allow_rmb_select] must be enabled. @@ -578,55 +465,55 @@ </constant> </constants> <theme_items> - <theme_item name="bg" type="StyleBox"> + <theme_item name="bg" data_type="style" type="StyleBox"> Default [StyleBox] for the [ItemList], i.e. used when the control is not being focused. </theme_item> - <theme_item name="bg_focus" type="StyleBox"> + <theme_item name="bg_focus" data_type="style" type="StyleBox"> [StyleBox] used when the [ItemList] is being focused. </theme_item> - <theme_item name="cursor" type="StyleBox"> + <theme_item name="cursor" data_type="style" type="StyleBox"> [StyleBox] used for the cursor, when the [ItemList] is being focused. </theme_item> - <theme_item name="cursor_unfocused" type="StyleBox"> + <theme_item name="cursor_unfocused" data_type="style" type="StyleBox"> [StyleBox] used for the cursor, when the [ItemList] is not being focused. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> [Font] of the item's text. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.63, 0.63, 0.63, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.63, 0.63, 0.63, 1)"> Default text [Color] of the item. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the item. </theme_item> - <theme_item name="font_selected_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> Text [Color] used when the item is selected. </theme_item> - <theme_item name="font_size" type="int"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the item's text. </theme_item> - <theme_item name="guide_color" type="Color" default="Color(0, 0, 0, 0.1)"> + <theme_item name="guide_color" data_type="color" type="Color" default="Color(0, 0, 0, 0.1)"> [Color] of the guideline. The guideline is a line drawn between each row of items. </theme_item> - <theme_item name="hseparation" type="int" default="4"> + <theme_item name="hseparation" data_type="constant" type="int" default="4"> The horizontal spacing between items. </theme_item> - <theme_item name="icon_margin" type="int" default="4"> + <theme_item name="icon_margin" data_type="constant" type="int" default="4"> The spacing between item's icon and text. </theme_item> - <theme_item name="line_separation" type="int" default="2"> + <theme_item name="line_separation" data_type="constant" type="int" default="2"> The vertical spacing between each line of text. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the item text outline. </theme_item> - <theme_item name="selected" type="StyleBox"> + <theme_item name="selected" data_type="style" type="StyleBox"> [StyleBox] for the selected items, used when the [ItemList] is not being focused. </theme_item> - <theme_item name="selected_focus" type="StyleBox"> + <theme_item name="selected_focus" data_type="style" type="StyleBox"> [StyleBox] for the selected items, used when the [ItemList] is being focused. </theme_item> - <theme_item name="vseparation" type="int" default="2"> + <theme_item name="vseparation" data_type="constant" type="int" default="2"> The vertical spacing between items. </theme_item> </theme_items> diff --git a/doc/classes/JSON.xml b/doc/classes/JSON.xml index b95aaed143..cee7db08e9 100644 --- a/doc/classes/JSON.xml +++ b/doc/classes/JSON.xml @@ -30,48 +30,38 @@ </tutorials> <methods> <method name="get_data" qualifiers="const"> - <return type="Variant"> - </return> + <return type="Variant" /> <description> Returns the [Variant] containing the data of a successful [method parse]. [b]Note:[/b] It will return [code]Null[/code] if the last call to parse was unsuccessful or [method parse] has not yet been called. </description> </method> <method name="get_error_line" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns [code]0[/code] if the last call to [method parse] was successful, or the line number where the parse failed. </description> </method> <method name="get_error_message" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns an empty string if the last call to [method parse] was successful, or the error message if it failed. </description> </method> <method name="parse"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="json_string" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="json_string" type="String" /> <description> Attempts to parse the [code]json_string[/code] provided. Returns an [enum Error]. If the parse was successful, it returns [code]OK[/code] and the result can be retrieved using [method get_data]. If unsuccessful, use [method get_error_line] and [method get_error_message] for identifying the source of the failure. </description> </method> <method name="stringify"> - <return type="String"> - </return> - <argument index="0" name="data" type="Variant"> - </argument> - <argument index="1" name="indent" type="String" default=""""> - </argument> - <argument index="2" name="sort_keys" type="bool" default="true"> - </argument> - <argument index="3" name="full_precision" type="bool" default="false"> - </argument> + <return type="String" /> + <argument index="0" name="data" type="Variant" /> + <argument index="1" name="indent" type="String" default="""" /> + <argument index="2" name="sort_keys" type="bool" default="true" /> + <argument index="3" name="full_precision" type="bool" default="false" /> <description> Converts a [Variant] var to JSON text and returns the result. Useful for serializing data to store or send over the network. [b]Note:[/b] The JSON specification does not define integer or float types, but only a [i]number[/i] type. Therefore, converting a Variant to JSON text will convert all numerical values to [float] types. diff --git a/doc/classes/JSONRPC.xml b/doc/classes/JSONRPC.xml index 1e74159f58..8f1d1581b1 100644 --- a/doc/classes/JSONRPC.xml +++ b/doc/classes/JSONRPC.xml @@ -1,81 +1,78 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="JSONRPC" inherits="Object" version="4.0"> <brief_description> + A helper to handle dictionaries which look like JSONRPC documents. </brief_description> <description> + [url=https://www.jsonrpc.org/]JSON-RPC[/url] is a standard which wraps a method call in a [JSON] object. The object has a particular structure and identifies which method is called, the parameters to that function, and carries an ID to keep track of responses. This class implements that standard on top of [Dictionary]; you will have to convert between a [Dictionary] and [JSON] with other functions. </description> <tutorials> </tutorials> <methods> <method name="make_notification"> - <return type="Dictionary"> - </return> - <argument index="0" name="method" type="String"> - </argument> - <argument index="1" name="params" type="Variant"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="method" type="String" /> + <argument index="1" name="params" type="Variant" /> <description> + Returns a dictionary in the form of a JSON-RPC notification. Notifications are one-shot messages which do not expect a response. + - [code]method[/code]: Name of the method being called. + - [code]params[/code]: An array or dictionary of parameters being passed to the method. </description> </method> <method name="make_request"> - <return type="Dictionary"> - </return> - <argument index="0" name="method" type="String"> - </argument> - <argument index="1" name="params" type="Variant"> - </argument> - <argument index="2" name="id" type="Variant"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="method" type="String" /> + <argument index="1" name="params" type="Variant" /> + <argument index="2" name="id" type="Variant" /> <description> + Returns a dictionary in the form of a JSON-RPC request. Requests are sent to a server with the expectation of a response. The ID field is used for the server to specify which exact request it is responding to. + - [code]method[/code]: Name of the method being called. + - [code]params[/code]: An array or dictionary of parameters being passed to the method. + - [code]id[/code]: Uniquely identifies this request. The server is expected to send a response with the same ID. </description> </method> <method name="make_response"> - <return type="Dictionary"> - </return> - <argument index="0" name="result" type="Variant"> - </argument> - <argument index="1" name="id" type="Variant"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="result" type="Variant" /> + <argument index="1" name="id" type="Variant" /> <description> + When a server has received and processed a request, it is expected to send a response. If you did not want a response then you need to have sent a Notification instead. + - [code]result[/code]: The return value of the function which was called. + - [code]id[/code]: The ID of the request this response is targeted to. </description> </method> <method name="make_response_error" qualifiers="const"> - <return type="Dictionary"> - </return> - <argument index="0" name="code" type="int"> - </argument> - <argument index="1" name="message" type="String"> - </argument> - <argument index="2" name="id" type="Variant" default="null"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="code" type="int" /> + <argument index="1" name="message" type="String" /> + <argument index="2" name="id" type="Variant" default="null" /> <description> + Creates a response which indicates a previous reply has failed in some way. + - [code]code[/code]: The error code corresponding to what kind of error this is. See the [enum ErrorCode] constants. + - [code]message[/code]: A custom message about this error. + - [code]id[/code]: The request this error is a response to. </description> </method> <method name="process_action"> - <return type="Variant"> - </return> - <argument index="0" name="action" type="Variant"> - </argument> - <argument index="1" name="recurse" type="bool" default="false"> - </argument> + <return type="Variant" /> + <argument index="0" name="action" type="Variant" /> + <argument index="1" name="recurse" type="bool" default="false" /> <description> + Given a Dictionary which takes the form of a JSON-RPC request: unpack the request and run it. Methods are resolved by looking at the field called "method" and looking for an equivalently named function in the JSONRPC object. If one is found that method is called. + To add new supported methods extend the JSONRPC class and call [method process_action] on your subclass. + [code]action[/code]: The action to be run, as a Dictionary in the form of a JSON-RPC request or notification. </description> </method> <method name="process_string"> - <return type="String"> - </return> - <argument index="0" name="action" type="String"> - </argument> + <return type="String" /> + <argument index="0" name="action" type="String" /> <description> </description> </method> <method name="set_scope"> - <return type="void"> - </return> - <argument index="0" name="scope" type="String"> - </argument> - <argument index="1" name="target" type="Object"> - </argument> + <return type="void" /> + <argument index="0" name="scope" type="String" /> + <argument index="1" name="target" type="Object" /> <description> </description> </method> @@ -86,6 +83,7 @@ <constant name="INVALID_REQUEST" value="-32600" enum="ErrorCode"> </constant> <constant name="METHOD_NOT_FOUND" value="-32601" enum="ErrorCode"> + A method call was requested but no function of that name existed in the JSONRPC subclass. </constant> <constant name="INVALID_PARAMS" value="-32602" enum="ErrorCode"> </constant> diff --git a/doc/classes/JavaClassWrapper.xml b/doc/classes/JavaClassWrapper.xml index 7bad336af9..90d988f9bb 100644 --- a/doc/classes/JavaClassWrapper.xml +++ b/doc/classes/JavaClassWrapper.xml @@ -8,10 +8,8 @@ </tutorials> <methods> <method name="wrap"> - <return type="JavaClass"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="JavaClass" /> + <argument index="0" name="name" type="String" /> <description> </description> </method> diff --git a/doc/classes/JavaScript.xml b/doc/classes/JavaScript.xml index c87e637ff5..d68b4492c7 100644 --- a/doc/classes/JavaScript.xml +++ b/doc/classes/JavaScript.xml @@ -12,32 +12,24 @@ </tutorials> <methods> <method name="create_callback"> - <return type="JavaScriptObject"> - </return> - <argument index="0" name="callable" type="Callable"> - </argument> + <return type="JavaScriptObject" /> + <argument index="0" name="callable" type="Callable" /> <description> Creates a reference to a [Callable] that can be used as a callback by JavaScript. The reference must be kept until the callback happens, or it won't be called at all. See [JavaScriptObject] for usage. </description> </method> <method name="create_object" qualifiers="vararg"> - <return type="Variant"> - </return> - <argument index="0" name="object" type="String"> - </argument> + <return type="Variant" /> + <argument index="0" name="object" type="String" /> <description> Creates a new JavaScript object using the [code]new[/code] constructor. The [code]object[/code] must a valid property of the JavaScript [code]window[/code]. See [JavaScriptObject] for usage. </description> </method> <method name="download_buffer"> - <return type="void"> - </return> - <argument index="0" name="buffer" type="PackedByteArray"> - </argument> - <argument index="1" name="name" type="String"> - </argument> - <argument index="2" name="mime" type="String" default=""application/octet-stream""> - </argument> + <return type="void" /> + <argument index="0" name="buffer" type="PackedByteArray" /> + <argument index="1" name="name" type="String" /> + <argument index="2" name="mime" type="String" default=""application/octet-stream"" /> <description> Prompts the user to download a file containing the specified [code]buffer[/code]. The file will have the given [code]name[/code] and [code]mime[/code] type. [b]Note:[/b] The browser may override the [url=https://en.wikipedia.org/wiki/Media_type]MIME type[/url] provided based on the file [code]name[/code]'s extension. @@ -46,22 +38,17 @@ </description> </method> <method name="eval"> - <return type="Variant"> - </return> - <argument index="0" name="code" type="String"> - </argument> - <argument index="1" name="use_global_execution_context" type="bool" default="false"> - </argument> + <return type="Variant" /> + <argument index="0" name="code" type="String" /> + <argument index="1" name="use_global_execution_context" type="bool" default="false" /> <description> Execute the string [code]code[/code] as JavaScript code within the browser window. This is a call to the actual global JavaScript function [code]eval()[/code]. If [code]use_global_execution_context[/code] is [code]true[/code], the code will be evaluated in the global execution context. Otherwise, it is evaluated in the execution context of a function within the engine's runtime environment. </description> </method> <method name="get_interface"> - <return type="JavaScriptObject"> - </return> - <argument index="0" name="interface" type="String"> - </argument> + <return type="JavaScriptObject" /> + <argument index="0" name="interface" type="String" /> <description> Returns an interface to a JavaScript object that can be used by scripts. The [code]interface[/code] must be a valid property of the JavaScript [code]window[/code]. The callback must accept a single [Array] argument, which will contain the JavaScript [code]arguments[/code]. See [JavaScriptObject] for usage. </description> diff --git a/doc/classes/KinematicCollision2D.xml b/doc/classes/KinematicCollision2D.xml index d7999f1aa0..721b840e99 100644 --- a/doc/classes/KinematicCollision2D.xml +++ b/doc/classes/KinematicCollision2D.xml @@ -10,6 +10,13 @@ <tutorials> </tutorials> <methods> + <method name="get_angle" qualifiers="const"> + <return type="float" /> + <argument index="0" name="up_direction" type="Vector2" default="Vector2(0, -1)" /> + <description> + The collision angle according to [code]up_direction[/code], which is [code]Vector2.UP[/code] by default. This value is always positive. + </description> + </method> </methods> <members> <member name="collider" type="Object" setter="" getter="get_collider"> diff --git a/doc/classes/KinematicCollision3D.xml b/doc/classes/KinematicCollision3D.xml index abdb5b4f4e..5477736c25 100644 --- a/doc/classes/KinematicCollision3D.xml +++ b/doc/classes/KinematicCollision3D.xml @@ -10,6 +10,13 @@ <tutorials> </tutorials> <methods> + <method name="get_angle" qualifiers="const"> + <return type="float" /> + <argument index="0" name="up_direction" type="Vector3" default="Vector3(0, 1, 0)" /> + <description> + The collision angle according to [code]up_direction[/code], which is [code]Vector3.UP[/code] by default. This value is always positive. + </description> + </method> </methods> <members> <member name="collider" type="Object" setter="" getter="get_collider"> diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index 0789ac9010..3c349e052f 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -4,7 +4,7 @@ Displays plain text in a line or wrapped inside a rectangle. For formatted text, use [RichTextLabel]. </brief_description> <description> - Label displays plain text on the screen. It gives you control over the horizontal and vertical alignment, and can wrap the text inside the node's bounding rectangle. It doesn't support bold, italics or other formatting. For that, use [RichTextLabel] instead. + Label displays plain text on the screen. It gives you control over the horizontal and vertical alignment and can wrap the text inside the node's bounding rectangle. It doesn't support bold, italics, or other formatting. For that, use [RichTextLabel] instead. [b]Note:[/b] Contrarily to most other [Control]s, Label's [member Control.mouse_filter] defaults to [constant Control.MOUSE_FILTER_IGNORE] (i.e. it doesn't react to mouse input events). This implies that a label won't display any configured [member Control.hint_tooltip], unless you change its mouse filter. </description> <tutorials> @@ -12,24 +12,20 @@ </tutorials> <methods> <method name="clear_opentype_features"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all OpenType features. </description> </method> <method name="get_line_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the amount of lines of text the Label has. </description> </method> <method name="get_line_height" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="line" type="int" default="-1"> - </argument> + <return type="int" /> + <argument index="0" name="line" type="int" default="-1" /> <description> Returns the height of the line [code]line[/code]. If [code]line[/code] is set to [code]-1[/code], returns the biggest line height. @@ -37,35 +33,28 @@ </description> </method> <method name="get_opentype_feature" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="tag" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="tag" type="String" /> <description> Returns OpenType feature [code]tag[/code]. </description> </method> <method name="get_total_character_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the total number of printable characters in the text (excluding spaces and newlines). </description> </method> <method name="get_visible_line_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of lines shown. Useful if the [Label]'s height cannot currently display all lines. </description> </method> <method name="set_opentype_feature"> - <return type="void"> - </return> - <argument index="0" name="tag" type="String"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="tag" type="String" /> + <argument index="1" name="value" type="int" /> <description> Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. </description> @@ -75,8 +64,8 @@ <member name="align" type="int" setter="set_align" getter="get_align" enum="Label.Align" default="0"> Controls the text's horizontal align. Supports left, center, right, and fill, or justify. Set it to one of the [enum Align] constants. </member> - <member name="autowrap" type="bool" setter="set_autowrap" getter="has_autowrap" default="false"> - If [code]true[/code], wraps the text inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. + <member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="Label.AutowrapMode" default="0"> + If set to something other than [constant AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, see [enum AutowrapMode]. </member> <member name="clip_text" type="bool" setter="set_clip_text" getter="is_clipping_text" default="false"> If [code]true[/code], the Label only shows the text that fits inside its bounding rectangle and will clip text horizontally. @@ -107,6 +96,9 @@ <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0"> Base text writing direction. </member> + <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="Label.OverrunBehavior" default="0"> + Sets the clipping behavior when the text exceeds the node's bounding rectangle. See [enum OverrunBehavior] for a description of all modes. + </member> <member name="uppercase" type="bool" setter="set_uppercase" getter="is_uppercase" default="false"> If [code]true[/code], all the text displays as UPPERCASE. </member> @@ -142,39 +134,66 @@ <constant name="VALIGN_FILL" value="3" enum="VAlign"> Align the whole text by spreading the rows. </constant> + <constant name="AUTOWRAP_OFF" value="0" enum="AutowrapMode"> + Autowrap is disabled. + </constant> + <constant name="AUTOWRAP_ARBITRARY" value="1" enum="AutowrapMode"> + Wraps the text inside the node's bounding rectangle by allowing to break lines at arbitrary positions, which is useful when very limited space is available. + </constant> + <constant name="AUTOWRAP_WORD" value="2" enum="AutowrapMode"> + Wraps the text inside the node's bounding rectangle by soft-breaking between words. + </constant> + <constant name="AUTOWRAP_WORD_SMART" value="3" enum="AutowrapMode"> + Behaves similarly to [constant AUTOWRAP_WORD], but force-breaks a word if that single word does not fit in one line. + </constant> + <constant name="OVERRUN_NO_TRIMMING" value="0" enum="OverrunBehavior"> + No text trimming is performed. + </constant> + <constant name="OVERRUN_TRIM_CHAR" value="1" enum="OverrunBehavior"> + Trims the text per character. + </constant> + <constant name="OVERRUN_TRIM_WORD" value="2" enum="OverrunBehavior"> + Trims the text per word. + </constant> + <constant name="OVERRUN_TRIM_ELLIPSIS" value="3" enum="OverrunBehavior"> + Trims the text per character and adds an ellipsis to indicate that parts are hidden. + </constant> + <constant name="OVERRUN_TRIM_WORD_ELLIPSIS" value="4" enum="OverrunBehavior"> + Trims the text per word and adds an ellipsis to indicate that parts are hidden. + </constant> </constants> <theme_items> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> [Font] used for the [Label]'s text. </theme_item> - <theme_item name="font_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> Default text [Color] of the [Label]. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The tint of [Font]'s outline. </theme_item> - <theme_item name="font_shadow_color" type="Color" default="Color(0, 0, 0, 0)"> + <theme_item name="font_shadow_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)"> [Color] of the text's shadow effect. </theme_item> - <theme_item name="font_size" type="int"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the [Label]'s text. </theme_item> - <theme_item name="line_spacing" type="int" default="3"> + <theme_item name="line_spacing" data_type="constant" type="int" default="3"> Vertical space between lines in multiline [Label]. </theme_item> - <theme_item name="normal" type="StyleBox"> + <theme_item name="normal" data_type="style" type="StyleBox"> Background [StyleBox] for the [Label]. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> Text outline size. </theme_item> - <theme_item name="shadow_offset_x" type="int" default="1"> + <theme_item name="shadow_offset_x" data_type="constant" type="int" default="1"> The horizontal offset of the text's shadow. </theme_item> - <theme_item name="shadow_offset_y" type="int" default="1"> + <theme_item name="shadow_offset_y" data_type="constant" type="int" default="1"> The vertical offset of the text's shadow. </theme_item> - <theme_item name="shadow_outline_size" type="int" default="1"> + <theme_item name="shadow_outline_size" data_type="constant" type="int" default="1"> Shadow outline size. If set to 1 or greater, the shadow will be displayed around the whole text as an outline. </theme_item> </theme_items> diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml index 0e71f29b58..918e8a5c8a 100644 --- a/doc/classes/Light2D.xml +++ b/doc/classes/Light2D.xml @@ -12,16 +12,13 @@ </tutorials> <methods> <method name="get_height" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> </description> </method> <method name="set_height"> - <return type="void"> - </return> - <argument index="0" name="height" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="height" type="float" /> <description> </description> </method> diff --git a/doc/classes/Light3D.xml b/doc/classes/Light3D.xml index 815d20223d..cd2f4eca18 100644 --- a/doc/classes/Light3D.xml +++ b/doc/classes/Light3D.xml @@ -12,21 +12,16 @@ </tutorials> <methods> <method name="get_param" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="param" type="int" enum="Light3D.Param"> - </argument> + <return type="float" /> + <argument index="0" name="param" type="int" enum="Light3D.Param" /> <description> Returns the value of the specified [enum Light3D.Param] parameter. </description> </method> <method name="set_param"> - <return type="void"> - </return> - <argument index="0" name="param" type="int" enum="Light3D.Param"> - </argument> - <argument index="1" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="param" type="int" enum="Light3D.Param" /> + <argument index="1" name="value" type="float" /> <description> Sets the value of the specified [enum Light3D.Param] parameter. </description> @@ -66,7 +61,7 @@ <member name="light_specular" type="float" setter="set_param" getter="get_param" default="0.5"> The intensity of the specular blob in objects affected by the light. At [code]0[/code], the light becomes a pure diffuse light. When not baking emission, this can be used to avoid unrealistic reflections when placing lights above an emissive surface. </member> - <member name="shadow_bias" type="float" setter="set_param" getter="get_param" default="0.1"> + <member name="shadow_bias" type="float" setter="set_param" getter="get_param" default="0.2"> Used to adjust shadow appearance. Too small a value results in self-shadowing ("shadow acne"), while too large a value causes shadows to separate from casters ("peter-panning"). Adjust as needed. </member> <member name="shadow_blur" type="float" setter="set_param" getter="get_param" default="1.0"> @@ -80,7 +75,7 @@ </member> <member name="shadow_fog_fade" type="float" setter="set_param" getter="get_param" default="0.1"> </member> - <member name="shadow_normal_bias" type="float" setter="set_param" getter="get_param" default="2.0"> + <member name="shadow_normal_bias" type="float" setter="set_param" getter="get_param" default="1.0"> Offsets the lookup into the shadow map by the object's normal. This can be used to reduce self-shadowing artifacts without using [member shadow_bias]. In practice, this value should be tweaked along with [member shadow_bias] to reduce artifacts as much as possible. </member> <member name="shadow_reverse_cull_face" type="bool" setter="set_shadow_reverse_cull_face" getter="get_shadow_reverse_cull_face" default="false"> diff --git a/doc/classes/LightmapGIData.xml b/doc/classes/LightmapGIData.xml index 3a37c6dcb7..c577439c8f 100644 --- a/doc/classes/LightmapGIData.xml +++ b/doc/classes/LightmapGIData.xml @@ -8,50 +8,38 @@ </tutorials> <methods> <method name="add_user"> - <return type="void"> - </return> - <argument index="0" name="path" type="NodePath"> - </argument> - <argument index="1" name="uv_scale" type="Rect2"> - </argument> - <argument index="2" name="slice_index" type="int"> - </argument> - <argument index="3" name="sub_instance" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="path" type="NodePath" /> + <argument index="1" name="uv_scale" type="Rect2" /> + <argument index="2" name="slice_index" type="int" /> + <argument index="3" name="sub_instance" type="int" /> <description> </description> </method> <method name="clear_users"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> <method name="get_user_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> <method name="get_user_path" qualifiers="const"> - <return type="NodePath"> - </return> - <argument index="0" name="user_idx" type="int"> - </argument> + <return type="NodePath" /> + <argument index="0" name="user_idx" type="int" /> <description> </description> </method> <method name="is_using_spherical_harmonics" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> </description> </method> <method name="set_uses_spherical_harmonics"> - <return type="void"> - </return> - <argument index="0" name="uses_spherical_harmonics" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="uses_spherical_harmonics" type="bool" /> <description> </description> </method> diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml index 587d5833b9..4d9abbbb19 100644 --- a/doc/classes/Line2D.xml +++ b/doc/classes/Line2D.xml @@ -12,56 +12,44 @@ </tutorials> <methods> <method name="add_point"> - <return type="void"> - </return> - <argument index="0" name="position" type="Vector2"> - </argument> - <argument index="1" name="at_position" type="int" default="-1"> - </argument> + <return type="void" /> + <argument index="0" name="position" type="Vector2" /> + <argument index="1" name="at_position" type="int" default="-1" /> <description> Adds a point at the [code]position[/code]. Appends the point at the end of the line. If [code]at_position[/code] is given, the point is inserted before the point number [code]at_position[/code], moving that point (and every point after) after the inserted point. If [code]at_position[/code] is not given, or is an illegal value ([code]at_position < 0[/code] or [code]at_position >= [method get_point_count][/code]), the point will be appended at the end of the point list. </description> </method> <method name="clear_points"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all points from the line. </description> </method> <method name="get_point_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the Line2D's amount of points. </description> </method> <method name="get_point_position" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="i" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="i" type="int" /> <description> Returns point [code]i[/code]'s position. </description> </method> <method name="remove_point"> - <return type="void"> - </return> - <argument index="0" name="i" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="i" type="int" /> <description> Removes the point at index [code]i[/code] from the line. </description> </method> <method name="set_point_position"> - <return type="void"> - </return> - <argument index="0" name="i" type="int"> - </argument> - <argument index="1" name="position" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="i" type="int" /> + <argument index="1" name="position" type="Vector2" /> <description> Overwrites the position in point [code]i[/code] with the supplied [code]position[/code]. </description> @@ -70,6 +58,7 @@ <members> <member name="antialiased" type="bool" setter="set_antialiased" getter="get_antialiased" default="false"> If [code]true[/code], the line's border will be anti-aliased. + [b]Note:[/b] Line2D is not accelerated by batching when being anti-aliased. </member> <member name="begin_cap_mode" type="int" setter="set_begin_cap_mode" getter="get_begin_cap_mode" enum="Line2D.LineCapMode" default="0"> Controls the style of the line's first point. Use [enum LineCapMode] constants. diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index 773f7b1a02..834b5a41db 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -32,92 +32,80 @@ </tutorials> <methods> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> Erases the [LineEdit]'s [member text]. </description> </method> <method name="clear_opentype_features"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all OpenType features. </description> </method> <method name="delete_char_at_caret"> - <return type="void"> - </return> + <return type="void" /> <description> Deletes one character at the caret's current position (equivalent to pressing [kbd]Delete[/kbd]). </description> </method> <method name="delete_text"> - <return type="void"> - </return> - <argument index="0" name="from_column" type="int"> - </argument> - <argument index="1" name="to_column" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="from_column" type="int" /> + <argument index="1" name="to_column" type="int" /> <description> Deletes a section of the [member text] going from position [code]from_column[/code] to [code]to_column[/code]. Both parameters should be within the text's length. </description> </method> <method name="deselect"> - <return type="void"> - </return> + <return type="void" /> <description> Clears the current selection. </description> </method> <method name="get_menu" qualifiers="const"> - <return type="PopupMenu"> - </return> + <return type="PopupMenu" /> <description> Returns the [PopupMenu] of this [LineEdit]. By default, this menu is displayed when right-clicking on the [LineEdit]. </description> </method> <method name="get_opentype_feature" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="tag" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="tag" type="String" /> <description> Returns OpenType feature [code]tag[/code]. </description> </method> <method name="get_scroll_offset" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the scroll offset due to [member caret_column], as a number of characters. </description> </method> <method name="insert_text_at_caret"> - <return type="void"> - </return> - <argument index="0" name="text" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="text" type="String" /> <description> Inserts [code]text[/code] at the caret. If the resulting value is longer than [member max_length], nothing happens. </description> </method> + <method name="is_menu_visible" qualifiers="const"> + <return type="bool" /> + <description> + Returns whether the menu is visible. Use this instead of [code]get_menu().visible[/code] to improve performance (so the creation of the menu is avoided). + </description> + </method> <method name="menu_option"> - <return type="void"> - </return> - <argument index="0" name="option" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="option" type="int" /> <description> Executes a given action as defined in the [enum MenuItems] enum. </description> </method> <method name="select"> - <return type="void"> - </return> - <argument index="0" name="from" type="int" default="0"> - </argument> - <argument index="1" name="to" type="int" default="-1"> - </argument> + <return type="void" /> + <argument index="0" name="from" type="int" default="0" /> + <argument index="1" name="to" type="int" default="-1" /> <description> Selects characters inside [LineEdit] between [code]from[/code] and [code]to[/code]. By default, [code]from[/code] is at the beginning and [code]to[/code] at the end. [codeblocks] @@ -137,19 +125,15 @@ </description> </method> <method name="select_all"> - <return type="void"> - </return> + <return type="void" /> <description> Selects the whole [String]. </description> </method> <method name="set_opentype_feature"> - <return type="void"> - </return> - <argument index="0" name="tag" type="String"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="tag" type="String" /> + <argument index="1" name="value" type="int" /> <description> Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. </description> @@ -260,22 +244,19 @@ </members> <signals> <signal name="text_change_rejected"> - <argument index="0" name="rejected_substring" type="String"> - </argument> + <argument index="0" name="rejected_substring" type="String" /> <description> Emitted when appending text that overflows the [member max_length]. The appended text is truncated to fit [member max_length], and the part that couldn't fit is passed as the [code]rejected_substring[/code] argument. </description> </signal> <signal name="text_changed"> - <argument index="0" name="new_text" type="String"> - </argument> + <argument index="0" name="new_text" type="String" /> <description> Emitted when the text changes. </description> </signal> <signal name="text_submitted"> - <argument index="0" name="new_text" type="String"> - </argument> + <argument index="0" name="new_text" type="String" /> <description> Emitted when the user presses [constant KEY_ENTER] on the [LineEdit]. </description> @@ -384,52 +365,52 @@ </constant> </constants> <theme_items> - <theme_item name="caret_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> + <theme_item name="caret_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> Color of the [LineEdit]'s caret (text cursor). </theme_item> - <theme_item name="clear" type="Texture2D"> + <theme_item name="clear" data_type="icon" type="Texture2D"> Texture for the clear button. See [member clear_button_enabled]. </theme_item> - <theme_item name="clear_button_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="clear_button_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> Color used as default tint for the clear button. </theme_item> - <theme_item name="clear_button_color_pressed" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="clear_button_color_pressed" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> Color used for the clear button when it's pressed. </theme_item> - <theme_item name="focus" type="StyleBox"> + <theme_item name="focus" data_type="style" type="StyleBox"> Background used when [LineEdit] has GUI focus. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> Font used for the text. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> Default font color. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [LineEdit]. </theme_item> - <theme_item name="font_selected_color" type="Color" default="Color(0, 0, 0, 1)"> + <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> Font color for selected text (inside the selection rectangle). </theme_item> - <theme_item name="font_size" type="int"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the [LineEdit]'s text. </theme_item> - <theme_item name="font_uneditable_color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)"> + <theme_item name="font_uneditable_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)"> Font color when editing is disabled. </theme_item> - <theme_item name="minimum_character_width" type="int" default="4"> + <theme_item name="minimum_character_width" data_type="constant" type="int" default="4"> Minimum horizontal space for the text (not counting the clear button and content margins). This value is measured in count of 'M' characters (i.e. this amount of 'M' characters can be displayed without scrolling). </theme_item> - <theme_item name="normal" type="StyleBox"> + <theme_item name="normal" data_type="style" type="StyleBox"> Default background for the [LineEdit]. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. </theme_item> - <theme_item name="read_only" type="StyleBox"> + <theme_item name="read_only" data_type="style" type="StyleBox"> Background used when [LineEdit] is in read-only mode ([member editable] is set to [code]false[/code]). </theme_item> - <theme_item name="selection_color" type="Color" default="Color(0.49, 0.49, 0.49, 1)"> + <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)"> Color of the selection rectangle. </theme_item> </theme_items> diff --git a/doc/classes/LinkButton.xml b/doc/classes/LinkButton.xml index 51b20cd04d..e4445e9076 100644 --- a/doc/classes/LinkButton.xml +++ b/doc/classes/LinkButton.xml @@ -11,28 +11,22 @@ </tutorials> <methods> <method name="clear_opentype_features"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all OpenType features. </description> </method> <method name="get_opentype_feature" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="tag" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="tag" type="String" /> <description> Returns OpenType feature [code]tag[/code]. </description> </method> <method name="set_opentype_feature"> - <return type="void"> - </return> - <argument index="0" name="tag" type="String"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="tag" type="String" /> + <argument index="1" name="value" type="int" /> <description> Returns OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. </description> @@ -72,31 +66,31 @@ </constant> </constants> <theme_items> - <theme_item name="focus" type="StyleBox"> + <theme_item name="focus" data_type="style" type="StyleBox"> [StyleBox] used when the [LinkButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> [Font] of the [LinkButton]'s text. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> Default text [Color] of the [LinkButton]. </theme_item> - <theme_item name="font_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> + <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> Text [Color] used when the [LinkButton] is being hovered. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [LinkButton]. </theme_item> - <theme_item name="font_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> Text [Color] used when the [LinkButton] is being pressed. </theme_item> - <theme_item name="font_size" type="int"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the [LinkButton]'s text. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. </theme_item> - <theme_item name="underline_spacing" type="int" default="2"> + <theme_item name="underline_spacing" data_type="constant" type="int" default="2"> The vertical space between the baseline of text and the underline. </theme_item> </theme_items> diff --git a/doc/classes/Listener3D.xml b/doc/classes/Listener3D.xml index b2fcbe534d..9cc803f241 100644 --- a/doc/classes/Listener3D.xml +++ b/doc/classes/Listener3D.xml @@ -11,30 +11,26 @@ </tutorials> <methods> <method name="clear_current"> - <return type="void"> - </return> + <return type="void" /> <description> Disables the listener to use the current camera's listener instead. </description> </method> <method name="get_listener_transform" qualifiers="const"> - <return type="Transform3D"> - </return> + <return type="Transform3D" /> <description> Returns the listener's global orthonormalized [Transform3D]. </description> </method> <method name="is_current" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the listener was made current using [method make_current], [code]false[/code] otherwise. [b]Note:[/b] There may be more than one Listener3D marked as "current" in the scene tree, but only the one that was made current last will be used. </description> </method> <method name="make_current"> - <return type="void"> - </return> + <return type="void" /> <description> Enables the listener. This will override the current camera's listener. </description> diff --git a/doc/classes/MainLoop.xml b/doc/classes/MainLoop.xml index 537ecf2b2b..11124a1436 100644 --- a/doc/classes/MainLoop.xml +++ b/doc/classes/MainLoop.xml @@ -45,34 +45,28 @@ </tutorials> <methods> <method name="_finalize" qualifiers="virtual"> - <return type="void"> - </return> + <return type="void" /> <description> Called before the program exits. </description> </method> <method name="_initialize" qualifiers="virtual"> - <return type="void"> - </return> + <return type="void" /> <description> Called once during initialization. </description> </method> <method name="_physics_process" qualifiers="virtual"> - <return type="bool"> - </return> - <argument index="0" name="delta" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="delta" type="float" /> <description> Called each physics frame with the time since the last physics frame as argument ([code]delta[/code], in seconds). Equivalent to [method Node._physics_process]. If implemented, the method must return a boolean value. [code]true[/code] ends the main loop, while [code]false[/code] lets it proceed to the next frame. </description> </method> <method name="_process" qualifiers="virtual"> - <return type="bool"> - </return> - <argument index="0" name="delta" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="delta" type="float" /> <description> Called each process (idle) frame with the time since the last process frame as argument (in seconds). Equivalent to [method Node._process]. If implemented, the method must return a boolean value. [code]true[/code] ends the main loop, while [code]false[/code] lets it proceed to the next frame. @@ -81,10 +75,8 @@ </methods> <signals> <signal name="on_request_permissions_result"> - <argument index="0" name="permission" type="String"> - </argument> - <argument index="1" name="granted" type="bool"> - </argument> + <argument index="0" name="permission" type="String" /> + <argument index="1" name="granted" type="bool" /> <description> Emitted when a user responds to a permission request. </description> diff --git a/doc/classes/MarginContainer.xml b/doc/classes/MarginContainer.xml index a51632d5f1..419857c13f 100644 --- a/doc/classes/MarginContainer.xml +++ b/doc/classes/MarginContainer.xml @@ -32,16 +32,16 @@ <constants> </constants> <theme_items> - <theme_item name="margin_bottom" type="int" default="0"> + <theme_item name="margin_bottom" data_type="constant" type="int" default="0"> All direct children of [MarginContainer] will have a bottom margin of [code]margin_bottom[/code] pixels. </theme_item> - <theme_item name="margin_left" type="int" default="0"> + <theme_item name="margin_left" data_type="constant" type="int" default="0"> All direct children of [MarginContainer] will have a left margin of [code]margin_left[/code] pixels. </theme_item> - <theme_item name="margin_right" type="int" default="0"> + <theme_item name="margin_right" data_type="constant" type="int" default="0"> All direct children of [MarginContainer] will have a right margin of [code]margin_right[/code] pixels. </theme_item> - <theme_item name="margin_top" type="int" default="0"> + <theme_item name="margin_top" data_type="constant" type="int" default="0"> All direct children of [MarginContainer] will have a top margin of [code]margin_top[/code] pixels. </theme_item> </theme_items> diff --git a/doc/classes/Marshalls.xml b/doc/classes/Marshalls.xml index 4250ffd700..0f36dd11ca 100644 --- a/doc/classes/Marshalls.xml +++ b/doc/classes/Marshalls.xml @@ -10,60 +10,46 @@ </tutorials> <methods> <method name="base64_to_raw"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="base64_str" type="String"> - </argument> + <return type="PackedByteArray" /> + <argument index="0" name="base64_str" type="String" /> <description> Returns a decoded [PackedByteArray] corresponding to the Base64-encoded string [code]base64_str[/code]. </description> </method> <method name="base64_to_utf8"> - <return type="String"> - </return> - <argument index="0" name="base64_str" type="String"> - </argument> + <return type="String" /> + <argument index="0" name="base64_str" type="String" /> <description> Returns a decoded string corresponding to the Base64-encoded string [code]base64_str[/code]. </description> </method> <method name="base64_to_variant"> - <return type="Variant"> - </return> - <argument index="0" name="base64_str" type="String"> - </argument> - <argument index="1" name="allow_objects" type="bool" default="false"> - </argument> + <return type="Variant" /> + <argument index="0" name="base64_str" type="String" /> + <argument index="1" name="allow_objects" type="bool" default="false" /> <description> Returns a decoded [Variant] corresponding to the Base64-encoded string [code]base64_str[/code]. If [code]allow_objects[/code] is [code]true[/code], decoding objects is allowed. [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. </description> </method> <method name="raw_to_base64"> - <return type="String"> - </return> - <argument index="0" name="array" type="PackedByteArray"> - </argument> + <return type="String" /> + <argument index="0" name="array" type="PackedByteArray" /> <description> Returns a Base64-encoded string of a given [PackedByteArray]. </description> </method> <method name="utf8_to_base64"> - <return type="String"> - </return> - <argument index="0" name="utf8_str" type="String"> - </argument> + <return type="String" /> + <argument index="0" name="utf8_str" type="String" /> <description> Returns a Base64-encoded string of the UTF-8 string [code]utf8_str[/code]. </description> </method> <method name="variant_to_base64"> - <return type="String"> - </return> - <argument index="0" name="variant" type="Variant"> - </argument> - <argument index="1" name="full_objects" type="bool" default="false"> - </argument> + <return type="String" /> + <argument index="0" name="variant" type="Variant" /> + <argument index="1" name="full_objects" type="bool" default="false" /> <description> Returns a Base64-encoded string of the [Variant] [code]variant[/code]. If [code]full_objects[/code] is [code]true[/code], encoding objects is allowed (and can potentially include code). </description> diff --git a/doc/classes/Material.xml b/doc/classes/Material.xml index 0d287a5d1d..a3e98228c6 100644 --- a/doc/classes/Material.xml +++ b/doc/classes/Material.xml @@ -12,8 +12,7 @@ </tutorials> <methods> <method name="inspect_native_shader_code"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> diff --git a/doc/classes/MenuButton.xml b/doc/classes/MenuButton.xml index 3b37853d70..1c7e6f1f19 100644 --- a/doc/classes/MenuButton.xml +++ b/doc/classes/MenuButton.xml @@ -12,17 +12,14 @@ </tutorials> <methods> <method name="get_popup" qualifiers="const"> - <return type="PopupMenu"> - </return> + <return type="PopupMenu" /> <description> Returns the [PopupMenu] contained in this button. </description> </method> <method name="set_disable_shortcuts"> - <return type="void"> - </return> - <argument index="0" name="disabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="disabled" type="bool" /> <description> If [code]true[/code], shortcuts are disabled and cannot be used to trigger the button. </description> @@ -47,46 +44,46 @@ <constants> </constants> <theme_items> - <theme_item name="disabled" type="StyleBox"> + <theme_item name="disabled" data_type="style" type="StyleBox"> [StyleBox] used when the [MenuButton] is disabled. </theme_item> - <theme_item name="focus" type="StyleBox"> + <theme_item name="focus" data_type="style" type="StyleBox"> [StyleBox] used when the [MenuButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> [Font] of the [MenuButton]'s text. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> Default text [Color] of the [MenuButton]. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color(1, 1, 1, 0.3)"> + <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(1, 1, 1, 0.3)"> Text [Color] used when the [MenuButton] is disabled. </theme_item> - <theme_item name="font_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> + <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> Text [Color] used when the [MenuButton] is being hovered. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [MenuButton]. </theme_item> - <theme_item name="font_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> Text [Color] used when the [MenuButton] is being pressed. </theme_item> - <theme_item name="font_size" type="int"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the [MenuButton]'s text. </theme_item> - <theme_item name="hover" type="StyleBox"> + <theme_item name="hover" data_type="style" type="StyleBox"> [StyleBox] used when the [MenuButton] is being hovered. </theme_item> - <theme_item name="hseparation" type="int" default="3"> + <theme_item name="hseparation" data_type="constant" type="int" default="3"> The horizontal space between [MenuButton]'s icon and text. </theme_item> - <theme_item name="normal" type="StyleBox"> + <theme_item name="normal" data_type="style" type="StyleBox"> Default [StyleBox] for the [MenuButton]. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. </theme_item> - <theme_item name="pressed" type="StyleBox"> + <theme_item name="pressed" data_type="style" type="StyleBox"> [StyleBox] used when the [MenuButton] is being pressed. </theme_item> </theme_items> diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index 3bbdfbe62e..bfa55c2d35 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -14,92 +14,79 @@ </tutorials> <methods> <method name="create_convex_shape" qualifiers="const"> - <return type="Shape3D"> - </return> + <return type="Shape3D" /> + <argument index="0" name="clean" type="bool" default="true" /> + <argument index="1" name="simplify" type="bool" default="false" /> <description> Calculate a [ConvexPolygonShape3D] from the mesh. + If [code]clean[/code] is [code]true[/code] (default), duplicate and interior vertices are removed automatically. You can set it to [code]false[/code] to make the process faster if not needed. + If [code]simplify[/code] is [code]true[/code], the geometry can be further simplified to reduce the amount of vertices. Disabled by default. </description> </method> <method name="create_outline" qualifiers="const"> - <return type="Mesh"> - </return> - <argument index="0" name="margin" type="float"> - </argument> + <return type="Mesh" /> + <argument index="0" name="margin" type="float" /> <description> Calculate an outline mesh at a defined offset (margin) from the original mesh. [b]Note:[/b] This method typically returns the vertices in reverse order (e.g. clockwise to counterclockwise). </description> </method> <method name="create_trimesh_shape" qualifiers="const"> - <return type="Shape3D"> - </return> + <return type="Shape3D" /> <description> Calculate a [ConcavePolygonShape3D] from the mesh. </description> </method> <method name="generate_triangle_mesh" qualifiers="const"> - <return type="TriangleMesh"> - </return> + <return type="TriangleMesh" /> <description> Generate a [TriangleMesh] from the mesh. </description> </method> <method name="get_aabb" qualifiers="const"> - <return type="AABB"> - </return> + <return type="AABB" /> <description> Returns the smallest [AABB] enclosing this mesh in local space. Not affected by [code]custom_aabb[/code]. See also [method VisualInstance3D.get_transformed_aabb]. [b]Note:[/b] This is only implemented for [ArrayMesh] and [PrimitiveMesh]. </description> </method> <method name="get_faces" qualifiers="const"> - <return type="PackedVector3Array"> - </return> + <return type="PackedVector3Array" /> <description> Returns all the vertices that make up the faces of the mesh. Each three vertices represent one triangle. </description> </method> <method name="get_surface_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the amount of surfaces that the [Mesh] holds. </description> </method> <method name="surface_get_arrays" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="surf_idx" type="int"> - </argument> + <return type="Array" /> + <argument index="0" name="surf_idx" type="int" /> <description> Returns the arrays for the vertices, normals, uvs, etc. that make up the requested surface (see [method ArrayMesh.add_surface_from_arrays]). </description> </method> <method name="surface_get_blend_shape_arrays" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="surf_idx" type="int"> - </argument> + <return type="Array" /> + <argument index="0" name="surf_idx" type="int" /> <description> Returns the blend shape arrays for the requested surface. </description> </method> <method name="surface_get_material" qualifiers="const"> - <return type="Material"> - </return> - <argument index="0" name="surf_idx" type="int"> - </argument> + <return type="Material" /> + <argument index="0" name="surf_idx" type="int" /> <description> Returns a [Material] in a given surface. Surface is rendered using this material. </description> </method> <method name="surface_set_material"> - <return type="void"> - </return> - <argument index="0" name="surf_idx" type="int"> - </argument> - <argument index="1" name="material" type="Material"> - </argument> + <return type="void" /> + <argument index="0" name="surf_idx" type="int" /> + <argument index="1" name="material" type="Material" /> <description> Sets a [Material] for a given surface. Surface will be rendered using this material. </description> diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml index c0ee1e1956..338deed0be 100644 --- a/doc/classes/MeshDataTool.xml +++ b/doc/classes/MeshDataTool.xml @@ -52,366 +52,281 @@ </tutorials> <methods> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> Clears all data currently in MeshDataTool. </description> </method> <method name="commit_to_surface"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="mesh" type="ArrayMesh"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="mesh" type="ArrayMesh" /> <description> Adds a new surface to specified [Mesh] with edited data. </description> </method> <method name="create_from_surface"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="mesh" type="ArrayMesh"> - </argument> - <argument index="1" name="surface" type="int"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="mesh" type="ArrayMesh" /> + <argument index="1" name="surface" type="int" /> <description> Uses specified surface of given [Mesh] to populate data for MeshDataTool. Requires [Mesh] with primitive type [constant Mesh.PRIMITIVE_TRIANGLES]. </description> </method> <method name="get_edge_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of edges in this [Mesh]. </description> </method> <method name="get_edge_faces" qualifiers="const"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="idx" type="int" /> <description> Returns array of faces that touch given edge. </description> </method> <method name="get_edge_meta" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Variant" /> + <argument index="0" name="idx" type="int" /> <description> Returns meta information assigned to given edge. </description> </method> <method name="get_edge_vertex" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="vertex" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="vertex" type="int" /> <description> Returns index of specified vertex connected to given edge. Vertex argument can only be 0 or 1 because edges are comprised of two vertices. </description> </method> <method name="get_face_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of faces in this [Mesh]. </description> </method> <method name="get_face_edge" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="edge" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="edge" type="int" /> <description> Returns specified edge associated with given face. Edge argument must 2 or less because a face only has three edges. </description> </method> <method name="get_face_meta" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Variant" /> + <argument index="0" name="idx" type="int" /> <description> Returns the metadata associated with the given face. </description> </method> <method name="get_face_normal" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Vector3" /> + <argument index="0" name="idx" type="int" /> <description> Calculates and returns the face normal of the given face. </description> </method> <method name="get_face_vertex" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="vertex" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="vertex" type="int" /> <description> Returns the specified vertex of the given face. Vertex argument must be 2 or less because faces contain three vertices. </description> </method> <method name="get_format" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the [Mesh]'s format. Format is an integer made up of [Mesh] format flags combined together. For example, a mesh containing both vertices and normals would return a format of [code]3[/code] because [constant Mesh.ARRAY_FORMAT_VERTEX] is [code]1[/code] and [constant Mesh.ARRAY_FORMAT_NORMAL] is [code]2[/code]. See [enum Mesh.ArrayFormat] for a list of format flags. </description> </method> <method name="get_material" qualifiers="const"> - <return type="Material"> - </return> + <return type="Material" /> <description> Returns the material assigned to the [Mesh]. </description> </method> <method name="get_vertex" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Vector3" /> + <argument index="0" name="idx" type="int" /> <description> Returns the vertex at given index. </description> </method> <method name="get_vertex_bones" qualifiers="const"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="idx" type="int" /> <description> Returns the bones of the given vertex. </description> </method> <method name="get_vertex_color" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="idx" type="int" /> <description> Returns the color of the given vertex. </description> </method> <method name="get_vertex_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the total number of vertices in [Mesh]. </description> </method> <method name="get_vertex_edges" qualifiers="const"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="idx" type="int" /> <description> Returns an array of edges that share the given vertex. </description> </method> <method name="get_vertex_faces" qualifiers="const"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="idx" type="int" /> <description> Returns an array of faces that share the given vertex. </description> </method> <method name="get_vertex_meta" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Variant" /> + <argument index="0" name="idx" type="int" /> <description> Returns the metadata associated with the given vertex. </description> </method> <method name="get_vertex_normal" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Vector3" /> + <argument index="0" name="idx" type="int" /> <description> Returns the normal of the given vertex. </description> </method> <method name="get_vertex_tangent" qualifiers="const"> - <return type="Plane"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Plane" /> + <argument index="0" name="idx" type="int" /> <description> Returns the tangent of the given vertex. </description> </method> <method name="get_vertex_uv" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="idx" type="int" /> <description> Returns the UV of the given vertex. </description> </method> <method name="get_vertex_uv2" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="idx" type="int" /> <description> Returns the UV2 of the given vertex. </description> </method> <method name="get_vertex_weights" qualifiers="const"> - <return type="PackedFloat32Array"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="PackedFloat32Array" /> + <argument index="0" name="idx" type="int" /> <description> Returns bone weights of the given vertex. </description> </method> <method name="set_edge_meta"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="meta" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="meta" type="Variant" /> <description> Sets the metadata of the given edge. </description> </method> <method name="set_face_meta"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="meta" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="meta" type="Variant" /> <description> Sets the metadata of the given face. </description> </method> <method name="set_material"> - <return type="void"> - </return> - <argument index="0" name="material" type="Material"> - </argument> + <return type="void" /> + <argument index="0" name="material" type="Material" /> <description> Sets the material to be used by newly-constructed [Mesh]. </description> </method> <method name="set_vertex"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="vertex" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="vertex" type="Vector3" /> <description> Sets the position of the given vertex. </description> </method> <method name="set_vertex_bones"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="bones" type="PackedInt32Array"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="bones" type="PackedInt32Array" /> <description> Sets the bones of the given vertex. </description> </method> <method name="set_vertex_color"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="color" type="Color" /> <description> Sets the color of the given vertex. </description> </method> <method name="set_vertex_meta"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="meta" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="meta" type="Variant" /> <description> Sets the metadata associated with the given vertex. </description> </method> <method name="set_vertex_normal"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="normal" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="normal" type="Vector3" /> <description> Sets the normal of the given vertex. </description> </method> <method name="set_vertex_tangent"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="tangent" type="Plane"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="tangent" type="Plane" /> <description> Sets the tangent of the given vertex. </description> </method> <method name="set_vertex_uv"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="uv" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="uv" type="Vector2" /> <description> Sets the UV of the given vertex. </description> </method> <method name="set_vertex_uv2"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="uv2" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="uv2" type="Vector2" /> <description> Sets the UV2 of the given vertex. </description> </method> <method name="set_vertex_weights"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="weights" type="PackedFloat32Array"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="weights" type="PackedFloat32Array" /> <description> Sets the bone weights of the given vertex. </description> diff --git a/doc/classes/MeshInstance3D.xml b/doc/classes/MeshInstance3D.xml index 7c4e75793e..665d5d3c77 100644 --- a/doc/classes/MeshInstance3D.xml +++ b/doc/classes/MeshInstance3D.xml @@ -14,65 +14,57 @@ </tutorials> <methods> <method name="create_convex_collision"> - <return type="void"> - </return> + <return type="void" /> + <argument index="0" name="clean" type="bool" default="true" /> + <argument index="1" name="simplify" type="bool" default="false" /> <description> This helper creates a [StaticBody3D] child node with a [ConvexPolygonShape3D] collision shape calculated from the mesh geometry. It's mainly used for testing. + If [code]clean[/code] is [code]true[/code] (default), duplicate and interior vertices are removed automatically. You can set it to [code]false[/code] to make the process faster if not needed. + If [code]simplify[/code] is [code]true[/code], the geometry can be further simplified to reduce the amount of vertices. Disabled by default. </description> </method> <method name="create_debug_tangents"> - <return type="void"> - </return> + <return type="void" /> <description> This helper creates a [MeshInstance3D] child node with gizmos at every vertex calculated from the mesh geometry. It's mainly used for testing. </description> </method> <method name="create_multiple_convex_collisions"> - <return type="void"> - </return> + <return type="void" /> <description> This helper creates a [StaticBody3D] child node with multiple [ConvexPolygonShape3D] collision shapes calculated from the mesh geometry via convex decomposition. It's mainly used for testing. </description> </method> <method name="create_trimesh_collision"> - <return type="void"> - </return> + <return type="void" /> <description> This helper creates a [StaticBody3D] child node with a [ConcavePolygonShape3D] collision shape calculated from the mesh geometry. It's mainly used for testing. </description> </method> <method name="get_active_material" qualifiers="const"> - <return type="Material"> - </return> - <argument index="0" name="surface" type="int"> - </argument> + <return type="Material" /> + <argument index="0" name="surface" type="int" /> <description> Returns the [Material] that will be used by the [Mesh] when drawing. This can return the [member GeometryInstance3D.material_override], the surface override [Material] defined in this [MeshInstance3D], or the surface [Material] defined in the [Mesh]. For example, if [member GeometryInstance3D.material_override] is used, all surfaces will return the override material. </description> </method> <method name="get_surface_override_material" qualifiers="const"> - <return type="Material"> - </return> - <argument index="0" name="surface" type="int"> - </argument> + <return type="Material" /> + <argument index="0" name="surface" type="int" /> <description> Returns the override [Material] for the specified surface of the [Mesh] resource. </description> </method> <method name="get_surface_override_material_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of surface override materials. This is equivalent to [method Mesh.get_surface_count]. </description> </method> <method name="set_surface_override_material"> - <return type="void"> - </return> - <argument index="0" name="surface" type="int"> - </argument> - <argument index="1" name="material" type="Material"> - </argument> + <return type="void" /> + <argument index="0" name="surface" type="int" /> + <argument index="1" name="material" type="Material" /> <description> Sets the override [Material] for the specified surface of the [Mesh] resource. This material is associated with this [MeshInstance3D] rather than with the [Mesh] resource. </description> diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml index b33bcc89e3..9e0292f946 100644 --- a/doc/classes/MeshLibrary.xml +++ b/doc/classes/MeshLibrary.xml @@ -12,172 +12,133 @@ </tutorials> <methods> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> Clears the library. </description> </method> <method name="create_item"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> <description> Creates a new item in the library with the given ID. You can get an unused ID from [method get_last_unused_item_id]. </description> </method> <method name="find_item_by_name" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="name" type="String" /> <description> Returns the first item with the given name. </description> </method> <method name="get_item_list" qualifiers="const"> - <return type="PackedInt32Array"> - </return> + <return type="PackedInt32Array" /> <description> Returns the list of item IDs in use. </description> </method> <method name="get_item_mesh" qualifiers="const"> - <return type="Mesh"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="Mesh" /> + <argument index="0" name="id" type="int" /> <description> Returns the item's mesh. </description> </method> <method name="get_item_name" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="id" type="int" /> <description> Returns the item's name. </description> </method> <method name="get_item_navmesh" qualifiers="const"> - <return type="NavigationMesh"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="NavigationMesh" /> + <argument index="0" name="id" type="int" /> <description> Returns the item's navigation mesh. </description> </method> <method name="get_item_navmesh_transform" qualifiers="const"> - <return type="Transform3D"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="id" type="int" /> <description> Returns the transform applied to the item's navigation mesh. </description> </method> <method name="get_item_preview" qualifiers="const"> - <return type="Texture2D"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="Texture2D" /> + <argument index="0" name="id" type="int" /> <description> When running in the editor, returns a generated item preview (a 3D rendering in isometric perspective). When used in a running project, returns the manually-defined item preview which can be set using [method set_item_preview]. Returns an empty [Texture2D] if no preview was manually set in a running project. </description> </method> <method name="get_item_shapes" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="Array" /> + <argument index="0" name="id" type="int" /> <description> Returns an item's collision shapes. The array consists of each [Shape3D] followed by its [Transform3D]. </description> </method> <method name="get_last_unused_item_id" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Gets an unused ID for a new item. </description> </method> <method name="remove_item"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> <description> Removes the item. </description> </method> <method name="set_item_mesh"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="mesh" type="Mesh"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="mesh" type="Mesh" /> <description> Sets the item's mesh. </description> </method> <method name="set_item_name"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="name" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="name" type="String" /> <description> Sets the item's name. This name is shown in the editor. It can also be used to look up the item later using [method find_item_by_name]. </description> </method> <method name="set_item_navmesh"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="navmesh" type="NavigationMesh"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="navmesh" type="NavigationMesh" /> <description> Sets the item's navigation mesh. </description> </method> <method name="set_item_navmesh_transform"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="navmesh" type="Transform3D"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="navmesh" type="Transform3D" /> <description> Sets the transform to apply to the item's navigation mesh. </description> </method> <method name="set_item_preview"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="texture" type="Texture2D"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="texture" type="Texture2D" /> <description> Sets a texture to use as the item's preview icon in the editor. </description> </method> <method name="set_item_shapes"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="shapes" type="Array"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="shapes" type="Array" /> <description> Sets an item's collision shapes. The array should consist of [Shape3D] objects, each followed by a [Transform3D] that will be applied to it. For shapes that should not have a transform, use [constant Transform3D.IDENTITY]. diff --git a/doc/classes/MethodTweener.xml b/doc/classes/MethodTweener.xml index 42b91abf93..1b93b20d9f 100644 --- a/doc/classes/MethodTweener.xml +++ b/doc/classes/MethodTweener.xml @@ -4,35 +4,29 @@ Interpolates an abstract value and supplies it to a method called over time. </brief_description> <description> - [MethodTweener] is similar to a combination of [CallbackTweener] and [PropertyTweener]. It calls a method providing an interpolated value as a paramater. See [method Tween.tween_method] for more usage information. + [MethodTweener] is similar to a combination of [CallbackTweener] and [PropertyTweener]. It calls a method providing an interpolated value as a parameter. See [method Tween.tween_method] for more usage information. [b]Note:[/b] [method Tween.tween_method] is the only correct way to create [MethodTweener]. Any [MethodTweener] created manually will not function correctly. </description> <tutorials> </tutorials> <methods> <method name="set_delay"> - <return type="MethodTweener"> - </return> - <argument index="0" name="delay" type="float"> - </argument> + <return type="MethodTweener" /> + <argument index="0" name="delay" type="float" /> <description> Sets the time in seconds after which the [MethodTweener] will start interpolating. By default there's no delay. </description> </method> <method name="set_ease"> - <return type="MethodTweener"> - </return> - <argument index="0" name="ease" type="int" enum="Tween.EaseType"> - </argument> + <return type="MethodTweener" /> + <argument index="0" name="ease" type="int" enum="Tween.EaseType" /> <description> Sets the type of used easing from [enum Tween.EaseType]. If not set, the default easing is used from the [Tween] that contains this Tweener. </description> </method> <method name="set_trans"> - <return type="MethodTweener"> - </return> - <argument index="0" name="trans" type="int" enum="Tween.TransitionType"> - </argument> + <return type="MethodTweener" /> + <argument index="0" name="trans" type="int" enum="Tween.TransitionType" /> <description> Sets the type of used transition from [enum Tween.TransitionType]. If not set, the default transition is used from the [Tween] that contains this Tweener. </description> diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml index 7151e58c5f..7b4a53a810 100644 --- a/doc/classes/MultiMesh.xml +++ b/doc/classes/MultiMesh.xml @@ -6,7 +6,7 @@ <description> MultiMesh provides low-level mesh instancing. Drawing thousands of [MeshInstance3D] nodes can be slow, since each object is submitted to the GPU then drawn individually. MultiMesh is much faster as it can draw thousands of instances with a single draw call, resulting in less API overhead. - As a drawback, if the instances are too far away of each other, performance may be reduced as every single instance will always render (they are spatially indexed as one, for the whole object). + As a drawback, if the instances are too far away from each other, performance may be reduced as every single instance will always render (they are spatially indexed as one, for the whole object). Since instances may have any behavior, the AABB used for visibility must be provided by the user. </description> <tutorials> @@ -15,90 +15,69 @@ </tutorials> <methods> <method name="get_aabb" qualifiers="const"> - <return type="AABB"> - </return> + <return type="AABB" /> <description> Returns the visibility axis-aligned bounding box in local space. See also [method VisualInstance3D.get_transformed_aabb]. </description> </method> <method name="get_instance_color" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="instance" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="instance" type="int" /> <description> Gets a specific instance's color. </description> </method> <method name="get_instance_custom_data" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="instance" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="instance" type="int" /> <description> Returns the custom data that has been set for a specific instance. </description> </method> <method name="get_instance_transform" qualifiers="const"> - <return type="Transform3D"> - </return> - <argument index="0" name="instance" type="int"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="instance" type="int" /> <description> Returns the [Transform3D] of a specific instance. </description> </method> <method name="get_instance_transform_2d" qualifiers="const"> - <return type="Transform2D"> - </return> - <argument index="0" name="instance" type="int"> - </argument> + <return type="Transform2D" /> + <argument index="0" name="instance" type="int" /> <description> Returns the [Transform2D] of a specific instance. </description> </method> <method name="set_instance_color"> - <return type="void"> - </return> - <argument index="0" name="instance" type="int"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="instance" type="int" /> + <argument index="1" name="color" type="Color" /> <description> Sets the color of a specific instance by [i]multiplying[/i] the mesh's existing vertex colors. For the color to take effect, ensure that [member use_colors] is [code]true[/code] on the [MultiMesh] and [member BaseMaterial3D.vertex_color_use_as_albedo] is [code]true[/code] on the material. </description> </method> <method name="set_instance_custom_data"> - <return type="void"> - </return> - <argument index="0" name="instance" type="int"> - </argument> - <argument index="1" name="custom_data" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="instance" type="int" /> + <argument index="1" name="custom_data" type="Color" /> <description> Sets custom data for a specific instance. Although [Color] is used, it is just a container for 4 floating point numbers. For the custom data to be used, ensure that [member use_custom_data] is [code]true[/code]. </description> </method> <method name="set_instance_transform"> - <return type="void"> - </return> - <argument index="0" name="instance" type="int"> - </argument> - <argument index="1" name="transform" type="Transform3D"> - </argument> + <return type="void" /> + <argument index="0" name="instance" type="int" /> + <argument index="1" name="transform" type="Transform3D" /> <description> Sets the [Transform3D] for a specific instance. </description> </method> <method name="set_instance_transform_2d"> - <return type="void"> - </return> - <argument index="0" name="instance" type="int"> - </argument> - <argument index="1" name="transform" type="Transform2D"> - </argument> + <return type="void" /> + <argument index="0" name="instance" type="int" /> + <argument index="1" name="transform" type="Transform2D" /> <description> Sets the [Transform2D] for a specific instance. </description> diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml index 5de5703d95..647233f679 100644 --- a/doc/classes/MultiplayerAPI.xml +++ b/doc/classes/MultiplayerAPI.xml @@ -4,8 +4,8 @@ High-level multiplayer API. </brief_description> <description> - This class implements most of the logic behind the high-level multiplayer API. See also [NetworkedMultiplayerPeer]. - By default, [SceneTree] has a reference to this class that is used to provide multiplayer capabilities (i.e. RPC/RSET) across the whole scene. + This class implements the high-level multiplayer API. See also [MultiplayerPeer]. + By default, [SceneTree] has a reference to this class that is used to provide multiplayer capabilities (i.e. RPCs) across the whole scene. It is possible to override the MultiplayerAPI instance used by specific Nodes by setting the [member Node.custom_multiplayer] property, effectively allowing to run both client and server in the same scene. [b]Note:[/b] The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice. </description> @@ -13,80 +13,72 @@ </tutorials> <methods> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> Clears the current MultiplayerAPI network state (you shouldn't call this unless you know what you are doing). </description> </method> - <method name="get_network_connected_peers" qualifiers="const"> - <return type="PackedInt32Array"> - </return> + <method name="get_peers" qualifiers="const"> + <return type="PackedInt32Array" /> <description> - Returns the peer IDs of all connected peers of this MultiplayerAPI's [member network_peer]. + Returns the peer IDs of all connected peers of this MultiplayerAPI's [member multiplayer_peer]. </description> </method> - <method name="get_network_unique_id" qualifiers="const"> - <return type="int"> - </return> + <method name="get_remote_sender_id" qualifiers="const"> + <return type="int" /> <description> - Returns the unique peer ID of this MultiplayerAPI's [member network_peer]. + Returns the sender's peer ID for the RPC currently being executed. + [b]Note:[/b] If not inside an RPC this method will return 0. </description> </method> - <method name="get_rpc_sender_id" qualifiers="const"> - <return type="int"> - </return> + <method name="get_unique_id" qualifiers="const"> + <return type="int" /> <description> - Returns the sender's peer ID for the RPC currently being executed. - [b]Note:[/b] If not inside an RPC this method will return 0. + Returns the unique peer ID of this MultiplayerAPI's [member multiplayer_peer]. </description> </method> - <method name="has_network_peer" qualifiers="const"> - <return type="bool"> - </return> + <method name="has_multiplayer_peer" qualifiers="const"> + <return type="bool" /> <description> - Returns [code]true[/code] if there is a [member network_peer] set. + Returns [code]true[/code] if there is a [member multiplayer_peer] set. </description> </method> - <method name="is_network_server" qualifiers="const"> - <return type="bool"> - </return> + <method name="is_server" qualifiers="const"> + <return type="bool" /> <description> - Returns [code]true[/code] if this MultiplayerAPI's [member network_peer] is in server mode (listening for connections). + Returns [code]true[/code] if this MultiplayerAPI's [member multiplayer_peer] is valid and in server mode (listening for connections). </description> </method> <method name="poll"> - <return type="void"> - </return> + <return type="void" /> <description> Method used for polling the MultiplayerAPI. You only need to worry about this if you are using [member Node.custom_multiplayer] override or you set [member SceneTree.multiplayer_poll] to [code]false[/code]. By default, [SceneTree] will poll its MultiplayerAPI for you. - [b]Note:[/b] This method results in RPCs and RSETs being called, so they will be executed in the same context of this function (e.g. [code]_process[/code], [code]physics[/code], [Thread]). + [b]Note:[/b] This method results in RPCs being called, so they will be executed in the same context of this function (e.g. [code]_process[/code], [code]physics[/code], [Thread]). </description> </method> <method name="send_bytes"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="bytes" type="PackedByteArray"> - </argument> - <argument index="1" name="id" type="int" default="0"> - </argument> - <argument index="2" name="mode" type="int" enum="NetworkedMultiplayerPeer.TransferMode" default="2"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="bytes" type="PackedByteArray" /> + <argument index="1" name="id" type="int" default="0" /> + <argument index="2" name="mode" type="int" enum="TransferMode" default="2" /> + <argument index="3" name="channel" type="int" default="0" /> <description> - Sends the given raw [code]bytes[/code] to a specific peer identified by [code]id[/code] (see [method NetworkedMultiplayerPeer.set_target_peer]). Default ID is [code]0[/code], i.e. broadcast to all peers. + Sends the given raw [code]bytes[/code] to a specific peer identified by [code]id[/code] (see [method MultiplayerPeer.set_target_peer]). Default ID is [code]0[/code], i.e. broadcast to all peers. </description> </method> </methods> <members> <member name="allow_object_decoding" type="bool" setter="set_allow_object_decoding" getter="is_object_decoding_allowed" default="false"> - If [code]true[/code], the MultiplayerAPI will allow encoding and decoding of object during RPCs/RSETs. + If [code]true[/code], the MultiplayerAPI will allow encoding and decoding of object during RPCs. [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. </member> - <member name="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_peer"> - The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_network_server]) and will set root node's network mode to master, or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals. + <member name="multiplayer_peer" type="MultiplayerPeer" setter="set_multiplayer_peer" getter="get_multiplayer_peer"> + The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_server]) and will set root node's network mode to authority, or it will become a regular client peer. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals. + </member> + <member name="refuse_new_connections" type="bool" setter="set_refuse_new_connections" getter="is_refusing_new_connections" default="false"> + If [code]true[/code], the MultiplayerAPI's [member multiplayer_peer] refuses new incoming connections. </member> - <member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections" default="false"> - If [code]true[/code], the MultiplayerAPI's [member network_peer] refuses new incoming connections. + <member name="replicator" type="MultiplayerReplicator" setter="" getter="get_replicator"> </member> <member name="root_node" type="Node" setter="set_root_node" getter="get_root_node"> The root node to use for RPCs. Instead of an absolute path, a relative path will be used to find the node upon which the RPC should be executed. @@ -96,64 +88,39 @@ <signals> <signal name="connected_to_server"> <description> - Emitted when this MultiplayerAPI's [member network_peer] successfully connected to a server. Only emitted on clients. + Emitted when this MultiplayerAPI's [member multiplayer_peer] successfully connected to a server. Only emitted on clients. </description> </signal> <signal name="connection_failed"> <description> - Emitted when this MultiplayerAPI's [member network_peer] fails to establish a connection to a server. Only emitted on clients. + Emitted when this MultiplayerAPI's [member multiplayer_peer] fails to establish a connection to a server. Only emitted on clients. </description> </signal> - <signal name="network_peer_connected"> - <argument index="0" name="id" type="int"> - </argument> + <signal name="peer_connected"> + <argument index="0" name="id" type="int" /> <description> - Emitted when this MultiplayerAPI's [member network_peer] connects with a new peer. ID is the peer ID of the new peer. Clients get notified when other clients connect to the same server. Upon connecting to a server, a client also receives this signal for the server (with ID being 1). + Emitted when this MultiplayerAPI's [member multiplayer_peer] connects with a new peer. ID is the peer ID of the new peer. Clients get notified when other clients connect to the same server. Upon connecting to a server, a client also receives this signal for the server (with ID being 1). </description> </signal> - <signal name="network_peer_disconnected"> - <argument index="0" name="id" type="int"> - </argument> + <signal name="peer_disconnected"> + <argument index="0" name="id" type="int" /> <description> - Emitted when this MultiplayerAPI's [member network_peer] disconnects from a peer. Clients get notified when other clients disconnect from the same server. + Emitted when this MultiplayerAPI's [member multiplayer_peer] disconnects from a peer. Clients get notified when other clients disconnect from the same server. </description> </signal> - <signal name="network_peer_packet"> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="packet" type="PackedByteArray"> - </argument> + <signal name="peer_packet"> + <argument index="0" name="id" type="int" /> + <argument index="1" name="packet" type="PackedByteArray" /> <description> - Emitted when this MultiplayerAPI's [member network_peer] receive a [code]packet[/code] with custom data (see [method send_bytes]). ID is the peer ID of the peer that sent the packet. + Emitted when this MultiplayerAPI's [member multiplayer_peer] receives a [code]packet[/code] with custom data (see [method send_bytes]). ID is the peer ID of the peer that sent the packet. </description> </signal> <signal name="server_disconnected"> <description> - Emitted when this MultiplayerAPI's [member network_peer] disconnects from server. Only emitted on clients. + Emitted when this MultiplayerAPI's [member multiplayer_peer] disconnects from server. Only emitted on clients. </description> </signal> </signals> <constants> - <constant name="RPC_MODE_DISABLED" value="0" enum="RPCMode"> - Used with [method Node.rpc_config] to disable a method or property for all RPC calls, making it unavailable. Default for all methods. - </constant> - <constant name="RPC_MODE_REMOTE" value="1" enum="RPCMode"> - Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on the remote end, not locally. Analogous to the [code]remote[/code] keyword. Calls and property changes are accepted from all remote peers, no matter if they are node's master or puppets. - </constant> - <constant name="RPC_MODE_MASTER" value="2" enum="RPCMode"> - Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on the network master for this node. Analogous to the [code]master[/code] keyword. Only accepts calls or property changes from the node's network puppets, see [method Node.set_network_master]. - </constant> - <constant name="RPC_MODE_PUPPET" value="3" enum="RPCMode"> - Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on puppets for this node. Analogous to the [code]puppet[/code] keyword. Only accepts calls or property changes from the node's network master, see [method Node.set_network_master]. - </constant> - <constant name="RPC_MODE_REMOTESYNC" value="4" enum="RPCMode"> - Behave like [constant RPC_MODE_REMOTE] but also make the call or property change locally. Analogous to the [code]remotesync[/code] keyword. - </constant> - <constant name="RPC_MODE_MASTERSYNC" value="5" enum="RPCMode"> - Behave like [constant RPC_MODE_MASTER] but also make the call or property change locally. Analogous to the [code]mastersync[/code] keyword. - </constant> - <constant name="RPC_MODE_PUPPETSYNC" value="6" enum="RPCMode"> - Behave like [constant RPC_MODE_PUPPET] but also make the call or property change locally. Analogous to the [code]puppetsync[/code] keyword. - </constant> </constants> </class> diff --git a/doc/classes/NetworkedMultiplayerPeer.xml b/doc/classes/MultiplayerPeer.xml index 06ea46f023..411317cdc8 100644 --- a/doc/classes/NetworkedMultiplayerPeer.xml +++ b/doc/classes/MultiplayerPeer.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NetworkedMultiplayerPeer" inherits="PacketPeer" version="4.0"> +<class name="MultiplayerPeer" inherits="PacketPeer" version="4.0"> <brief_description> A high-level network interface to simplify multiplayer interactions. </brief_description> <description> - Manages the connection to network peers. Assigns unique IDs to each client connected to the server. See also [MultiplayerAPI]. + Manages the connection to multiplayer peers. Assigns unique IDs to each client connected to the server. See also [MultiplayerAPI]. [b]Note:[/b] The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice. </description> <tutorials> @@ -12,39 +12,39 @@ <link title="WebRTC Signaling Demo">https://godotengine.org/asset-library/asset/537</link> </tutorials> <methods> + <method name="generate_unique_id" qualifiers="const"> + <return type="int" /> + <description> + Returns a randomly generated integer that can be used as a network unique ID. + </description> + </method> <method name="get_connection_status" qualifiers="const"> - <return type="int" enum="NetworkedMultiplayerPeer.ConnectionStatus"> - </return> + <return type="int" enum="MultiplayerPeer.ConnectionStatus" /> <description> Returns the current state of the connection. See [enum ConnectionStatus]. </description> </method> <method name="get_packet_peer" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> - Returns the ID of the [NetworkedMultiplayerPeer] who sent the most recent packet. + Returns the ID of the [MultiplayerPeer] who sent the most recent packet. </description> </method> <method name="get_unique_id" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> - Returns the ID of this [NetworkedMultiplayerPeer]. + Returns the ID of this [MultiplayerPeer]. </description> </method> <method name="poll"> - <return type="void"> - </return> + <return type="void" /> <description> Waits up to 1 second to receive a new network event. </description> </method> <method name="set_target_peer"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> <description> Sets the peer to which packets will be sent. The [code]id[/code] can be one of: [constant TARGET_PEER_BROADCAST] to send to all connected peers, [constant TARGET_PEER_SERVER] to send to the peer acting as server, a valid peer ID to send to that specific peer, a negative peer ID to send to all peers except that one. By default, the target peer is [constant TARGET_PEER_BROADCAST]. @@ -53,9 +53,13 @@ </methods> <members> <member name="refuse_new_connections" type="bool" setter="set_refuse_new_connections" getter="is_refusing_new_connections" default="true"> - If [code]true[/code], this [NetworkedMultiplayerPeer] refuses new connections. + If [code]true[/code], this [MultiplayerPeer] refuses new connections. + </member> + <member name="transfer_channel" type="int" setter="set_transfer_channel" getter="get_transfer_channel" default="0"> + The channel to use to send packets. Many network APIs such as ENet and WebRTC allow the creation of multiple independent channels which behaves, in a way, like separate connections. This means that reliable data will only block delivery of other packets on that channel, and ordering will only be in respect to the channel the packet is being sent on. Using different channels to send [b]different and independent[/b] state updates is a common way to optimize network usage and decrease latency in fast-paced games. + [b]Note:[/b] The default channel ([code]0[/code]) actually works as 3 separate channels (one for each [enum TransferMode]) so that [constant TRANSFER_MODE_RELIABLE] and [constant TRANSFER_MODE_ORDERED] does not interact with each other by default. Refer to the specific network API documentation (e.g. ENet or WebRTC) to learn how to set up channels correctly. </member> - <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="NetworkedMultiplayerPeer.TransferMode" default="0"> + <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="TransferMode" default="0"> The manner in which to send packets to the [code]target_peer[/code]. See [enum TransferMode]. </member> </members> @@ -71,15 +75,13 @@ </description> </signal> <signal name="peer_connected"> - <argument index="0" name="id" type="int"> - </argument> + <argument index="0" name="id" type="int" /> <description> Emitted by the server when a client connects. </description> </signal> <signal name="peer_disconnected"> - <argument index="0" name="id" type="int"> - </argument> + <argument index="0" name="id" type="int" /> <description> Emitted by the server when a client disconnects. </description> @@ -91,15 +93,6 @@ </signal> </signals> <constants> - <constant name="TRANSFER_MODE_UNRELIABLE" value="0" enum="TransferMode"> - Packets are not acknowledged, no resend attempts are made for lost packets. Packets may arrive in any order. Potentially faster than [constant TRANSFER_MODE_UNRELIABLE_ORDERED]. Use for non-critical data, and always consider whether the order matters. - </constant> - <constant name="TRANSFER_MODE_UNRELIABLE_ORDERED" value="1" enum="TransferMode"> - Packets are not acknowledged, no resend attempts are made for lost packets. Packets are received in the order they were sent in. Potentially faster than [constant TRANSFER_MODE_RELIABLE]. Use for non-critical data or data that would be outdated if received late due to resend attempt(s) anyway, for example movement and positional data. - </constant> - <constant name="TRANSFER_MODE_RELIABLE" value="2" enum="TransferMode"> - Packets must be received and resend attempts should be made until the packets are acknowledged. Packets must be received in the order they were sent in. Most reliable transfer mode, but potentially the slowest due to the overhead. Use for critical data that must be transmitted and arrive in order, for example an ability being triggered or a chat message. Consider carefully if the information really is critical, and use sparingly. - </constant> <constant name="CONNECTION_DISCONNECTED" value="0" enum="ConnectionStatus"> The ongoing connection disconnected. </constant> diff --git a/doc/classes/MultiplayerReplicator.xml b/doc/classes/MultiplayerReplicator.xml new file mode 100644 index 0000000000..e0c309ef39 --- /dev/null +++ b/doc/classes/MultiplayerReplicator.xml @@ -0,0 +1,191 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="MultiplayerReplicator" inherits="Object" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="decode_state"> + <return type="int" enum="Error" /> + <argument index="0" name="scene_id" type="int" /> + <argument index="1" name="object" type="Object" /> + <argument index="2" name="data" type="PackedByteArray" /> + <argument index="3" name="initial" type="bool" default="true" /> + <description> + Decode the given [code]data[/code] representing a spawnable state into [code]object[/code] using the configuration associated with the provided [code]scene_id[/code]. This function is called automatically when a client receives a server spawn for a scene with [constant REPLICATION_MODE_SERVER]. See [method spawn_config]. + Tip: You may find this function useful in servers when parsing spawn requests from clients, or when implementing your own logic with [constant REPLICATION_MODE_CUSTOM]. + </description> + </method> + <method name="despawn"> + <return type="int" enum="Error" /> + <argument index="0" name="scene_id" type="int" /> + <argument index="1" name="object" type="Object" /> + <argument index="2" name="peer_id" type="int" default="0" /> + <description> + Request a despawn for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code]. This will either trigger the default behaviour, or invoke the custom spawn/despawn callables specified in [method spawn_config]. See [method send_despawn] for the default behavior. + </description> + </method> + <method name="encode_state"> + <return type="PackedByteArray" /> + <argument index="0" name="scene_id" type="int" /> + <argument index="1" name="object" type="Object" /> + <argument index="2" name="initial" type="bool" default="true" /> + <description> + Encode the given [code]object[/code] using the configuration associated with the provided [code]scene_id[/code]. This function is called automatically when the server spawns scenes with [constant REPLICATION_MODE_SERVER]. See [method spawn_config]. + Tip: You may find this function useful when requesting spawns from clients to server, or when implementing your own logic with [constant REPLICATION_MODE_CUSTOM]. + </description> + </method> + <method name="send_despawn"> + <return type="int" enum="Error" /> + <argument index="0" name="peer_id" type="int" /> + <argument index="1" name="scene_id" type="int" /> + <argument index="2" name="data" type="Variant" default="null" /> + <argument index="3" name="path" type="NodePath" default="NodePath("")" /> + <description> + Sends a despawn request for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). If the scene is configured as [constant REPLICATION_MODE_SERVER] (see [method spawn_config]) and the request is sent by the server (see [method MultiplayerAPI.is_server]), the receiving peer(s) will automatically queue for deletion the node at [code]path[/code] and emit the signal [signal despawned]. In all other cases no deletion happens, and the signal [signal despawn_requested] is emitted instead. + </description> + </method> + <method name="send_spawn"> + <return type="int" enum="Error" /> + <argument index="0" name="peer_id" type="int" /> + <argument index="1" name="scene_id" type="int" /> + <argument index="2" name="data" type="Variant" default="null" /> + <argument index="3" name="path" type="NodePath" default="NodePath("")" /> + <description> + Sends a spawn request for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). If the scene is configured as [constant REPLICATION_MODE_SERVER] (see [method spawn_config]) and the request is sent by the server (see [method MultiplayerAPI.is_server]), the receiving peer(s) will automatically instantiate that scene, add it to the [SceneTree] at the given [code]path[/code] and emit the signal [signal spawned]. In all other cases no instantiation happens, and the signal [signal spawn_requested] is emitted instead. + </description> + </method> + <method name="send_sync"> + <return type="int" enum="Error" /> + <argument index="0" name="peer_id" type="int" /> + <argument index="1" name="scene_id" type="int" /> + <argument index="2" name="data" type="PackedByteArray" /> + <argument index="3" name="transfer_mode" type="int" enum="TransferMode" default="2" /> + <argument index="4" name="channel" type="int" default="0" /> + <description> + Sends a sync request for the instances of the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). This function can only be called manually when overriding the send and receive sync functions (see [method sync_config]). + </description> + </method> + <method name="spawn"> + <return type="int" enum="Error" /> + <argument index="0" name="scene_id" type="int" /> + <argument index="1" name="object" type="Object" /> + <argument index="2" name="peer_id" type="int" default="0" /> + <description> + Request a spawn for the scene identified by [code]scene_id[/code] to the given [code]peer_id[/code]. This will either trigger the default behaviour, or invoke the custom spawn/despawn callables specified in [method spawn_config]. See [method send_spawn] for the default behavior. + </description> + </method> + <method name="spawn_config"> + <return type="int" enum="Error" /> + <argument index="0" name="scene_id" type="int" /> + <argument index="1" name="spawn_mode" type="int" enum="MultiplayerReplicator.ReplicationMode" /> + <argument index="2" name="properties" type="StringName[]" default="[]" /> + <argument index="3" name="custom_send" type="Callable" /> + <argument index="4" name="custom_receive" type="Callable" /> + <description> + Configures the MultiplayerReplicator to track instances of the [PackedScene] identified by [code]scene_id[/code] (see [method ResourceLoader.get_resource_uid]) for the purpose of network replication. When [code]mode[/code] is [constant REPLICATION_MODE_SERVER], the specified [code]properties[/code] will also be replicated to clients during the initial spawn. You can optionally specify a [code]custom_send[/code] and a [code]custom_receive[/code] to override the default behaviour and customize the spawn/despawn proecess. + Tip: You can use a custom property in the scene main script to return a customly optimized state representation. + </description> + </method> + <method name="sync_all"> + <return type="int" enum="Error" /> + <argument index="0" name="scene_id" type="int" /> + <argument index="1" name="peer_id" type="int" default="0" /> + <description> + Manually request a sync for all the instances of the scene identified by [code]scene_id[/code]. This function will trigger the default sync behaviour, or call your send custom send callable if specified in [method sync_config]. + Note: The default implementation only allow syncing from server to clients. + </description> + </method> + <method name="sync_config"> + <return type="int" enum="Error" /> + <argument index="0" name="scene_id" type="int" /> + <argument index="1" name="interval" type="int" /> + <argument index="2" name="properties" type="StringName[]" default="[]" /> + <argument index="3" name="custom_send" type="Callable" /> + <argument index="4" name="custom_receive" type="Callable" /> + <description> + Configures the MultiplayerReplicator to sync instances of the [PackedScene] identified by [code]scene_id[/code] (see [method ResourceLoader.get_resource_uid]) for the purpose of network replication at the desired [code]interval[/code] (in milliseconds). The specified [code]properties[/code] will be part of the state sync. You can optionally specify a [code]custom_send[/code] and a [code]custom_receive[/code] to override the default behaviour and customize the syncronization proecess. + Tip: You can use a custom property in the scene main script to return a customly optimized state representation (having a single property that returns a PackedByteArray is higly recommended when dealing with many instances). + </description> + </method> + <method name="track"> + <return type="void" /> + <argument index="0" name="scene_id" type="int" /> + <argument index="1" name="object" type="Object" /> + <description> + Track the given [code]object[/code] as an instance of the scene identified by [code]scene_id[/code]. This object will be passed to your custom sync callables (see [method sync_config]). Tracking and untracking is automatic in [constant REPLICATION_MODE_SERVER]. + </description> + </method> + <method name="untrack"> + <return type="void" /> + <argument index="0" name="scene_id" type="int" /> + <argument index="1" name="object" type="Object" /> + <description> + Untrack the given [code]object[/code]. This object will no longer be passed to your custom sync callables (see [method sync_config]). Tracking and untracking is automatic in [constant REPLICATION_MODE_SERVER]. + </description> + </method> + </methods> + <signals> + <signal name="despawn_requested"> + <argument index="0" name="id" type="int" /> + <argument index="1" name="scene_id" type="int" /> + <argument index="2" name="parent" type="Node" /> + <argument index="3" name="name" type="String" /> + <argument index="4" name="data" type="PackedByteArray" /> + <description> + Emitted when a network despawn request has been received from a client, or for a [PackedScene] that has been configured as [constant REPLICATION_MODE_CUSTOM]. + </description> + </signal> + <signal name="despawned"> + <argument index="0" name="scene_id" type="int" /> + <argument index="1" name="node" type="Node" /> + <description> + Emitted on a client before deleting a local Node upon receiving a despawn request from the server. + </description> + </signal> + <signal name="replicated_instance_added"> + <argument index="0" name="scene_id" type="int" /> + <argument index="1" name="node" type="Node" /> + <description> + Emitted when an instance of a [PackedScene] that has been configured for networking enters the [SceneTree]. See [method spawn_config]. + </description> + </signal> + <signal name="replicated_instance_removed"> + <argument index="0" name="scene_id" type="int" /> + <argument index="1" name="node" type="Node" /> + <description> + Emitted when an instance of a [PackedScene] that has been configured for networking leaves the [SceneTree]. See [method spawn_config]. + </description> + </signal> + <signal name="spawn_requested"> + <argument index="0" name="id" type="int" /> + <argument index="1" name="scene_id" type="int" /> + <argument index="2" name="parent" type="Node" /> + <argument index="3" name="name" type="String" /> + <argument index="4" name="data" type="PackedByteArray" /> + <description> + Emitted when a network spawn request has been received from a client, or for a [PackedScene] that has been configured as [constant REPLICATION_MODE_CUSTOM]. + </description> + </signal> + <signal name="spawned"> + <argument index="0" name="scene_id" type="int" /> + <argument index="1" name="node" type="Node" /> + <description> + Emitted on a client after a new Node is instantiated locally and added to the SceneTree upon receiving a spawn request from the server. + </description> + </signal> + </signals> + <constants> + <constant name="REPLICATION_MODE_NONE" value="0" enum="ReplicationMode"> + Used with [method spawn_config] to identify a [PackedScene] that should not be replicated. + </constant> + <constant name="REPLICATION_MODE_SERVER" value="1" enum="ReplicationMode"> + Used with [method spawn_config] to identify a [PackedScene] that should be automatically replicated from server to clients. + </constant> + <constant name="REPLICATION_MODE_CUSTOM" value="2" enum="ReplicationMode"> + Used with [method spawn_config] to identify a [PackedScene] that can be manually replicated among peers. + </constant> + </constants> +</class> diff --git a/doc/classes/Mutex.xml b/doc/classes/Mutex.xml index dfda614f8e..f97b2344a5 100644 --- a/doc/classes/Mutex.xml +++ b/doc/classes/Mutex.xml @@ -11,22 +11,19 @@ </tutorials> <methods> <method name="lock"> - <return type="void"> - </return> + <return type="void" /> <description> Locks this [Mutex], blocks until it is unlocked by the current owner. </description> </method> <method name="try_lock"> - <return type="int" enum="Error"> - </return> + <return type="int" enum="Error" /> <description> Tries locking this [Mutex], but does not block. Returns [constant OK] on success, [constant ERR_BUSY] otherwise. </description> </method> <method name="unlock"> - <return type="void"> - </return> + <return type="void" /> <description> Unlocks this [Mutex], leaving it to other threads. </description> diff --git a/doc/classes/NativeExtension.xml b/doc/classes/NativeExtension.xml index c48af7df7b..ac3e8d53d8 100644 --- a/doc/classes/NativeExtension.xml +++ b/doc/classes/NativeExtension.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NativeExtension" inherits="RefCounted" version="4.0"> +<class name="NativeExtension" inherits="Resource" version="4.0"> <brief_description> </brief_description> <description> @@ -8,38 +8,30 @@ </tutorials> <methods> <method name="close_library"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> <method name="get_minimum_library_initialization_level" qualifiers="const"> - <return type="int" enum="NativeExtension.InitializationLevel"> - </return> + <return type="int" enum="NativeExtension.InitializationLevel" /> <description> </description> </method> <method name="initialize_library"> - <return type="void"> - </return> - <argument index="0" name="level" type="int" enum="NativeExtension.InitializationLevel"> - </argument> + <return type="void" /> + <argument index="0" name="level" type="int" enum="NativeExtension.InitializationLevel" /> <description> </description> </method> <method name="is_library_open" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> </description> </method> <method name="open_library"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="entry_symbol" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="entry_symbol" type="String" /> <description> </description> </method> diff --git a/doc/classes/NativeExtensionManager.xml b/doc/classes/NativeExtensionManager.xml index ba9018ff4c..42246619f6 100644 --- a/doc/classes/NativeExtensionManager.xml +++ b/doc/classes/NativeExtensionManager.xml @@ -8,40 +8,37 @@ </tutorials> <methods> <method name="get_extension"> - <return type="NativeExtension"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="NativeExtension" /> + <argument index="0" name="path" type="String" /> <description> </description> </method> <method name="get_loaded_extensions" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> + <description> + </description> + </method> + <method name="is_extension_loaded" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="path" type="String" /> <description> </description> </method> <method name="load_extension"> - <return type="int" enum="NativeExtensionManager.LoadStatus"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="int" enum="NativeExtensionManager.LoadStatus" /> + <argument index="0" name="path" type="String" /> <description> </description> </method> <method name="reload_extension"> - <return type="int" enum="NativeExtensionManager.LoadStatus"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="int" enum="NativeExtensionManager.LoadStatus" /> + <argument index="0" name="path" type="String" /> <description> </description> </method> <method name="unload_extension"> - <return type="int" enum="NativeExtensionManager.LoadStatus"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="int" enum="NativeExtensionManager.LoadStatus" /> + <argument index="0" name="path" type="String" /> <description> </description> </method> diff --git a/doc/classes/NavigationAgent2D.xml b/doc/classes/NavigationAgent2D.xml index de81ae4d91..c05f7c2094 100644 --- a/doc/classes/NavigationAgent2D.xml +++ b/doc/classes/NavigationAgent2D.xml @@ -10,88 +10,74 @@ </tutorials> <methods> <method name="distance_to_target" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the distance to the target location, using the agent's global position. The user must set the target location with [method set_target_location] in order for this to be accurate. </description> </method> <method name="get_final_location"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the reachable final location in global coordinates. This can change if the navigation path is altered in any way. </description> </method> <method name="get_nav_path" qualifiers="const"> - <return type="PackedVector2Array"> - </return> + <return type="PackedVector2Array" /> <description> Returns the path from start to finish in global coordinates. </description> </method> <method name="get_nav_path_index" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns which index the agent is currently on in the navigation path's [PackedVector2Array]. </description> </method> <method name="get_next_location"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns a [Vector2] in global coordinates, that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the position of the agent's parent. </description> </method> <method name="get_rid" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="get_target_location" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the user defined [Vector2] after setting the target location. </description> </method> <method name="is_navigation_finished"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns true if the navigation path's final location has been reached. </description> </method> <method name="is_target_reachable"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns true if the target location is reachable. The target location is set using [method set_target_location]. </description> </method> <method name="is_target_reached" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location]. </description> </method> <method name="set_target_location"> - <return type="void"> - </return> - <argument index="0" name="location" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="location" type="Vector2" /> <description> Sets the user desired final location. This will clear the current navigation path. </description> </method> <method name="set_velocity"> - <return type="void"> - </return> - <argument index="0" name="velocity" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="velocity" type="Vector2" /> <description> Sends the passed in velocity to the collision avoidance algorithm. It will adjust the velocity to avoid collisions. Once the adjustment to the velocity is complete, it will emit the [signal velocity_computed] signal. </description> @@ -137,8 +123,7 @@ </description> </signal> <signal name="velocity_computed"> - <argument index="0" name="safe_velocity" type="Vector3"> - </argument> + <argument index="0" name="safe_velocity" type="Vector3" /> <description> Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity]. </description> diff --git a/doc/classes/NavigationAgent3D.xml b/doc/classes/NavigationAgent3D.xml index 8942a37774..af4a058489 100644 --- a/doc/classes/NavigationAgent3D.xml +++ b/doc/classes/NavigationAgent3D.xml @@ -10,88 +10,74 @@ </tutorials> <methods> <method name="distance_to_target" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the distance to the target location, using the agent's global position. The user must set the target location with [method set_target_location] in order for this to be accurate. </description> </method> <method name="get_final_location"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns the reachable final location in global coordinates. This can change if the navigation path is altered in any way. Because of this, it would be best to check this each frame. </description> </method> <method name="get_nav_path" qualifiers="const"> - <return type="PackedVector3Array"> - </return> + <return type="PackedVector3Array" /> <description> Returns the path from start to finish in global coordinates. </description> </method> <method name="get_nav_path_index" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns which index the agent is currently on in the navigation path's [PackedVector3Array]. </description> </method> <method name="get_next_location"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns a [Vector3] in global coordinates, that can be moved to, making sure that there are no static objects in the way. If the agent does not have a navigation path, it will return the origin of the agent's parent. </description> </method> <method name="get_rid" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="get_target_location" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns the user defined [Vector3] after setting the target location. </description> </method> <method name="is_navigation_finished"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns true if the navigation path's final location has been reached. </description> </method> <method name="is_target_reachable"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns true if the target location is reachable. The target location is set using [method set_target_location]. </description> </method> <method name="is_target_reached" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns true if the target location is reached. The target location is set using [method set_target_location]. It may not always be possible to reach the target location. It should always be possible to reach the final location though. See [method get_final_location]. </description> </method> <method name="set_target_location"> - <return type="void"> - </return> - <argument index="0" name="location" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="location" type="Vector3" /> <description> Sets the user desired final location. This will clear the current navigation path. </description> </method> <method name="set_velocity"> - <return type="void"> - </return> - <argument index="0" name="velocity" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="velocity" type="Vector3" /> <description> Sends the passed in velocity to the collision avoidance algorithm. It will adjust the velocity to avoid collisions. Once the adjustment to the velocity is complete, it will emit the [signal velocity_computed] signal. </description> @@ -143,8 +129,7 @@ </description> </signal> <signal name="velocity_computed"> - <argument index="0" name="safe_velocity" type="Vector3"> - </argument> + <argument index="0" name="safe_velocity" type="Vector3" /> <description> Notifies when the collision avoidance velocity is calculated. Emitted by [method set_velocity]. </description> diff --git a/doc/classes/NavigationMesh.xml b/doc/classes/NavigationMesh.xml index 871c92798a..e476949360 100644 --- a/doc/classes/NavigationMesh.xml +++ b/doc/classes/NavigationMesh.xml @@ -1,151 +1,186 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="NavigationMesh" inherits="Resource" version="4.0"> <brief_description> + A mesh to approximate the walkable areas and obstacles. </brief_description> <description> + A navigation mesh is a collection of polygons that define which areas of an environment are traversable to aid agents in pathfinding through complicated spaces. </description> <tutorials> <link title="3D Navmesh Demo">https://godotengine.org/asset-library/asset/124</link> </tutorials> <methods> <method name="add_polygon"> - <return type="void"> - </return> - <argument index="0" name="polygon" type="PackedInt32Array"> - </argument> + <return type="void" /> + <argument index="0" name="polygon" type="PackedInt32Array" /> <description> + Adds a polygon using the indices of the vertices you get when calling [method get_vertices]. </description> </method> <method name="clear_polygons"> - <return type="void"> - </return> + <return type="void" /> <description> + Clears the array of polygons, but it doesn't clear the array of vertices. </description> </method> <method name="create_from_mesh"> - <return type="void"> - </return> - <argument index="0" name="mesh" type="Mesh"> - </argument> + <return type="void" /> + <argument index="0" name="mesh" type="Mesh" /> <description> + Initializes the navigation mesh by setting the vertices and indices according to a [Mesh]. </description> </method> - <method name="get_collision_mask_bit" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="bit" type="int"> - </argument> + <method name="get_collision_mask_value" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="layer_number" type="int" /> <description> + Returns whether or not the specified layer of the [member geometry/collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. </description> </method> <method name="get_polygon"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="idx" type="int" /> <description> + Returns a [PackedInt32Array] containing the indices of the vertices of a created polygon. </description> </method> <method name="get_polygon_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> + Returns the number of polygons in the navigation mesh. </description> </method> <method name="get_vertices" qualifiers="const"> - <return type="PackedVector3Array"> - </return> + <return type="PackedVector3Array" /> <description> + Returns a [PackedVector3Array] containing all the vertices being used to create the polygons. </description> </method> - <method name="set_collision_mask_bit"> - <return type="void"> - </return> - <argument index="0" name="bit" type="int"> - </argument> - <argument index="1" name="value" type="bool"> - </argument> + <method name="set_collision_mask_value"> + <return type="void" /> + <argument index="0" name="layer_number" type="int" /> + <argument index="1" name="value" type="bool" /> <description> + Based on [code]value[/code], enables or disables the specified layer in the [member geometry/collision_mask], given a [code]layer_number[/code] between 1 and 32. </description> </method> <method name="set_vertices"> - <return type="void"> - </return> - <argument index="0" name="vertices" type="PackedVector3Array"> - </argument> + <return type="void" /> + <argument index="0" name="vertices" type="PackedVector3Array" /> <description> + Sets the vertices that can be then indexed to create polygons with the [method add_polygon] method. </description> </method> </methods> <members> <member name="agent/height" type="float" setter="set_agent_height" getter="get_agent_height" default="2.0"> - The minimum Y space needed for navigation to be generated. + The minimum floor to ceiling height that will still allow the floor area to be considered walkable. + [b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell/height]. </member> <member name="agent/max_climb" type="float" setter="set_agent_max_climb" getter="get_agent_max_climb" default="0.9"> - The maximum height difference between two areas for navigation to be generated between them. + The minimum ledge height that is considered to still be traversable. + [b]Note:[/b] While baking, this value will be rounded down to the nearest multiple of [member cell/height]. </member> <member name="agent/max_slope" type="float" setter="set_agent_max_slope" getter="get_agent_max_slope" default="45.0"> - The maximum angle a slope can be at for navigation to be generated on it. + The maximum slope that is considered walkable, in degrees. </member> <member name="agent/radius" type="float" setter="set_agent_radius" getter="get_agent_radius" default="0.6"> - Determines where the edge of a navigation mesh is. This way an agent will not overlap with another mesh or stand over nothing. + The distance to erode/shrink the walkable area of the heightfield away from obstructions. + [b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell/size]. </member> <member name="cell/height" type="float" setter="set_cell_height" getter="get_cell_height" default="0.2"> - The height of a cell. + The Y axis cell size to use for fields. </member> <member name="cell/size" type="float" setter="set_cell_size" getter="get_cell_size" default="0.3"> - The size of cells in the [NavigationMesh]. + The XZ plane cell size to use for fields. </member> <member name="detail/sample_distance" type="float" setter="set_detail_sample_distance" getter="get_detail_sample_distance" default="6.0"> + The sampling distance to use when generating the detail mesh, in cell unit. </member> <member name="detail/sample_max_error" type="float" setter="set_detail_sample_max_error" getter="get_detail_sample_max_error" default="1.0"> + The maximum distance the detail mesh surface should deviate from heightfield, in cell unit. </member> <member name="edge/max_error" type="float" setter="set_edge_max_error" getter="get_edge_max_error" default="1.3"> + The maximum distance a simplfied contour's border edges should deviate the original raw contour. </member> <member name="edge/max_length" type="float" setter="set_edge_max_length" getter="get_edge_max_length" default="12.0"> + The maximum allowed length for contour edges along the border of the mesh. + [b]Note:[/b] While baking, this value will be rounded up to the nearest multiple of [member cell/size]. </member> <member name="filter/filter_walkable_low_height_spans" type="bool" setter="set_filter_walkable_low_height_spans" getter="get_filter_walkable_low_height_spans" default="false"> + If [code]true[/code], marks walkable spans as not walkable if the clearance above the span is less than [member agent/height]. </member> <member name="filter/ledge_spans" type="bool" setter="set_filter_ledge_spans" getter="get_filter_ledge_spans" default="false"> + If [code]true[/code], marks spans that are ledges as non-walkable. </member> <member name="filter/low_hanging_obstacles" type="bool" setter="set_filter_low_hanging_obstacles" getter="get_filter_low_hanging_obstacles" default="false"> + If [code]true[/code], marks non-walkable spans as walkable if their maximum is within [member agent/max_climb] of a walkable neighbor. </member> <member name="geometry/collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask"> - The physics layers used to generate the [NavigationMesh]. + The physics layers to scan for static colliders. + Only used when [member geometry/parsed_geometry_type] is [constant PARSED_GEOMETRY_STATIC_COLLIDERS] or [constant PARSED_GEOMETRY_BOTH]. </member> - <member name="geometry/parsed_geometry_type" type="int" setter="set_parsed_geometry_type" getter="get_parsed_geometry_type" default="0"> - What kind of geometry is used to generate the [NavigationMesh]. + <member name="geometry/parsed_geometry_type" type="int" setter="set_parsed_geometry_type" getter="get_parsed_geometry_type" enum="NavigationMesh.ParsedGeometryType" default="0"> + Determines which type of nodes will be parsed as geometry. See [enum ParsedGeometryType] for possible values. </member> - <member name="geometry/source_geometry_mode" type="int" setter="set_source_geometry_mode" getter="get_source_geometry_mode" default="0"> - Which geometry is used to generate the [NavigationMesh]. + <member name="geometry/source_geometry_mode" type="int" setter="set_source_geometry_mode" getter="get_source_geometry_mode" enum="NavigationMesh.SourceGeometryMode" default="0"> + The source of the geometry used when baking. See [enum SourceGeometryMode] for possible values. </member> <member name="geometry/source_group_name" type="StringName" setter="set_source_group_name" getter="get_source_group_name"> - The name of the group that is used to generate the [NavigationMesh]. + The name of the group to scan for geometry. + Only used when [member geometry/source_geometry_mode] is [constant SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN] or [constant SOURCE_GEOMETRY_GROUPS_EXPLICIT]. </member> <member name="polygon/verts_per_poly" type="float" setter="set_verts_per_poly" getter="get_verts_per_poly" default="6.0"> - The number of vertices to use per polygon. Higher values will improve performance at the cost of lower precision. + The maximum number of vertices allowed for polygons generated during the contour to polygon conversion process. </member> <member name="region/merge_size" type="float" setter="set_region_merge_size" getter="get_region_merge_size" default="20.0"> - If two adjacent regions' edges are separated by a distance lower than this value, the regions will be merged together. + Any regions with a size smaller than this will be merged with larger regions if possible. + [b]Note:[/b] This value will be squared to calculate the number of cells. For example, a value of 20 will set the number of cells to 400. </member> <member name="region/min_size" type="float" setter="set_region_min_size" getter="get_region_min_size" default="8.0"> The minimum size of a region for it to be created. + [b]Note:[/b] This value will be squared to calculate the minimum number of cells allowed to form isolated island areas. For example, a value of 8 will set the number of cells to 64. </member> - <member name="sample_partition_type/sample_partition_type" type="int" setter="set_sample_partition_type" getter="get_sample_partition_type" default="0"> + <member name="sample_partition_type/sample_partition_type" type="int" setter="set_sample_partition_type" getter="get_sample_partition_type" enum="NavigationMesh.SamplePartitionType" default="0"> + Partitioning algorithm for creating the navigation mesh polys. See [enum SamplePartitionType] for possible values. </member> </members> <constants> - <constant name="SAMPLE_PARTITION_WATERSHED" value="0"> + <constant name="SAMPLE_PARTITION_WATERSHED" value="0" enum="SamplePartitionType"> + Watershed partitioning. Generally the best choice if you precompute the navigation mesh, use this if you have large open areas. </constant> - <constant name="SAMPLE_PARTITION_MONOTONE" value="1"> + <constant name="SAMPLE_PARTITION_MONOTONE" value="1" enum="SamplePartitionType"> + Monotone partitioning. Use this if you want fast navigation mesh generation. </constant> - <constant name="SAMPLE_PARTITION_LAYERS" value="2"> + <constant name="SAMPLE_PARTITION_LAYERS" value="2" enum="SamplePartitionType"> + Layer partitioning. Good choice to use for tiled navigation mesh with medium and small sized tiles. </constant> - <constant name="PARSED_GEOMETRY_MESH_INSTANCES" value="0"> + <constant name="SAMPLE_PARTITION_MAX" value="3" enum="SamplePartitionType"> + Represents the size of the [enum SamplePartitionType] enum. </constant> - <constant name="PARSED_GEOMETRY_STATIC_COLLIDERS" value="1"> + <constant name="PARSED_GEOMETRY_MESH_INSTANCES" value="0" enum="ParsedGeometryType"> + Parses mesh instances as geometry. This includes [MeshInstance3D], [CSGShape3D], and [GridMap] nodes. </constant> - <constant name="PARSED_GEOMETRY_BOTH" value="2"> + <constant name="PARSED_GEOMETRY_STATIC_COLLIDERS" value="1" enum="ParsedGeometryType"> + Parses [StaticBody3D] colliders as geometry. The collider should be in any of the layers specified by [member geometry/collision_mask]. + </constant> + <constant name="PARSED_GEOMETRY_BOTH" value="2" enum="ParsedGeometryType"> + Both [constant PARSED_GEOMETRY_MESH_INSTANCES] and [constant PARSED_GEOMETRY_STATIC_COLLIDERS]. + </constant> + <constant name="PARSED_GEOMETRY_MAX" value="3" enum="ParsedGeometryType"> + Represents the size of the [enum ParsedGeometryType] enum. + </constant> + <constant name="SOURCE_GEOMETRY_NAVMESH_CHILDREN" value="0" enum="SourceGeometryMode"> + Scans the child nodes of [NavigationRegion3D] recursively for geometry. + </constant> + <constant name="SOURCE_GEOMETRY_GROUPS_WITH_CHILDREN" value="1" enum="SourceGeometryMode"> + Scans nodes in a group and their child nodes recursively for geometry. The group is specified by [member geometry/source_group_name]. + </constant> + <constant name="SOURCE_GEOMETRY_GROUPS_EXPLICIT" value="2" enum="SourceGeometryMode"> + Uses nodes in a group for geometry. The group is specified by [member geometry/source_group_name]. + </constant> + <constant name="SOURCE_GEOMETRY_MAX" value="3" enum="SourceGeometryMode"> + Represents the size of the [enum SourceGeometryMode] enum. </constant> </constants> </class> diff --git a/doc/classes/NavigationMeshGenerator.xml b/doc/classes/NavigationMeshGenerator.xml index ce1182ffbe..9931033260 100644 --- a/doc/classes/NavigationMeshGenerator.xml +++ b/doc/classes/NavigationMeshGenerator.xml @@ -8,20 +8,15 @@ </tutorials> <methods> <method name="bake"> - <return type="void"> - </return> - <argument index="0" name="nav_mesh" type="NavigationMesh"> - </argument> - <argument index="1" name="root_node" type="Node"> - </argument> + <return type="void" /> + <argument index="0" name="nav_mesh" type="NavigationMesh" /> + <argument index="1" name="root_node" type="Node" /> <description> </description> </method> <method name="clear"> - <return type="void"> - </return> - <argument index="0" name="nav_mesh" type="NavigationMesh"> - </argument> + <return type="void" /> + <argument index="0" name="nav_mesh" type="NavigationMesh" /> <description> </description> </method> diff --git a/doc/classes/NavigationPolygon.xml b/doc/classes/NavigationPolygon.xml index 38921078d7..e1e2c34a63 100644 --- a/doc/classes/NavigationPolygon.xml +++ b/doc/classes/NavigationPolygon.xml @@ -47,119 +47,95 @@ </tutorials> <methods> <method name="add_outline"> - <return type="void"> - </return> - <argument index="0" name="outline" type="PackedVector2Array"> - </argument> + <return type="void" /> + <argument index="0" name="outline" type="PackedVector2Array" /> <description> Appends a [PackedVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use. </description> </method> <method name="add_outline_at_index"> - <return type="void"> - </return> - <argument index="0" name="outline" type="PackedVector2Array"> - </argument> - <argument index="1" name="index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="outline" type="PackedVector2Array" /> + <argument index="1" name="index" type="int" /> <description> Adds a [PackedVector2Array] that contains the vertices of an outline to the internal array that contains all the outlines at a fixed position. You have to call [method make_polygons_from_outlines] in order for this array to be converted to polygons that the engine will use. </description> </method> <method name="add_polygon"> - <return type="void"> - </return> - <argument index="0" name="polygon" type="PackedInt32Array"> - </argument> + <return type="void" /> + <argument index="0" name="polygon" type="PackedInt32Array" /> <description> Adds a polygon using the indices of the vertices you get when calling [method get_vertices]. </description> </method> <method name="clear_outlines"> - <return type="void"> - </return> + <return type="void" /> <description> Clears the array of the outlines, but it doesn't clear the vertices and the polygons that were created by them. </description> </method> <method name="clear_polygons"> - <return type="void"> - </return> + <return type="void" /> <description> Clears the array of polygons, but it doesn't clear the array of outlines and vertices. </description> </method> <method name="get_outline" qualifiers="const"> - <return type="PackedVector2Array"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="PackedVector2Array" /> + <argument index="0" name="idx" type="int" /> <description> Returns a [PackedVector2Array] containing the vertices of an outline that was created in the editor or by script. </description> </method> <method name="get_outline_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of outlines that were created in the editor or by script. </description> </method> <method name="get_polygon"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="idx" type="int" /> <description> Returns a [PackedInt32Array] containing the indices of the vertices of a created polygon. </description> </method> <method name="get_polygon_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the count of all polygons. </description> </method> <method name="get_vertices" qualifiers="const"> - <return type="PackedVector2Array"> - </return> + <return type="PackedVector2Array" /> <description> Returns a [PackedVector2Array] containing all the vertices being used to create the polygons. </description> </method> <method name="make_polygons_from_outlines"> - <return type="void"> - </return> + <return type="void" /> <description> Creates polygons from the outlines added in the editor or by script. </description> </method> <method name="remove_outline"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> <description> Removes an outline created in the editor or by script. You have to call [method make_polygons_from_outlines] for the polygons to update. </description> </method> <method name="set_outline"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="outline" type="PackedVector2Array"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="outline" type="PackedVector2Array" /> <description> Changes an outline created in the editor or by script. You have to call [method make_polygons_from_outlines] for the polygons to update. </description> </method> <method name="set_vertices"> - <return type="void"> - </return> - <argument index="0" name="vertices" type="PackedVector2Array"> - </argument> + <return type="void" /> + <argument index="0" name="vertices" type="PackedVector2Array" /> <description> Sets the vertices that can be then indexed to create polygons with the [method add_polygon] method. </description> diff --git a/doc/classes/NavigationRegion3D.xml b/doc/classes/NavigationRegion3D.xml index 2904ba4200..da06641b48 100644 --- a/doc/classes/NavigationRegion3D.xml +++ b/doc/classes/NavigationRegion3D.xml @@ -11,8 +11,7 @@ </tutorials> <methods> <method name="bake_navigation_mesh"> - <return type="void"> - </return> + <return type="void" /> <description> Bakes the [NavigationMesh]. The baking is done in a separate thread because navigation baking is not a cheap operation. This can be done at runtime. When it is completed, it automatically sets the new [NavigationMesh]. </description> diff --git a/doc/classes/NavigationServer2D.xml b/doc/classes/NavigationServer2D.xml index b0a57ed227..042ab06e6f 100644 --- a/doc/classes/NavigationServer2D.xml +++ b/doc/classes/NavigationServer2D.xml @@ -16,337 +16,249 @@ </tutorials> <methods> <method name="agent_create" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates the agent. </description> </method> <method name="agent_is_map_changed" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="agent" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="agent" type="RID" /> <description> Returns true if the map got changed the previous frame. </description> </method> <method name="agent_set_callback" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="agent" type="RID"> - </argument> - <argument index="1" name="receiver" type="Object"> - </argument> - <argument index="2" name="method" type="StringName"> - </argument> - <argument index="3" name="userdata" type="Variant" default="null"> - </argument> + <return type="void" /> + <argument index="0" name="agent" type="RID" /> + <argument index="1" name="receiver" type="Object" /> + <argument index="2" name="method" type="StringName" /> + <argument index="3" name="userdata" type="Variant" default="null" /> <description> Callback called at the end of the RVO process. </description> </method> <method name="agent_set_map" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="agent" type="RID"> - </argument> - <argument index="1" name="map" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="agent" type="RID" /> + <argument index="1" name="map" type="RID" /> <description> Puts the agent in the map. </description> </method> <method name="agent_set_max_neighbors" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="agent" type="RID"> - </argument> - <argument index="1" name="count" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="agent" type="RID" /> + <argument index="1" name="count" type="int" /> <description> Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. </description> </method> <method name="agent_set_max_speed" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="agent" type="RID"> - </argument> - <argument index="1" name="max_speed" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="agent" type="RID" /> + <argument index="1" name="max_speed" type="float" /> <description> Sets the maximum speed of the agent. Must be positive. </description> </method> <method name="agent_set_neighbor_dist" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="agent" type="RID"> - </argument> - <argument index="1" name="dist" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="agent" type="RID" /> + <argument index="1" name="dist" type="float" /> <description> Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. </description> </method> <method name="agent_set_position" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="agent" type="RID"> - </argument> - <argument index="1" name="position" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="agent" type="RID" /> + <argument index="1" name="position" type="Vector2" /> <description> Sets the position of the agent in world space. </description> </method> <method name="agent_set_radius" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="agent" type="RID"> - </argument> - <argument index="1" name="radius" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="agent" type="RID" /> + <argument index="1" name="radius" type="float" /> <description> Sets the radius of the agent. </description> </method> <method name="agent_set_target_velocity" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="agent" type="RID"> - </argument> - <argument index="1" name="target_velocity" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="agent" type="RID" /> + <argument index="1" name="target_velocity" type="Vector2" /> <description> Sets the new target velocity. </description> </method> <method name="agent_set_time_horizon" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="agent" type="RID"> - </argument> - <argument index="1" name="time" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="agent" type="RID" /> + <argument index="1" name="time" type="float" /> <description> The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. Must be positive. </description> </method> <method name="agent_set_velocity" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="agent" type="RID"> - </argument> - <argument index="1" name="velocity" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="agent" type="RID" /> + <argument index="1" name="velocity" type="Vector2" /> <description> Sets the current velocity of the agent. </description> </method> <method name="free" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="object" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="object" type="RID" /> <description> Destroy the RID </description> </method> <method name="map_create" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> Create a new map. </description> </method> <method name="map_get_cell_size" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="map" type="RID"> - </argument> + <return type="float" /> + <argument index="0" name="map" type="RID" /> <description> Returns the map cell size. </description> </method> <method name="map_get_closest_point" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="map" type="RID"> - </argument> - <argument index="1" name="to_point" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="map" type="RID" /> + <argument index="1" name="to_point" type="Vector2" /> <description> Returns the point closest to the provided [code]to_point[/code] on the navigation mesh surface. </description> </method> <method name="map_get_closest_point_owner" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="map" type="RID"> - </argument> - <argument index="1" name="to_point" type="Vector2"> - </argument> + <return type="RID" /> + <argument index="0" name="map" type="RID" /> + <argument index="1" name="to_point" type="Vector2" /> <description> Returns the owner region RID for the point returned by [method map_get_closest_point]. </description> </method> <method name="map_get_edge_connection_margin" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="map" type="RID"> - </argument> + <return type="float" /> + <argument index="0" name="map" type="RID" /> <description> Returns the edge connection margin of the map. The edge connection margin is a distance used to connect two regions. </description> </method> <method name="map_get_path" qualifiers="const"> - <return type="PackedVector2Array"> - </return> - <argument index="0" name="map" type="RID"> - </argument> - <argument index="1" name="origin" type="Vector2"> - </argument> - <argument index="2" name="destination" type="Vector2"> - </argument> - <argument index="3" name="optimize" type="bool"> - </argument> - <argument index="4" name="layers" type="int" default="1"> - </argument> + <return type="PackedVector2Array" /> + <argument index="0" name="map" type="RID" /> + <argument index="1" name="origin" type="Vector2" /> + <argument index="2" name="destination" type="Vector2" /> + <argument index="3" name="optimize" type="bool" /> + <argument index="4" name="layers" type="int" default="1" /> <description> Returns the navigation path to reach the destination from the origin. [code]layers[/code] is a bitmask of all region layers that are allowed to be in the path. </description> </method> <method name="map_is_active" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="nap" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="nap" type="RID" /> <description> Returns true if the map is active. </description> </method> <method name="map_set_active" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="map" type="RID"> - </argument> - <argument index="1" name="active" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="map" type="RID" /> + <argument index="1" name="active" type="bool" /> <description> Sets the map active. </description> </method> <method name="map_set_cell_size" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="map" type="RID"> - </argument> - <argument index="1" name="cell_size" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="map" type="RID" /> + <argument index="1" name="cell_size" type="float" /> <description> Set the map cell size used to weld the navigation mesh polygons. </description> </method> <method name="map_set_edge_connection_margin" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="map" type="RID"> - </argument> - <argument index="1" name="margin" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="map" type="RID" /> + <argument index="1" name="margin" type="float" /> <description> Set the map edge connection margin used to weld the compatible region edges. </description> </method> <method name="region_create" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates a new region. </description> </method> <method name="region_get_connection_pathway_end" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="region" type="RID"> - </argument> - <argument index="1" name="connection" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="region" type="RID" /> + <argument index="1" name="connection" type="int" /> <description> Returns the ending point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count]. </description> </method> <method name="region_get_connection_pathway_start" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="region" type="RID"> - </argument> - <argument index="1" name="connection" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="region" type="RID" /> + <argument index="1" name="connection" type="int" /> <description> Returns the starting point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count]. </description> </method> <method name="region_get_connections_count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="region" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="region" type="RID" /> <description> Returns how many connections this [code]region[/code] has with other regions in the map. </description> </method> <method name="region_get_layers" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="region" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="region" type="RID" /> <description> Returns the region's layers. </description> </method> <method name="region_set_layers" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="region" type="RID"> - </argument> - <argument index="1" name="layers" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="region" type="RID" /> + <argument index="1" name="layers" type="int" /> <description> Set the region's layers. This allows selecting regions from a path request (when using [method NavigationServer2D.map_get_path]). </description> </method> <method name="region_set_map" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="region" type="RID"> - </argument> - <argument index="1" name="map" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="region" type="RID" /> + <argument index="1" name="map" type="RID" /> <description> Sets the map for the region. </description> </method> <method name="region_set_navpoly" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="region" type="RID"> - </argument> - <argument index="1" name="nav_poly" type="NavigationPolygon"> - </argument> + <return type="void" /> + <argument index="0" name="region" type="RID" /> + <argument index="1" name="nav_poly" type="NavigationPolygon" /> <description> Sets the navigation mesh for the region. </description> </method> <method name="region_set_transform" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="region" type="RID"> - </argument> - <argument index="1" name="transform" type="Transform2D"> - </argument> + <return type="void" /> + <argument index="0" name="region" type="RID" /> + <argument index="1" name="transform" type="Transform2D" /> <description> Sets the global transformation for the region. </description> @@ -354,8 +266,7 @@ </methods> <signals> <signal name="map_changed"> - <argument index="0" name="map" type="RID"> - </argument> + <argument index="0" name="map" type="RID" /> <description> Emitted when a navigation map is updated, when a region moves or is modified. </description> diff --git a/doc/classes/NavigationServer3D.xml b/doc/classes/NavigationServer3D.xml index ef9efcb99c..73ca18655a 100644 --- a/doc/classes/NavigationServer3D.xml +++ b/doc/classes/NavigationServer3D.xml @@ -16,301 +16,221 @@ </tutorials> <methods> <method name="agent_create" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates the agent. </description> </method> <method name="agent_is_map_changed" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="agent" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="agent" type="RID" /> <description> Returns true if the map got changed the previous frame. </description> </method> <method name="agent_set_callback" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="agent" type="RID"> - </argument> - <argument index="1" name="receiver" type="Object"> - </argument> - <argument index="2" name="method" type="StringName"> - </argument> - <argument index="3" name="userdata" type="Variant" default="null"> - </argument> + <return type="void" /> + <argument index="0" name="agent" type="RID" /> + <argument index="1" name="receiver" type="Object" /> + <argument index="2" name="method" type="StringName" /> + <argument index="3" name="userdata" type="Variant" default="null" /> <description> Callback called at the end of the RVO process. </description> </method> <method name="agent_set_map" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="agent" type="RID"> - </argument> - <argument index="1" name="map" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="agent" type="RID" /> + <argument index="1" name="map" type="RID" /> <description> Puts the agent in the map. </description> </method> <method name="agent_set_max_neighbors" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="agent" type="RID"> - </argument> - <argument index="1" name="count" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="agent" type="RID" /> + <argument index="1" name="count" type="int" /> <description> Sets the maximum number of other agents the agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. </description> </method> <method name="agent_set_max_speed" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="agent" type="RID"> - </argument> - <argument index="1" name="max_speed" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="agent" type="RID" /> + <argument index="1" name="max_speed" type="float" /> <description> Sets the maximum speed of the agent. Must be positive. </description> </method> <method name="agent_set_neighbor_dist" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="agent" type="RID"> - </argument> - <argument index="1" name="dist" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="agent" type="RID" /> + <argument index="1" name="dist" type="float" /> <description> Sets the maximum distance to other agents this agent takes into account in the navigation. The larger this number, the longer the running time of the simulation. If the number is too low, the simulation will not be safe. </description> </method> <method name="agent_set_position" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="agent" type="RID"> - </argument> - <argument index="1" name="position" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="agent" type="RID" /> + <argument index="1" name="position" type="Vector3" /> <description> Sets the position of the agent in world space. </description> </method> <method name="agent_set_radius" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="agent" type="RID"> - </argument> - <argument index="1" name="radius" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="agent" type="RID" /> + <argument index="1" name="radius" type="float" /> <description> Sets the radius of the agent. </description> </method> <method name="agent_set_target_velocity" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="agent" type="RID"> - </argument> - <argument index="1" name="target_velocity" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="agent" type="RID" /> + <argument index="1" name="target_velocity" type="Vector3" /> <description> Sets the new target velocity. </description> </method> <method name="agent_set_time_horizon" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="agent" type="RID"> - </argument> - <argument index="1" name="time" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="agent" type="RID" /> + <argument index="1" name="time" type="float" /> <description> The minimal amount of time for which the agent's velocities that are computed by the simulation are safe with respect to other agents. The larger this number, the sooner this agent will respond to the presence of other agents, but the less freedom this agent has in choosing its velocities. Must be positive. </description> </method> <method name="agent_set_velocity" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="agent" type="RID"> - </argument> - <argument index="1" name="velocity" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="agent" type="RID" /> + <argument index="1" name="velocity" type="Vector3" /> <description> Sets the current velocity of the agent. </description> </method> <method name="free" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="object" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="object" type="RID" /> <description> Destroy the RID </description> </method> <method name="map_create" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> Create a new map. </description> </method> <method name="map_get_cell_size" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="map" type="RID"> - </argument> + <return type="float" /> + <argument index="0" name="map" type="RID" /> <description> Returns the map cell size. </description> </method> <method name="map_get_closest_point" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="map" type="RID"> - </argument> - <argument index="1" name="to_point" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="map" type="RID" /> + <argument index="1" name="to_point" type="Vector3" /> <description> Returns the point closest to the provided [code]point[/code] on the navigation mesh surface. </description> </method> <method name="map_get_closest_point_normal" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="map" type="RID"> - </argument> - <argument index="1" name="to_point" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="map" type="RID" /> + <argument index="1" name="to_point" type="Vector3" /> <description> Returns the normal for the point returned by [method map_get_closest_point]. </description> </method> <method name="map_get_closest_point_owner" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="map" type="RID"> - </argument> - <argument index="1" name="to_point" type="Vector3"> - </argument> + <return type="RID" /> + <argument index="0" name="map" type="RID" /> + <argument index="1" name="to_point" type="Vector3" /> <description> Returns the owner region RID for the point returned by [method map_get_closest_point]. </description> </method> <method name="map_get_closest_point_to_segment" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="map" type="RID"> - </argument> - <argument index="1" name="start" type="Vector3"> - </argument> - <argument index="2" name="end" type="Vector3"> - </argument> - <argument index="3" name="use_collision" type="bool" default="false"> - </argument> + <return type="Vector3" /> + <argument index="0" name="map" type="RID" /> + <argument index="1" name="start" type="Vector3" /> + <argument index="2" name="end" type="Vector3" /> + <argument index="3" name="use_collision" type="bool" default="false" /> <description> Returns the closest point between the navigation surface and the segment. </description> </method> <method name="map_get_edge_connection_margin" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="map" type="RID"> - </argument> + <return type="float" /> + <argument index="0" name="map" type="RID" /> <description> Returns the edge connection margin of the map. This distance is the minimum vertex distance needed to connect two edges from different regions. </description> </method> <method name="map_get_path" qualifiers="const"> - <return type="PackedVector3Array"> - </return> - <argument index="0" name="map" type="RID"> - </argument> - <argument index="1" name="origin" type="Vector3"> - </argument> - <argument index="2" name="destination" type="Vector3"> - </argument> - <argument index="3" name="optimize" type="bool"> - </argument> - <argument index="4" name="layers" type="int" default="1"> - </argument> + <return type="PackedVector3Array" /> + <argument index="0" name="map" type="RID" /> + <argument index="1" name="origin" type="Vector3" /> + <argument index="2" name="destination" type="Vector3" /> + <argument index="3" name="optimize" type="bool" /> + <argument index="4" name="layers" type="int" default="1" /> <description> Returns the navigation path to reach the destination from the origin. [code]layers[/code] is a bitmask of all region layers that are allowed to be in the path. </description> </method> <method name="map_get_up" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="map" type="RID"> - </argument> + <return type="Vector3" /> + <argument index="0" name="map" type="RID" /> <description> Returns the map's up direction. </description> </method> <method name="map_is_active" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="nap" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="nap" type="RID" /> <description> Returns true if the map is active. </description> </method> <method name="map_set_active" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="map" type="RID"> - </argument> - <argument index="1" name="active" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="map" type="RID" /> + <argument index="1" name="active" type="bool" /> <description> Sets the map active. </description> </method> <method name="map_set_cell_size" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="map" type="RID"> - </argument> - <argument index="1" name="cell_size" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="map" type="RID" /> + <argument index="1" name="cell_size" type="float" /> <description> Set the map cell size used to weld the navigation mesh polygons. </description> </method> <method name="map_set_edge_connection_margin" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="map" type="RID"> - </argument> - <argument index="1" name="margin" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="map" type="RID" /> + <argument index="1" name="margin" type="float" /> <description> Set the map edge connection margin used to weld the compatible region edges. </description> </method> <method name="map_set_up" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="map" type="RID"> - </argument> - <argument index="1" name="up" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="map" type="RID" /> + <argument index="1" name="up" type="Vector3" /> <description> Sets the map up direction. </description> </method> <method name="process"> - <return type="void"> - </return> - <argument index="0" name="delta_time" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="delta_time" type="float" /> <description> Process the collision avoidance agents. The result of this process is needed by the physics server, so this must be called in the main thread. @@ -318,112 +238,84 @@ </description> </method> <method name="region_bake_navmesh" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="mesh" type="NavigationMesh"> - </argument> - <argument index="1" name="node" type="Node"> - </argument> + <return type="void" /> + <argument index="0" name="mesh" type="NavigationMesh" /> + <argument index="1" name="node" type="Node" /> <description> Bakes the navigation mesh. </description> </method> <method name="region_create" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates a new region. </description> </method> <method name="region_get_connection_pathway_end" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="region" type="RID"> - </argument> - <argument index="1" name="connection" type="int"> - </argument> + <return type="Vector3" /> + <argument index="0" name="region" type="RID" /> + <argument index="1" name="connection" type="int" /> <description> Returns the ending point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count]. </description> </method> <method name="region_get_connection_pathway_start" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="region" type="RID"> - </argument> - <argument index="1" name="connection" type="int"> - </argument> + <return type="Vector3" /> + <argument index="0" name="region" type="RID" /> + <argument index="1" name="connection" type="int" /> <description> Returns the starting point of a connection door. [code]connection[/code] is an index between 0 and the return value of [method region_get_connections_count]. </description> </method> <method name="region_get_connections_count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="region" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="region" type="RID" /> <description> Returns how many connections this [code]region[/code] has with other regions in the map. </description> </method> <method name="region_get_layers" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="region" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="region" type="RID" /> <description> Returns the region's layers. </description> </method> <method name="region_set_layers" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="region" type="RID"> - </argument> - <argument index="1" name="layers" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="region" type="RID" /> + <argument index="1" name="layers" type="int" /> <description> Set the region's layers. This allows selecting regions from a path request (when using [method NavigationServer3D.map_get_path]). </description> </method> <method name="region_set_map" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="region" type="RID"> - </argument> - <argument index="1" name="map" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="region" type="RID" /> + <argument index="1" name="map" type="RID" /> <description> Sets the map for the region. </description> </method> <method name="region_set_navmesh" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="region" type="RID"> - </argument> - <argument index="1" name="nav_mesh" type="NavigationMesh"> - </argument> + <return type="void" /> + <argument index="0" name="region" type="RID" /> + <argument index="1" name="nav_mesh" type="NavigationMesh" /> <description> Sets the navigation mesh for the region. </description> </method> <method name="region_set_transform" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="region" type="RID"> - </argument> - <argument index="1" name="transform" type="Transform3D"> - </argument> + <return type="void" /> + <argument index="0" name="region" type="RID" /> + <argument index="1" name="transform" type="Transform3D" /> <description> Sets the global transformation for the region. </description> </method> <method name="set_active" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="active" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="active" type="bool" /> <description> Control activation of this server. </description> @@ -431,8 +323,7 @@ </methods> <signals> <signal name="map_changed"> - <argument index="0" name="map" type="RID"> - </argument> + <argument index="0" name="map" type="RID" /> <description> Emitted when a navigation map is updated, when a region moves or is modified. </description> diff --git a/doc/classes/NinePatchRect.xml b/doc/classes/NinePatchRect.xml index 5d59f994d3..77fd9165bb 100644 --- a/doc/classes/NinePatchRect.xml +++ b/doc/classes/NinePatchRect.xml @@ -10,21 +10,16 @@ </tutorials> <methods> <method name="get_patch_margin" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="margin" type="int" enum="Side"> - </argument> + <return type="int" /> + <argument index="0" name="margin" type="int" enum="Side" /> <description> Returns the size of the margin on the specified [enum Side]. </description> </method> <method name="set_patch_margin"> - <return type="void"> - </return> - <argument index="0" name="margin" type="int" enum="Side"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="margin" type="int" enum="Side" /> + <argument index="1" name="value" type="int" /> <description> Sets the size of the margin on the specified [enum Side] to [code]value[/code] pixels. </description> diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 88e69968d2..608d76cd9f 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -14,7 +14,7 @@ To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with the [member owner] property. This keeps track of who instantiated what. This is mostly useful when writing editors and tools, though. Finally, when a node is freed with [method Object.free] or [method queue_free], it will also free all its children. [b]Groups:[/b] Nodes can be added to as many groups as you want to be easy to manage, you could create groups like "enemies" or "collectables" for example, depending on your game. See [method add_to_group], [method is_in_group] and [method remove_from_group]. You can then retrieve all nodes in these groups, iterate them and even call methods on groups via the methods on [SceneTree]. - [b]Networking with nodes:[/b] After connecting to a server (or making one, see [NetworkedMultiplayerENet]), it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling [method rpc] with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections). To identify which node receives the RPC call, Godot will use its [NodePath] (make sure node names are the same on all peers). Also, take a look at the high-level networking tutorial and corresponding demos. + [b]Networking with nodes:[/b] After connecting to a server (or making one, see [ENetMultiplayerPeer]), it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling [method rpc] with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections). To identify which node receives the RPC call, Godot will use its [NodePath] (make sure node names are the same on all peers). Also, take a look at the high-level networking tutorial and corresponding demos. </description> <tutorials> <link title="Scenes and nodes">https://docs.godotengine.org/en/latest/getting_started/step_by_step/scenes_and_nodes.html</link> @@ -22,24 +22,21 @@ </tutorials> <methods> <method name="_enter_tree" qualifiers="virtual"> - <return type="void"> - </return> + <return type="void" /> <description> Called when the node enters the [SceneTree] (e.g. upon instancing, scene changing, or after calling [method add_child] in a script). If the node has children, its [method _enter_tree] callback will be called first, and then that of the children. Corresponds to the [constant NOTIFICATION_ENTER_TREE] notification in [method Object._notification]. </description> </method> <method name="_exit_tree" qualifiers="virtual"> - <return type="void"> - </return> + <return type="void" /> <description> Called when the node is about to leave the [SceneTree] (e.g. upon freeing, scene changing, or after calling [method remove_child] in a script). If the node has children, its [method _exit_tree] callback will be called last, after all its children have left the tree. Corresponds to the [constant NOTIFICATION_EXIT_TREE] notification in [method Object._notification] and signal [signal tree_exiting]. To get notified when the node has already left the active tree, connect to the [signal tree_exited]. </description> </method> - <method name="_get_configuration_warnings" qualifiers="virtual"> - <return type="String[]"> - </return> + <method name="_get_configuration_warnings" qualifiers="virtual const"> + <return type="PackedStringArray" /> <description> The elements in the array returned from this method are displayed as warnings in the Scene Dock if the script that overrides it is a [code]tool[/code] script. Returning an empty array produces no warnings. @@ -47,10 +44,8 @@ </description> </method> <method name="_input" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="event" type="InputEvent"> - </argument> + <return type="void" /> + <argument index="0" name="event" type="InputEvent" /> <description> Called when there is an input event. The input event propagates up through the node tree until a node consumes it. It is only called if input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_input]. @@ -60,10 +55,8 @@ </description> </method> <method name="_physics_process" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="delta" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="delta" type="float" /> <description> Called during the physics processing step of the main loop. Physics processing means that the frame rate is synced to the physics, i.e. the [code]delta[/code] variable should be constant. [code]delta[/code] is in seconds. It is only called if physics processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_physics_process]. @@ -72,10 +65,8 @@ </description> </method> <method name="_process" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="delta" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="delta" type="float" /> <description> Called during the processing step of the main loop. Processing happens at every frame and as fast as possible, so the [code]delta[/code] time since the previous frame is not constant. [code]delta[/code] is in seconds. It is only called if processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process]. @@ -84,8 +75,7 @@ </description> </method> <method name="_ready" qualifiers="virtual"> - <return type="void"> - </return> + <return type="void" /> <description> Called when the node is "ready", i.e. when both the node and its children have entered the scene tree. If the node has children, their [method _ready] callbacks get triggered first, and the parent node will receive the ready notification afterwards. Corresponds to the [constant NOTIFICATION_READY] notification in [method Object._notification]. See also the [code]onready[/code] keyword for variables. @@ -94,10 +84,8 @@ </description> </method> <method name="_unhandled_input" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="event" type="InputEvent"> - </argument> + <return type="void" /> + <argument index="0" name="event" type="InputEvent" /> <description> Called when an [InputEvent] hasn't been consumed by [method _input] or any GUI. The input event propagates up through the node tree until a node consumes it. It is only called if unhandled input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_input]. @@ -107,12 +95,10 @@ </description> </method> <method name="_unhandled_key_input" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="event" type="InputEventKey"> - </argument> + <return type="void" /> + <argument index="0" name="event" type="InputEvent" /> <description> - Called when an [InputEventKey] hasn't been consumed by [method _input] or any GUI. The input event propagates up through the node tree until a node consumes it. + Called when an [InputEventKey] or [InputEventShortcut] hasn't been consumed by [method _input] or any GUI. The input event propagates up through the node tree until a node consumes it. It is only called if unhandled key input processing is enabled, which is done automatically if this method is overridden, and can be toggled with [method set_process_unhandled_key_input]. To consume the input event and stop it propagating further to other nodes, [method Viewport.set_input_as_handled] can be called. For gameplay input, this and [method _unhandled_input] are usually a better fit than [method _input] as they allow the GUI to intercept the events first. @@ -120,15 +106,14 @@ </description> </method> <method name="add_child"> - <return type="void"> - </return> - <argument index="0" name="node" type="Node"> - </argument> - <argument index="1" name="legible_unique_name" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="node" type="Node" /> + <argument index="1" name="legible_unique_name" type="bool" default="false" /> + <argument index="2" name="internal" type="int" enum="Node.InternalMode" default="0" /> <description> Adds a child node. Nodes can have any number of children, but every child must have a unique name. Child nodes are automatically deleted when the parent node is deleted, so an entire scene can be removed by deleting its topmost node. If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instantiated instead of its type. + If [code]internal[/code] is different than [constant INTERNAL_MODE_DISABLED], the child will be added as internal node. Such nodes are ignored by methods like [method get_children], unless their parameter [code]include_internal[/code] is [code]true[/code].The intended usage is to hide the internal nodes from the user, so the user won't accidentally delete or modify them. Used by some GUI nodes, e.g. [ColorPicker]. See [enum InternalMode] for available modes. [b]Note:[/b] If the child node already has a parent, the function will fail. Use [method remove_child] first to remove the node from its current parent. For example: [codeblocks] [gdscript] @@ -151,40 +136,34 @@ </description> </method> <method name="add_sibling"> - <return type="void"> - </return> - <argument index="0" name="sibling" type="Node"> - </argument> - <argument index="1" name="legible_unique_name" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="sibling" type="Node" /> + <argument index="1" name="legible_unique_name" type="bool" default="false" /> <description> Adds a [code]sibling[/code] node to current's node parent, at the same level as that node, right below it. If [code]legible_unique_name[/code] is [code]true[/code], the child node will have a human-readable name based on the name of the node being instantiated instead of its type. Use [method add_child] instead of this method if you don't need the child node to be added below a specific node in the list of children. + [b]Note:[/b] If this node is internal, the new sibling will be internal too (see [code]internal[/code] parameter in [method add_child]). </description> </method> <method name="add_to_group"> - <return type="void"> - </return> - <argument index="0" name="group" type="StringName"> - </argument> - <argument index="1" name="persistent" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="group" type="StringName" /> + <argument index="1" name="persistent" type="bool" default="false" /> <description> Adds the node to a group. Groups are helpers to name and organize a subset of nodes, for example "enemies" or "collectables". A node can be in any number of groups. Nodes can be assigned a group at any time, but will not be added until they are inside the scene tree (see [method is_inside_tree]). See notes in the description, and the group methods in [SceneTree]. The [code]persistent[/code] option is used when packing node to [PackedScene] and saving to file. Non-persistent groups aren't stored. + [b]Note:[/b] For performance reasons, the order of node groups is [i]not[/i] guaranteed. The order of node groups should not be relied upon as it can vary across project runs. </description> </method> <method name="can_process" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the node can process while the scene tree is paused (see [member process_mode]). Always returns [code]true[/code] if the scene tree is not paused, and [code]false[/code] if the node is not in the tree. </description> </method> <method name="create_tween"> - <return type="Tween"> - </return> + <return type="Tween" /> <description> Creates a new [Tween] and binds it to this node. This is equivalent of doing: [codeblock] @@ -193,10 +172,8 @@ </description> </method> <method name="duplicate" qualifiers="const"> - <return type="Node"> - </return> - <argument index="0" name="flags" type="int" default="15"> - </argument> + <return type="Node" /> + <argument index="0" name="flags" type="int" default="15" /> <description> Duplicates the node, returning a new node. You can fine-tune the behavior using the [code]flags[/code] (see [enum DuplicateFlags]). @@ -204,14 +181,10 @@ </description> </method> <method name="find_node" qualifiers="const"> - <return type="Node"> - </return> - <argument index="0" name="mask" type="String"> - </argument> - <argument index="1" name="recursive" type="bool" default="true"> - </argument> - <argument index="2" name="owned" type="bool" default="true"> - </argument> + <return type="Node" /> + <argument index="0" name="mask" type="String" /> + <argument index="1" name="recursive" type="bool" default="true" /> + <argument index="2" name="owned" type="bool" default="true" /> <description> Finds a descendant of this node whose name matches [code]mask[/code] as in [method String.match] (i.e. case-sensitive, but [code]"*"[/code] matches zero or more characters and [code]"?"[/code] matches any single character except [code]"."[/code]). [b]Note:[/b] It does not match against the full path, just against individual node names. @@ -220,10 +193,8 @@ </description> </method> <method name="find_parent" qualifiers="const"> - <return type="Node"> - </return> - <argument index="0" name="mask" type="String"> - </argument> + <return type="Node" /> + <argument index="0" name="mask" type="String" /> <description> Finds the first parent of the current node whose name matches [code]mask[/code] as in [method String.match] (i.e. case-sensitive, but [code]"*"[/code] matches zero or more characters and [code]"?"[/code] matches any single character except [code]"."[/code]). [b]Note:[/b] It does not match against the full path, just against individual node names. @@ -231,62 +202,61 @@ </description> </method> <method name="get_child" qualifiers="const"> - <return type="Node"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Node" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="include_internal" type="bool" default="false" /> <description> Returns a child node by its index (see [method get_child_count]). This method is often used for iterating all children of a node. Negative indices access the children from the last one. + If [code]include_internal[/code] is [code]true[/code], internal children are skipped (see [code]internal[/code] parameter in [method add_child]). To access a child node via its name, use [method get_node]. </description> </method> <method name="get_child_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> + <argument index="0" name="include_internal" type="bool" default="false" /> <description> Returns the number of child nodes. + If [code]include_internal[/code] is [code]false[/code], internal children aren't counted (see [code]internal[/code] parameter in [method add_child]). </description> </method> <method name="get_children" qualifiers="const"> - <return type="Node[]"> - </return> + <return type="Node[]" /> + <argument index="0" name="include_internal" type="bool" default="false" /> <description> Returns an array of references to node's children. + If [code]include_internal[/code] is [code]false[/code], the returned array won't include internal children (see [code]internal[/code] parameter in [method add_child]). </description> </method> <method name="get_editor_description" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> </description> </method> <method name="get_groups" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns an array listing the groups that the node is a member of. + [b]Note:[/b] For performance reasons, the order of node groups is [i]not[/i] guaranteed. The order of node groups should not be relied upon as it can vary across project runs. </description> </method> <method name="get_index" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> + <argument index="0" name="include_internal" type="bool" default="false" /> <description> Returns the node's order in the scene tree branch. For example, if called on the first child node the position is [code]0[/code]. + If [code]include_internal[/code] is [code]false[/code], the index won't take internal children into account, i.e. first non-internal child will have index of 0 (see [code]internal[/code] parameter in [method add_child]). </description> </method> - <method name="get_network_master" qualifiers="const"> - <return type="int"> - </return> + <method name="get_multiplayer_authority" qualifiers="const"> + <return type="int" /> <description> - Returns the peer ID of the network master for this node. See [method set_network_master]. + Returns the peer ID of the multiplayer authority for this node. See [method set_multiplayer_authority]. </description> </method> <method name="get_node" qualifiers="const"> - <return type="Node"> - </return> - <argument index="0" name="path" type="NodePath"> - </argument> + <return type="Node" /> + <argument index="0" name="path" type="NodePath" /> <description> Fetches a node. The [NodePath] can be either a relative path (from the current node) or an absolute path (in the scene tree) to a node. If the path does not exist, a [code]null instance[/code] is returned and an error is logged. Attempts to access methods on the return value will result in an "Attempt to call <method> on a null instance." error. [b]Note:[/b] Fetching absolute paths only works when the node is inside the scene tree (see [method is_inside_tree]). @@ -319,10 +289,8 @@ </description> </method> <method name="get_node_and_resource"> - <return type="Array"> - </return> - <argument index="0" name="path" type="NodePath"> - </argument> + <return type="Array" /> + <argument index="0" name="path" type="NodePath" /> <description> Fetches a node and one of its resources as specified by the [NodePath]'s subname (e.g. [code]Area2D/CollisionShape2D:shape[/code]). If several nested resources are specified in the [NodePath], the last one will be fetched. The return value is an array of size 3: the first index points to the [Node] (or [code]null[/code] if not found), the second index points to the [Resource] (or [code]null[/code] if not found), and the third index is the remaining [NodePath], if any. @@ -342,208 +310,180 @@ </description> </method> <method name="get_node_or_null" qualifiers="const"> - <return type="Node"> - </return> - <argument index="0" name="path" type="NodePath"> - </argument> + <return type="Node" /> + <argument index="0" name="path" type="NodePath" /> <description> Similar to [method get_node], but does not log an error if [code]path[/code] does not point to a valid [Node]. </description> </method> <method name="get_parent" qualifiers="const"> - <return type="Node"> - </return> + <return type="Node" /> <description> Returns the parent node of the current node, or a [code]null instance[/code] if the node lacks a parent. </description> </method> <method name="get_path" qualifiers="const"> - <return type="NodePath"> - </return> + <return type="NodePath" /> <description> Returns the absolute path of the current node. This only works if the current node is inside the scene tree (see [method is_inside_tree]). </description> </method> <method name="get_path_to" qualifiers="const"> - <return type="NodePath"> - </return> - <argument index="0" name="node" type="Node"> - </argument> + <return type="NodePath" /> + <argument index="0" name="node" type="Node" /> <description> Returns the relative [NodePath] from this node to the specified [code]node[/code]. Both nodes must be in the same scene or the function will fail. </description> </method> <method name="get_physics_process_delta_time" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> - Returns the time elapsed (in seconds) since the last physics-bound frame (see [method _physics_process]). This is always a constant value in physics processing unless the frames per second is changed via [member Engine.iterations_per_second]. + Returns the time elapsed (in seconds) since the last physics-bound frame (see [method _physics_process]). This is always a constant value in physics processing unless the frames per second is changed via [member Engine.physics_ticks_per_second]. </description> </method> <method name="get_process_delta_time" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the time elapsed (in seconds) since the last process callback. This value may vary from frame to frame. </description> </method> <method name="get_scene_instance_load_placeholder" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if this is an instance load placeholder. See [InstancePlaceholder]. </description> </method> <method name="get_tree" qualifiers="const"> - <return type="SceneTree"> - </return> + <return type="SceneTree" /> <description> Returns the [SceneTree] that contains this node. </description> </method> <method name="get_viewport" qualifiers="const"> - <return type="Viewport"> - </return> + <return type="Viewport" /> <description> Returns the node's [Viewport]. </description> </method> <method name="has_node" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="path" type="NodePath"> - </argument> + <return type="bool" /> + <argument index="0" name="path" type="NodePath" /> <description> Returns [code]true[/code] if the node that the [NodePath] points to exists. </description> </method> <method name="has_node_and_resource" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="path" type="NodePath"> - </argument> + <return type="bool" /> + <argument index="0" name="path" type="NodePath" /> <description> Returns [code]true[/code] if the [NodePath] points to a valid node and its subname points to a valid resource, e.g. [code]Area2D/CollisionShape2D:shape[/code]. Properties with a non-[Resource] type (e.g. nodes or primitive math types) are not considered resources. </description> </method> <method name="is_ancestor_of" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="node" type="Node"> - </argument> + <return type="bool" /> + <argument index="0" name="node" type="Node" /> <description> Returns [code]true[/code] if the given node is a direct or indirect child of the current node. </description> </method> <method name="is_displayed_folded" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> - Returns [code]true[/code] if the node is folded (collapsed) in the Scene dock. + Returns [code]true[/code] if the node is folded (collapsed) in the Scene dock. This method is only intended for use with editor tooling. + </description> + </method> + <method name="is_editable_instance" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="node" type="Node" /> + <description> + Returns [code]true[/code] if [code]node[/code] has editable children enabled relative to this node. This method is only intended for use with editor tooling. </description> </method> <method name="is_greater_than" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="node" type="Node"> - </argument> + <return type="bool" /> + <argument index="0" name="node" type="Node" /> <description> Returns [code]true[/code] if the given node occurs later in the scene hierarchy than the current node. </description> </method> <method name="is_in_group" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="group" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="group" type="StringName" /> <description> Returns [code]true[/code] if this node is in the specified group. See notes in the description, and the group methods in [SceneTree]. </description> </method> <method name="is_inside_tree" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if this node is currently inside a [SceneTree]. </description> </method> - <method name="is_network_master" qualifiers="const"> - <return type="bool"> - </return> + <method name="is_multiplayer_authority" qualifiers="const"> + <return type="bool" /> <description> - Returns [code]true[/code] if the local system is the master of this node. + Returns [code]true[/code] if the local system is the multiplayer authority of this node. </description> </method> <method name="is_physics_processing" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if physics processing is enabled (see [method set_physics_process]). </description> </method> <method name="is_physics_processing_internal" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if internal physics processing is enabled (see [method set_physics_process_internal]). </description> </method> <method name="is_processing" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if processing is enabled (see [method set_process]). </description> </method> <method name="is_processing_input" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the node is processing input (see [method set_process_input]). </description> </method> <method name="is_processing_internal" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if internal processing is enabled (see [method set_process_internal]). </description> </method> <method name="is_processing_unhandled_input" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the node is processing unhandled input (see [method set_process_unhandled_input]). </description> </method> <method name="is_processing_unhandled_key_input" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the node is processing unhandled key input (see [method set_process_unhandled_key_input]). </description> </method> <method name="move_child"> - <return type="void"> - </return> - <argument index="0" name="child_node" type="Node"> - </argument> - <argument index="1" name="to_position" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="child_node" type="Node" /> + <argument index="1" name="to_position" type="int" /> <description> Moves a child node to a different position (order) among the other children. Since calls, signals, etc are performed by tree order, changing the order of children nodes may be useful. + [b]Note:[/b] Internal children can only be moved within their expected "internal range" (see [code]internal[/code] parameter in [method add_child]). </description> </method> <method name="print_stray_nodes"> - <return type="void"> - </return> + <return type="void" /> <description> Prints all stray nodes (nodes outside the [SceneTree]). Used for debugging. Works only in debug builds. </description> </method> <method name="print_tree"> - <return type="void"> - </return> + <return type="void" /> <description> Prints the tree to stdout. Used mainly for debugging purposes. This version displays the path relative to the current node, and is good for copy/pasting into the [method get_node] function. [b]Example output:[/b] @@ -558,8 +498,7 @@ </description> </method> <method name="print_tree_pretty"> - <return type="void"> - </return> + <return type="void" /> <description> Similar to [method print_tree], this prints the tree to stdout. This version displays a more graphical representation similar to what is displayed in the scene inspector. It is useful for inspecting larger trees. [b]Example output:[/b] @@ -574,226 +513,183 @@ </description> </method> <method name="propagate_call"> - <return type="void"> - </return> - <argument index="0" name="method" type="StringName"> - </argument> - <argument index="1" name="args" type="Array" default="[]"> - </argument> - <argument index="2" name="parent_first" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="method" type="StringName" /> + <argument index="1" name="args" type="Array" default="[]" /> + <argument index="2" name="parent_first" type="bool" default="false" /> <description> Calls the given method (if present) with the arguments given in [code]args[/code] on this node and recursively on all its children. If the [code]parent_first[/code] argument is [code]true[/code], the method will be called on the current node first, then on all its children. If [code]parent_first[/code] is [code]false[/code], the children will be called first. </description> </method> <method name="propagate_notification"> - <return type="void"> - </return> - <argument index="0" name="what" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="what" type="int" /> <description> Notifies the current node and all its children recursively by calling [method Object.notification] on all of them. </description> </method> <method name="queue_free"> - <return type="void"> - </return> + <return type="void" /> <description> Queues a node for deletion at the end of the current frame. When deleted, all of its child nodes will be deleted as well. This method ensures it's safe to delete the node, contrary to [method Object.free]. Use [method Object.is_queued_for_deletion] to check whether a node will be deleted at the end of the frame. </description> </method> <method name="raise"> - <return type="void"> - </return> + <return type="void" /> <description> Moves this node to the bottom of parent node's children hierarchy. This is often useful in GUIs ([Control] nodes), because their order of drawing depends on their order in the tree. The top Node is drawn first, then any siblings below the top Node in the hierarchy are successively drawn on top of it. After using [code]raise[/code], a Control will be drawn on top of its siblings. </description> </method> <method name="remove_and_skip"> - <return type="void"> - </return> + <return type="void" /> <description> Removes a node and sets all its children as children of the parent node (if it exists). All event subscriptions that pass by the removed node will be unsubscribed. </description> </method> <method name="remove_child"> - <return type="void"> - </return> - <argument index="0" name="node" type="Node"> - </argument> + <return type="void" /> + <argument index="0" name="node" type="Node" /> <description> Removes a child node. The node is NOT deleted and must be deleted manually. </description> </method> <method name="remove_from_group"> - <return type="void"> - </return> - <argument index="0" name="group" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="group" type="StringName" /> <description> Removes a node from a group. See notes in the description, and the group methods in [SceneTree]. </description> </method> <method name="replace_by"> - <return type="void"> - </return> - <argument index="0" name="node" type="Node"> - </argument> - <argument index="1" name="keep_groups" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="node" type="Node" /> + <argument index="1" name="keep_groups" type="bool" default="false" /> <description> Replaces a node in a scene by the given one. Subscriptions that pass through this node will be lost. If [code]keep_groups[/code] is [code]true[/code], the [code]node[/code] is added to the same groups that the replaced node is in. </description> </method> <method name="request_ready"> - <return type="void"> - </return> + <return type="void" /> <description> Requests that [code]_ready[/code] be called again. Note that the method won't be called immediately, but is scheduled for when the node is added to the scene tree again (see [method _ready]). [code]_ready[/code] is called only for the node which requested it, which means that you need to request ready for each child if you want them to call [code]_ready[/code] too (in which case, [code]_ready[/code] will be called in the same order as it would normally). </description> </method> <method name="rpc" qualifiers="vararg"> - <return type="Variant"> - </return> - <argument index="0" name="method" type="StringName"> - </argument> + <return type="Variant" /> + <argument index="0" name="method" type="StringName" /> <description> Sends a remote procedure call request for the given [code]method[/code] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. Returns an empty [Variant]. - [b]Note:[/b] You can only safely use RPCs on clients after you received the [code]connected_to_server[/code] signal from the [SceneTree]. You also need to keep track of the connection state, either by the [SceneTree] signals like [code]server_disconnected[/code] or by checking [code]SceneTree.network_peer.get_connection_status() == CONNECTION_CONNECTED[/code]. + [b]Note:[/b] You can only safely use RPCs on clients after you received the [code]connected_to_server[/code] signal from the [MultiplayerAPI]. You also need to keep track of the connection state, either by the [MultiplayerAPI] signals like [code]server_disconnected[/code] or by checking [code]get_multiplayer().peer.get_connection_status() == CONNECTION_CONNECTED[/code]. </description> </method> <method name="rpc_config"> - <return type="int"> - </return> - <argument index="0" name="method" type="StringName"> - </argument> - <argument index="1" name="rpc_mode" type="int" enum="MultiplayerAPI.RPCMode"> - </argument> - <argument index="2" name="transfer_mode" type="int" enum="NetworkedMultiplayerPeer.TransferMode" default="2"> - </argument> - <argument index="3" name="channel" type="int" default="0"> - </argument> + <return type="int" /> + <argument index="0" name="method" type="StringName" /> + <argument index="1" name="rpc_mode" type="int" enum="RPCMode" /> + <argument index="2" name="transfer_mode" type="int" enum="TransferMode" default="2" /> + <argument index="3" name="channel" type="int" default="0" /> <description> - Changes the RPC mode for the given [code]method[/code] to the given [code]rpc_mode[/code], optionally specifying the [code]transfer_mode[/code] and [code]channel[/code] (on supported peers). See [enum MultiplayerAPI.RPCMode] and [enum NetworkedMultiplayerPeer.TransferMode]. An alternative is annotating methods and properties with the corresponding keywords ([code]remote[/code], [code]master[/code], [code]puppet[/code], [code]remotesync[/code], [code]mastersync[/code], [code]puppetsync[/code]). By default, methods are not exposed to networking (and RPCs). + Changes the RPC mode for the given [code]method[/code] to the given [code]rpc_mode[/code], optionally specifying the [code]transfer_mode[/code] and [code]channel[/code] (on supported peers). See [enum RPCMode] and [enum TransferMode]. An alternative is annotating methods and properties with the corresponding annotation ([code]@rpc(any)[/code], [code]@rpc(auth)[/code]). By default, methods are not exposed to networking (and RPCs). </description> </method> <method name="rpc_id" qualifiers="vararg"> - <return type="Variant"> - </return> - <argument index="0" name="peer_id" type="int"> - </argument> - <argument index="1" name="method" type="StringName"> - </argument> + <return type="Variant" /> + <argument index="0" name="peer_id" type="int" /> + <argument index="1" name="method" type="StringName" /> <description> - Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] (see [method NetworkedMultiplayerPeer.set_target_peer]). Returns an empty [Variant]. + Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). Returns an empty [Variant]. </description> </method> <method name="set_display_folded"> - <return type="void"> - </return> - <argument index="0" name="fold" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="fold" type="bool" /> <description> - Sets the folded state of the node in the Scene dock. + Sets the folded state of the node in the Scene dock. This method is only intended for use with editor tooling. + </description> + </method> + <method name="set_editable_instance"> + <return type="void" /> + <argument index="0" name="node" type="Node" /> + <argument index="1" name="is_editable" type="bool" /> + <description> + Sets the editable children state of [code]node[/code] relative to this node. This method is only intended for use with editor tooling. </description> </method> <method name="set_editor_description"> - <return type="void"> - </return> - <argument index="0" name="editor_description" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="editor_description" type="String" /> <description> </description> </method> - <method name="set_network_master"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="recursive" type="bool" default="true"> - </argument> + <method name="set_multiplayer_authority"> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="recursive" type="bool" default="true" /> <description> - Sets the node's network master to the peer with the given peer ID. The network master is the peer that has authority over the node on the network. Useful in conjunction with the [code]master[/code] and [code]puppet[/code] keywords. Inherited from the parent node by default, which ultimately defaults to peer ID 1 (the server). If [code]recursive[/code], the given peer is recursively set as the master for all children of this node. + Sets the node's multiplayer authority to the peer with the given peer ID. The multiplayer authority is the peer that has authority over the node on the network. Useful in conjunction with [method rpc_config] and the [MultiplayerAPI]. Inherited from the parent node by default, which ultimately defaults to peer ID 1 (the server). If [code]recursive[/code], the given peer is recursively set as the authority for all children of this node. </description> </method> <method name="set_physics_process"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enable" type="bool" /> <description> - Enables or disables physics (i.e. fixed framerate) processing. When a node is being processed, it will receive a [constant NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine.iterations_per_second] to change) interval (and the [method _physics_process] callback will be called if exists). Enabled automatically if [method _physics_process] is overridden. Any calls to this before [method _ready] will be ignored. + Enables or disables physics (i.e. fixed framerate) processing. When a node is being processed, it will receive a [constant NOTIFICATION_PHYSICS_PROCESS] at a fixed (usually 60 FPS, see [member Engine.physics_ticks_per_second] to change) interval (and the [method _physics_process] callback will be called if exists). Enabled automatically if [method _physics_process] is overridden. Any calls to this before [method _ready] will be ignored. </description> </method> <method name="set_physics_process_internal"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enable" type="bool" /> <description> Enables or disables internal physics for this node. Internal physics processing happens in isolation from the normal [method _physics_process] calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or physics processing is disabled for scripting ([method set_physics_process]). Only useful for advanced uses to manipulate built-in nodes' behavior. [b]Warning:[/b] Built-in Nodes rely on the internal processing for their own logic, so changing this value from your code may lead to unexpected behavior. Script access to this internal logic is provided for specific advanced uses, but is unsafe and not supported. </description> </method> <method name="set_process"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enable" type="bool" /> <description> Enables or disables processing. When a node is being processed, it will receive a [constant NOTIFICATION_PROCESS] on every drawn frame (and the [method _process] callback will be called if exists). Enabled automatically if [method _process] is overridden. Any calls to this before [method _ready] will be ignored. </description> </method> <method name="set_process_input"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enable" type="bool" /> <description> Enables or disables input processing. This is not required for GUI controls! Enabled automatically if [method _input] is overridden. Any calls to this before [method _ready] will be ignored. </description> </method> <method name="set_process_internal"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enable" type="bool" /> <description> Enables or disabled internal processing for this node. Internal processing happens in isolation from the normal [method _process] calls and is used by some nodes internally to guarantee proper functioning even if the node is paused or processing is disabled for scripting ([method set_process]). Only useful for advanced uses to manipulate built-in nodes' behavior. [b]Warning:[/b] Built-in Nodes rely on the internal processing for their own logic, so changing this value from your code may lead to unexpected behavior. Script access to this internal logic is provided for specific advanced uses, but is unsafe and not supported. </description> </method> <method name="set_process_unhandled_input"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enable" type="bool" /> <description> Enables unhandled input processing. This is not required for GUI controls! It enables the node to receive all input that was not previously handled (usually by a [Control]). Enabled automatically if [method _unhandled_input] is overridden. Any calls to this before [method _ready] will be ignored. </description> </method> <method name="set_process_unhandled_key_input"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enable" type="bool" /> <description> Enables unhandled key input processing. Enabled automatically if [method _unhandled_key_input] is overridden. Any calls to this before [method _ready] will be ignored. </description> </method> <method name="set_scene_instance_load_placeholder"> - <return type="void"> - </return> - <argument index="0" name="load_placeholder" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="load_placeholder" type="bool" /> <description> Sets whether this is an instance load placeholder. See [InstancePlaceholder]. </description> </method> <method name="update_configuration_warnings"> - <return type="void"> - </return> + <return type="void" /> <description> Updates the warning displayed for this node in the Scene Dock. Use [method _get_configuration_warnings] to setup the warning message to display. @@ -1006,5 +902,14 @@ Duplicate using instancing. An instance stays linked to the original so when the original changes, the instance changes too. </constant> + <constant name="INTERNAL_MODE_DISABLED" value="0" enum="InternalMode"> + Node will not be internal. + </constant> + <constant name="INTERNAL_MODE_FRONT" value="1" enum="InternalMode"> + Node will be placed at the front of parent's node list, before any non-internal sibling. + </constant> + <constant name="INTERNAL_MODE_BACK" value="2" enum="InternalMode"> + Node will be placed at the back of parent's node list, after any non-internal sibling. + </constant> </constants> </class> diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml index 9ffa333f17..cc790b7c28 100644 --- a/doc/classes/Node2D.xml +++ b/doc/classes/Node2D.xml @@ -12,104 +12,80 @@ </tutorials> <methods> <method name="apply_scale"> - <return type="void"> - </return> - <argument index="0" name="ratio" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="ratio" type="Vector2" /> <description> Multiplies the current scale by the [code]ratio[/code] vector. </description> </method> <method name="get_angle_to" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="point" type="Vector2"> - </argument> + <return type="float" /> + <argument index="0" name="point" type="Vector2" /> <description> Returns the angle between the node and the [code]point[/code] in radians. </description> </method> <method name="get_relative_transform_to_parent" qualifiers="const"> - <return type="Transform2D"> - </return> - <argument index="0" name="parent" type="Node"> - </argument> + <return type="Transform2D" /> + <argument index="0" name="parent" type="Node" /> <description> Returns the [Transform2D] relative to this node's parent. </description> </method> <method name="global_translate"> - <return type="void"> - </return> - <argument index="0" name="offset" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="offset" type="Vector2" /> <description> Adds the [code]offset[/code] vector to the node's global position. </description> </method> <method name="look_at"> - <return type="void"> - </return> - <argument index="0" name="point" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="point" type="Vector2" /> <description> Rotates the node so it points towards the [code]point[/code], which is expected to use global coordinates. </description> </method> <method name="move_local_x"> - <return type="void"> - </return> - <argument index="0" name="delta" type="float"> - </argument> - <argument index="1" name="scaled" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="delta" type="float" /> + <argument index="1" name="scaled" type="bool" default="false" /> <description> Applies a local translation on the node's X axis based on the [method Node._process]'s [code]delta[/code]. If [code]scaled[/code] is [code]false[/code], normalizes the movement. </description> </method> <method name="move_local_y"> - <return type="void"> - </return> - <argument index="0" name="delta" type="float"> - </argument> - <argument index="1" name="scaled" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="delta" type="float" /> + <argument index="1" name="scaled" type="bool" default="false" /> <description> Applies a local translation on the node's Y axis based on the [method Node._process]'s [code]delta[/code]. If [code]scaled[/code] is [code]false[/code], normalizes the movement. </description> </method> <method name="rotate"> - <return type="void"> - </return> - <argument index="0" name="radians" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="radians" type="float" /> <description> Applies a rotation to the node, in radians, starting from its current rotation. </description> </method> <method name="to_global" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="local_point" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="local_point" type="Vector2" /> <description> Transforms the provided local position into a position in global coordinate space. The input is expected to be local relative to the [Node2D] it is called on. e.g. Applying this method to the positions of child nodes will correctly transform their positions into the global coordinate space, but applying it to a node's own position will give an incorrect result, as it will incorporate the node's own transformation into its global position. </description> </method> <method name="to_local" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="global_point" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="global_point" type="Vector2" /> <description> Transforms the provided global position into a position in local coordinate space. The output will be local relative to the [Node2D] it is called on. e.g. It is appropriate for determining the positions of child nodes, but it is not appropriate for determining its own position relative to its parent. </description> </method> <method name="translate"> - <return type="void"> - </return> - <argument index="0" name="offset" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="offset" type="Vector2" /> <description> Translates the node by the given [code]offset[/code] in local coordinates. </description> diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml index 14e03a2186..49901dc4d9 100644 --- a/doc/classes/Node3D.xml +++ b/doc/classes/Node3D.xml @@ -13,281 +13,248 @@ <link title="All 3D Demos">https://github.com/godotengine/godot-demo-projects/tree/master/3d</link> </tutorials> <methods> + <method name="add_gizmo"> + <return type="void" /> + <argument index="0" name="gizmo" type="Node3DGizmo" /> + <description> + Attach a gizmo to this [code]Node3D[/code]. + </description> + </method> + <method name="clear_gizmos"> + <return type="void" /> + <description> + Clear all gizmos attached to this [code]Node3D[/code]. + </description> + </method> + <method name="clear_subgizmo_selection"> + <return type="void" /> + <description> + Clears subgizmo selection for this node in the editor. Useful when subgizmo IDs become invalid after a property change. + </description> + </method> <method name="force_update_transform"> - <return type="void"> - </return> + <return type="void" /> <description> Forces the transform to update. Transform changes in physics are not instant for performance reasons. Transforms are accumulated and then set. Use this if you need an up-to-date transform when doing physics operations. </description> </method> + <method name="get_gizmos" qualifiers="const"> + <return type="Array" /> + <description> + Returns all the gizmos attached to this [code]Node3D[/code]. + </description> + </method> <method name="get_parent_node_3d" qualifiers="const"> - <return type="Node3D"> - </return> + <return type="Node3D" /> <description> Returns the parent [Node3D], or an empty [Object] if no parent exists or parent is not of type [Node3D]. </description> </method> <method name="get_world_3d" qualifiers="const"> - <return type="World3D"> - </return> + <return type="World3D" /> <description> Returns the current [World3D] resource this [Node3D] node is registered to. </description> </method> <method name="global_rotate"> - <return type="void"> - </return> - <argument index="0" name="axis" type="Vector3"> - </argument> - <argument index="1" name="angle" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="axis" type="Vector3" /> + <argument index="1" name="angle" type="float" /> <description> Rotates the global (world) transformation around axis, a unit [Vector3], by specified angle in radians. The rotation axis is in global coordinate system. </description> </method> <method name="global_scale"> - <return type="void"> - </return> - <argument index="0" name="scale" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="scale" type="Vector3" /> <description> Scales the global (world) transformation by the given [Vector3] scale factors. </description> </method> <method name="global_translate"> - <return type="void"> - </return> - <argument index="0" name="offset" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="offset" type="Vector3" /> <description> Moves the global (world) transformation by [Vector3] offset. The offset is in global coordinate system. </description> </method> <method name="hide"> - <return type="void"> - </return> + <return type="void" /> <description> Disables rendering of this node. Changes [member visible] to [code]false[/code]. </description> </method> <method name="is_local_transform_notification_enabled" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns whether node notifies about its local transformation changes. [Node3D] will not propagate this by default. </description> </method> <method name="is_scale_disabled" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns whether this node uses a scale of [code](1, 1, 1)[/code] or its local transformation scale. </description> </method> <method name="is_transform_notification_enabled" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns whether the node notifies about its global and local transformation changes. [Node3D] will not propagate this by default. </description> </method> <method name="is_visible_in_tree" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the node is present in the [SceneTree], its [member visible] property is [code]true[/code] and all its antecedents are also visible. If any antecedent is hidden, this node will not be visible in the scene tree. </description> </method> <method name="look_at"> - <return type="void"> - </return> - <argument index="0" name="target" type="Vector3"> - </argument> - <argument index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)"> - </argument> - <description> - Rotates itself so that the local -Z axis points towards the [code]target[/code] position. - The transform will first be rotated around the given [code]up[/code] vector, and then fully aligned to the target by a further rotation around an axis perpendicular to both the [code]target[/code] and [code]up[/code] vectors. + <return type="void" /> + <argument index="0" name="target" type="Vector3" /> + <argument index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)" /> + <description> + Rotates the node so that the local forward axis (-Z) points toward the [code]target[/code] position. + The local up axis (+Y) points as close to the [code]up[/code] vector as possible while staying perpendicular to the local forward axis. The resulting transform is orthogonal, and the scale is preserved. Non-uniform scaling may not work correctly. + The [code]target[/code] position cannot be the same as the node's position, the [code]up[/code] vector cannot be zero, and the direction from the node's position to the [code]target[/code] vector cannot be parallel to the [code]up[/code] vector. Operations take place in global space. </description> </method> <method name="look_at_from_position"> - <return type="void"> - </return> - <argument index="0" name="position" type="Vector3"> - </argument> - <argument index="1" name="target" type="Vector3"> - </argument> - <argument index="2" name="up" type="Vector3" default="Vector3(0, 1, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="position" type="Vector3" /> + <argument index="1" name="target" type="Vector3" /> + <argument index="2" name="up" type="Vector3" default="Vector3(0, 1, 0)" /> <description> - Moves the node to the specified [code]position[/code], and then rotates itself to point toward the [code]target[/code] as per [method look_at]. Operations take place in global space. + Moves the node to the specified [code]position[/code], and then rotates the node to point toward the [code]target[/code] as per [method look_at]. Operations take place in global space. </description> </method> <method name="orthonormalize"> - <return type="void"> - </return> + <return type="void" /> <description> Resets this node's transformations (like scale, skew and taper) preserving its rotation and translation by performing Gram-Schmidt orthonormalization on this node's [Transform3D]. </description> </method> <method name="rotate"> - <return type="void"> - </return> - <argument index="0" name="axis" type="Vector3"> - </argument> - <argument index="1" name="angle" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="axis" type="Vector3" /> + <argument index="1" name="angle" type="float" /> <description> Rotates the local transformation around axis, a unit [Vector3], by specified angle in radians. </description> </method> <method name="rotate_object_local"> - <return type="void"> - </return> - <argument index="0" name="axis" type="Vector3"> - </argument> - <argument index="1" name="angle" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="axis" type="Vector3" /> + <argument index="1" name="angle" type="float" /> <description> Rotates the local transformation around axis, a unit [Vector3], by specified angle in radians. The rotation axis is in object-local coordinate system. </description> </method> <method name="rotate_x"> - <return type="void"> - </return> - <argument index="0" name="angle" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="angle" type="float" /> <description> Rotates the local transformation around the X axis by angle in radians. </description> </method> <method name="rotate_y"> - <return type="void"> - </return> - <argument index="0" name="angle" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="angle" type="float" /> <description> Rotates the local transformation around the Y axis by angle in radians. </description> </method> <method name="rotate_z"> - <return type="void"> - </return> - <argument index="0" name="angle" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="angle" type="float" /> <description> Rotates the local transformation around the Z axis by angle in radians. </description> </method> <method name="scale_object_local"> - <return type="void"> - </return> - <argument index="0" name="scale" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="scale" type="Vector3" /> <description> Scales the local transformation by given 3D scale factors in object-local coordinate system. </description> </method> <method name="set_disable_scale"> - <return type="void"> - </return> - <argument index="0" name="disable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="disable" type="bool" /> <description> Sets whether the node uses a scale of [code](1, 1, 1)[/code] or its local transformation scale. Changes to the local transformation scale are preserved. </description> </method> <method name="set_identity"> - <return type="void"> - </return> + <return type="void" /> <description> Reset all transformations for this node (sets its [Transform3D] to the identity matrix). </description> </method> <method name="set_ignore_transform_notification"> - <return type="void"> - </return> - <argument index="0" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enabled" type="bool" /> <description> Sets whether the node ignores notification that its transformation (global or local) changed. </description> </method> <method name="set_notify_local_transform"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enable" type="bool" /> <description> Sets whether the node notifies about its local transformation changes. [Node3D] will not propagate this by default. </description> </method> <method name="set_notify_transform"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enable" type="bool" /> <description> Sets whether the node notifies about its global and local transformation changes. [Node3D] will not propagate this by default, unless it is in the editor context and it has a valid gizmo. </description> </method> <method name="show"> - <return type="void"> - </return> + <return type="void" /> <description> Enables rendering of this node. Changes [member visible] to [code]true[/code]. </description> </method> <method name="to_global" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="local_point" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="local_point" type="Vector3" /> <description> Transforms [code]local_point[/code] from this node's local space to world space. </description> </method> <method name="to_local" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="global_point" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="global_point" type="Vector3" /> <description> Transforms [code]global_point[/code] from world space to this node's local space. </description> </method> <method name="translate"> - <return type="void"> - </return> - <argument index="0" name="offset" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="offset" type="Vector3" /> <description> Changes the node's position by the given offset [Vector3]. Note that the translation [code]offset[/code] is affected by the node's scale, so if scaled by e.g. [code](10, 1, 1)[/code], a translation by an offset of [code](2, 0, 0)[/code] would actually add 20 ([code]2 * 10[/code]) to the X coordinate. </description> </method> <method name="translate_object_local"> - <return type="void"> - </return> - <argument index="0" name="offset" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="offset" type="Vector3" /> <description> Changes the node's position by the given offset [Vector3] in local space. </description> </method> - <method name="update_gizmo"> - <return type="void"> - </return> + <method name="update_gizmos"> + <return type="void" /> <description> - Updates the [Node3DGizmo] of this node. + Updates all the [Node3DGizmo]s attached to this node. </description> </method> </methods> <members> - <member name="gizmo" type="Node3DGizmo" setter="set_gizmo" getter="get_gizmo"> - The [Node3DGizmo] for this node. Used for example in [EditorNode3DGizmo] as custom visualization and editing handles in Editor. - </member> <member name="global_transform" type="Transform3D" setter="set_global_transform" getter="get_global_transform"> World3D space (global) [Transform3D] of this node. </member> @@ -308,7 +275,7 @@ Local space [Transform3D] of this node, with respect to the parent node. </member> <member name="visibility_parent" type="NodePath" setter="set_visibility_parent" getter="get_visibility_parent" default="NodePath("")"> - Defines the visibility range parent for this node and its subtree. The visibility parent must be a GeometryInstance3D. Any visual instance will only be visible if the visibility parent (and all of its visibility ancestors) is hidden by being closer to the camera than its own [member GeometryInstance3D.visibility_range_begin]. Nodes hidden via the [member Node3D.visible] property are essentially removed from the visibility dependency tree, so dependant instances will not take the hidden node or its ancestors into account. + Defines the visibility range parent for this node and its subtree. The visibility parent must be a GeometryInstance3D. Any visual instance will only be visible if the visibility parent (and all of its visibility ancestors) is hidden by being closer to the camera than its own [member GeometryInstance3D.visibility_range_begin]. Nodes hidden via the [member Node3D.visible] property are essentially removed from the visibility dependency tree, so dependent instances will not take the hidden node or its ancestors into account. </member> <member name="visible" type="bool" setter="set_visible" getter="is_visible" default="true"> If [code]true[/code], this node is drawn. The node is only visible if all of its antecedents are visible as well (in other words, [method is_visible_in_tree] must return [code]true[/code]). @@ -324,7 +291,7 @@ <constants> <constant name="NOTIFICATION_TRANSFORM_CHANGED" value="2000"> Node3D nodes receives this notification when their global transform changes. This means that either the current or a parent node changed its transform. - In order for [constant NOTIFICATION_TRANSFORM_CHANGED] to work, users first need to ask for it, with [method set_notify_transform]. The notification is also sent if the node is in the editor context and it has a valid gizmo. + In order for [constant NOTIFICATION_TRANSFORM_CHANGED] to work, users first need to ask for it, with [method set_notify_transform]. The notification is also sent if the node is in the editor context and it has at least one valid gizmo. </constant> <constant name="NOTIFICATION_ENTER_WORLD" value="41"> Node3D nodes receives this notification when they are registered to new [World3D] resource. diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml index 0ba2e73ad4..d05630d277 100644 --- a/doc/classes/NodePath.xml +++ b/doc/classes/NodePath.xml @@ -27,26 +27,21 @@ </tutorials> <methods> <method name="NodePath" qualifiers="constructor"> - <return type="NodePath"> - </return> + <return type="NodePath" /> <description> Constructs an empty [NodePath]. </description> </method> <method name="NodePath" qualifiers="constructor"> - <return type="NodePath"> - </return> - <argument index="0" name="from" type="NodePath"> - </argument> + <return type="NodePath" /> + <argument index="0" name="from" type="NodePath" /> <description> Constructs a [NodePath] as a copy of the given [NodePath]. </description> </method> <method name="NodePath" qualifiers="constructor"> - <return type="NodePath"> - </return> - <argument index="0" name="from" type="String"> - </argument> + <return type="NodePath" /> + <argument index="0" name="from" type="String" /> <description> Creates a NodePath from a string, e.g. [code]"Path2D/PathFollow2D/Sprite2D:texture:size"[/code]. A path is absolute if it starts with a slash. Absolute paths are only valid in the global scene tree, not within individual scenes. In a relative path, [code]"."[/code] and [code]".."[/code] indicate the current node and its parent. The "subnames" optionally included after the path to the target node can point to resources or properties, and can also be nested. @@ -68,8 +63,7 @@ </description> </method> <method name="get_as_property_path" qualifiers="const"> - <return type="NodePath"> - </return> + <return type="NodePath" /> <description> Returns a node path with a colon character ([code]:[/code]) prepended, transforming it to a pure property path with no node name (defaults to resolving from the current node). [codeblocks] @@ -91,8 +85,7 @@ </description> </method> <method name="get_concatenated_subnames" qualifiers="const"> - <return type="StringName"> - </return> + <return type="StringName" /> <description> Returns all subnames concatenated with a colon character ([code]:[/code]) as separator, i.e. the right side of the first colon in a node path. [codeblocks] @@ -108,10 +101,8 @@ </description> </method> <method name="get_name" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="StringName" /> + <argument index="0" name="idx" type="int" /> <description> Gets the node name indicated by [code]idx[/code] (0 to [method get_name_count]). [codeblocks] @@ -131,18 +122,15 @@ </description> </method> <method name="get_name_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Gets the number of node names which make up the path. Subnames (see [method get_subname_count]) are not included. For example, [code]"Path2D/PathFollow2D/Sprite2D"[/code] has 3 names. </description> </method> <method name="get_subname" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="StringName" /> + <argument index="0" name="idx" type="int" /> <description> Gets the resource or property name indicated by [code]idx[/code] (0 to [method get_subname_count]). [codeblocks] @@ -160,40 +148,33 @@ </description> </method> <method name="get_subname_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Gets the number of resource or property names ("subnames") in the path. Each subname is listed after a colon character ([code]:[/code]) in the node path. For example, [code]"Path2D/PathFollow2D/Sprite2D:texture:load_path"[/code] has 2 subnames. </description> </method> <method name="is_absolute" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the node path is absolute (as opposed to relative), which means that it starts with a slash character ([code]/[/code]). Absolute node paths can be used to access the root node ([code]"/root"[/code]) or autoloads (e.g. [code]"/global"[/code] if a "global" autoload was registered). </description> </method> <method name="is_empty" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the node path is empty. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="NodePath"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="NodePath" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="NodePath"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="NodePath" /> <description> </description> </method> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index a9396306f4..757730f6c8 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -10,28 +10,31 @@ <link title="OS Test Demo">https://godotengine.org/asset-library/asset/677</link> </tutorials> <methods> + <method name="alert"> + <return type="void" /> + <argument index="0" name="text" type="String" /> + <argument index="1" name="title" type="String" default=""Alert!"" /> + <description> + Displays a modal dialog box using the host OS' facilities. Execution is blocked until the dialog is closed. + </description> + </method> <method name="can_use_threads" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the current host platform is using multiple threads. </description> </method> <method name="close_midi_inputs"> - <return type="void"> - </return> + <return type="void" /> <description> Shuts down system MIDI driver. [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="create_process"> - <return type="int"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="arguments" type="PackedStringArray"> - </argument> + <return type="int" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="arguments" type="PackedStringArray" /> <description> Creates a new process that runs independently of Godot. It will not terminate if Godot terminates. The file specified in [code]path[/code] must exist and be executable. Platform path resolution will be used. The [code]arguments[/code] are used in the given order and separated by a space. If the process creation succeeds, the method will return the new process ID, which you can use to monitor the process (and potentially terminate it with [method kill]). If the process creation fails, the method will return [code]-1[/code]. @@ -49,38 +52,30 @@ </description> </method> <method name="delay_msec" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="msec" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="msec" type="int" /> <description> - Delay execution of the current thread by [code]msec[/code] milliseconds. [code]usec[/code] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_msec] will do nothing and will print an error message. + Delay execution of the current thread by [code]msec[/code] milliseconds. [code]msec[/code] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_msec] will do nothing and will print an error message. </description> </method> <method name="delay_usec" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="usec" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="usec" type="int" /> <description> Delay execution of the current thread by [code]usec[/code] microseconds. [code]usec[/code] must be greater than or equal to [code]0[/code]. Otherwise, [method delay_usec] will do nothing and will print an error message. </description> </method> <method name="dump_memory_to_file"> - <return type="void"> - </return> - <argument index="0" name="file" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="file" type="String" /> <description> Dumps the memory allocation ringlist to a file (only works in debug). Entry format per line: "Address - Size - Description". </description> </method> <method name="dump_resources_to_file"> - <return type="void"> - </return> - <argument index="0" name="file" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="file" type="String" /> <description> Dumps all used resources to file (only works in debug). Entry format per line: "Resource Type : Resource Location". @@ -88,16 +83,11 @@ </description> </method> <method name="execute"> - <return type="int"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="arguments" type="PackedStringArray"> - </argument> - <argument index="2" name="output" type="Array" default="[]"> - </argument> - <argument index="3" name="read_stderr" type="bool" default="false"> - </argument> + <return type="int" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="arguments" type="PackedStringArray" /> + <argument index="2" name="output" type="Array" default="[]" /> + <argument index="3" name="read_stderr" type="bool" default="false" /> <description> Executes a command. The file specified in [code]path[/code] must exist and be executable. Platform path resolution will be used. The [code]arguments[/code] are used in the given order and separated by a space. If an [code]output[/code] [Array] is provided, the complete shell output of the process will be appended as a single [String] element in [code]output[/code]. If [code]read_stderr[/code] is [code]true[/code], the output to the standard error stream will be included too. If the command is successfully executed, the method will return the exit code of the command, or [code]-1[/code] if it fails. @@ -128,25 +118,21 @@ </description> </method> <method name="find_keycode_from_string" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="string" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="string" type="String" /> <description> Returns the keycode of the given string (e.g. "Escape"). </description> </method> <method name="get_cache_dir" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the [i]global[/i] cache data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CACHE_HOME[/code] environment variable before starting the project. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_config_dir] and [method get_data_dir]. Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path. </description> </method> <method name="get_cmdline_args"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns the command-line arguments passed to the engine. Command-line arguments can be written in any form, including both [code]--key value[/code] and [code]--key=value[/code] forms so they can be properly parsed, as long as custom command-line arguments do not conflict with engine arguments. @@ -176,16 +162,14 @@ </description> </method> <method name="get_config_dir" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the [i]global[/i] user configuration directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_CONFIG_HOME[/code] environment variable before starting the project. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_data_dir]. Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path. </description> </method> <method name="get_connected_midi_inputs"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns an array of MIDI device names. The returned array will be empty if the system MIDI driver has not previously been initialised with [method open_midi_inputs]. @@ -193,141 +177,117 @@ </description> </method> <method name="get_data_dir" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the [i]global[/i] user data directory according to the operating system's standards. On desktop platforms, this path can be overridden by setting the [code]XDG_DATA_HOME[/code] environment variable before starting the project. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] in the documentation for more information. See also [method get_cache_dir] and [method get_config_dir]. Not to be confused with [method get_user_data_dir], which returns the [i]project-specific[/i] user data path. </description> </method> <method name="get_environment" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="variable" type="String"> - </argument> + <return type="String" /> + <argument index="0" name="variable" type="String" /> <description> Returns the value of an environment variable. Returns an empty string if the environment variable doesn't exist. [b]Note:[/b] Double-check the casing of [code]variable[/code]. Environment variable names are case-sensitive on all platforms except Windows. </description> </method> <method name="get_executable_path" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the path to the current engine executable. </description> </method> - <method name="get_external_data_dir" qualifiers="const"> - <return type="String"> - </return> - <description> - On Android, returns the absolute directory path where user data can be written to external storage if available. On all other platforms, this will return the same location as [method get_user_data_dir]. - </description> - </method> <method name="get_granted_permissions" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> - With this function you can get the list of dangerous permissions that have been granted to the Android application. + With this function, you can get the list of dangerous permissions that have been granted to the Android application. [b]Note:[/b] This method is implemented on Android. </description> </method> <method name="get_keycode_string" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="code" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="code" type="int" /> <description> Returns the given keycode as a string (e.g. Return values: [code]"Escape"[/code], [code]"Shift+Escape"[/code]). See also [member InputEventKey.keycode] and [method InputEventKey.get_keycode_with_modifiers]. </description> </method> <method name="get_locale" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the host OS locale as a string of the form [code]language_Script_COUNTRY_VARIANT@extra[/code]. [code]language[/code] - 2 or 3-letter [url=https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes]language code[/url], in lower case. [code]Script[/code] - optional, 4-letter [url=https://en.wikipedia.org/wiki/ISO_15924]script code[/url], in title case. [code]COUNTRY[/code] - optional, 2 or 3-letter [url=https://en.wikipedia.org/wiki/ISO_3166-1]country code[/url], in upper case. - [code]VARIANT[/code] - optional, language variant, region and sort order. Variant can have any number of underscored key words. + [code]VARIANT[/code] - optional, language variant, region and sort order. Variant can have any number of underscored keywords. [code]extra[/code] - optional, semicolon separated list of additional key words. Currency, calendar, sort order and numbering system information. </description> </method> <method name="get_model_name" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the model name of the current device. [b]Note:[/b] This method is implemented on Android and iOS. Returns [code]"GenericDevice"[/code] on unsupported platforms. </description> </method> <method name="get_name" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the name of the host OS. Possible values are: [code]"Android"[/code], [code]"iOS"[/code], [code]"HTML5"[/code], [code]"OSX"[/code], [code]"Server"[/code], [code]"Windows"[/code], [code]"UWP"[/code], [code]"X11"[/code]. </description> </method> <method name="get_process_id" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the project's process ID. [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows. </description> </method> <method name="get_processor_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of threads available on the host machine. </description> </method> <method name="get_static_memory_peak_usage" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the maximum amount of static memory used (only works in debug). </description> </method> <method name="get_static_memory_usage" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the amount of static memory being used by the program in bytes. </description> </method> <method name="get_system_dir" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="dir" type="int" enum="OS.SystemDir"> - </argument> + <return type="String" /> + <argument index="0" name="dir" type="int" enum="OS.SystemDir" /> + <argument index="1" name="shared_storage" type="bool" default="true" /> <description> Returns the actual path to commonly used folders across different platforms. Available locations are specified in [enum SystemDir]. [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows. + [b]Note:[/b] Shared storage is implemented on Android and allows to differentiate between app specific and shared directories. Shared directories have additional restrictions on Android. </description> </method> <method name="get_thread_caller_id" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the ID of the current thread. This can be used in logs to ease debugging of multi-threaded applications. [b]Note:[/b] Thread IDs are not deterministic and may be reused across application restarts. </description> </method> <method name="get_unique_id" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns a string that is unique to the device. - [b]Note:[/b] This string may change without notice if the user reinstalls/upgrades their operating system or changes their hardware. This means it should generally not be used to encrypt persistent data as the data saved prior to an unexpected ID change would become inaccessible. The returned string may also be falsified using external programs, so do not rely on the string returned by [method get_unique_id] for security purposes. + [b]Note:[/b] This string may change without notice if the user reinstalls/upgrades their operating system or changes their hardware. This means it should generally not be used to encrypt persistent data as the data saved before an unexpected ID change would become inaccessible. The returned string may also be falsified using external programs, so do not rely on the string returned by [method get_unique_id] for security purposes. [b]Note:[/b] Returns an empty string on HTML5 and UWP, as this method isn't implemented on those platforms yet. </description> </method> <method name="get_user_data_dir" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the absolute directory path where user data is written ([code]user://[/code]). On Linux, this is [code]~/.local/share/godot/app_userdata/[project_name][/code], or [code]~/.local/share/[custom_name][/code] if [code]use_custom_user_dir[/code] is set. @@ -338,28 +298,23 @@ </description> </method> <method name="has_environment" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="variable" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="variable" type="String" /> <description> Returns [code]true[/code] if the environment variable with the name [code]variable[/code] exists. [b]Note:[/b] Double-check the casing of [code]variable[/code]. Environment variable names are case-sensitive on all platforms except Windows. </description> </method> <method name="has_feature" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="tag_name" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="tag_name" type="String" /> <description> - Returns [code]true[/code] if the feature for the given feature tag is supported in the currently running instance, depending on platform, build etc. Can be used to check whether you're currently running a debug build, on a certain platform or arch, etc. Refer to the [url=https://docs.godotengine.org/en/latest/getting_started/workflow/export/feature_tags.html]Feature Tags[/url] documentation for more details. + Returns [code]true[/code] if the feature for the given feature tag is supported in the currently running instance, depending on the platform, build, etc. Can be used to check whether you're currently running a debug build, on a certain platform or arch, etc. Refer to the [url=https://docs.godotengine.org/en/latest/getting_started/workflow/export/feature_tags.html]Feature Tags[/url] documentation for more details. [b]Note:[/b] Tag names are case-sensitive. </description> </method> <method name="is_debug_build" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the Godot binary used to run the project is a [i]debug[/i] export template, or when running in the editor. Returns [code]false[/code] if the Godot binary used to run the project is a [i]release[/i] export template. @@ -367,33 +322,27 @@ </description> </method> <method name="is_keycode_unicode" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="code" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="code" type="int" /> <description> Returns [code]true[/code] if the input keycode corresponds to a Unicode character. </description> </method> <method name="is_stdout_verbose" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the engine was executed with [code]-v[/code] (verbose stdout). </description> </method> <method name="is_userfs_persistent" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> If [code]true[/code], the [code]user://[/code] file system is persistent, so that its state is the same after a player quits and starts the game again. Relevant to the HTML5 platform, where this persistence may be unavailable. </description> </method> <method name="kill"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="pid" type="int"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="pid" type="int" /> <description> Kill (terminate) the process identified by the given process ID ([code]pid[/code]), e.g. the one returned by [method execute] in non-blocking mode. [b]Note:[/b] This method can also be used to kill processes that were not spawned by the game. @@ -401,99 +350,79 @@ </description> </method> <method name="open_midi_inputs"> - <return type="void"> - </return> + <return type="void" /> <description> Initialises the singleton for the system MIDI driver. [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="print_all_resources"> - <return type="void"> - </return> - <argument index="0" name="tofile" type="String" default=""""> - </argument> + <return type="void" /> + <argument index="0" name="tofile" type="String" default="""" /> <description> Shows all resources in the game. Optionally, the list can be written to a file by specifying a file path in [code]tofile[/code]. </description> </method> <method name="print_all_textures_by_size"> - <return type="void"> - </return> + <return type="void" /> <description> Shows the list of loaded textures sorted by size in memory. </description> </method> <method name="print_resources_by_type"> - <return type="void"> - </return> - <argument index="0" name="types" type="PackedStringArray"> - </argument> + <return type="void" /> + <argument index="0" name="types" type="PackedStringArray" /> <description> Shows the number of resources loaded by the game of the given types. </description> </method> <method name="print_resources_in_use"> - <return type="void"> - </return> - <argument index="0" name="short" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="short" type="bool" default="false" /> <description> Shows all resources currently used by the game. </description> </method> <method name="request_permission"> - <return type="bool"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="String" /> <description> At the moment this function is only used by [code]AudioDriverOpenSL[/code] to request permission for [code]RECORD_AUDIO[/code] on Android. </description> </method> <method name="request_permissions"> - <return type="bool"> - </return> + <return type="bool" /> <description> - With this function you can request dangerous permissions since normal permissions are automatically granted at install time in Android application. + With this function, you can request dangerous permissions since normal permissions are automatically granted at install time in Android applications. [b]Note:[/b] This method is implemented on Android. </description> </method> <method name="set_environment" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="variable" type="String"> - </argument> - <argument index="1" name="value" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="variable" type="String" /> + <argument index="1" name="value" type="String" /> <description> Sets the value of the environment variable [code]variable[/code] to [code]value[/code]. The environment variable will be set for the Godot process and any process executed with [method execute] after running [method set_environment]. The environment variable will [i]not[/i] persist to processes run after the Godot process was terminated. [b]Note:[/b] Double-check the casing of [code]variable[/code]. Environment variable names are case-sensitive on all platforms except Windows. </description> </method> <method name="set_thread_name"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="name" type="String" /> <description> Sets the name of the current thread. </description> </method> <method name="set_use_file_access_save_and_swap"> - <return type="void"> - </return> - <argument index="0" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enabled" type="bool" /> <description> Enables backup saves if [code]enabled[/code] is [code]true[/code]. </description> </method> <method name="shell_open"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="uri" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="uri" type="String" /> <description> Requests the OS to open a resource with the most appropriate program. For example: - [code]OS.shell_open("C:\\Users\name\Downloads")[/code] on Windows opens the file explorer at the user's Downloads folder. diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index cdf76a3a59..c9e9a0699c 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -13,15 +13,15 @@ [codeblocks] [gdscript] var n = Node2D.new() - print("position" in n) # Prints "True". - print("other_property" in n) # Prints "False". + print("position" in n) # Prints "true". + print("other_property" in n) # Prints "false". [/gdscript] [csharp] var node = new Node2D(); // C# has no direct equivalent to GDScript's `in` operator here, but we // can achieve the same behavior by performing `Get` with a null check. - GD.Print(node.Get("position") != null); // Prints "True". - GD.Print(node.Get("other_property") != null); // Prints "False". + GD.Print(node.Get("position") != null); // Prints "true". + GD.Print(node.Get("other_property") != null); // Prints "false". [/csharp] [/codeblocks] The [code]in[/code] operator will evaluate to [code]true[/code] as long as the key exists, even if the value is [code]null[/code]. @@ -33,18 +33,15 @@ </tutorials> <methods> <method name="_get" qualifiers="virtual"> - <return type="Variant"> - </return> - <argument index="0" name="property" type="StringName"> - </argument> + <return type="Variant" /> + <argument index="0" name="property" type="StringName" /> <description> Virtual method which can be overridden to customize the return value of [method get]. Returns the given property. Returns [code]null[/code] if the [code]property[/code] does not exist. </description> </method> <method name="_get_property_list" qualifiers="virtual"> - <return type="Array"> - </return> + <return type="Array" /> <description> Virtual method which can be overridden to customize the return value of [method get_property_list]. Returns the object's property list as an [Array] of dictionaries. @@ -52,57 +49,45 @@ </description> </method> <method name="_init" qualifiers="virtual"> - <return type="void"> - </return> + <return type="void" /> <description> Called when the object is initialized. </description> </method> <method name="_notification" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="what" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="what" type="int" /> <description> Called whenever the object receives a notification, which is identified in [code]what[/code] by a constant. The base [Object] has two constants [constant NOTIFICATION_POSTINITIALIZE] and [constant NOTIFICATION_PREDELETE], but subclasses such as [Node] define a lot more notifications which are also received by this method. </description> </method> <method name="_set" qualifiers="virtual"> - <return type="bool"> - </return> - <argument index="0" name="property" type="StringName"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> + <return type="bool" /> + <argument index="0" name="property" type="StringName" /> + <argument index="1" name="value" type="Variant" /> <description> Virtual method which can be overridden to customize the return value of [method set]. Sets a property. Returns [code]true[/code] if the [code]property[/code] exists. </description> </method> <method name="_to_string" qualifiers="virtual"> - <return type="String"> - </return> + <return type="String" /> <description> Virtual method which can be overridden to customize the return value of [method to_string], and thus the object's representation where it is converted to a string, e.g. with [code]print(obj)[/code]. Returns a [String] representing the object. If not overridden, defaults to [code]"[ClassName:RID]"[/code]. </description> </method> <method name="add_user_signal"> - <return type="void"> - </return> - <argument index="0" name="signal" type="String"> - </argument> - <argument index="1" name="arguments" type="Array" default="[]"> - </argument> + <return type="void" /> + <argument index="0" name="signal" type="String" /> + <argument index="1" name="arguments" type="Array" default="[]" /> <description> Adds a user-defined [code]signal[/code]. Arguments are optional, but can be added as an [Array] of dictionaries, each containing [code]name: String[/code] and [code]type: int[/code] (see [enum Variant.Type]) entries. </description> </method> <method name="call" qualifiers="vararg"> - <return type="Variant"> - </return> - <argument index="0" name="method" type="StringName"> - </argument> + <return type="Variant" /> + <argument index="0" name="method" type="StringName" /> <description> Calls the [code]method[/code] on the object and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: [codeblocks] @@ -119,10 +104,8 @@ </description> </method> <method name="call_deferred" qualifiers="vararg"> - <return type="void"> - </return> - <argument index="0" name="method" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="method" type="StringName" /> <description> Calls the [code]method[/code] on the object during idle time. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: [codeblocks] @@ -139,12 +122,9 @@ </description> </method> <method name="callv"> - <return type="Variant"> - </return> - <argument index="0" name="method" type="StringName"> - </argument> - <argument index="1" name="arg_array" type="Array"> - </argument> + <return type="Variant" /> + <argument index="0" name="method" type="StringName" /> + <argument index="1" name="arg_array" type="Array" /> <description> Calls the [code]method[/code] on the object and returns the result. Contrarily to [method call], this method does not support a variable number of arguments but expects all parameters to be via a single [Array]. [codeblocks] @@ -160,23 +140,17 @@ </description> </method> <method name="can_translate_messages" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the object can translate strings. See [method set_message_translation] and [method tr]. </description> </method> <method name="connect"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="signal" type="StringName"> - </argument> - <argument index="1" name="callable" type="Callable"> - </argument> - <argument index="2" name="binds" type="Array" default="[]"> - </argument> - <argument index="3" name="flags" type="int" default="0"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="signal" type="StringName" /> + <argument index="1" name="callable" type="Callable" /> + <argument index="2" name="binds" type="Array" default="[]" /> + <argument index="3" name="flags" type="int" default="0" /> <description> Connects a [code]signal[/code] to a [code]callable[/code]. Pass optional [code]binds[/code] to the call as an [Array] of parameters. These parameters will be passed to the [Callable]'s method after any parameter used in the call to [method emit_signal]. Use [code]flags[/code] to set deferred or one-shot connections. See [enum ConnectFlags] constants. [b]Note:[/b] This method is the legacy implementation for connecting signals. The recommended modern approach is to use [method Signal.connect] and to use [method Callable.bind] to add and validate parameter binds. Both syntaxes are shown below. @@ -315,22 +289,17 @@ </description> </method> <method name="disconnect"> - <return type="void"> - </return> - <argument index="0" name="signal" type="StringName"> - </argument> - <argument index="1" name="callable" type="Callable"> - </argument> + <return type="void" /> + <argument index="0" name="signal" type="StringName" /> + <argument index="1" name="callable" type="Callable" /> <description> Disconnects a [code]signal[/code] from a given [code]callable[/code]. If you try to disconnect a connection that does not exist, the method will throw an error. Use [method is_connected] to ensure that the connection exists. </description> </method> <method name="emit_signal" qualifiers="vararg"> - <return type="void"> - </return> - <argument index="0" name="signal" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="signal" type="StringName" /> <description> Emits the given [code]signal[/code]. The signal must exist, so it should be a built-in signal of this class or one of its parent classes, or a user-defined signal. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: [codeblocks] @@ -346,32 +315,27 @@ </description> </method> <method name="free"> - <return type="void"> - </return> + <return type="void" /> <description> Deletes the object from memory. Any pre-existing reference to the freed object will become invalid, e.g. [code]is_instance_valid(object)[/code] will return [code]false[/code]. </description> </method> <method name="get" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="property" type="String"> - </argument> + <return type="Variant" /> + <argument index="0" name="property" type="String" /> <description> Returns the [Variant] value of the given [code]property[/code]. If the [code]property[/code] doesn't exist, this will return [code]null[/code]. [b]Note:[/b] In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase). </description> </method> <method name="get_class" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the object's class as a [String]. </description> </method> <method name="get_incoming_connections" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns an [Array] of dictionaries with information about signals that are connected to the object. Each [Dictionary] contains three String entries: @@ -381,214 +345,170 @@ </description> </method> <method name="get_indexed" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="property" type="NodePath"> - </argument> + <return type="Variant" /> + <argument index="0" name="property" type="NodePath" /> <description> Gets the object's property indexed by the given [NodePath]. The node path should be relative to the current object and can use the colon character ([code]:[/code]) to access nested properties. Examples: [code]"position:x"[/code] or [code]"material:next_pass:blend_mode"[/code]. </description> </method> <method name="get_instance_id" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the object's unique instance ID. This ID can be saved in [EncodedObjectAsID], and can be used to retrieve the object instance with [method @GlobalScope.instance_from_id]. </description> </method> <method name="get_meta" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="Variant" /> + <argument index="0" name="name" type="StringName" /> <description> Returns the object's metadata entry for the given [code]name[/code]. </description> </method> <method name="get_meta_list" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns the object's metadata as a [PackedStringArray]. </description> </method> <method name="get_method_list" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns the object's methods and their signatures as an [Array]. </description> </method> <method name="get_property_list" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns the object's property list as an [Array] of dictionaries. Each property's [Dictionary] contain at least [code]name: String[/code] and [code]type: int[/code] (see [enum Variant.Type]) entries. Optionally, it can also include [code]hint: int[/code] (see [enum PropertyHint]), [code]hint_string: String[/code], and [code]usage: int[/code] (see [enum PropertyUsageFlags]). </description> </method> <method name="get_script" qualifiers="const"> - <return type="Variant"> - </return> + <return type="Variant" /> <description> Returns the object's [Script] instance, or [code]null[/code] if none is assigned. </description> </method> <method name="get_signal_connection_list" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="signal" type="String"> - </argument> + <return type="Array" /> + <argument index="0" name="signal" type="String" /> <description> Returns an [Array] of connections for the given [code]signal[/code]. </description> </method> <method name="get_signal_list" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns the list of signals as an [Array] of dictionaries. </description> </method> <method name="has_meta" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> <description> Returns [code]true[/code] if a metadata entry is found with the given [code]name[/code]. </description> </method> <method name="has_method" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="method" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="method" type="StringName" /> <description> Returns [code]true[/code] if the object contains the given [code]method[/code]. </description> </method> <method name="has_signal" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="signal" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="signal" type="StringName" /> <description> Returns [code]true[/code] if the given [code]signal[/code] exists. </description> </method> <method name="has_user_signal" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="signal" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="signal" type="StringName" /> <description> Returns [code]true[/code] if the given user-defined [code]signal[/code] exists. Only signals added using [method add_user_signal] are taken into account. </description> </method> <method name="is_blocking_signals" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if signal emission blocking is enabled. </description> </method> <method name="is_class" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="class" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="class" type="String" /> <description> Returns [code]true[/code] if the object inherits from the given [code]class[/code]. </description> </method> <method name="is_connected" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="signal" type="StringName"> - </argument> - <argument index="1" name="callable" type="Callable"> - </argument> + <return type="bool" /> + <argument index="0" name="signal" type="StringName" /> + <argument index="1" name="callable" type="Callable" /> <description> Returns [code]true[/code] if a connection exists for a given [code]signal[/code] and [code]callable[/code]. </description> </method> <method name="is_queued_for_deletion" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the [method Node.queue_free] method was called for the object. </description> </method> <method name="notification"> - <return type="void"> - </return> - <argument index="0" name="what" type="int"> - </argument> - <argument index="1" name="reversed" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="what" type="int" /> + <argument index="1" name="reversed" type="bool" default="false" /> <description> Send a given notification to the object, which will also trigger a call to the [method _notification] method of all classes that the object inherits from. If [code]reversed[/code] is [code]true[/code], [method _notification] is called first on the object's own class, and then up to its successive parent classes. If [code]reversed[/code] is [code]false[/code], [method _notification] is called first on the highest ancestor ([Object] itself), and then down to its successive inheriting classes. </description> </method> <method name="notify_property_list_changed"> - <return type="void"> - </return> + <return type="void" /> <description> Notify the editor that the property list has changed by emitting the [signal property_list_changed] signal, so that editor plugins can take the new values into account. </description> </method> <method name="remove_meta"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> <description> Removes a given entry from the object's metadata. See also [method set_meta]. </description> </method> <method name="set"> - <return type="void"> - </return> - <argument index="0" name="property" type="String"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="property" type="String" /> + <argument index="1" name="value" type="Variant" /> <description> Assigns a new value to the given property. If the [code]property[/code] does not exist, nothing will happen. [b]Note:[/b] In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase). </description> </method> <method name="set_block_signals"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enable" type="bool" /> <description> If set to [code]true[/code], signal emission is blocked. </description> </method> <method name="set_deferred"> - <return type="void"> - </return> - <argument index="0" name="property" type="StringName"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="property" type="StringName" /> + <argument index="1" name="value" type="Variant" /> <description> Assigns a new value to the given property, after the current frame's physics step. This is equivalent to calling [method set] via [method call_deferred], i.e. [code]call_deferred("set", property, value)[/code]. [b]Note:[/b] In C#, the property name must be specified as snake_case if it is defined by a built-in Godot node. This doesn't apply to user-defined properties where you should use the same convention as in the C# source (typically PascalCase). </description> </method> <method name="set_indexed"> - <return type="void"> - </return> - <argument index="0" name="property" type="NodePath"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="property" type="NodePath" /> + <argument index="1" name="value" type="Variant" /> <description> Assigns a new value to the property identified by the [NodePath]. The node path should be relative to the current object and can use the colon character ([code]:[/code]) to access nested properties. Example: [codeblocks] @@ -608,51 +528,40 @@ </description> </method> <method name="set_message_translation"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enable" type="bool" /> <description> Defines whether the object can translate strings (with calls to [method tr]). Enabled by default. </description> </method> <method name="set_meta"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="value" type="Variant" /> <description> Adds, changes or removes a given entry in the object's metadata. Metadata are serialized and can take any [Variant] value. To remove a given entry from the object's metadata, use [method remove_meta]. Metadata is also removed if its value is set to [code]null[/code]. This means you can also use [code]set_meta("name", null)[/code] to remove metadata for [code]"name"[/code]. </description> </method> <method name="set_script"> - <return type="void"> - </return> - <argument index="0" name="script" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="script" type="Variant" /> <description> Assigns a script to the object. Each object can have a single script assigned to it, which are used to extend its functionality. If the object already had a script, the previous script instance will be freed and its variables and state will be lost. The new script's [method _init] method will be called. </description> </method> <method name="to_string"> - <return type="String"> - </return> + <return type="String" /> <description> Returns a [String] representing the object. If not overridden, defaults to [code]"[ClassName:RID]"[/code]. Override the method [method _to_string] to customize the [String] representation. </description> </method> <method name="tr" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="message" type="StringName"> - </argument> - <argument index="1" name="context" type="StringName" default=""""> - </argument> + <return type="String" /> + <argument index="0" name="message" type="StringName" /> + <argument index="1" name="context" type="StringName" default="""" /> <description> Translates a message using translation catalogs configured in the Project Settings. An additional context could be used to specify the translation context. Only works if message translation is enabled (which it is by default), otherwise it returns the [code]message[/code] unchanged. See [method set_message_translation]. @@ -660,16 +569,11 @@ </description> </method> <method name="tr_n" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="message" type="StringName"> - </argument> - <argument index="1" name="plural_message" type="StringName"> - </argument> - <argument index="2" name="n" type="int"> - </argument> - <argument index="3" name="context" type="StringName" default=""""> - </argument> + <return type="String" /> + <argument index="0" name="message" type="StringName" /> + <argument index="1" name="plural_message" type="StringName" /> + <argument index="2" name="n" type="int" /> + <argument index="3" name="context" type="StringName" default="""" /> <description> Translates a message involving plurals using translation catalogs configured in the Project Settings. An additional context could be used to specify the translation context. Only works if message translation is enabled (which it is by default), otherwise it returns the [code]message[/code] or [code]plural_message[/code] unchanged. See [method set_message_translation]. diff --git a/doc/classes/OccluderInstance3D.xml b/doc/classes/OccluderInstance3D.xml index 76b784d21d..cc4bddc229 100644 --- a/doc/classes/OccluderInstance3D.xml +++ b/doc/classes/OccluderInstance3D.xml @@ -7,22 +7,19 @@ <tutorials> </tutorials> <methods> - <method name="get_bake_mask_bit" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="layer" type="int"> - </argument> + <method name="get_bake_mask_value" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="layer_number" type="int" /> <description> + Returns whether or not the specified layer of the [member bake_mask] is enabled, given a [code]layer_number[/code] between 1 and 20. </description> </method> - <method name="set_bake_mask_bit"> - <return type="void"> - </return> - <argument index="0" name="layer" type="int"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <method name="set_bake_mask_value"> + <return type="void" /> + <argument index="0" name="layer_number" type="int" /> + <argument index="1" name="value" type="bool" /> <description> + Based on [code]value[/code], enables or disables the specified layer in the [member bake_mask], given a [code]layer_number[/code] between 1 and 20. </description> </method> </methods> diff --git a/doc/classes/OptimizedTranslation.xml b/doc/classes/OptimizedTranslation.xml index a5ca93c7ff..195fa28188 100644 --- a/doc/classes/OptimizedTranslation.xml +++ b/doc/classes/OptimizedTranslation.xml @@ -10,10 +10,8 @@ </tutorials> <methods> <method name="generate"> - <return type="void"> - </return> - <argument index="0" name="from" type="Translation"> - </argument> + <return type="void" /> + <argument index="0" name="from" type="Translation" /> <description> Generates and sets an optimized translation from the given [Translation] resource. </description> diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index 4c03c59f8b..8aa0ad073d 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -11,195 +11,151 @@ </tutorials> <methods> <method name="add_icon_item"> - <return type="void"> - </return> - <argument index="0" name="texture" type="Texture2D"> - </argument> - <argument index="1" name="label" type="String"> - </argument> - <argument index="2" name="id" type="int" default="-1"> - </argument> + <return type="void" /> + <argument index="0" name="texture" type="Texture2D" /> + <argument index="1" name="label" type="String" /> + <argument index="2" name="id" type="int" default="-1" /> <description> Adds an item, with a [code]texture[/code] icon, text [code]label[/code] and (optionally) [code]id[/code]. If no [code]id[/code] is passed, the item index will be used as the item's ID. New items are appended at the end. </description> </method> <method name="add_item"> - <return type="void"> - </return> - <argument index="0" name="label" type="String"> - </argument> - <argument index="1" name="id" type="int" default="-1"> - </argument> + <return type="void" /> + <argument index="0" name="label" type="String" /> + <argument index="1" name="id" type="int" default="-1" /> <description> Adds an item, with text [code]label[/code] and (optionally) [code]id[/code]. If no [code]id[/code] is passed, the item index will be used as the item's ID. New items are appended at the end. </description> </method> <method name="add_separator"> - <return type="void"> - </return> + <return type="void" /> <description> Adds a separator to the list of items. Separators help to group items. Separator also takes up an index and is appended at the end. </description> </method> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> Clears all the items in the [OptionButton]. </description> </method> <method name="get_item_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the amount of items in the OptionButton, including separators. </description> </method> <method name="get_item_icon" qualifiers="const"> - <return type="Texture2D"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Texture2D" /> + <argument index="0" name="idx" type="int" /> <description> Returns the icon of the item at index [code]idx[/code]. </description> </method> <method name="get_item_id" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="idx" type="int" /> <description> Returns the ID of the item at index [code]idx[/code]. </description> </method> <method name="get_item_index" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="id" type="int" /> <description> Returns the index of the item with the given [code]id[/code]. </description> </method> <method name="get_item_metadata" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Variant" /> + <argument index="0" name="idx" type="int" /> <description> Retrieves the metadata of an item. Metadata may be any type and can be used to store extra information about an item, such as an external string ID. </description> </method> <method name="get_item_text" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="idx" type="int" /> <description> Returns the text of the item at index [code]idx[/code]. </description> </method> <method name="get_popup" qualifiers="const"> - <return type="PopupMenu"> - </return> + <return type="PopupMenu" /> <description> Returns the [PopupMenu] contained in this button. </description> </method> <method name="get_selected_id" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the ID of the selected item, or [code]0[/code] if no item is selected. </description> </method> <method name="get_selected_metadata" qualifiers="const"> - <return type="Variant"> - </return> + <return type="Variant" /> <description> Gets the metadata of the selected item. Metadata for items can be set using [method set_item_metadata]. </description> </method> <method name="is_item_disabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="idx" type="int" /> <description> Returns [code]true[/code] if the item at index [code]idx[/code] is disabled. </description> </method> <method name="remove_item"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> <description> Removes the item at index [code]idx[/code]. </description> </method> <method name="select"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> <description> Selects an item by index and makes it the current item. This will work even if the item is disabled. </description> </method> <method name="set_item_disabled"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="disabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="disabled" type="bool" /> <description> Sets whether the item at index [code]idx[/code] is disabled. Disabled items are drawn differently in the dropdown and are not selectable by the user. If the current selected item is set as disabled, it will remain selected. </description> </method> <method name="set_item_icon"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="texture" type="Texture2D"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="texture" type="Texture2D" /> <description> Sets the icon of the item at index [code]idx[/code]. </description> </method> <method name="set_item_id"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="id" type="int" /> <description> Sets the ID of the item at index [code]idx[/code]. </description> </method> <method name="set_item_metadata"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="metadata" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="metadata" type="Variant" /> <description> Sets the metadata of an item. Metadata may be of any type and can be used to store extra information about an item, such as an external string ID. </description> </method> <method name="set_item_text"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="text" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="text" type="String" /> <description> Sets the text of the item at index [code]idx[/code]. </description> @@ -215,15 +171,13 @@ </members> <signals> <signal name="item_focused"> - <argument index="0" name="index" type="int"> - </argument> + <argument index="0" name="index" type="int" /> <description> Emitted when the user navigates to an item using the [code]ui_up[/code] or [code]ui_down[/code] actions. The index of the item selected is passed as argument. </description> </signal> <signal name="item_selected"> - <argument index="0" name="index" type="int"> - </argument> + <argument index="0" name="index" type="int" /> <description> Emitted when the current item has been changed by the user. The index of the item selected is passed as argument. </description> @@ -232,64 +186,64 @@ <constants> </constants> <theme_items> - <theme_item name="arrow" type="Texture2D"> + <theme_item name="arrow" data_type="icon" type="Texture2D"> The arrow icon to be drawn on the right end of the button. </theme_item> - <theme_item name="arrow_margin" type="int" default="2"> + <theme_item name="arrow_margin" data_type="constant" type="int" default="2"> The horizontal space between the arrow icon and the right edge of the button. </theme_item> - <theme_item name="disabled" type="StyleBox"> + <theme_item name="disabled" data_type="style" type="StyleBox"> [StyleBox] used when the [OptionButton] is disabled (for left-to-right layouts). </theme_item> - <theme_item name="disabled_mirrored" type="StyleBox"> + <theme_item name="disabled_mirrored" data_type="style" type="StyleBox"> [StyleBox] used when the [OptionButton] is disabled (for right-to-left layouts). </theme_item> - <theme_item name="focus" type="StyleBox"> + <theme_item name="focus" data_type="style" type="StyleBox"> [StyleBox] used when the [OptionButton] is focused. It is displayed over the current [StyleBox], so using [StyleBoxEmpty] will just disable the focus visual effect. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> [Font] of the [OptionButton]'s text. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> Default text [Color] of the [OptionButton]. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> + <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> Text [Color] used when the [OptionButton] is disabled. </theme_item> - <theme_item name="font_hover_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> + <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> Text [Color] used when the [OptionButton] is being hovered. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [OptionButton]. </theme_item> - <theme_item name="font_pressed_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_pressed_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> Text [Color] used when the [OptionButton] is being pressed. </theme_item> - <theme_item name="font_size" type="int"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the [OptionButton]'s text. </theme_item> - <theme_item name="hover" type="StyleBox"> + <theme_item name="hover" data_type="style" type="StyleBox"> [StyleBox] used when the [OptionButton] is being hovered (for left-to-right layouts). </theme_item> - <theme_item name="hover_mirrored" type="StyleBox"> + <theme_item name="hover_mirrored" data_type="style" type="StyleBox"> [StyleBox] used when the [OptionButton] is being hovered (for right-to-left layouts). </theme_item> - <theme_item name="hseparation" type="int" default="2"> + <theme_item name="hseparation" data_type="constant" type="int" default="2"> The horizontal space between [OptionButton]'s icon and text. </theme_item> - <theme_item name="normal" type="StyleBox"> + <theme_item name="normal" data_type="style" type="StyleBox"> Default [StyleBox] for the [OptionButton] (for left-to-right layouts). </theme_item> - <theme_item name="normal_mirrored" type="StyleBox"> + <theme_item name="normal_mirrored" data_type="style" type="StyleBox"> Default [StyleBox] for the [OptionButton] (for right-to-left layouts). </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. </theme_item> - <theme_item name="pressed" type="StyleBox"> + <theme_item name="pressed" data_type="style" type="StyleBox"> [StyleBox] used when the [OptionButton] is being pressed (for left-to-right layouts). </theme_item> - <theme_item name="pressed_mirrored" type="StyleBox"> + <theme_item name="pressed_mirrored" data_type="style" type="StyleBox"> [StyleBox] used when the [OptionButton] is being pressed (for right-to-left layouts). </theme_item> </theme_items> diff --git a/doc/classes/PCKPacker.xml b/doc/classes/PCKPacker.xml index 40e8683c93..0af329983d 100644 --- a/doc/classes/PCKPacker.xml +++ b/doc/classes/PCKPacker.xml @@ -25,38 +25,27 @@ </tutorials> <methods> <method name="add_file"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="pck_path" type="String"> - </argument> - <argument index="1" name="source_path" type="String"> - </argument> - <argument index="2" name="encrypt" type="bool" default="false"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="pck_path" type="String" /> + <argument index="1" name="source_path" type="String" /> + <argument index="2" name="encrypt" type="bool" default="false" /> <description> Adds the [code]source_path[/code] file to the current PCK package at the [code]pck_path[/code] internal path (should start with [code]res://[/code]). </description> </method> <method name="flush"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="verbose" type="bool" default="false"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="verbose" type="bool" default="false" /> <description> Writes the files specified using all [method add_file] calls since the last flush. If [code]verbose[/code] is [code]true[/code], a list of files added will be printed to the console for easier debugging. </description> </method> <method name="pck_start"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="pck_name" type="String"> - </argument> - <argument index="1" name="alignment" type="int" default="0"> - </argument> - <argument index="2" name="key" type="String" default=""""> - </argument> - <argument index="3" name="encrypt_directory" type="bool" default="false"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="pck_name" type="String" /> + <argument index="1" name="alignment" type="int" default="0" /> + <argument index="2" name="key" type="String" default="""" /> + <argument index="3" name="encrypt_directory" type="bool" default="false" /> <description> Creates a new PCK file with the name [code]pck_name[/code]. The [code].pck[/code] file extension isn't added automatically, so it should be part of [code]pck_name[/code] (even though it's not required). </description> diff --git a/doc/classes/PackedByteArray.xml b/doc/classes/PackedByteArray.xml index 0652cf0aa1..af92590da3 100644 --- a/doc/classes/PackedByteArray.xml +++ b/doc/classes/PackedByteArray.xml @@ -10,183 +10,138 @@ </tutorials> <methods> <method name="PackedByteArray" qualifiers="constructor"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> Constructs an empty [PackedByteArray]. </description> </method> <method name="PackedByteArray" qualifiers="constructor"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="from" type="PackedByteArray"> - </argument> + <return type="PackedByteArray" /> + <argument index="0" name="from" type="PackedByteArray" /> <description> Constructs a [PackedByteArray] as a copy of the given [PackedByteArray]. </description> </method> <method name="PackedByteArray" qualifiers="constructor"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="from" type="Array"> - </argument> + <return type="PackedByteArray" /> + <argument index="0" name="from" type="Array" /> <description> Constructs a new [PackedByteArray]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> - <return type="bool"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="int" /> <description> Appends an element at the end of the array (alias of [method push_back]). </description> </method> <method name="append_array"> - <return type="void"> - </return> - <argument index="0" name="array" type="PackedByteArray"> - </argument> + <return type="void" /> + <argument index="0" name="array" type="PackedByteArray" /> <description> Appends a [PackedByteArray] at the end of this array. </description> </method> <method name="compress" qualifiers="const"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="compression_mode" type="int" default="0"> - </argument> + <return type="PackedByteArray" /> + <argument index="0" name="compression_mode" type="int" default="0" /> <description> Returns a new [PackedByteArray] with the data compressed. Set the compression mode using one of [enum File.CompressionMode]'s constants. </description> </method> <method name="decode_double" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="byte_offset" type="int" /> <description> </description> </method> <method name="decode_float" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="byte_offset" type="int" /> <description> </description> </method> <method name="decode_half" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="byte_offset" type="int" /> <description> </description> </method> <method name="decode_s16" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="byte_offset" type="int" /> <description> </description> </method> <method name="decode_s32" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="byte_offset" type="int" /> <description> </description> </method> <method name="decode_s64" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="byte_offset" type="int" /> <description> </description> </method> <method name="decode_s8" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="byte_offset" type="int" /> <description> </description> </method> <method name="decode_u16" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="byte_offset" type="int" /> <description> </description> </method> <method name="decode_u32" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="byte_offset" type="int" /> <description> </description> </method> <method name="decode_u64" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="byte_offset" type="int" /> <description> </description> </method> <method name="decode_u8" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="byte_offset" type="int" /> <description> </description> </method> <method name="decode_var" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> - <argument index="1" name="allow_objects" type="bool" default="false"> - </argument> + <return type="Variant" /> + <argument index="0" name="byte_offset" type="int" /> + <argument index="1" name="allow_objects" type="bool" default="false" /> <description> </description> </method> <method name="decode_var_size" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> - <argument index="1" name="allow_objects" type="bool" default="false"> - </argument> + <return type="int" /> + <argument index="0" name="byte_offset" type="int" /> + <argument index="1" name="allow_objects" type="bool" default="false" /> <description> </description> </method> <method name="decompress" qualifiers="const"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="buffer_size" type="int"> - </argument> - <argument index="1" name="compression_mode" type="int" default="0"> - </argument> + <return type="PackedByteArray" /> + <argument index="0" name="buffer_size" type="int" /> + <argument index="1" name="compression_mode" type="int" default="0" /> <description> Returns a new [PackedByteArray] with the data decompressed. Set [code]buffer_size[/code] to the size of the uncompressed data. Set the compression mode using one of [enum File.CompressionMode]'s constants. </description> </method> <method name="decompress_dynamic" qualifiers="const"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="max_output_size" type="int"> - </argument> - <argument index="1" name="compression_mode" type="int" default="0"> - </argument> + <return type="PackedByteArray" /> + <argument index="0" name="max_output_size" type="int" /> + <argument index="1" name="compression_mode" type="int" default="0" /> <description> Returns a new [PackedByteArray] with the data decompressed. Set the compression mode using one of [enum File.CompressionMode]'s constants. [b]This method only accepts gzip and deflate compression modes.[/b] This method is potentially slower than [code]decompress[/code], as it may have to re-allocate its output buffer multiple times while decompressing, whereas [code]decompress[/code] knows it's output buffer size from the beginning. @@ -194,193 +149,143 @@ </description> </method> <method name="duplicate"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> Creates a copy of the array, and returns it. </description> </method> <method name="encode_double"> - <return type="void"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> - <argument index="1" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="byte_offset" type="int" /> + <argument index="1" name="value" type="float" /> <description> </description> </method> <method name="encode_float"> - <return type="void"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> - <argument index="1" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="byte_offset" type="int" /> + <argument index="1" name="value" type="float" /> <description> </description> </method> <method name="encode_half"> - <return type="void"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> - <argument index="1" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="byte_offset" type="int" /> + <argument index="1" name="value" type="float" /> <description> </description> </method> <method name="encode_s16"> - <return type="void"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="byte_offset" type="int" /> + <argument index="1" name="value" type="int" /> <description> </description> </method> <method name="encode_s32"> - <return type="void"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="byte_offset" type="int" /> + <argument index="1" name="value" type="int" /> <description> </description> </method> <method name="encode_s64"> - <return type="void"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="byte_offset" type="int" /> + <argument index="1" name="value" type="int" /> <description> </description> </method> <method name="encode_s8"> - <return type="void"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="byte_offset" type="int" /> + <argument index="1" name="value" type="int" /> <description> </description> </method> <method name="encode_u16"> - <return type="void"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="byte_offset" type="int" /> + <argument index="1" name="value" type="int" /> <description> </description> </method> <method name="encode_u32"> - <return type="void"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="byte_offset" type="int" /> + <argument index="1" name="value" type="int" /> <description> </description> </method> <method name="encode_u64"> - <return type="void"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="byte_offset" type="int" /> + <argument index="1" name="value" type="int" /> <description> </description> </method> <method name="encode_u8"> - <return type="void"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="byte_offset" type="int" /> + <argument index="1" name="value" type="int" /> <description> </description> </method> <method name="encode_var"> - <return type="int"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> - <argument index="2" name="allow_objects" type="bool" default="false"> - </argument> + <return type="int" /> + <argument index="0" name="byte_offset" type="int" /> + <argument index="1" name="value" type="Variant" /> + <argument index="2" name="allow_objects" type="bool" default="false" /> <description> </description> </method> <method name="fill"> - <return type="void"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="int" /> <description> Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> <method name="get_string_from_ascii" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Converts ASCII/Latin-1 encoded array to [String]. Fast alternative to [method get_string_from_utf8] if the content is ASCII/Latin-1 only. Unlike the UTF-8 function this function maps every byte to a character in the array. Multibyte sequences will not be interpreted correctly. For parsing user input always use [method get_string_from_utf8]. </description> </method> <method name="get_string_from_utf16" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Converts UTF-16 encoded array to [String]. If the BOM is missing, system endianness is assumed. Returns empty string if source array is not valid UTF-16 string. </description> </method> <method name="get_string_from_utf32" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Converts UTF-32 encoded array to [String]. System endianness is assumed. Returns empty string if source array is not valid UTF-32 string. </description> </method> <method name="get_string_from_utf8" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Converts UTF-8 encoded array to [String]. Slower than [method get_string_from_ascii] but supports UTF-8 encoded data. Use this function if you are unsure about the source of the data. For user input this function should always be preferred. Returns empty string if source array is not valid UTF-8 string. </description> </method> <method name="has"> - <return type="bool"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="int" /> <description> Returns [code]true[/code] if the array contains [code]value[/code]. </description> </method> <method name="has_encoded_var" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="byte_offset" type="int"> - </argument> - <argument index="1" name="allow_objects" type="bool" default="false"> - </argument> + <return type="bool" /> + <argument index="0" name="byte_offset" type="int" /> + <argument index="1" name="allow_objects" type="bool" default="false" /> <description> </description> </method> <method name="hex_encode" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns a hexadecimal representation of this array as a [String]. [codeblocks] @@ -396,125 +301,130 @@ </description> </method> <method name="insert"> - <return type="int"> - </return> - <argument index="0" name="at_index" type="int"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="at_index" type="int" /> + <argument index="1" name="value" type="int" /> <description> Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="is_empty" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the array is empty. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="PackedByteArray"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="PackedByteArray" /> <description> </description> </method> <method name="operator +" qualifiers="operator"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="right" type="PackedByteArray"> - </argument> + <return type="PackedByteArray" /> + <argument index="0" name="right" type="PackedByteArray" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="PackedByteArray"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="PackedByteArray" /> <description> </description> </method> <method name="operator []" qualifiers="operator"> - <return type="int"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="push_back"> - <return type="bool"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="int" /> <description> Appends an element at the end of the array. </description> </method> <method name="remove"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> <description> Removes an element from the array by index. </description> </method> <method name="resize"> - <return type="int"> - </return> - <argument index="0" name="new_size" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="new_size" type="int" /> <description> Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> <method name="reverse"> - <return type="void"> - </return> + <return type="void" /> <description> Reverses the order of the elements in the array. </description> </method> <method name="set"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> + <argument index="1" name="value" type="int" /> <description> Changes the byte at the given index. </description> </method> <method name="size" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the size of the array. </description> </method> <method name="sort"> - <return type="void"> - </return> + <return type="void" /> <description> Sorts the elements of the array in ascending order. </description> </method> <method name="subarray" qualifiers="const"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="from" type="int"> - </argument> - <argument index="1" name="to" type="int"> - </argument> + <return type="PackedByteArray" /> + <argument index="0" name="from" type="int" /> + <argument index="1" name="to" type="int" /> <description> Returns the slice of the [PackedByteArray] between indices (inclusive) as a new [PackedByteArray]. Any negative index is considered to be from the end of the array. </description> </method> + <method name="to_float32_array" qualifiers="const"> + <return type="PackedFloat32Array" /> + <description> + Returns a copy of the data converted to a [PackedFloat32Array], where each block of 4 bytes has been converted to a 32-bit float (C++ [code]float[/code]). + The size of the new array will be [code]byte_array.size() / 4[/code]. + If the original data can't be converted to 32-bit floats, the resulting data is undefined. + </description> + </method> + <method name="to_float64_array" qualifiers="const"> + <return type="PackedFloat64Array" /> + <description> + Returns a copy of the data converted to a [PackedFloat64Array], where each block of 8 bytes has been converted to a 64-bit float (C++ [code]double[/code], Godot [float]). + The size of the new array will be [code]byte_array.size() / 8[/code]. + If the original data can't be converted to 64-bit floats, the resulting data is undefined. + </description> + </method> + <method name="to_int32_array" qualifiers="const"> + <return type="PackedInt32Array" /> + <description> + Returns a copy of the data converted to a [PackedInt32Array], where each block of 4 bytes has been converted to a signed 32-bit integer (C++ [code]int32_t[/code]). + The size of the new array will be [code]byte_array.size() / 4[/code]. + If the original data can't be converted to signed 32-bit integers, the resulting data is undefined. + </description> + </method> + <method name="to_int64_array" qualifiers="const"> + <return type="PackedInt64Array" /> + <description> + Returns a copy of the data converted to a [PackedInt64Array], where each block of 4 bytes has been converted to a signed 64-bit integer (C++ [code]int64_t[/code], Godot [int]). + The size of the new array will be [code]byte_array.size() / 8[/code]. + If the original data can't be converted to signed 64-bit integers, the resulting data is undefined. + </description> + </method> </methods> <constants> </constants> diff --git a/doc/classes/PackedColorArray.xml b/doc/classes/PackedColorArray.xml index 19cfcd7c87..a5a5703bfa 100644 --- a/doc/classes/PackedColorArray.xml +++ b/doc/classes/PackedColorArray.xml @@ -10,195 +10,153 @@ </tutorials> <methods> <method name="PackedColorArray" qualifiers="constructor"> - <return type="PackedColorArray"> - </return> + <return type="PackedColorArray" /> <description> Constructs an empty [PackedColorArray]. </description> </method> <method name="PackedColorArray" qualifiers="constructor"> - <return type="PackedColorArray"> - </return> - <argument index="0" name="from" type="PackedColorArray"> - </argument> + <return type="PackedColorArray" /> + <argument index="0" name="from" type="PackedColorArray" /> <description> Constructs a [PackedColorArray] as a copy of the given [PackedColorArray]. </description> </method> <method name="PackedColorArray" qualifiers="constructor"> - <return type="PackedColorArray"> - </return> - <argument index="0" name="from" type="Array"> - </argument> + <return type="PackedColorArray" /> + <argument index="0" name="from" type="Array" /> <description> Constructs a new [PackedColorArray]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> - <return type="bool"> - </return> - <argument index="0" name="value" type="Color"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="Color" /> <description> Appends an element at the end of the array (alias of [method push_back]). </description> </method> <method name="append_array"> - <return type="void"> - </return> - <argument index="0" name="array" type="PackedColorArray"> - </argument> + <return type="void" /> + <argument index="0" name="array" type="PackedColorArray" /> <description> Appends a [PackedColorArray] at the end of this array. </description> </method> <method name="duplicate"> - <return type="PackedColorArray"> - </return> + <return type="PackedColorArray" /> <description> Creates a copy of the array, and returns it. </description> </method> <method name="fill"> - <return type="void"> - </return> - <argument index="0" name="value" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="Color" /> <description> Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> <method name="has"> - <return type="bool"> - </return> - <argument index="0" name="value" type="Color"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="Color" /> <description> Returns [code]true[/code] if the array contains [code]value[/code]. </description> </method> <method name="insert"> - <return type="int"> - </return> - <argument index="0" name="at_index" type="int"> - </argument> - <argument index="1" name="value" type="Color"> - </argument> + <return type="int" /> + <argument index="0" name="at_index" type="int" /> + <argument index="1" name="value" type="Color" /> <description> Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="is_empty" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the array is empty. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="PackedColorArray"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="PackedColorArray" /> <description> </description> </method> <method name="operator +" qualifiers="operator"> - <return type="PackedColorArray"> - </return> - <argument index="0" name="right" type="PackedColorArray"> - </argument> + <return type="PackedColorArray" /> + <argument index="0" name="right" type="PackedColorArray" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="PackedColorArray"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="PackedColorArray" /> <description> </description> </method> <method name="operator []" qualifiers="operator"> - <return type="Color"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="push_back"> - <return type="bool"> - </return> - <argument index="0" name="value" type="Color"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="Color" /> <description> Appends a value to the array. </description> </method> <method name="remove"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> <description> Removes an element from the array by index. </description> </method> <method name="resize"> - <return type="int"> - </return> - <argument index="0" name="new_size" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="new_size" type="int" /> <description> Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> <method name="reverse"> - <return type="void"> - </return> + <return type="void" /> <description> Reverses the order of the elements in the array. </description> </method> <method name="set"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="value" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> + <argument index="1" name="value" type="Color" /> <description> Changes the [Color] at the given index. </description> </method> <method name="size" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the size of the array. </description> </method> <method name="sort"> - <return type="void"> - </return> + <return type="void" /> <description> Sorts the elements of the array in ascending order. </description> </method> <method name="subarray" qualifiers="const"> - <return type="PackedColorArray"> - </return> - <argument index="0" name="from" type="int"> - </argument> - <argument index="1" name="to" type="int"> - </argument> + <return type="PackedColorArray" /> + <argument index="0" name="from" type="int" /> + <argument index="1" name="to" type="int" /> <description> </description> </method> <method name="to_byte_array" qualifiers="const"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> </description> </method> diff --git a/doc/classes/PackedDataContainer.xml b/doc/classes/PackedDataContainer.xml index f72db514f0..0a765fcc75 100644 --- a/doc/classes/PackedDataContainer.xml +++ b/doc/classes/PackedDataContainer.xml @@ -8,16 +8,13 @@ </tutorials> <methods> <method name="pack"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="value" type="Variant"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="value" type="Variant" /> <description> </description> </method> <method name="size" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> diff --git a/doc/classes/PackedDataContainerRef.xml b/doc/classes/PackedDataContainerRef.xml index bfd5a6f1c1..5e42079b97 100644 --- a/doc/classes/PackedDataContainerRef.xml +++ b/doc/classes/PackedDataContainerRef.xml @@ -9,8 +9,7 @@ </tutorials> <methods> <method name="size" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> diff --git a/doc/classes/PackedFloat32Array.xml b/doc/classes/PackedFloat32Array.xml index ab97c9a695..9e7dd8f99e 100644 --- a/doc/classes/PackedFloat32Array.xml +++ b/doc/classes/PackedFloat32Array.xml @@ -11,196 +11,156 @@ </tutorials> <methods> <method name="PackedFloat32Array" qualifiers="constructor"> - <return type="PackedFloat32Array"> - </return> + <return type="PackedFloat32Array" /> <description> Constructs an empty [PackedFloat32Array]. </description> </method> <method name="PackedFloat32Array" qualifiers="constructor"> - <return type="PackedFloat32Array"> - </return> - <argument index="0" name="from" type="PackedFloat32Array"> - </argument> + <return type="PackedFloat32Array" /> + <argument index="0" name="from" type="PackedFloat32Array" /> <description> Constructs a [PackedFloat32Array] as a copy of the given [PackedFloat32Array]. </description> </method> <method name="PackedFloat32Array" qualifiers="constructor"> - <return type="PackedFloat32Array"> - </return> - <argument index="0" name="from" type="Array"> - </argument> + <return type="PackedFloat32Array" /> + <argument index="0" name="from" type="Array" /> <description> Constructs a new [PackedFloat32Array]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> - <return type="bool"> - </return> - <argument index="0" name="value" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="float" /> <description> Appends an element at the end of the array (alias of [method push_back]). </description> </method> <method name="append_array"> - <return type="void"> - </return> - <argument index="0" name="array" type="PackedFloat32Array"> - </argument> + <return type="void" /> + <argument index="0" name="array" type="PackedFloat32Array" /> <description> Appends a [PackedFloat32Array] at the end of this array. </description> </method> <method name="duplicate"> - <return type="PackedFloat32Array"> - </return> + <return type="PackedFloat32Array" /> <description> Creates a copy of the array, and returns it. </description> </method> <method name="fill"> - <return type="void"> - </return> - <argument index="0" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="float" /> <description> Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> <method name="has"> - <return type="bool"> - </return> - <argument index="0" name="value" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="float" /> <description> Returns [code]true[/code] if the array contains [code]value[/code]. </description> </method> <method name="insert"> - <return type="int"> - </return> - <argument index="0" name="at_index" type="int"> - </argument> - <argument index="1" name="value" type="float"> - </argument> + <return type="int" /> + <argument index="0" name="at_index" type="int" /> + <argument index="1" name="value" type="float" /> <description> Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="is_empty" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the array is empty. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="PackedFloat32Array"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="PackedFloat32Array" /> <description> </description> </method> <method name="operator +" qualifiers="operator"> - <return type="PackedFloat32Array"> - </return> - <argument index="0" name="right" type="PackedFloat32Array"> - </argument> + <return type="PackedFloat32Array" /> + <argument index="0" name="right" type="PackedFloat32Array" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="PackedFloat32Array"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="PackedFloat32Array" /> <description> </description> </method> <method name="operator []" qualifiers="operator"> - <return type="float"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="push_back"> - <return type="bool"> - </return> - <argument index="0" name="value" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="float" /> <description> Appends an element at the end of the array. </description> </method> <method name="remove"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> <description> Removes an element from the array by index. </description> </method> <method name="resize"> - <return type="int"> - </return> - <argument index="0" name="new_size" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="new_size" type="int" /> <description> Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> <method name="reverse"> - <return type="void"> - </return> + <return type="void" /> <description> Reverses the order of the elements in the array. </description> </method> <method name="set"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> + <argument index="1" name="value" type="float" /> <description> Changes the float at the given index. </description> </method> <method name="size" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the size of the array. </description> </method> <method name="sort"> - <return type="void"> - </return> + <return type="void" /> <description> Sorts the elements of the array in ascending order. </description> </method> <method name="subarray" qualifiers="const"> - <return type="PackedFloat32Array"> - </return> - <argument index="0" name="from" type="int"> - </argument> - <argument index="1" name="to" type="int"> - </argument> + <return type="PackedFloat32Array" /> + <argument index="0" name="from" type="int" /> + <argument index="1" name="to" type="int" /> <description> </description> </method> <method name="to_byte_array" qualifiers="const"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> + Returns a copy of the data converted to a [PackedByteArray], where each element have been encoded as 4 bytes. + The size of the new array will be [code]float32_array.size() * 4[/code]. </description> </method> </methods> diff --git a/doc/classes/PackedFloat64Array.xml b/doc/classes/PackedFloat64Array.xml index ad20801b01..ff4cf0edf8 100644 --- a/doc/classes/PackedFloat64Array.xml +++ b/doc/classes/PackedFloat64Array.xml @@ -11,196 +11,156 @@ </tutorials> <methods> <method name="PackedFloat64Array" qualifiers="constructor"> - <return type="PackedFloat64Array"> - </return> + <return type="PackedFloat64Array" /> <description> Constructs an empty [PackedFloat64Array]. </description> </method> <method name="PackedFloat64Array" qualifiers="constructor"> - <return type="PackedFloat64Array"> - </return> - <argument index="0" name="from" type="PackedFloat64Array"> - </argument> + <return type="PackedFloat64Array" /> + <argument index="0" name="from" type="PackedFloat64Array" /> <description> Constructs a [PackedFloat64Array] as a copy of the given [PackedFloat64Array]. </description> </method> <method name="PackedFloat64Array" qualifiers="constructor"> - <return type="PackedFloat64Array"> - </return> - <argument index="0" name="from" type="Array"> - </argument> + <return type="PackedFloat64Array" /> + <argument index="0" name="from" type="Array" /> <description> Constructs a new [PackedFloat64Array]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> - <return type="bool"> - </return> - <argument index="0" name="value" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="float" /> <description> Appends an element at the end of the array (alias of [method push_back]). </description> </method> <method name="append_array"> - <return type="void"> - </return> - <argument index="0" name="array" type="PackedFloat64Array"> - </argument> + <return type="void" /> + <argument index="0" name="array" type="PackedFloat64Array" /> <description> Appends a [PackedFloat64Array] at the end of this array. </description> </method> <method name="duplicate"> - <return type="PackedFloat64Array"> - </return> + <return type="PackedFloat64Array" /> <description> Creates a copy of the array, and returns it. </description> </method> <method name="fill"> - <return type="void"> - </return> - <argument index="0" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="float" /> <description> Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> <method name="has"> - <return type="bool"> - </return> - <argument index="0" name="value" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="float" /> <description> Returns [code]true[/code] if the array contains [code]value[/code]. </description> </method> <method name="insert"> - <return type="int"> - </return> - <argument index="0" name="at_index" type="int"> - </argument> - <argument index="1" name="value" type="float"> - </argument> + <return type="int" /> + <argument index="0" name="at_index" type="int" /> + <argument index="1" name="value" type="float" /> <description> Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="is_empty" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the array is empty. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="PackedFloat64Array"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="PackedFloat64Array" /> <description> </description> </method> <method name="operator +" qualifiers="operator"> - <return type="PackedFloat64Array"> - </return> - <argument index="0" name="right" type="PackedFloat64Array"> - </argument> + <return type="PackedFloat64Array" /> + <argument index="0" name="right" type="PackedFloat64Array" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="PackedFloat64Array"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="PackedFloat64Array" /> <description> </description> </method> <method name="operator []" qualifiers="operator"> - <return type="float"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="push_back"> - <return type="bool"> - </return> - <argument index="0" name="value" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="float" /> <description> Appends an element at the end of the array. </description> </method> <method name="remove"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> <description> Removes an element from the array by index. </description> </method> <method name="resize"> - <return type="int"> - </return> - <argument index="0" name="new_size" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="new_size" type="int" /> <description> Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> <method name="reverse"> - <return type="void"> - </return> + <return type="void" /> <description> Reverses the order of the elements in the array. </description> </method> <method name="set"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> + <argument index="1" name="value" type="float" /> <description> Changes the float at the given index. </description> </method> <method name="size" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the size of the array. </description> </method> <method name="sort"> - <return type="void"> - </return> + <return type="void" /> <description> Sorts the elements of the array in ascending order. </description> </method> <method name="subarray" qualifiers="const"> - <return type="PackedFloat64Array"> - </return> - <argument index="0" name="from" type="int"> - </argument> - <argument index="1" name="to" type="int"> - </argument> + <return type="PackedFloat64Array" /> + <argument index="0" name="from" type="int" /> + <argument index="1" name="to" type="int" /> <description> </description> </method> <method name="to_byte_array" qualifiers="const"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> + Returns a copy of the data converted to a [PackedByteArray], where each element have been encoded as 8 bytes. + The size of the new array will be [code]float64_array.size() * 8[/code]. </description> </method> </methods> diff --git a/doc/classes/PackedInt32Array.xml b/doc/classes/PackedInt32Array.xml index ff4729082e..2e9716b665 100644 --- a/doc/classes/PackedInt32Array.xml +++ b/doc/classes/PackedInt32Array.xml @@ -11,196 +11,156 @@ </tutorials> <methods> <method name="PackedInt32Array" qualifiers="constructor"> - <return type="PackedInt32Array"> - </return> + <return type="PackedInt32Array" /> <description> Constructs an empty [PackedInt32Array]. </description> </method> <method name="PackedInt32Array" qualifiers="constructor"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="from" type="PackedInt32Array"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="from" type="PackedInt32Array" /> <description> Constructs a [PackedInt32Array] as a copy of the given [PackedInt32Array]. </description> </method> <method name="PackedInt32Array" qualifiers="constructor"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="from" type="Array"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="from" type="Array" /> <description> Constructs a new [PackedInt32Array]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> - <return type="bool"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="int" /> <description> Appends an element at the end of the array (alias of [method push_back]). </description> </method> <method name="append_array"> - <return type="void"> - </return> - <argument index="0" name="array" type="PackedInt32Array"> - </argument> + <return type="void" /> + <argument index="0" name="array" type="PackedInt32Array" /> <description> Appends a [PackedInt32Array] at the end of this array. </description> </method> <method name="duplicate"> - <return type="PackedInt32Array"> - </return> + <return type="PackedInt32Array" /> <description> Creates a copy of the array, and returns it. </description> </method> <method name="fill"> - <return type="void"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="int" /> <description> Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> <method name="has"> - <return type="bool"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="int" /> <description> Returns [code]true[/code] if the array contains [code]value[/code]. </description> </method> <method name="insert"> - <return type="int"> - </return> - <argument index="0" name="at_index" type="int"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="at_index" type="int" /> + <argument index="1" name="value" type="int" /> <description> Inserts a new integer at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="is_empty" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the array is empty. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="PackedInt32Array"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="PackedInt32Array" /> <description> </description> </method> <method name="operator +" qualifiers="operator"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="right" type="PackedInt32Array"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="right" type="PackedInt32Array" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="PackedInt32Array"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="PackedInt32Array" /> <description> </description> </method> <method name="operator []" qualifiers="operator"> - <return type="int"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="push_back"> - <return type="bool"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="int" /> <description> Appends a value to the array. </description> </method> <method name="remove"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> <description> Removes an element from the array by index. </description> </method> <method name="resize"> - <return type="int"> - </return> - <argument index="0" name="new_size" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="new_size" type="int" /> <description> Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> <method name="reverse"> - <return type="void"> - </return> + <return type="void" /> <description> Reverses the order of the elements in the array. </description> </method> <method name="set"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> + <argument index="1" name="value" type="int" /> <description> Changes the integer at the given index. </description> </method> <method name="size" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the array size. </description> </method> <method name="sort"> - <return type="void"> - </return> + <return type="void" /> <description> Sorts the elements of the array in ascending order. </description> </method> <method name="subarray" qualifiers="const"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="from" type="int"> - </argument> - <argument index="1" name="to" type="int"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="from" type="int" /> + <argument index="1" name="to" type="int" /> <description> </description> </method> <method name="to_byte_array" qualifiers="const"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> + Returns a copy of the data converted to a [PackedByteArray], where each element have been encoded as 4 bytes. + The size of the new array will be [code]int32_array.size() * 4[/code]. </description> </method> </methods> diff --git a/doc/classes/PackedInt64Array.xml b/doc/classes/PackedInt64Array.xml index 195b12b129..1e7fff3bc6 100644 --- a/doc/classes/PackedInt64Array.xml +++ b/doc/classes/PackedInt64Array.xml @@ -11,196 +11,156 @@ </tutorials> <methods> <method name="PackedInt64Array" qualifiers="constructor"> - <return type="PackedInt64Array"> - </return> + <return type="PackedInt64Array" /> <description> Constructs an empty [PackedInt64Array]. </description> </method> <method name="PackedInt64Array" qualifiers="constructor"> - <return type="PackedInt64Array"> - </return> - <argument index="0" name="from" type="PackedInt64Array"> - </argument> + <return type="PackedInt64Array" /> + <argument index="0" name="from" type="PackedInt64Array" /> <description> Constructs a [PackedInt64Array] as a copy of the given [PackedInt64Array]. </description> </method> <method name="PackedInt64Array" qualifiers="constructor"> - <return type="PackedInt64Array"> - </return> - <argument index="0" name="from" type="Array"> - </argument> + <return type="PackedInt64Array" /> + <argument index="0" name="from" type="Array" /> <description> Constructs a new [PackedInt64Array]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> - <return type="bool"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="int" /> <description> Appends an element at the end of the array (alias of [method push_back]). </description> </method> <method name="append_array"> - <return type="void"> - </return> - <argument index="0" name="array" type="PackedInt64Array"> - </argument> + <return type="void" /> + <argument index="0" name="array" type="PackedInt64Array" /> <description> Appends a [PackedInt64Array] at the end of this array. </description> </method> <method name="duplicate"> - <return type="PackedInt64Array"> - </return> + <return type="PackedInt64Array" /> <description> Creates a copy of the array, and returns it. </description> </method> <method name="fill"> - <return type="void"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="int" /> <description> Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> <method name="has"> - <return type="bool"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="int" /> <description> Returns [code]true[/code] if the array contains [code]value[/code]. </description> </method> <method name="insert"> - <return type="int"> - </return> - <argument index="0" name="at_index" type="int"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="at_index" type="int" /> + <argument index="1" name="value" type="int" /> <description> Inserts a new integer at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="is_empty" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the array is empty. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="PackedInt64Array"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="PackedInt64Array" /> <description> </description> </method> <method name="operator +" qualifiers="operator"> - <return type="PackedInt64Array"> - </return> - <argument index="0" name="right" type="PackedInt64Array"> - </argument> + <return type="PackedInt64Array" /> + <argument index="0" name="right" type="PackedInt64Array" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="PackedInt64Array"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="PackedInt64Array" /> <description> </description> </method> <method name="operator []" qualifiers="operator"> - <return type="int"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="push_back"> - <return type="bool"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="int" /> <description> Appends a value to the array. </description> </method> <method name="remove"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> <description> Removes an element from the array by index. </description> </method> <method name="resize"> - <return type="int"> - </return> - <argument index="0" name="new_size" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="new_size" type="int" /> <description> Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> <method name="reverse"> - <return type="void"> - </return> + <return type="void" /> <description> Reverses the order of the elements in the array. </description> </method> <method name="set"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> + <argument index="1" name="value" type="int" /> <description> Changes the integer at the given index. </description> </method> <method name="size" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the array size. </description> </method> <method name="sort"> - <return type="void"> - </return> + <return type="void" /> <description> Sorts the elements of the array in ascending order. </description> </method> <method name="subarray" qualifiers="const"> - <return type="PackedInt64Array"> - </return> - <argument index="0" name="from" type="int"> - </argument> - <argument index="1" name="to" type="int"> - </argument> + <return type="PackedInt64Array" /> + <argument index="0" name="from" type="int" /> + <argument index="1" name="to" type="int" /> <description> </description> </method> <method name="to_byte_array" qualifiers="const"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> + Returns a copy of the data converted to a [PackedByteArray], where each element have been encoded as 8 bytes. + The size of the new array will be [code]int64_array.size() * 8[/code]. </description> </method> </methods> diff --git a/doc/classes/PackedScene.xml b/doc/classes/PackedScene.xml index f39cae8be5..1374496b52 100644 --- a/doc/classes/PackedScene.xml +++ b/doc/classes/PackedScene.xml @@ -77,33 +77,27 @@ </tutorials> <methods> <method name="can_instantiate" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the scene file has nodes. </description> </method> <method name="get_state"> - <return type="SceneState"> - </return> + <return type="SceneState" /> <description> Returns the [code]SceneState[/code] representing the scene file contents. </description> </method> <method name="instantiate" qualifiers="const"> - <return type="Node"> - </return> - <argument index="0" name="edit_state" type="int" enum="PackedScene.GenEditState" default="0"> - </argument> + <return type="Node" /> + <argument index="0" name="edit_state" type="int" enum="PackedScene.GenEditState" default="0" /> <description> Instantiates the scene's node hierarchy. Triggers child scene instantiation(s). Triggers a [constant Node.NOTIFICATION_INSTANCED] notification on the root node. </description> </method> <method name="pack"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="Node"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="Node" /> <description> Pack will ignore any sub-nodes not owned by given node. See [member Node.owner]. </description> diff --git a/doc/classes/PackedStringArray.xml b/doc/classes/PackedStringArray.xml index 22458832da..04113d4a2e 100644 --- a/doc/classes/PackedStringArray.xml +++ b/doc/classes/PackedStringArray.xml @@ -11,195 +11,153 @@ </tutorials> <methods> <method name="PackedStringArray" qualifiers="constructor"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Constructs an empty [PackedStringArray]. </description> </method> <method name="PackedStringArray" qualifiers="constructor"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="from" type="PackedStringArray"> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="from" type="PackedStringArray" /> <description> Constructs a [PackedStringArray] as a copy of the given [PackedStringArray]. </description> </method> <method name="PackedStringArray" qualifiers="constructor"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="from" type="Array"> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="from" type="Array" /> <description> Constructs a new [PackedStringArray]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> - <return type="bool"> - </return> - <argument index="0" name="value" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="String" /> <description> Appends an element at the end of the array (alias of [method push_back]). </description> </method> <method name="append_array"> - <return type="void"> - </return> - <argument index="0" name="array" type="PackedStringArray"> - </argument> + <return type="void" /> + <argument index="0" name="array" type="PackedStringArray" /> <description> Appends a [PackedStringArray] at the end of this array. </description> </method> <method name="duplicate"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Creates a copy of the array, and returns it. </description> </method> <method name="fill"> - <return type="void"> - </return> - <argument index="0" name="value" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="String" /> <description> Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> <method name="has"> - <return type="bool"> - </return> - <argument index="0" name="value" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="String" /> <description> Returns [code]true[/code] if the array contains [code]value[/code]. </description> </method> <method name="insert"> - <return type="int"> - </return> - <argument index="0" name="at_index" type="int"> - </argument> - <argument index="1" name="value" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="at_index" type="int" /> + <argument index="1" name="value" type="String" /> <description> Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="is_empty" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the array is empty. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="PackedStringArray"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="PackedStringArray" /> <description> </description> </method> <method name="operator +" qualifiers="operator"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="right" type="PackedStringArray"> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="right" type="PackedStringArray" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="PackedStringArray"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="PackedStringArray" /> <description> </description> </method> <method name="operator []" qualifiers="operator"> - <return type="String"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="push_back"> - <return type="bool"> - </return> - <argument index="0" name="value" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="String" /> <description> Appends a string element at end of the array. </description> </method> <method name="remove"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> <description> Removes an element from the array by index. </description> </method> <method name="resize"> - <return type="int"> - </return> - <argument index="0" name="new_size" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="new_size" type="int" /> <description> Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> <method name="reverse"> - <return type="void"> - </return> + <return type="void" /> <description> Reverses the order of the elements in the array. </description> </method> <method name="set"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="value" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> + <argument index="1" name="value" type="String" /> <description> Changes the [String] at the given index. </description> </method> <method name="size" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the size of the array. </description> </method> <method name="sort"> - <return type="void"> - </return> + <return type="void" /> <description> Sorts the elements of the array in ascending order. </description> </method> <method name="subarray" qualifiers="const"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="from" type="int"> - </argument> - <argument index="1" name="to" type="int"> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="from" type="int" /> + <argument index="1" name="to" type="int" /> <description> </description> </method> <method name="to_byte_array" qualifiers="const"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> </description> </method> diff --git a/doc/classes/PackedVector2Array.xml b/doc/classes/PackedVector2Array.xml index 6c8791f988..76d3aff20e 100644 --- a/doc/classes/PackedVector2Array.xml +++ b/doc/classes/PackedVector2Array.xml @@ -11,203 +11,159 @@ </tutorials> <methods> <method name="PackedVector2Array" qualifiers="constructor"> - <return type="PackedVector2Array"> - </return> + <return type="PackedVector2Array" /> <description> Constructs an empty [PackedVector2Array]. </description> </method> <method name="PackedVector2Array" qualifiers="constructor"> - <return type="PackedVector2Array"> - </return> - <argument index="0" name="from" type="PackedVector2Array"> - </argument> + <return type="PackedVector2Array" /> + <argument index="0" name="from" type="PackedVector2Array" /> <description> Constructs a [PackedVector2Array] as a copy of the given [PackedVector2Array]. </description> </method> <method name="PackedVector2Array" qualifiers="constructor"> - <return type="PackedVector2Array"> - </return> - <argument index="0" name="from" type="Array"> - </argument> + <return type="PackedVector2Array" /> + <argument index="0" name="from" type="Array" /> <description> Constructs a new [PackedVector2Array]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> - <return type="bool"> - </return> - <argument index="0" name="value" type="Vector2"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="Vector2" /> <description> Appends an element at the end of the array (alias of [method push_back]). </description> </method> <method name="append_array"> - <return type="void"> - </return> - <argument index="0" name="array" type="PackedVector2Array"> - </argument> + <return type="void" /> + <argument index="0" name="array" type="PackedVector2Array" /> <description> Appends a [PackedVector2Array] at the end of this array. </description> </method> <method name="duplicate"> - <return type="PackedVector2Array"> - </return> + <return type="PackedVector2Array" /> <description> Creates a copy of the array, and returns it. </description> </method> <method name="fill"> - <return type="void"> - </return> - <argument index="0" name="value" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="Vector2" /> <description> Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> <method name="has"> - <return type="bool"> - </return> - <argument index="0" name="value" type="Vector2"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="Vector2" /> <description> Returns [code]true[/code] if the array contains [code]value[/code]. </description> </method> <method name="insert"> - <return type="int"> - </return> - <argument index="0" name="at_index" type="int"> - </argument> - <argument index="1" name="value" type="Vector2"> - </argument> + <return type="int" /> + <argument index="0" name="at_index" type="int" /> + <argument index="1" name="value" type="Vector2" /> <description> Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="is_empty" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the array is empty. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="PackedVector2Array"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="PackedVector2Array" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="PackedVector2Array"> - </return> - <argument index="0" name="right" type="Transform2D"> - </argument> + <return type="PackedVector2Array" /> + <argument index="0" name="right" type="Transform2D" /> <description> </description> </method> <method name="operator +" qualifiers="operator"> - <return type="PackedVector2Array"> - </return> - <argument index="0" name="right" type="PackedVector2Array"> - </argument> + <return type="PackedVector2Array" /> + <argument index="0" name="right" type="PackedVector2Array" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="PackedVector2Array"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="PackedVector2Array" /> <description> </description> </method> <method name="operator []" qualifiers="operator"> - <return type="Vector2"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="push_back"> - <return type="bool"> - </return> - <argument index="0" name="value" type="Vector2"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="Vector2" /> <description> Inserts a [Vector2] at the end. </description> </method> <method name="remove"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> <description> Removes an element from the array by index. </description> </method> <method name="resize"> - <return type="int"> - </return> - <argument index="0" name="new_size" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="new_size" type="int" /> <description> Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> <method name="reverse"> - <return type="void"> - </return> + <return type="void" /> <description> Reverses the order of the elements in the array. </description> </method> <method name="set"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="value" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> + <argument index="1" name="value" type="Vector2" /> <description> Changes the [Vector2] at the given index. </description> </method> <method name="size" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the size of the array. </description> </method> <method name="sort"> - <return type="void"> - </return> + <return type="void" /> <description> Sorts the elements of the array in ascending order. </description> </method> <method name="subarray" qualifiers="const"> - <return type="PackedVector2Array"> - </return> - <argument index="0" name="from" type="int"> - </argument> - <argument index="1" name="to" type="int"> - </argument> + <return type="PackedVector2Array" /> + <argument index="0" name="from" type="int" /> + <argument index="1" name="to" type="int" /> <description> </description> </method> <method name="to_byte_array" qualifiers="const"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> </description> </method> diff --git a/doc/classes/PackedVector3Array.xml b/doc/classes/PackedVector3Array.xml index 00ded39082..1a35f71619 100644 --- a/doc/classes/PackedVector3Array.xml +++ b/doc/classes/PackedVector3Array.xml @@ -10,203 +10,159 @@ </tutorials> <methods> <method name="PackedVector3Array" qualifiers="constructor"> - <return type="PackedVector3Array"> - </return> + <return type="PackedVector3Array" /> <description> Constructs an empty [PackedVector3Array]. </description> </method> <method name="PackedVector3Array" qualifiers="constructor"> - <return type="PackedVector3Array"> - </return> - <argument index="0" name="from" type="PackedVector3Array"> - </argument> + <return type="PackedVector3Array" /> + <argument index="0" name="from" type="PackedVector3Array" /> <description> Constructs a [PackedVector3Array] as a copy of the given [PackedVector3Array]. </description> </method> <method name="PackedVector3Array" qualifiers="constructor"> - <return type="PackedVector3Array"> - </return> - <argument index="0" name="from" type="Array"> - </argument> + <return type="PackedVector3Array" /> + <argument index="0" name="from" type="Array" /> <description> Constructs a new [PackedVector3Array]. Optionally, you can pass in a generic [Array] that will be converted. </description> </method> <method name="append"> - <return type="bool"> - </return> - <argument index="0" name="value" type="Vector3"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="Vector3" /> <description> Appends an element at the end of the array (alias of [method push_back]). </description> </method> <method name="append_array"> - <return type="void"> - </return> - <argument index="0" name="array" type="PackedVector3Array"> - </argument> + <return type="void" /> + <argument index="0" name="array" type="PackedVector3Array" /> <description> Appends a [PackedVector3Array] at the end of this array. </description> </method> <method name="duplicate"> - <return type="PackedVector3Array"> - </return> + <return type="PackedVector3Array" /> <description> Creates a copy of the array, and returns it. </description> </method> <method name="fill"> - <return type="void"> - </return> - <argument index="0" name="value" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="Vector3" /> <description> Assigns the given value to all elements in the array. This can typically be used together with [method resize] to create an array with a given size and initialized elements. </description> </method> <method name="has"> - <return type="bool"> - </return> - <argument index="0" name="value" type="Vector3"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="Vector3" /> <description> Returns [code]true[/code] if the array contains [code]value[/code]. </description> </method> <method name="insert"> - <return type="int"> - </return> - <argument index="0" name="at_index" type="int"> - </argument> - <argument index="1" name="value" type="Vector3"> - </argument> + <return type="int" /> + <argument index="0" name="at_index" type="int" /> + <argument index="1" name="value" type="Vector3" /> <description> Inserts a new element at a given position in the array. The position must be valid, or at the end of the array ([code]idx == size()[/code]). </description> </method> <method name="is_empty" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the array is empty. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="PackedVector3Array"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="PackedVector3Array" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="PackedVector3Array"> - </return> - <argument index="0" name="right" type="Transform3D"> - </argument> + <return type="PackedVector3Array" /> + <argument index="0" name="right" type="Transform3D" /> <description> </description> </method> <method name="operator +" qualifiers="operator"> - <return type="PackedVector3Array"> - </return> - <argument index="0" name="right" type="PackedVector3Array"> - </argument> + <return type="PackedVector3Array" /> + <argument index="0" name="right" type="PackedVector3Array" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="PackedVector3Array"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="PackedVector3Array" /> <description> </description> </method> <method name="operator []" qualifiers="operator"> - <return type="Vector3"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="Vector3" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="push_back"> - <return type="bool"> - </return> - <argument index="0" name="value" type="Vector3"> - </argument> + <return type="bool" /> + <argument index="0" name="value" type="Vector3" /> <description> Inserts a [Vector3] at the end. </description> </method> <method name="remove"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> <description> Removes an element from the array by index. </description> </method> <method name="resize"> - <return type="int"> - </return> - <argument index="0" name="new_size" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="new_size" type="int" /> <description> Sets the size of the array. If the array is grown, reserves elements at the end of the array. If the array is shrunk, truncates the array to the new size. </description> </method> <method name="reverse"> - <return type="void"> - </return> + <return type="void" /> <description> Reverses the order of the elements in the array. </description> </method> <method name="set"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="value" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> + <argument index="1" name="value" type="Vector3" /> <description> Changes the [Vector3] at the given index. </description> </method> <method name="size" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the size of the array. </description> </method> <method name="sort"> - <return type="void"> - </return> + <return type="void" /> <description> Sorts the elements of the array in ascending order. </description> </method> <method name="subarray" qualifiers="const"> - <return type="PackedVector3Array"> - </return> - <argument index="0" name="from" type="int"> - </argument> - <argument index="1" name="to" type="int"> - </argument> + <return type="PackedVector3Array" /> + <argument index="0" name="from" type="int" /> + <argument index="1" name="to" type="int" /> <description> </description> </method> <method name="to_byte_array" qualifiers="const"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> </description> </method> diff --git a/doc/classes/PacketPeer.xml b/doc/classes/PacketPeer.xml index 0a758c2cd6..8d0aa89287 100644 --- a/doc/classes/PacketPeer.xml +++ b/doc/classes/PacketPeer.xml @@ -10,52 +10,42 @@ </tutorials> <methods> <method name="get_available_packet_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of packets currently available in the ring-buffer. </description> </method> <method name="get_packet"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> Gets a raw packet. </description> </method> <method name="get_packet_error" qualifiers="const"> - <return type="int" enum="Error"> - </return> + <return type="int" enum="Error" /> <description> Returns the error state of the last packet received (via [method get_packet] and [method get_var]). </description> </method> <method name="get_var"> - <return type="Variant"> - </return> - <argument index="0" name="allow_objects" type="bool" default="false"> - </argument> + <return type="Variant" /> + <argument index="0" name="allow_objects" type="bool" default="false" /> <description> Gets a Variant. If [code]allow_objects[/code] is [code]true[/code], decoding objects is allowed. [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. </description> </method> <method name="put_packet"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="buffer" type="PackedByteArray"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="buffer" type="PackedByteArray" /> <description> Sends a raw packet. </description> </method> <method name="put_var"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="var" type="Variant"> - </argument> - <argument index="1" name="full_objects" type="bool" default="false"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="var" type="Variant" /> + <argument index="1" name="full_objects" type="bool" default="false" /> <description> Sends a [Variant] as a packet. If [code]full_objects[/code] is [code]true[/code], encoding objects is allowed (and can potentially include code). </description> diff --git a/doc/classes/PacketPeerDTLS.xml b/doc/classes/PacketPeerDTLS.xml index 19ebb9d81e..b05743fb5a 100644 --- a/doc/classes/PacketPeerDTLS.xml +++ b/doc/classes/PacketPeerDTLS.xml @@ -5,42 +5,35 @@ </brief_description> <description> This class represents a DTLS peer connection. It can be used to connect to a DTLS server, and is returned by [method DTLSServer.take_connection]. + [b]Warning:[/b] SSL/TLS certificate revocation and certificate pinning are currently not supported. Revoked certificates are accepted as long as they are otherwise valid. If this is a concern, you may want to use automatically managed certificates with a short validity period. </description> <tutorials> </tutorials> <methods> <method name="connect_to_peer"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="packet_peer" type="PacketPeerUDP"> - </argument> - <argument index="1" name="validate_certs" type="bool" default="true"> - </argument> - <argument index="2" name="for_hostname" type="String" default=""""> - </argument> - <argument index="3" name="valid_certificate" type="X509Certificate" default="null"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="packet_peer" type="PacketPeerUDP" /> + <argument index="1" name="validate_certs" type="bool" default="true" /> + <argument index="2" name="for_hostname" type="String" default="""" /> + <argument index="3" name="valid_certificate" type="X509Certificate" default="null" /> <description> Connects a [code]peer[/code] beginning the DTLS handshake using the underlying [PacketPeerUDP] which must be connected (see [method PacketPeerUDP.connect_to_host]). If [code]validate_certs[/code] is [code]true[/code], [PacketPeerDTLS] will validate that the certificate presented by the remote peer and match it with the [code]for_hostname[/code] argument. You can specify a custom [X509Certificate] to use for validation via the [code]valid_certificate[/code] argument. </description> </method> <method name="disconnect_from_peer"> - <return type="void"> - </return> + <return type="void" /> <description> Disconnects this peer, terminating the DTLS session. </description> </method> <method name="get_status" qualifiers="const"> - <return type="int" enum="PacketPeerDTLS.Status"> - </return> + <return type="int" enum="PacketPeerDTLS.Status" /> <description> Returns the status of the connection. See [enum Status] for values. </description> </method> <method name="poll"> - <return type="void"> - </return> + <return type="void" /> <description> Poll the connection to check for incoming packets. Call this frequently to update the status and keep the connection working. </description> diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml index 5d059ad3df..e2acb91058 100644 --- a/doc/classes/PacketPeerUDP.xml +++ b/doc/classes/PacketPeerUDP.xml @@ -10,14 +10,10 @@ </tutorials> <methods> <method name="bind"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="port" type="int"> - </argument> - <argument index="1" name="bind_address" type="String" default=""*""> - </argument> - <argument index="2" name="recv_buf_size" type="int" default="65536"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="port" type="int" /> + <argument index="1" name="bind_address" type="String" default=""*"" /> + <argument index="2" name="recv_buf_size" type="int" default="65536" /> <description> Binds this [PacketPeerUDP] to the specified [code]port[/code] and [code]address[/code] with a buffer size [code]recv_buf_size[/code], allowing it to receive incoming packets. If [code]address[/code] is set to [code]"*"[/code] (default), the peer will be bound on all available addresses (both IPv4 and IPv6). @@ -26,66 +22,54 @@ </description> </method> <method name="close"> - <return type="void"> - </return> + <return type="void" /> <description> Closes the [PacketPeerUDP]'s underlying UDP socket. </description> </method> <method name="connect_to_host"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="host" type="String"> - </argument> - <argument index="1" name="port" type="int"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="host" type="String" /> + <argument index="1" name="port" type="int" /> <description> Calling this method connects this UDP peer to the given [code]host[/code]/[code]port[/code] pair. UDP is in reality connectionless, so this option only means that incoming packets from different addresses are automatically discarded, and that outgoing packets are always sent to the connected address (future calls to [method set_dest_address] are not allowed). This method does not send any data to the remote peer, to do that, use [method PacketPeer.put_var] or [method PacketPeer.put_packet] as usual. See also [UDPServer]. [b]Note:[/b] Connecting to the remote peer does not help to protect from malicious attacks like IP spoofing, etc. Think about using an encryption technique like SSL or DTLS if you feel like your application is transferring sensitive information. </description> </method> <method name="get_local_port" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the local port to which this peer is bound. </description> </method> <method name="get_packet_ip" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the IP of the remote peer that sent the last packet(that was received with [method PacketPeer.get_packet] or [method PacketPeer.get_var]). </description> </method> <method name="get_packet_port" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the port of the remote peer that sent the last packet(that was received with [method PacketPeer.get_packet] or [method PacketPeer.get_var]). </description> </method> <method name="is_bound" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns whether this [PacketPeerUDP] is bound to an address and can receive packets. </description> </method> <method name="is_connected_to_host" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the UDP socket is open and has been connected to a remote address. See [method connect_to_host]. </description> </method> <method name="join_multicast_group"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="multicast_address" type="String"> - </argument> - <argument index="1" name="interface_name" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="multicast_address" type="String" /> + <argument index="1" name="interface_name" type="String" /> <description> Joins the multicast group specified by [code]multicast_address[/code] using the interface identified by [code]interface_name[/code]. You can join the same multicast group with multiple interfaces. Use [method IP.get_local_interfaces] to know which are available. @@ -93,41 +77,32 @@ </description> </method> <method name="leave_multicast_group"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="multicast_address" type="String"> - </argument> - <argument index="1" name="interface_name" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="multicast_address" type="String" /> + <argument index="1" name="interface_name" type="String" /> <description> Removes the interface identified by [code]interface_name[/code] from the multicast group specified by [code]multicast_address[/code]. </description> </method> <method name="set_broadcast_enabled"> - <return type="void"> - </return> - <argument index="0" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enabled" type="bool" /> <description> Enable or disable sending of broadcast packets (e.g. [code]set_dest_address("255.255.255.255", 4343)[/code]. This option is disabled by default. Note: Some Android devices might require the [code]CHANGE_WIFI_MULTICAST_STATE[/code] permission and this option to be enabled to receive broadcast packets too. </description> </method> <method name="set_dest_address"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="host" type="String"> - </argument> - <argument index="1" name="port" type="int"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="host" type="String" /> + <argument index="1" name="port" type="int" /> <description> Sets the destination address and port for sending packets and variables. A hostname will be resolved using DNS if needed. Note: [method set_broadcast_enabled] must be enabled before sending packets to a broadcast address (e.g. [code]255.255.255.255[/code]). </description> </method> <method name="wait"> - <return type="int" enum="Error"> - </return> + <return type="int" enum="Error" /> <description> Waits for a packet to arrive on the bound address. See [method bind]. [b]Note:[/b] [method wait] can't be interrupted once it has been called. This can be worked around by allowing the other party to send a specific "death pill" packet like this: @@ -148,7 +123,7 @@ var socket = new PacketPeerUDP(); // Server socket.SetDestAddress("127.0.0.1", 789); - socket.PutPacket("Time To Stop".ToAscii()); + socket.PutPacket("Time to stop".ToAscii()); // Client while (socket.Wait() == OK) diff --git a/doc/classes/Panel.xml b/doc/classes/Panel.xml index b65c2c956d..9906abf895 100644 --- a/doc/classes/Panel.xml +++ b/doc/classes/Panel.xml @@ -24,10 +24,10 @@ </constant> </constants> <theme_items> - <theme_item name="panel" type="StyleBox"> + <theme_item name="panel" data_type="style" type="StyleBox"> The style of this [Panel]. </theme_item> - <theme_item name="panel_fg" type="StyleBox"> + <theme_item name="panel_fg" data_type="style" type="StyleBox"> </theme_item> </theme_items> </class> diff --git a/doc/classes/PanelContainer.xml b/doc/classes/PanelContainer.xml index ad6080c780..f3f2f6839a 100644 --- a/doc/classes/PanelContainer.xml +++ b/doc/classes/PanelContainer.xml @@ -17,7 +17,7 @@ <constants> </constants> <theme_items> - <theme_item name="panel" type="StyleBox"> + <theme_item name="panel" data_type="style" type="StyleBox"> The style of [PanelContainer]'s background. </theme_item> </theme_items> diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index e8fde21032..3b583f5c89 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -11,150 +11,131 @@ <tutorials> </tutorials> <methods> - <method name="get_param" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter"> - </argument> + <method name="get_param_max" qualifiers="const"> + <return type="float" /> + <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" /> <description> - Returns the value of the specified parameter. + Return the maximum value range for the given prameter. </description> </method> - <method name="get_param_randomness" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter"> - </argument> + <method name="get_param_min" qualifiers="const"> + <return type="float" /> + <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" /> <description> - Returns the randomness ratio associated with the specified parameter. + Return the minimum value range for the given parameter. </description> </method> <method name="get_param_texture" qualifiers="const"> - <return type="Texture2D"> - </return> - <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter"> - </argument> + <return type="Texture2D" /> + <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" /> <description> Returns the [Texture2D] used by the specified parameter. </description> </method> <method name="get_particle_flag" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="particle_flag" type="int" enum="ParticlesMaterial.ParticleFlags"> - </argument> + <return type="bool" /> + <argument index="0" name="particle_flag" type="int" enum="ParticlesMaterial.ParticleFlags" /> <description> Returns [code]true[/code] if the specified particle flag is enabled. See [enum ParticleFlags] for options. </description> </method> - <method name="set_param"> - <return type="void"> - </return> - <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter"> - </argument> - <argument index="1" name="value" type="float"> - </argument> + <method name="set_param_max"> + <return type="void" /> + <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" /> + <argument index="1" name="value" type="float" /> <description> - Sets the specified [enum Parameter]. + Sets the maximum value range for the given parameter. </description> </method> - <method name="set_param_randomness"> - <return type="void"> - </return> - <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter"> - </argument> - <argument index="1" name="randomness" type="float"> - </argument> + <method name="set_param_min"> + <return type="void" /> + <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" /> + <argument index="1" name="value" type="float" /> <description> - Sets the randomness ratio for the specified [enum Parameter]. + Sets the minimum value range for the given parameter. </description> </method> <method name="set_param_texture"> - <return type="void"> - </return> - <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter"> - </argument> - <argument index="1" name="texture" type="Texture2D"> - </argument> + <return type="void" /> + <argument index="0" name="param" type="int" enum="ParticlesMaterial.Parameter" /> + <argument index="1" name="texture" type="Texture2D" /> <description> Sets the [Texture2D] for the specified [enum Parameter]. </description> </method> <method name="set_particle_flag"> - <return type="void"> - </return> - <argument index="0" name="particle_flag" type="int" enum="ParticlesMaterial.ParticleFlags"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="particle_flag" type="int" enum="ParticlesMaterial.ParticleFlags" /> + <argument index="1" name="enable" type="bool" /> <description> If [code]true[/code], enables the specified particle flag. See [enum ParticleFlags] for options. </description> </method> </methods> <members> - <member name="angle" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial rotation applied to each particle, in degrees. - Only applied when [member particle_flag_disable_z] or [member particle_flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES]. - </member> <member name="angle_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's rotation will be animated along this [CurveTexture]. </member> - <member name="angle_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Rotation randomness ratio. + <member name="angle_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum angle. </member> - <member name="angular_velocity" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial angular velocity applied to each particle. Sets the speed of rotation of the particle. - Only applied when [member particle_flag_disable_z] or [member particle_flag_rotate_y] are [code]true[/code] or the [BaseMaterial3D] being used to draw the particle is using [constant BaseMaterial3D.BILLBOARD_PARTICLES]. + <member name="angle_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum angle. </member> <member name="angular_velocity_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's angular velocity will vary along this [CurveTexture]. </member> - <member name="angular_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Angular velocity randomness ratio. + <member name="angular_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum angular velocity. </member> - <member name="anim_offset" type="float" setter="set_param" getter="get_param" default="0.0"> - Particle animation offset. + <member name="angular_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum angular velocity. </member> <member name="anim_offset_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's animation offset will vary along this [CurveTexture]. </member> - <member name="anim_offset_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Animation offset randomness ratio. + <member name="anim_offset_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum animation offset. </member> - <member name="anim_speed" type="float" setter="set_param" getter="get_param" default="0.0"> - Particle animation speed. + <member name="anim_offset_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum animation offset. </member> <member name="anim_speed_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's animation speed will vary along this [CurveTexture]. </member> - <member name="anim_speed_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Animation speed randomness ratio. + <member name="anim_speed_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum particle animation speed. + </member> + <member name="anim_speed_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum particle animation speed. </member> <member name="attractor_interaction_enabled" type="bool" setter="set_attractor_interaction_enabled" getter="is_attractor_interaction_enabled" default="true"> + True if the interaction with particle attractors is enabled. </member> <member name="collision_bounce" type="float" setter="set_collision_bounce" getter="get_collision_bounce" default="0.0"> + Collision bouncyness. </member> <member name="collision_enabled" type="bool" setter="set_collision_enabled" getter="is_collision_enabled" default="false"> + True if collisions are enabled for this particle system. </member> <member name="collision_friction" type="float" setter="set_collision_friction" getter="get_collision_friction" default="0.0"> + Collision friction. </member> <member name="collision_use_scale" type="bool" setter="set_collision_use_scale" getter="is_collision_using_scale" default="false"> + Should collision take scale into account. </member> <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)"> Each particle's initial color. If the [GPUParticles2D]'s [code]texture[/code] is defined, it will be multiplied by this color. To have particle display color in a [BaseMaterial3D] make sure to set [member BaseMaterial3D.vertex_color_use_as_albedo] to [code]true[/code]. </member> <member name="color_ramp" type="Texture2D" setter="set_color_ramp" getter="get_color_ramp"> - Each particle's color will vary along this [GradientTexture]. - </member> - <member name="damping" type="float" setter="set_param" getter="get_param" default="0.0"> - The rate at which particles lose velocity. + Each particle's color will vary along this [GradientTexture] over its lifetime (multiplied with [member color]). </member> <member name="damping_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Damping will vary along this [CurveTexture]. </member> - <member name="damping_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Damping randomness ratio. + <member name="damping_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + </member> + <member name="damping_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> </member> <member name="direction" type="Vector3" setter="set_direction" getter="get_direction" default="Vector3(1, 0, 0)"> Unit vector specifying the particles' emission direction. @@ -174,6 +155,18 @@ <member name="emission_point_texture" type="Texture2D" setter="set_emission_point_texture" getter="get_emission_point_texture"> Particles will be emitted at positions determined by sampling this texture at a random position. Used with [constant EMISSION_SHAPE_POINTS] and [constant EMISSION_SHAPE_DIRECTED_POINTS]. Can be created automatically from mesh or node by selecting "Create Emission Points from Mesh/Node" under the "Particles" tool in the toolbar. </member> + <member name="emission_ring_axis" type="Vector3" setter="set_emission_ring_axis" getter="get_emission_ring_axis"> + The axis of the ring when using the emitter [constant EMISSION_SHAPE_RING]. + </member> + <member name="emission_ring_height" type="float" setter="set_emission_ring_height" getter="get_emission_ring_height"> + The height of the ring when using the emitter [constant EMISSION_SHAPE_RING]. + </member> + <member name="emission_ring_inner_radius" type="float" setter="set_emission_ring_inner_radius" getter="get_emission_ring_inner_radius"> + The inner radius of the ring when using the emitter [constant EMISSION_SHAPE_RING]. + </member> + <member name="emission_ring_radius" type="float" setter="set_emission_ring_radius" getter="get_emission_ring_radius"> + The radius of the ring when using the emitter [constant EMISSION_SHAPE_RING]. + </member> <member name="emission_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="ParticlesMaterial.EmissionShape" default="0"> Particles will be emitted inside this region. Use [enum EmissionShape] constants for values. </member> @@ -186,42 +179,41 @@ <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3(0, -9.8, 0)"> Gravity applied to every particle. </member> - <member name="hue_variation" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial hue variation applied to each particle. - </member> <member name="hue_variation_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's hue will vary along this [CurveTexture]. </member> - <member name="hue_variation_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Hue variation randomness ratio. + <member name="hue_variation_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum hue variation. </member> - <member name="initial_velocity" type="float" setter="set_param" getter="get_param" default="0.0"> - Initial velocity magnitude for each particle. Direction comes from [member spread] and the node's orientation. + <member name="hue_variation_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum hue variation. </member> - <member name="initial_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Initial velocity randomness ratio. + <member name="initial_velocity_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum initial velocity. + </member> + <member name="initial_velocity_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum initial velocity. </member> <member name="lifetime_randomness" type="float" setter="set_lifetime_randomness" getter="get_lifetime_randomness" default="0.0"> Particle lifetime randomness ratio. </member> - <member name="linear_accel" type="float" setter="set_param" getter="get_param" default="0.0"> - Linear acceleration applied to each particle in the direction of motion. - </member> <member name="linear_accel_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's linear acceleration will vary along this [CurveTexture]. </member> - <member name="linear_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Linear acceleration randomness ratio. + <member name="linear_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum linear acceleration. </member> - <member name="orbit_velocity" type="float" setter="set_param" getter="get_param"> - Orbital velocity applied to each particle. Makes the particles circle around origin. Specified in number of full rotations around origin per second. - Only available when [member particle_flag_disable_z] is [code]true[/code]. + <member name="linear_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum linear acceleration. </member> <member name="orbit_velocity_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's orbital velocity will vary along this [CurveTexture]. </member> - <member name="orbit_velocity_random" type="float" setter="set_param_randomness" getter="get_param_randomness"> - Orbital velocity randomness ratio. + <member name="orbit_velocity_max" type="float" setter="set_param_max" getter="get_param_max"> + Maximum orbit velocity. + </member> + <member name="orbit_velocity_min" type="float" setter="set_param_min" getter="get_param_min"> + Minimum orbit velocity. </member> <member name="particle_flag_align_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> Align Y axis of particle with the direction of its velocity. @@ -230,25 +222,25 @@ If [code]true[/code], particles will not move on the z axis. </member> <member name="particle_flag_rotate_y" type="bool" setter="set_particle_flag" getter="get_particle_flag" default="false"> - If [code]true[/code], particles rotate around Y axis by [member angle]. - </member> - <member name="radial_accel" type="float" setter="set_param" getter="get_param" default="0.0"> - Radial acceleration applied to each particle. Makes particle accelerate away from origin. + If [code]true[/code], particles rotate around Y axis by [member angle_min]. </member> <member name="radial_accel_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's radial acceleration will vary along this [CurveTexture]. </member> - <member name="radial_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Radial acceleration randomness ratio. + <member name="radial_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum radial acceleration. </member> - <member name="scale" type="float" setter="set_param" getter="get_param" default="1.0"> - Initial scale applied to each particle. + <member name="radial_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum radial acceleration. </member> <member name="scale_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> - Each particle's scale will vary along this [CurveTexture]. + Each particle's scale will vary along this [CurveTexture]. If a [CurveXYZTexture] is supplied instead, the scale will be separated per-axis. </member> - <member name="scale_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Scale randomness ratio. + <member name="scale_max" type="float" setter="set_param_max" getter="get_param_max" default="1.0"> + Maximum scale. + </member> + <member name="scale_min" type="float" setter="set_param_min" getter="get_param_min" default="1.0"> + Minimum scale. </member> <member name="spread" type="float" setter="set_spread" getter="get_spread" default="45.0"> Each particle's initial direction range from [code]+spread[/code] to [code]-spread[/code] degrees. @@ -261,52 +253,52 @@ </member> <member name="sub_emitter_mode" type="int" setter="set_sub_emitter_mode" getter="get_sub_emitter_mode" enum="ParticlesMaterial.SubEmitterMode" default="0"> </member> - <member name="tangential_accel" type="float" setter="set_param" getter="get_param" default="0.0"> - Tangential acceleration applied to each particle. Tangential acceleration is perpendicular to the particle's velocity giving the particles a swirling motion. - </member> <member name="tangential_accel_curve" type="Texture2D" setter="set_param_texture" getter="get_param_texture"> Each particle's tangential acceleration will vary along this [CurveTexture]. </member> - <member name="tangential_accel_random" type="float" setter="set_param_randomness" getter="get_param_randomness" default="0.0"> - Tangential acceleration randomness ratio. + <member name="tangential_accel_max" type="float" setter="set_param_max" getter="get_param_max" default="0.0"> + Maximum tangential acceleration. + </member> + <member name="tangential_accel_min" type="float" setter="set_param_min" getter="get_param_min" default="0.0"> + Minimum tangential acceleration. </member> </members> <constants> <constant name="PARAM_INITIAL_LINEAR_VELOCITY" value="0" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set initial velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set initial velocity properties. </constant> <constant name="PARAM_ANGULAR_VELOCITY" value="1" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set angular velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set angular velocity properties. </constant> <constant name="PARAM_ORBIT_VELOCITY" value="2" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set orbital velocity properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set orbital velocity properties. </constant> <constant name="PARAM_LINEAR_ACCEL" value="3" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set linear acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set linear acceleration properties. </constant> <constant name="PARAM_RADIAL_ACCEL" value="4" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set radial acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set radial acceleration properties. </constant> <constant name="PARAM_TANGENTIAL_ACCEL" value="5" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set tangential acceleration properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set tangential acceleration properties. </constant> <constant name="PARAM_DAMPING" value="6" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set damping properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set damping properties. </constant> <constant name="PARAM_ANGLE" value="7" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set angle properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set angle properties. </constant> <constant name="PARAM_SCALE" value="8" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set scale properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set scale properties. </constant> <constant name="PARAM_HUE_VARIATION" value="9" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set hue variation properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set hue variation properties. </constant> <constant name="PARAM_ANIM_SPEED" value="10" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set animation speed properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set animation speed properties. </constant> <constant name="PARAM_ANIM_OFFSET" value="11" enum="Parameter"> - Use with [method set_param], [method set_param_randomness], and [method set_param_texture] to set animation offset properties. + Use with [method set_param_min], [method set_param_max], and [method set_param_texture] to set animation offset properties. </constant> <constant name="PARAM_MAX" value="12" enum="Parameter"> Represents the size of the [enum Parameter] enum. @@ -338,7 +330,10 @@ <constant name="EMISSION_SHAPE_DIRECTED_POINTS" value="4" enum="EmissionShape"> Particles will be emitted at a position determined by sampling a random point on the [member emission_point_texture]. Particle velocity and rotation will be set based on [member emission_normal_texture]. Particle color will be modulated by [member emission_color_texture]. </constant> - <constant name="EMISSION_SHAPE_MAX" value="5" enum="EmissionShape"> + <constant name="EMISSION_SHAPE_RING" value="5" enum="EmissionShape"> + Particles will be emitted in a ring or cylinder. + </constant> + <constant name="EMISSION_SHAPE_MAX" value="6" enum="EmissionShape"> Represents the size of the [enum EmissionShape] enum. </constant> <constant name="SUB_EMITTER_DISABLED" value="0" enum="SubEmitterMode"> diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml index a141961df5..335c3d254b 100644 --- a/doc/classes/Performance.xml +++ b/doc/classes/Performance.xml @@ -14,14 +14,10 @@ </tutorials> <methods> <method name="add_custom_monitor"> - <return type="void"> - </return> - <argument index="0" name="id" type="StringName"> - </argument> - <argument index="1" name="callable" type="Callable"> - </argument> - <argument index="2" name="arguments" type="Array" default="[]"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="StringName" /> + <argument index="1" name="callable" type="Callable" /> + <argument index="2" name="arguments" type="Array" default="[]" /> <description> Adds a custom monitor with name same as id. You can specify the category of monitor using '/' in id. If there are more than one '/' then default category is used. Default category is "Custom". [codeblocks] @@ -77,27 +73,22 @@ </description> </method> <method name="get_custom_monitor"> - <return type="Variant"> - </return> - <argument index="0" name="id" type="StringName"> - </argument> + <return type="Variant" /> + <argument index="0" name="id" type="StringName" /> <description> Returns the value of custom monitor with given id. The callable is called to get the value of custom monitor. [b]Note:[/b] It throws an error if the given id is absent. </description> </method> <method name="get_custom_monitor_names"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns the names of active custom monitors in an array. </description> </method> <method name="get_monitor" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="monitor" type="int" enum="Performance.Monitor"> - </argument> + <return type="float" /> + <argument index="0" name="monitor" type="int" enum="Performance.Monitor" /> <description> Returns the value of one of the available monitors. You should provide one of the [enum Monitor] constants as the argument, like this: [codeblocks] @@ -111,26 +102,21 @@ </description> </method> <method name="get_monitor_modification_time"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the last tick in which custom monitor was added/removed. </description> </method> <method name="has_custom_monitor"> - <return type="bool"> - </return> - <argument index="0" name="id" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="id" type="StringName" /> <description> Returns true if custom monitor with the given id is present otherwise returns false. </description> </method> <method name="remove_custom_monitor"> - <return type="void"> - </return> - <argument index="0" name="id" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="StringName" /> <description> Removes the custom monitor with given id. [b]Note:[/b] It throws an error if the given id is already absent. diff --git a/doc/classes/PhysicalBone2D.xml b/doc/classes/PhysicalBone2D.xml index cea75bad52..b4d92475a1 100644 --- a/doc/classes/PhysicalBone2D.xml +++ b/doc/classes/PhysicalBone2D.xml @@ -12,15 +12,13 @@ </tutorials> <methods> <method name="get_joint" qualifiers="const"> - <return type="Joint2D"> - </return> + <return type="Joint2D" /> <description> Returns the first [Joint2D] child node, if one exists. This is mainly a helper function to make it easier to get the [Joint2D] that the [code]PhysicalBone2D[/code] is autoconfiguring. </description> </method> <method name="is_simulating_physics" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns a boolean that indicates whether the [code]PhysicalBone2D[/code] node is running and simulating using the Godot 2D physics engine. When [code]true[/code], the PhysicalBone2D node is using physics. </description> diff --git a/doc/classes/PhysicalBone3D.xml b/doc/classes/PhysicalBone3D.xml index 2ed862e9ce..710e96239b 100644 --- a/doc/classes/PhysicalBone3D.xml +++ b/doc/classes/PhysicalBone3D.xml @@ -8,38 +8,30 @@ </tutorials> <methods> <method name="apply_central_impulse"> - <return type="void"> - </return> - <argument index="0" name="impulse" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="impulse" type="Vector3" /> <description> </description> </method> <method name="apply_impulse"> - <return type="void"> - </return> - <argument index="0" name="impulse" type="Vector3"> - </argument> - <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="impulse" type="Vector3" /> + <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" /> <description> </description> </method> <method name="get_bone_id" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> <method name="get_simulate_physics"> - <return type="bool"> - </return> + <return type="bool" /> <description> </description> </method> <method name="is_simulating_physics"> - <return type="bool"> - </return> + <return type="bool" /> <description> </description> </method> diff --git a/doc/classes/PhysicsBody2D.xml b/doc/classes/PhysicsBody2D.xml index 654b0fb668..e00c473bcd 100644 --- a/doc/classes/PhysicsBody2D.xml +++ b/doc/classes/PhysicsBody2D.xml @@ -11,34 +11,23 @@ </tutorials> <methods> <method name="add_collision_exception_with"> - <return type="void"> - </return> - <argument index="0" name="body" type="Node"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="Node" /> <description> Adds a body to the list of bodies that this body can't collide with. </description> </method> <method name="get_collision_exceptions"> - <return type="PhysicsBody2D[]"> - </return> + <return type="PhysicsBody2D[]" /> <description> Returns an array of nodes that were added as collision exceptions for this body. </description> </method> <method name="move_and_collide"> - <return type="KinematicCollision2D"> - </return> - <argument index="0" name="rel_vec" type="Vector2"> - </argument> - <argument index="1" name="infinite_inertia" type="bool" default="true"> - </argument> - <argument index="2" name="exclude_raycast_shapes" type="bool" default="true"> - </argument> - <argument index="3" name="test_only" type="bool" default="false"> - </argument> - <argument index="4" name="safe_margin" type="float" default="0.08"> - </argument> + <return type="KinematicCollision2D" /> + <argument index="0" name="rel_vec" type="Vector2" /> + <argument index="1" name="test_only" type="bool" default="false" /> + <argument index="2" name="safe_margin" type="float" default="0.08" /> <description> Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision2D], which contains information about the collision. If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given. @@ -46,29 +35,18 @@ </description> </method> <method name="remove_collision_exception_with"> - <return type="void"> - </return> - <argument index="0" name="body" type="Node"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="Node" /> <description> Removes a body from the list of bodies that this body can't collide with. </description> </method> <method name="test_move"> - <return type="bool"> - </return> - <argument index="0" name="from" type="Transform2D"> - </argument> - <argument index="1" name="rel_vec" type="Vector2"> - </argument> - <argument index="2" name="infinite_inertia" type="bool" default="true"> - </argument> - <argument index="3" name="exclude_raycast_shapes" type="bool" default="true"> - </argument> - <argument index="4" name="collision" type="KinematicCollision2D" default="null"> - </argument> - <argument index="5" name="safe_margin" type="float" default="0.08"> - </argument> + <return type="bool" /> + <argument index="0" name="from" type="Transform2D" /> + <argument index="1" name="rel_vec" type="Vector2" /> + <argument index="2" name="collision" type="KinematicCollision2D" default="null" /> + <argument index="3" name="safe_margin" type="float" default="0.08" /> <description> Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform2D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur. [code]collision[/code] is an optional object of type [KinematicCollision2D], which contains additional information about the collision (should there be one). diff --git a/doc/classes/PhysicsBody3D.xml b/doc/classes/PhysicsBody3D.xml index 1ec38000be..ea2553e28a 100644 --- a/doc/classes/PhysicsBody3D.xml +++ b/doc/classes/PhysicsBody3D.xml @@ -11,43 +11,30 @@ </tutorials> <methods> <method name="add_collision_exception_with"> - <return type="void"> - </return> - <argument index="0" name="body" type="Node"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="Node" /> <description> Adds a body to the list of bodies that this body can't collide with. </description> </method> <method name="get_axis_lock" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis"> - </argument> + <return type="bool" /> + <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis" /> <description> Returns [code]true[/code] if the specified linear or rotational [code]axis[/code] is locked. </description> </method> <method name="get_collision_exceptions"> - <return type="PhysicsBody3D[]"> - </return> + <return type="PhysicsBody3D[]" /> <description> Returns an array of nodes that were added as collision exceptions for this body. </description> </method> <method name="move_and_collide"> - <return type="KinematicCollision3D"> - </return> - <argument index="0" name="rel_vec" type="Vector3"> - </argument> - <argument index="1" name="infinite_inertia" type="bool" default="true"> - </argument> - <argument index="2" name="exclude_raycast_shapes" type="bool" default="true"> - </argument> - <argument index="3" name="test_only" type="bool" default="false"> - </argument> - <argument index="4" name="safe_margin" type="float" default="0.001"> - </argument> + <return type="KinematicCollision3D" /> + <argument index="0" name="rel_vec" type="Vector3" /> + <argument index="1" name="test_only" type="bool" default="false" /> + <argument index="2" name="safe_margin" type="float" default="0.001" /> <description> Moves the body along the vector [code]rel_vec[/code]. The body will stop if it collides. Returns a [KinematicCollision3D], which contains information about the collision. If [code]test_only[/code] is [code]true[/code], the body does not move but the would-be collision information is given. @@ -55,40 +42,26 @@ </description> </method> <method name="remove_collision_exception_with"> - <return type="void"> - </return> - <argument index="0" name="body" type="Node"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="Node" /> <description> Removes a body from the list of bodies that this body can't collide with. </description> </method> <method name="set_axis_lock"> - <return type="void"> - </return> - <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis"> - </argument> - <argument index="1" name="lock" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="axis" type="int" enum="PhysicsServer3D.BodyAxis" /> + <argument index="1" name="lock" type="bool" /> <description> Locks or unlocks the specified linear or rotational [code]axis[/code] depending on the value of [code]lock[/code]. </description> </method> <method name="test_move"> - <return type="bool"> - </return> - <argument index="0" name="from" type="Transform3D"> - </argument> - <argument index="1" name="rel_vec" type="Vector3"> - </argument> - <argument index="2" name="infinite_inertia" type="bool" default="true"> - </argument> - <argument index="3" name="exclude_raycast_shapes" type="bool" default="true"> - </argument> - <argument index="4" name="collision" type="KinematicCollision3D" default="null"> - </argument> - <argument index="5" name="safe_margin" type="float" default="0.001"> - </argument> + <return type="bool" /> + <argument index="0" name="from" type="Transform3D" /> + <argument index="1" name="rel_vec" type="Vector3" /> + <argument index="2" name="collision" type="KinematicCollision3D" default="null" /> + <argument index="3" name="safe_margin" type="float" default="0.001" /> <description> Checks for collisions without moving the body. Virtually sets the node's position, scale and rotation to that of the given [Transform3D], then tries to move the body along the vector [code]rel_vec[/code]. Returns [code]true[/code] if a collision would occur. [code]collision[/code] is an optional object of type [KinematicCollision3D], which contains additional information about the collision (should there be one). diff --git a/doc/classes/PhysicsDirectBodyState2D.xml b/doc/classes/PhysicsDirectBodyState2D.xml index 65cb3e7f38..01c8933b51 100644 --- a/doc/classes/PhysicsDirectBodyState2D.xml +++ b/doc/classes/PhysicsDirectBodyState2D.xml @@ -7,175 +7,146 @@ Provides direct access to a physics body in the [PhysicsServer2D], allowing safe changes to physics properties. This object is passed via the direct state callback of dynamic bodies, and is intended for changing the direct state of that body. See [method RigidBody2D._integrate_forces]. </description> <tutorials> + <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> </tutorials> <methods> <method name="add_central_force"> - <return type="void"> - </return> - <argument index="0" name="force" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="force" type="Vector2" /> <description> Adds a constant directional force without affecting rotation. </description> </method> <method name="add_force"> - <return type="void"> - </return> - <argument index="0" name="force" type="Vector2"> - </argument> - <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="force" type="Vector2" /> + <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)" /> <description> Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates. </description> </method> <method name="add_torque"> - <return type="void"> - </return> - <argument index="0" name="torque" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="torque" type="float" /> <description> Adds a constant rotational force. </description> </method> <method name="apply_central_impulse"> - <return type="void"> - </return> - <argument index="0" name="impulse" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="impulse" type="Vector2" /> <description> Applies a directional impulse without affecting rotation. </description> </method> <method name="apply_impulse"> - <return type="void"> - </return> - <argument index="0" name="impulse" type="Vector2"> - </argument> - <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="impulse" type="Vector2" /> + <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)" /> <description> Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason, it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The offset uses the rotation of the global coordinate system, but is centered at the object's origin. </description> </method> <method name="apply_torque_impulse"> - <return type="void"> - </return> - <argument index="0" name="impulse" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="impulse" type="float" /> <description> Applies a rotational impulse to the body. </description> </method> <method name="get_contact_collider" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="contact_idx" type="int"> - </argument> + <return type="RID" /> + <argument index="0" name="contact_idx" type="int" /> <description> Returns the collider's [RID]. </description> </method> <method name="get_contact_collider_id" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="contact_idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="contact_idx" type="int" /> <description> Returns the collider's object id. </description> </method> <method name="get_contact_collider_object" qualifiers="const"> - <return type="Object"> - </return> - <argument index="0" name="contact_idx" type="int"> - </argument> + <return type="Object" /> + <argument index="0" name="contact_idx" type="int" /> <description> Returns the collider object. This depends on how it was created (will return a scene node if such was used to create it). </description> </method> <method name="get_contact_collider_position" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="contact_idx" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="contact_idx" type="int" /> <description> Returns the contact position in the collider. </description> </method> <method name="get_contact_collider_shape" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="contact_idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="contact_idx" type="int" /> <description> Returns the collider's shape index. </description> </method> <method name="get_contact_collider_shape_metadata" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="contact_idx" type="int"> - </argument> + <return type="Variant" /> + <argument index="0" name="contact_idx" type="int" /> <description> Returns the collided shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method PhysicsServer2D.shape_set_data]. </description> </method> <method name="get_contact_collider_velocity_at_position" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="contact_idx" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="contact_idx" type="int" /> <description> Returns the linear velocity vector at the collider's contact point. </description> </method> <method name="get_contact_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of contacts this body has with other bodies. [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidBody2D.contact_monitor]. </description> </method> <method name="get_contact_local_normal" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="contact_idx" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="contact_idx" type="int" /> <description> Returns the local normal at the contact point. </description> </method> <method name="get_contact_local_position" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="contact_idx" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="contact_idx" type="int" /> <description> Returns the local position of the contact point. </description> </method> <method name="get_contact_local_shape" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="contact_idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="contact_idx" type="int" /> <description> Returns the local shape index of the collision. </description> </method> <method name="get_space_state"> - <return type="PhysicsDirectSpaceState2D"> - </return> + <return type="PhysicsDirectSpaceState2D" /> <description> Returns the current state of the space, useful for queries. </description> </method> + <method name="get_velocity_at_local_position" qualifiers="const"> + <return type="Vector2" /> + <argument index="0" name="local_position" type="Vector2" /> + <description> + Returns the body's velocity at the given relative position, including both translation and rotation. + </description> + </method> <method name="integrate_forces"> - <return type="void"> - </return> + <return type="void" /> <description> Calls the built-in force integration code. </description> @@ -185,6 +156,9 @@ <member name="angular_velocity" type="float" setter="set_angular_velocity" getter="get_angular_velocity"> The body's rotational velocity. </member> + <member name="center_of_mass" type="Vector2" setter="" getter="get_center_of_mass"> + The body's center of mass. + </member> <member name="inverse_inertia" type="float" setter="" getter="get_inverse_inertia"> The inverse of the inertia of the body. </member> diff --git a/doc/classes/PhysicsDirectBodyState3D.xml b/doc/classes/PhysicsDirectBodyState3D.xml index 85feeef86e..839a83cfc3 100644 --- a/doc/classes/PhysicsDirectBodyState3D.xml +++ b/doc/classes/PhysicsDirectBodyState3D.xml @@ -7,176 +7,148 @@ Provides direct access to a physics body in the [PhysicsServer3D], allowing safe changes to physics properties. This object is passed via the direct state callback of dynamic bodies, and is intended for changing the direct state of that body. See [method RigidBody3D._integrate_forces]. </description> <tutorials> + <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> + <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> </tutorials> <methods> <method name="add_central_force"> - <return type="void"> - </return> - <argument index="0" name="force" type="Vector3" default="Vector3(0, 0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="force" type="Vector3" default="Vector3(0, 0, 0)" /> <description> Adds a constant directional force without affecting rotation. This is equivalent to [code]add_force(force, Vector3(0,0,0))[/code]. </description> </method> <method name="add_force"> - <return type="void"> - </return> - <argument index="0" name="force" type="Vector3"> - </argument> - <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="force" type="Vector3" /> + <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" /> <description> Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates. </description> </method> <method name="add_torque"> - <return type="void"> - </return> - <argument index="0" name="torque" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="torque" type="Vector3" /> <description> Adds a constant rotational force without affecting position. </description> </method> <method name="apply_central_impulse"> - <return type="void"> - </return> - <argument index="0" name="impulse" type="Vector3" default="Vector3(0, 0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="impulse" type="Vector3" default="Vector3(0, 0, 0)" /> <description> Applies a single directional impulse without affecting rotation. This is equivalent to [code]apply_impulse(Vector3(0, 0, 0), impulse)[/code]. </description> </method> <method name="apply_impulse"> - <return type="void"> - </return> - <argument index="0" name="impulse" type="Vector3"> - </argument> - <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="impulse" type="Vector3" /> + <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" /> <description> Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin. </description> </method> <method name="apply_torque_impulse"> - <return type="void"> - </return> - <argument index="0" name="impulse" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="impulse" type="Vector3" /> <description> Apply a torque impulse (which will be affected by the body mass and shape). This will rotate the body around the vector [code]j[/code] passed as parameter. </description> </method> <method name="get_contact_collider" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="contact_idx" type="int"> - </argument> + <return type="RID" /> + <argument index="0" name="contact_idx" type="int" /> <description> Returns the collider's [RID]. </description> </method> <method name="get_contact_collider_id" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="contact_idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="contact_idx" type="int" /> <description> Returns the collider's object id. </description> </method> <method name="get_contact_collider_object" qualifiers="const"> - <return type="Object"> - </return> - <argument index="0" name="contact_idx" type="int"> - </argument> + <return type="Object" /> + <argument index="0" name="contact_idx" type="int" /> <description> Returns the collider object. </description> </method> <method name="get_contact_collider_position" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="contact_idx" type="int"> - </argument> + <return type="Vector3" /> + <argument index="0" name="contact_idx" type="int" /> <description> Returns the contact position in the collider. </description> </method> <method name="get_contact_collider_shape" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="contact_idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="contact_idx" type="int" /> <description> Returns the collider's shape index. </description> </method> <method name="get_contact_collider_velocity_at_position" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="contact_idx" type="int"> - </argument> + <return type="Vector3" /> + <argument index="0" name="contact_idx" type="int" /> <description> Returns the linear velocity vector at the collider's contact point. </description> </method> <method name="get_contact_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of contacts this body has with other bodies. [b]Note:[/b] By default, this returns 0 unless bodies are configured to monitor contacts. See [member RigidBody3D.contact_monitor]. </description> </method> <method name="get_contact_impulse" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="contact_idx" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="contact_idx" type="int" /> <description> Impulse created by the contact. Only implemented for Bullet physics. </description> </method> <method name="get_contact_local_normal" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="contact_idx" type="int"> - </argument> + <return type="Vector3" /> + <argument index="0" name="contact_idx" type="int" /> <description> Returns the local normal at the contact point. </description> </method> <method name="get_contact_local_position" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="contact_idx" type="int"> - </argument> + <return type="Vector3" /> + <argument index="0" name="contact_idx" type="int" /> <description> Returns the local position of the contact point. </description> </method> <method name="get_contact_local_shape" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="contact_idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="contact_idx" type="int" /> <description> Returns the local shape index of the collision. </description> </method> <method name="get_space_state"> - <return type="PhysicsDirectSpaceState3D"> - </return> + <return type="PhysicsDirectSpaceState3D" /> <description> Returns the current state of the space, useful for queries. </description> </method> + <method name="get_velocity_at_local_position" qualifiers="const"> + <return type="Vector3" /> + <argument index="0" name="local_position" type="Vector3" /> + <description> + Returns the body's velocity at the given relative position, including both translation and rotation. + </description> + </method> <method name="integrate_forces"> - <return type="void"> - </return> + <return type="void" /> <description> Calls the built-in force integration code. </description> @@ -187,6 +159,7 @@ The body's rotational velocity. </member> <member name="center_of_mass" type="Vector3" setter="" getter="get_center_of_mass"> + The body's center of mass. </member> <member name="inverse_inertia" type="Vector3" setter="" getter="get_inverse_inertia"> The inverse of the inertia of the body. diff --git a/doc/classes/PhysicsDirectSpaceState2D.xml b/doc/classes/PhysicsDirectSpaceState2D.xml index 6c8c957e5d..536c7e4e04 100644 --- a/doc/classes/PhysicsDirectSpaceState2D.xml +++ b/doc/classes/PhysicsDirectSpaceState2D.xml @@ -7,14 +7,13 @@ Direct access object to a space in the [PhysicsServer2D]. It's used mainly to do queries against objects and areas residing in a given space. </description> <tutorials> - <link title="Ray-Casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> + <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> + <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> </tutorials> <methods> <method name="cast_motion"> - <return type="Array"> - </return> - <argument index="0" name="shape" type="PhysicsShapeQueryParameters2D"> - </argument> + <return type="Array" /> + <argument index="0" name="shape" type="PhysicsShapeQueryParameters2D" /> <description> Checks how far a [Shape2D] can move without colliding. All the parameters for the query, including the shape and the motion, are supplied through a [PhysicsShapeQueryParameters2D] object. Returns an array with the safe and unsafe proportions (between 0 and 1) of the motion. The safe proportion is the maximum fraction of the motion that can be made without a collision. The unsafe proportion is the minimum fraction of the distance that must be moved for a collision. If no collision is detected a result of [code][1.0, 1.0][/code] will be returned. @@ -22,21 +21,16 @@ </description> </method> <method name="collide_shape"> - <return type="Array"> - </return> - <argument index="0" name="shape" type="PhysicsShapeQueryParameters2D"> - </argument> - <argument index="1" name="max_results" type="int" default="32"> - </argument> + <return type="Array" /> + <argument index="0" name="shape" type="PhysicsShapeQueryParameters2D" /> + <argument index="1" name="max_results" type="int" default="32" /> <description> Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters2D] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time. </description> </method> <method name="get_rest_info"> - <return type="Dictionary"> - </return> - <argument index="0" name="shape" type="PhysicsShapeQueryParameters2D"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="shape" type="PhysicsShapeQueryParameters2D" /> <description> Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters2D] object, against the space. If it collides with more than one shape, the nearest one is selected. If the shape did not intersect anything, then an empty dictionary is returned instead. [b]Note:[/b] This method does not take into account the [code]motion[/code] property of the object. The returned object is a dictionary containing the following fields: @@ -50,20 +44,13 @@ </description> </method> <method name="intersect_point"> - <return type="Array"> - </return> - <argument index="0" name="point" type="Vector2"> - </argument> - <argument index="1" name="max_results" type="int" default="32"> - </argument> - <argument index="2" name="exclude" type="Array" default="[]"> - </argument> - <argument index="3" name="collision_layer" type="int" default="2147483647"> - </argument> - <argument index="4" name="collide_with_bodies" type="bool" default="true"> - </argument> - <argument index="5" name="collide_with_areas" type="bool" default="false"> - </argument> + <return type="Array" /> + <argument index="0" name="point" type="Vector2" /> + <argument index="1" name="max_results" type="int" default="32" /> + <argument index="2" name="exclude" type="Array" default="[]" /> + <argument index="3" name="collision_mask" type="int" default="4294967295" /> + <argument index="4" name="collide_with_bodies" type="bool" default="true" /> + <argument index="5" name="collide_with_areas" type="bool" default="false" /> <description> Checks whether a point is inside any solid shape. The shapes the point is inside of are returned in an array containing dictionaries with the following fields: [code]collider[/code]: The colliding object. @@ -71,45 +58,38 @@ [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method PhysicsServer2D.shape_set_data]. [code]rid[/code]: The intersecting object's [RID]. [code]shape[/code]: The shape index of the colliding shape. - Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively. + Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect (all layers by default), or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively. [b]Note:[/b] [ConcavePolygonShape2D]s and [CollisionPolygon2D]s in [code]Segments[/code] build mode are not solid shapes. Therefore, they will not be detected. </description> </method> <method name="intersect_point_on_canvas"> - <return type="Array"> - </return> - <argument index="0" name="point" type="Vector2"> - </argument> - <argument index="1" name="canvas_instance_id" type="int"> - </argument> - <argument index="2" name="max_results" type="int" default="32"> - </argument> - <argument index="3" name="exclude" type="Array" default="[]"> - </argument> - <argument index="4" name="collision_layer" type="int" default="2147483647"> - </argument> - <argument index="5" name="collide_with_bodies" type="bool" default="true"> - </argument> - <argument index="6" name="collide_with_areas" type="bool" default="false"> - </argument> + <return type="Array" /> + <argument index="0" name="point" type="Vector2" /> + <argument index="1" name="canvas_instance_id" type="int" /> + <argument index="2" name="max_results" type="int" default="32" /> + <argument index="3" name="exclude" type="Array" default="[]" /> + <argument index="4" name="collision_mask" type="int" default="4294967295" /> + <argument index="5" name="collide_with_bodies" type="bool" default="true" /> + <argument index="6" name="collide_with_areas" type="bool" default="false" /> <description> + Checks whether a point is inside any solid shape, in a specific canvas layer given by [code]canvas_instance_id[/code]. The shapes the point is inside of are returned in an array containing dictionaries with the following fields: + [code]collider[/code]: The colliding object. + [code]collider_id[/code]: The colliding object's ID. + [code]metadata[/code]: The intersecting shape's metadata. This metadata is different from [method Object.get_meta], and is set with [method PhysicsServer2D.shape_set_data]. + [code]rid[/code]: The intersecting object's [RID]. + [code]shape[/code]: The shape index of the colliding shape. + Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect (all layers by default), or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively. + [b]Note:[/b] [ConcavePolygonShape2D]s and [CollisionPolygon2D]s in [code]Segments[/code] build mode are not solid shapes. Therefore, they will not be detected. </description> </method> <method name="intersect_ray"> - <return type="Dictionary"> - </return> - <argument index="0" name="from" type="Vector2"> - </argument> - <argument index="1" name="to" type="Vector2"> - </argument> - <argument index="2" name="exclude" type="Array" default="[]"> - </argument> - <argument index="3" name="collision_layer" type="int" default="2147483647"> - </argument> - <argument index="4" name="collide_with_bodies" type="bool" default="true"> - </argument> - <argument index="5" name="collide_with_areas" type="bool" default="false"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="from" type="Vector2" /> + <argument index="1" name="to" type="Vector2" /> + <argument index="2" name="exclude" type="Array" default="[]" /> + <argument index="3" name="collision_mask" type="int" default="4294967295" /> + <argument index="4" name="collide_with_bodies" type="bool" default="true" /> + <argument index="5" name="collide_with_areas" type="bool" default="false" /> <description> Intersects a ray in a given space. The returned object is a dictionary with the following fields: [code]collider[/code]: The colliding object. @@ -120,16 +100,13 @@ [code]rid[/code]: The intersecting object's [RID]. [code]shape[/code]: The shape index of the colliding shape. If the ray did not intersect anything, then an empty dictionary is returned instead. - Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively. + Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect (all layers by default), or booleans to determine if the ray should collide with [PhysicsBody2D]s or [Area2D]s, respectively. </description> </method> <method name="intersect_shape"> - <return type="Array"> - </return> - <argument index="0" name="shape" type="PhysicsShapeQueryParameters2D"> - </argument> - <argument index="1" name="max_results" type="int" default="32"> - </argument> + <return type="Array" /> + <argument index="0" name="shape" type="PhysicsShapeQueryParameters2D" /> + <argument index="1" name="max_results" type="int" default="32" /> <description> Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters2D] object, against the space. [b]Note:[/b] This method does not take into account the [code]motion[/code] property of the object. The intersected shapes are returned in an array containing dictionaries with the following fields: diff --git a/doc/classes/PhysicsDirectSpaceState3D.xml b/doc/classes/PhysicsDirectSpaceState3D.xml index a69b6f07fd..4e6bd8456f 100644 --- a/doc/classes/PhysicsDirectSpaceState3D.xml +++ b/doc/classes/PhysicsDirectSpaceState3D.xml @@ -7,16 +7,14 @@ Direct access object to a space in the [PhysicsServer3D]. It's used mainly to do queries against objects and areas residing in a given space. </description> <tutorials> + <link title="Physics introduction">https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html</link> <link title="Ray-casting">https://docs.godotengine.org/en/latest/tutorials/physics/ray-casting.html</link> </tutorials> <methods> <method name="cast_motion"> - <return type="Array"> - </return> - <argument index="0" name="shape" type="PhysicsShapeQueryParameters3D"> - </argument> - <argument index="1" name="motion" type="Vector3"> - </argument> + <return type="Array" /> + <argument index="0" name="shape" type="PhysicsShapeQueryParameters3D" /> + <argument index="1" name="motion" type="Vector3" /> <description> Checks how far a [Shape3D] can move without colliding. All the parameters for the query, including the shape, are supplied through a [PhysicsShapeQueryParameters3D] object. Returns an array with the safe and unsafe proportions (between 0 and 1) of the motion. The safe proportion is the maximum fraction of the motion that can be made without a collision. The unsafe proportion is the minimum fraction of the distance that must be moved for a collision. If no collision is detected a result of [code][1.0, 1.0][/code] will be returned. @@ -24,21 +22,16 @@ </description> </method> <method name="collide_shape"> - <return type="Array"> - </return> - <argument index="0" name="shape" type="PhysicsShapeQueryParameters3D"> - </argument> - <argument index="1" name="max_results" type="int" default="32"> - </argument> + <return type="Array" /> + <argument index="0" name="shape" type="PhysicsShapeQueryParameters3D" /> + <argument index="1" name="max_results" type="int" default="32" /> <description> Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters3D] object, against the space. The resulting array contains a list of points where the shape intersects another. Like with [method intersect_shape], the number of returned results can be limited to save processing time. </description> </method> <method name="get_rest_info"> - <return type="Dictionary"> - </return> - <argument index="0" name="shape" type="PhysicsShapeQueryParameters3D"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="shape" type="PhysicsShapeQueryParameters3D" /> <description> Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters3D] object, against the space. If it collides with more than one shape, the nearest one is selected. The returned object is a dictionary containing the following fields: [code]collider_id[/code]: The colliding object's ID. @@ -51,20 +44,13 @@ </description> </method> <method name="intersect_ray"> - <return type="Dictionary"> - </return> - <argument index="0" name="from" type="Vector3"> - </argument> - <argument index="1" name="to" type="Vector3"> - </argument> - <argument index="2" name="exclude" type="Array" default="[]"> - </argument> - <argument index="3" name="collision_mask" type="int" default="2147483647"> - </argument> - <argument index="4" name="collide_with_bodies" type="bool" default="true"> - </argument> - <argument index="5" name="collide_with_areas" type="bool" default="false"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="from" type="Vector3" /> + <argument index="1" name="to" type="Vector3" /> + <argument index="2" name="exclude" type="Array" default="[]" /> + <argument index="3" name="collision_mask" type="int" default="4294967295" /> + <argument index="4" name="collide_with_bodies" type="bool" default="true" /> + <argument index="5" name="collide_with_areas" type="bool" default="false" /> <description> Intersects a ray in a given space. The returned object is a dictionary with the following fields: [code]collider[/code]: The colliding object. @@ -74,16 +60,13 @@ [code]rid[/code]: The intersecting object's [RID]. [code]shape[/code]: The shape index of the colliding shape. If the ray did not intersect anything, then an empty dictionary is returned instead. - Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to check in, or booleans to determine if the ray should collide with [PhysicsBody3D]s or [Area3D]s, respectively. + Additionally, the method can take an [code]exclude[/code] array of objects or [RID]s that are to be excluded from collisions, a [code]collision_mask[/code] bitmask representing the physics layers to detect (all layers by default), or booleans to determine if the ray should collide with [PhysicsBody3D]s or [Area3D]s, respectively. </description> </method> <method name="intersect_shape"> - <return type="Array"> - </return> - <argument index="0" name="shape" type="PhysicsShapeQueryParameters3D"> - </argument> - <argument index="1" name="max_results" type="int" default="32"> - </argument> + <return type="Array" /> + <argument index="0" name="shape" type="PhysicsShapeQueryParameters3D" /> + <argument index="1" name="max_results" type="int" default="32" /> <description> Checks the intersections of a shape, given through a [PhysicsShapeQueryParameters3D] object, against the space. The intersected shapes are returned in an array containing dictionaries with the following fields: [code]collider[/code]: The colliding object. diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml index 33cd61eb9c..b3b7fcd956 100644 --- a/doc/classes/PhysicsServer2D.xml +++ b/doc/classes/PhysicsServer2D.xml @@ -10,197 +10,145 @@ </tutorials> <methods> <method name="area_add_shape"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="shape" type="RID"> - </argument> - <argument index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)"> - </argument> - <argument index="3" name="disabled" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="shape" type="RID" /> + <argument index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)" /> + <argument index="3" name="disabled" type="bool" default="false" /> <description> Adds a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. </description> </method> <method name="area_attach_canvas_instance_id"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="id" type="int" /> <description> </description> </method> <method name="area_attach_object_instance_id"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="id" type="int" /> <description> Assigns the area to a descendant of [Object], so it can exist in the node tree. </description> </method> <method name="area_clear_shapes"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> <description> Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later. </description> </method> <method name="area_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates an [Area2D]. After creating an [Area2D] with this method, assign it to a space using [method area_set_space] to use the created [Area2D] in the physics world. </description> </method> <method name="area_get_canvas_instance_id" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="area" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="area" type="RID" /> <description> </description> </method> <method name="area_get_object_instance_id" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="area" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="area" type="RID" /> <description> Gets the instance ID of the object the area is assigned to. </description> </method> <method name="area_get_param" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer2D.AreaParameter"> - </argument> + <return type="Variant" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer2D.AreaParameter" /> <description> Returns an area parameter value. See [enum AreaParameter] for a list of available parameters. </description> </method> <method name="area_get_shape" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> + <return type="RID" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> <description> Returns the [RID] of the nth shape of an area. </description> </method> <method name="area_get_shape_count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="area" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="area" type="RID" /> <description> Returns the number of shapes assigned to an area. </description> </method> <method name="area_get_shape_transform" qualifiers="const"> - <return type="Transform2D"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> + <return type="Transform2D" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> <description> Returns the transform matrix of a shape within an area. </description> </method> <method name="area_get_space" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="area" type="RID"> - </argument> + <return type="RID" /> + <argument index="0" name="area" type="RID" /> <description> Returns the space assigned to the area. </description> </method> <method name="area_get_space_override_mode" qualifiers="const"> - <return type="int" enum="PhysicsServer2D.AreaSpaceOverrideMode"> - </return> - <argument index="0" name="area" type="RID"> - </argument> + <return type="int" enum="PhysicsServer2D.AreaSpaceOverrideMode" /> + <argument index="0" name="area" type="RID" /> <description> Returns the space override mode for the area. </description> </method> <method name="area_get_transform" qualifiers="const"> - <return type="Transform2D"> - </return> - <argument index="0" name="area" type="RID"> - </argument> + <return type="Transform2D" /> + <argument index="0" name="area" type="RID" /> <description> Returns the transform matrix for an area. </description> </method> <method name="area_remove_shape"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> <description> Removes a shape from an area. It does not delete the shape, so it can be reassigned later. </description> </method> <method name="area_set_area_monitor_callback"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="receiver" type="Object"> - </argument> - <argument index="2" name="method" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="receiver" type="Object" /> + <argument index="2" name="method" type="StringName" /> <description> </description> </method> <method name="area_set_collision_layer"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="layer" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="layer" type="int" /> <description> Assigns the area to one or many physics layers. </description> </method> <method name="area_set_collision_mask"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="mask" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="mask" type="int" /> <description> Sets which physics layers the area will monitor. </description> </method> <method name="area_set_monitor_callback"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="receiver" type="Object"> - </argument> - <argument index="2" name="method" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="receiver" type="Object" /> + <argument index="2" name="method" type="StringName" /> <description> Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: 1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area. @@ -211,911 +159,675 @@ </description> </method> <method name="area_set_monitorable"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="monitorable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="monitorable" type="bool" /> <description> </description> </method> <method name="area_set_param"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer2D.AreaParameter"> - </argument> - <argument index="2" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer2D.AreaParameter" /> + <argument index="2" name="value" type="Variant" /> <description> Sets the value for an area parameter. See [enum AreaParameter] for a list of available parameters. </description> </method> <method name="area_set_shape"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> - <argument index="2" name="shape" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> + <argument index="2" name="shape" type="RID" /> <description> Substitutes a given area shape by another. The old shape is selected by its index, the new one by its [RID]. </description> </method> <method name="area_set_shape_disabled"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> - <argument index="2" name="disabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> + <argument index="2" name="disabled" type="bool" /> <description> Disables a given shape in an area. </description> </method> <method name="area_set_shape_transform"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> - <argument index="2" name="transform" type="Transform2D"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> + <argument index="2" name="transform" type="Transform2D" /> <description> Sets the transform matrix for an area shape. </description> </method> <method name="area_set_space"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="space" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="space" type="RID" /> <description> Assigns a space to the area. </description> </method> <method name="area_set_space_override_mode"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="mode" type="int" enum="PhysicsServer2D.AreaSpaceOverrideMode"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="mode" type="int" enum="PhysicsServer2D.AreaSpaceOverrideMode" /> <description> Sets the space override mode for the area. See [enum AreaSpaceOverrideMode] for a list of available modes. </description> </method> <method name="area_set_transform"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="transform" type="Transform2D"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="transform" type="Transform2D" /> <description> Sets the transform matrix for an area. </description> </method> <method name="body_add_central_force"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="force" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="force" type="Vector2" /> <description> </description> </method> <method name="body_add_collision_exception"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="excepted_body" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="excepted_body" type="RID" /> <description> Adds a body to the list of bodies exempt from collisions. </description> </method> <method name="body_add_force"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="force" type="Vector2"> - </argument> - <argument index="2" name="position" type="Vector2" default="Vector2(0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="force" type="Vector2" /> + <argument index="2" name="position" type="Vector2" default="Vector2(0, 0)" /> <description> Adds a positioned force to the applied force and torque. As with [method body_apply_impulse], both the force and the offset from the body origin are in global coordinates. A force differs from an impulse in that, while the two are forces, the impulse clears itself after being applied. </description> </method> <method name="body_add_shape"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="shape" type="RID"> - </argument> - <argument index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)"> - </argument> - <argument index="3" name="disabled" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="shape" type="RID" /> + <argument index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)" /> + <argument index="3" name="disabled" type="bool" default="false" /> <description> Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. </description> </method> <method name="body_add_torque"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="torque" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="torque" type="float" /> <description> </description> </method> <method name="body_apply_central_impulse"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="impulse" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="impulse" type="Vector2" /> <description> </description> </method> <method name="body_apply_impulse"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="impulse" type="Vector2"> - </argument> - <argument index="2" name="position" type="Vector2" default="Vector2(0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="impulse" type="Vector2" /> + <argument index="2" name="position" type="Vector2" default="Vector2(0, 0)" /> <description> Adds a positioned impulse to the applied force and torque. Both the force and the offset from the body origin are in global coordinates. </description> </method> <method name="body_apply_torque_impulse"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="impulse" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="impulse" type="float" /> <description> </description> </method> <method name="body_attach_canvas_instance_id"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="id" type="int" /> <description> </description> </method> <method name="body_attach_object_instance_id"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="id" type="int" /> <description> Assigns the area to a descendant of [Object], so it can exist in the node tree. </description> </method> <method name="body_clear_shapes"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> <description> Removes all shapes from a body. </description> </method> <method name="body_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates a physics body. </description> </method> <method name="body_get_canvas_instance_id" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="body" type="RID" /> <description> </description> </method> <method name="body_get_collision_layer" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="body" type="RID" /> <description> Returns the physics layer or layers a body belongs to. </description> </method> <method name="body_get_collision_mask" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="body" type="RID" /> <description> Returns the physics layer or layers a body can collide with. </description> </method> <method name="body_get_continuous_collision_detection_mode" qualifiers="const"> - <return type="int" enum="PhysicsServer2D.CCDMode"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="int" enum="PhysicsServer2D.CCDMode" /> + <argument index="0" name="body" type="RID" /> <description> Returns the continuous collision detection mode. </description> </method> <method name="body_get_direct_state"> - <return type="PhysicsDirectBodyState2D"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="PhysicsDirectBodyState2D" /> + <argument index="0" name="body" type="RID" /> <description> Returns the [PhysicsDirectBodyState2D] of the body. </description> </method> <method name="body_get_max_contacts_reported" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="body" type="RID" /> <description> Returns the maximum contacts that can be reported. See [method body_set_max_contacts_reported]. </description> </method> <method name="body_get_mode" qualifiers="const"> - <return type="int" enum="PhysicsServer2D.BodyMode"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="int" enum="PhysicsServer2D.BodyMode" /> + <argument index="0" name="body" type="RID" /> <description> Returns the body mode. </description> </method> <method name="body_get_object_instance_id" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="body" type="RID" /> <description> Gets the instance ID of the object the area is assigned to. </description> </method> <method name="body_get_param" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer2D.BodyParameter"> - </argument> + <return type="Variant" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer2D.BodyParameter" /> <description> Returns the value of a body parameter. See [enum BodyParameter] for a list of available parameters. </description> </method> <method name="body_get_shape" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> + <return type="RID" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> <description> Returns the [RID] of the nth shape of a body. </description> </method> <method name="body_get_shape_count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="body" type="RID" /> <description> Returns the number of shapes assigned to a body. </description> </method> <method name="body_get_shape_metadata" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> + <return type="Variant" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> <description> Returns the metadata of a shape of a body. </description> </method> <method name="body_get_shape_transform" qualifiers="const"> - <return type="Transform2D"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> + <return type="Transform2D" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> <description> Returns the transform matrix of a body shape. </description> </method> <method name="body_get_space" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="RID" /> + <argument index="0" name="body" type="RID" /> <description> Returns the [RID] of the space assigned to a body. </description> </method> <method name="body_get_state" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="state" type="int" enum="PhysicsServer2D.BodyState"> - </argument> + <return type="Variant" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="state" type="int" enum="PhysicsServer2D.BodyState" /> <description> Returns a body state. </description> </method> <method name="body_is_omitting_force_integration" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="body" type="RID" /> <description> Returns whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]). </description> </method> <method name="body_remove_collision_exception"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="excepted_body" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="excepted_body" type="RID" /> <description> Removes a body from the list of bodies exempt from collisions. </description> </method> <method name="body_remove_shape"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> <description> Removes a shape from a body. The shape is not deleted, so it can be reused afterwards. </description> </method> + <method name="body_reset_mass_properties"> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <description> + Restores the default inertia and center of mass based on shapes to cancel any custom values previously set using [method body_set_param]. + </description> + </method> <method name="body_set_axis_velocity"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="axis_velocity" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="axis_velocity" type="Vector2" /> <description> Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. </description> </method> <method name="body_set_collision_layer"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="layer" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="layer" type="int" /> <description> Sets the physics layer or layers a body belongs to. </description> </method> <method name="body_set_collision_mask"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="mask" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="mask" type="int" /> <description> Sets the physics layer or layers a body can collide with. </description> </method> <method name="body_set_continuous_collision_detection_mode"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="mode" type="int" enum="PhysicsServer2D.CCDMode"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="mode" type="int" enum="PhysicsServer2D.CCDMode" /> <description> Sets the continuous collision detection mode using one of the [enum CCDMode] constants. Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. </description> </method> <method name="body_set_force_integration_callback"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="callable" type="Callable"> - </argument> - <argument index="2" name="userdata" type="Variant" default="null"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="callable" type="Callable" /> + <argument index="2" name="userdata" type="Variant" default="null" /> <description> Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]). + The force integration function takes 2 arguments: + [code]state:[/code] [PhysicsDirectBodyState2D] used to retrieve and modify the body's state. + [code]userdata:[/code] Optional user data, if it was passed when calling [code]body_set_force_integration_callback[/code]. </description> </method> <method name="body_set_max_contacts_reported"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="amount" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="amount" type="int" /> <description> Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. </description> </method> <method name="body_set_mode"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="mode" type="int" enum="PhysicsServer2D.BodyMode"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="mode" type="int" enum="PhysicsServer2D.BodyMode" /> <description> Sets the body mode using one of the [enum BodyMode] constants. </description> </method> <method name="body_set_omit_force_integration"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="enable" type="bool" /> <description> Sets whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]). </description> </method> <method name="body_set_param"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer2D.BodyParameter"> - </argument> - <argument index="2" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer2D.BodyParameter" /> + <argument index="2" name="value" type="Variant" /> <description> Sets a body parameter. See [enum BodyParameter] for a list of available parameters. </description> </method> <method name="body_set_shape"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> - <argument index="2" name="shape" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> + <argument index="2" name="shape" type="RID" /> <description> Substitutes a given body shape by another. The old shape is selected by its index, the new one by its [RID]. </description> </method> <method name="body_set_shape_as_one_way_collision"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> - <argument index="2" name="enable" type="bool"> - </argument> - <argument index="3" name="margin" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> + <argument index="2" name="enable" type="bool" /> + <argument index="3" name="margin" type="float" /> <description> Enables one way collision on body if [code]enable[/code] is [code]true[/code]. </description> </method> <method name="body_set_shape_disabled"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> - <argument index="2" name="disabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> + <argument index="2" name="disabled" type="bool" /> <description> Disables shape in body if [code]disable[/code] is [code]true[/code]. </description> </method> <method name="body_set_shape_metadata"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> - <argument index="2" name="metadata" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> + <argument index="2" name="metadata" type="Variant" /> <description> Sets metadata of a shape within a body. This metadata is different from [method Object.set_meta], and can be retrieved on shape queries. </description> </method> <method name="body_set_shape_transform"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> - <argument index="2" name="transform" type="Transform2D"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> + <argument index="2" name="transform" type="Transform2D" /> <description> Sets the transform matrix for a body shape. </description> </method> <method name="body_set_space"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="space" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="space" type="RID" /> <description> Assigns a space to the body (see [method space_create]). </description> </method> <method name="body_set_state"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="state" type="int" enum="PhysicsServer2D.BodyState"> - </argument> - <argument index="2" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="state" type="int" enum="PhysicsServer2D.BodyState" /> + <argument index="2" name="value" type="Variant" /> <description> Sets a body state using one of the [enum BodyState] constants. Note that the method doesn't take effect immediately. The state will change on the next physics frame. </description> </method> <method name="body_test_motion"> - <return type="bool"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="from" type="Transform2D"> - </argument> - <argument index="2" name="motion" type="Vector2"> - </argument> - <argument index="3" name="infinite_inertia" type="bool"> - </argument> - <argument index="4" name="margin" type="float" default="0.08"> - </argument> - <argument index="5" name="result" type="PhysicsTestMotionResult2D" default="null"> - </argument> + <return type="bool" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="from" type="Transform2D" /> + <argument index="2" name="motion" type="Vector2" /> + <argument index="3" name="margin" type="float" default="0.08" /> + <argument index="4" name="result" type="PhysicsTestMotionResult2D" default="null" /> + <argument index="5" name="collide_separation_ray" type="bool" default="false" /> + <argument index="6" name="exclude" type="Array" default="[]" /> <description> Returns [code]true[/code] if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. [PhysicsTestMotionResult2D] can be passed to return additional information in. </description> </method> <method name="capsule_shape_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="circle_shape_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="concave_polygon_shape_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="convex_polygon_shape_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="damped_spring_joint_get_param" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer2D.DampedSpringParam"> - </argument> + <return type="float" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer2D.DampedSpringParam" /> <description> Returns the value of a damped spring joint parameter. See [enum DampedSpringParam] for a list of available parameters. </description> </method> <method name="damped_spring_joint_set_param"> - <return type="void"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer2D.DampedSpringParam"> - </argument> - <argument index="2" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer2D.DampedSpringParam" /> + <argument index="2" name="value" type="float" /> <description> Sets a damped spring joint parameter. See [enum DampedSpringParam] for a list of available parameters. </description> </method> <method name="free_rid"> - <return type="void"> - </return> - <argument index="0" name="rid" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="rid" type="RID" /> <description> Destroys any of the objects created by PhysicsServer2D. If the [RID] passed is not one of the objects that can be created by PhysicsServer2D, an error will be sent to the console. </description> </method> <method name="get_process_info"> - <return type="int"> - </return> - <argument index="0" name="process_info" type="int" enum="PhysicsServer2D.ProcessInfo"> - </argument> + <return type="int" /> + <argument index="0" name="process_info" type="int" enum="PhysicsServer2D.ProcessInfo" /> <description> Returns information about the current state of the 2D physics engine. See [enum ProcessInfo] for a list of available states. </description> </method> <method name="joint_clear"> - <return type="void"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="joint" type="RID" /> <description> </description> </method> <method name="joint_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="joint_get_param" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer2D.JointParam"> - </argument> + <return type="float" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer2D.JointParam" /> <description> Returns the value of a joint parameter. </description> </method> <method name="joint_get_type" qualifiers="const"> - <return type="int" enum="PhysicsServer2D.JointType"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> + <return type="int" enum="PhysicsServer2D.JointType" /> + <argument index="0" name="joint" type="RID" /> <description> Returns a joint's type (see [enum JointType]). </description> </method> <method name="joint_make_damped_spring"> - <return type="void"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="anchor_a" type="Vector2"> - </argument> - <argument index="2" name="anchor_b" type="Vector2"> - </argument> - <argument index="3" name="body_a" type="RID"> - </argument> - <argument index="4" name="body_b" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="anchor_a" type="Vector2" /> + <argument index="2" name="anchor_b" type="Vector2" /> + <argument index="3" name="body_a" type="RID" /> + <argument index="4" name="body_b" type="RID" /> <description> </description> </method> <method name="joint_make_groove"> - <return type="void"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="groove1_a" type="Vector2"> - </argument> - <argument index="2" name="groove2_a" type="Vector2"> - </argument> - <argument index="3" name="anchor_b" type="Vector2"> - </argument> - <argument index="4" name="body_a" type="RID"> - </argument> - <argument index="5" name="body_b" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="groove1_a" type="Vector2" /> + <argument index="2" name="groove2_a" type="Vector2" /> + <argument index="3" name="anchor_b" type="Vector2" /> + <argument index="4" name="body_a" type="RID" /> + <argument index="5" name="body_b" type="RID" /> <description> </description> </method> <method name="joint_make_pin"> - <return type="void"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="anchor" type="Vector2"> - </argument> - <argument index="2" name="body_a" type="RID"> - </argument> - <argument index="3" name="body_b" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="anchor" type="Vector2" /> + <argument index="2" name="body_a" type="RID" /> + <argument index="3" name="body_b" type="RID" /> <description> </description> </method> <method name="joint_set_param"> - <return type="void"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer2D.JointParam"> - </argument> - <argument index="2" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer2D.JointParam" /> + <argument index="2" name="value" type="float" /> <description> Sets a joint parameter. See [enum JointParam] for a list of available parameters. </description> </method> - <method name="line_shape_create"> - <return type="RID"> - </return> - <description> - </description> - </method> - <method name="ray_shape_create"> - <return type="RID"> - </return> + <method name="rectangle_shape_create"> + <return type="RID" /> <description> </description> </method> - <method name="rectangle_shape_create"> - <return type="RID"> - </return> + <method name="segment_shape_create"> + <return type="RID" /> <description> </description> </method> - <method name="segment_shape_create"> - <return type="RID"> - </return> + <method name="separation_ray_shape_create"> + <return type="RID" /> <description> </description> </method> <method name="set_active"> - <return type="void"> - </return> - <argument index="0" name="active" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="active" type="bool" /> <description> Activates or deactivates the 2D physics engine. </description> </method> <method name="set_collision_iterations"> - <return type="void"> - </return> - <argument index="0" name="iterations" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="iterations" type="int" /> <description> - Sets the amount of iterations for calculating velocities of colliding bodies. The greater the amount, the more accurate the collisions, but with a performance loss. + Sets the amount of iterations for calculating velocities of colliding bodies. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. The default value is [code]8[/code]. </description> </method> <method name="shape_get_data" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="shape" type="RID"> - </argument> + <return type="Variant" /> + <argument index="0" name="shape" type="RID" /> <description> Returns the shape data. </description> </method> <method name="shape_get_type" qualifiers="const"> - <return type="int" enum="PhysicsServer2D.ShapeType"> - </return> - <argument index="0" name="shape" type="RID"> - </argument> + <return type="int" enum="PhysicsServer2D.ShapeType" /> + <argument index="0" name="shape" type="RID" /> <description> Returns a shape's type (see [enum ShapeType]). </description> </method> <method name="shape_set_data"> - <return type="void"> - </return> - <argument index="0" name="shape" type="RID"> - </argument> - <argument index="1" name="data" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="shape" type="RID" /> + <argument index="1" name="data" type="Variant" /> <description> Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type]. </description> </method> <method name="space_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with [method area_set_space], or to a body with [method body_set_space]. </description> </method> <method name="space_get_direct_state"> - <return type="PhysicsDirectSpaceState2D"> - </return> - <argument index="0" name="space" type="RID"> - </argument> + <return type="PhysicsDirectSpaceState2D" /> + <argument index="0" name="space" type="RID" /> <description> Returns the state of a space, a [PhysicsDirectSpaceState2D]. This object can be used to make collision/intersection queries. </description> </method> <method name="space_get_param" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="space" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer2D.SpaceParameter"> - </argument> + <return type="float" /> + <argument index="0" name="space" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer2D.SpaceParameter" /> <description> Returns the value of a space parameter. </description> </method> <method name="space_is_active" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="space" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="space" type="RID" /> <description> Returns whether the space is active. </description> </method> <method name="space_set_active"> - <return type="void"> - </return> - <argument index="0" name="space" type="RID"> - </argument> - <argument index="1" name="active" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="space" type="RID" /> + <argument index="1" name="active" type="bool" /> <description> Marks a space as active. It will not have an effect, unless it is assigned to an area or body. </description> </method> <method name="space_set_param"> - <return type="void"> - </return> - <argument index="0" name="space" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer2D.SpaceParameter"> - </argument> - <argument index="2" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="space" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer2D.SpaceParameter" /> + <argument index="2" name="value" type="float" /> <description> Sets the value for a space parameter. See [enum SpaceParameter] for a list of available parameters. </description> </method> + <method name="world_margin_shape_create"> + <return type="RID" /> + <description> + </description> + </method> </methods> <constants> <constant name="SPACE_PARAM_CONTACT_RECYCLE_RADIUS" value="0" enum="SpaceParameter"> @@ -1141,13 +853,14 @@ </constant> <constant name="SPACE_PARAM_TEST_MOTION_MIN_CONTACT_DEPTH" value="7" enum="SpaceParameter"> </constant> - <constant name="SHAPE_LINE" value="0" enum="ShapeType"> - This is the constant for creating line shapes. A line shape is an infinite line with an origin point, and a normal. Thus, it can be used for front/behind checks. + <constant name="SHAPE_WORLD_MARGIN" value="0" enum="ShapeType"> + This is the constant for creating world margin shapes. A world margin shape is an [i]infinite[/i] line with an origin point, and a normal. Thus, it can be used for front/behind checks. </constant> - <constant name="SHAPE_RAY" value="1" enum="ShapeType"> + <constant name="SHAPE_SEPARATION_RAY" value="1" enum="ShapeType"> + This is the constant for creating separation ray shapes. A separation ray is defined by a length and separates itself from what is touching its far endpoint. Useful for character controllers. </constant> <constant name="SHAPE_SEGMENT" value="2" enum="ShapeType"> - This is the constant for creating segment shapes. A segment shape is a line from a point A to a point B. It can be checked for intersections. + This is the constant for creating segment shapes. A segment shape is a [i]finite[/i] line from a point A to a point B. It can be checked for intersections. </constant> <constant name="SHAPE_CIRCLE" value="3" enum="ShapeType"> This is the constant for creating circle shapes. A circle shape only has a radius. It can be used for intersections and inside/outside checks. @@ -1207,7 +920,7 @@ This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. </constant> <constant name="BODY_MODE_STATIC" value="0" enum="BodyMode"> - Constant for static bodies. In this mode, a body can be only moved by user code. + Constant for static bodies. In this mode, a body can be only moved by user code and doesn't collide with other bodies along its path when moved. </constant> <constant name="BODY_MODE_KINEMATIC" value="1" enum="BodyMode"> Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path. @@ -1230,16 +943,19 @@ <constant name="BODY_PARAM_INERTIA" value="3" enum="BodyParameter"> Constant to set/get a body's inertia. </constant> - <constant name="BODY_PARAM_GRAVITY_SCALE" value="4" enum="BodyParameter"> + <constant name="BODY_PARAM_CENTER_OF_MASS" value="4" enum="BodyParameter"> + Constant to set/get a body's center of mass. + </constant> + <constant name="BODY_PARAM_GRAVITY_SCALE" value="5" enum="BodyParameter"> Constant to set/get a body's gravity multiplier. </constant> - <constant name="BODY_PARAM_LINEAR_DAMP" value="5" enum="BodyParameter"> + <constant name="BODY_PARAM_LINEAR_DAMP" value="6" enum="BodyParameter"> Constant to set/get a body's linear dampening factor. </constant> - <constant name="BODY_PARAM_ANGULAR_DAMP" value="6" enum="BodyParameter"> + <constant name="BODY_PARAM_ANGULAR_DAMP" value="7" enum="BodyParameter"> Constant to set/get a body's angular dampening factor. </constant> - <constant name="BODY_PARAM_MAX" value="7" enum="BodyParameter"> + <constant name="BODY_PARAM_MAX" value="8" enum="BodyParameter"> Represents the size of the [enum BodyParameter] enum. </constant> <constant name="BODY_STATE_TRANSFORM" value="0" enum="BodyState"> diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml index 88ce222324..2fbe84b8b1 100644 --- a/doc/classes/PhysicsServer3D.xml +++ b/doc/classes/PhysicsServer3D.xml @@ -10,179 +10,132 @@ </tutorials> <methods> <method name="area_add_shape"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="shape" type="RID"> - </argument> - <argument index="2" name="transform" type="Transform3D" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)"> - </argument> - <argument index="3" name="disabled" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="shape" type="RID" /> + <argument index="2" name="transform" type="Transform3D" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)" /> + <argument index="3" name="disabled" type="bool" default="false" /> <description> Adds a shape to the area, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. </description> </method> <method name="area_attach_object_instance_id"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="id" type="int" /> <description> Assigns the area to a descendant of [Object], so it can exist in the node tree. </description> </method> <method name="area_clear_shapes"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> <description> Removes all shapes from an area. It does not delete the shapes, so they can be reassigned later. </description> </method> <method name="area_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates an [Area3D]. </description> </method> <method name="area_get_object_instance_id" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="area" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="area" type="RID" /> <description> Gets the instance ID of the object the area is assigned to. </description> </method> <method name="area_get_param" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer3D.AreaParameter"> - </argument> + <return type="Variant" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer3D.AreaParameter" /> <description> Returns an area parameter value. A list of available parameters is on the [enum AreaParameter] constants. </description> </method> <method name="area_get_shape" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> + <return type="RID" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> <description> Returns the [RID] of the nth shape of an area. </description> </method> <method name="area_get_shape_count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="area" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="area" type="RID" /> <description> Returns the number of shapes assigned to an area. </description> </method> <method name="area_get_shape_transform" qualifiers="const"> - <return type="Transform3D"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> <description> Returns the transform matrix of a shape within an area. </description> </method> <method name="area_get_space" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="area" type="RID"> - </argument> + <return type="RID" /> + <argument index="0" name="area" type="RID" /> <description> Returns the space assigned to the area. </description> </method> <method name="area_get_space_override_mode" qualifiers="const"> - <return type="int" enum="PhysicsServer3D.AreaSpaceOverrideMode"> - </return> - <argument index="0" name="area" type="RID"> - </argument> + <return type="int" enum="PhysicsServer3D.AreaSpaceOverrideMode" /> + <argument index="0" name="area" type="RID" /> <description> Returns the space override mode for the area. </description> </method> <method name="area_get_transform" qualifiers="const"> - <return type="Transform3D"> - </return> - <argument index="0" name="area" type="RID"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="area" type="RID" /> <description> Returns the transform matrix for an area. </description> </method> <method name="area_remove_shape"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> <description> Removes a shape from an area. It does not delete the shape, so it can be reassigned later. </description> </method> <method name="area_set_area_monitor_callback"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="receiver" type="Object"> - </argument> - <argument index="2" name="method" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="receiver" type="Object" /> + <argument index="2" name="method" type="StringName" /> <description> </description> </method> <method name="area_set_collision_layer"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="layer" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="layer" type="int" /> <description> Assigns the area to one or many physics layers. </description> </method> <method name="area_set_collision_mask"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="mask" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="mask" type="int" /> <description> Sets which physics layers the area will monitor. </description> </method> <method name="area_set_monitor_callback"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="receiver" type="Object"> - </argument> - <argument index="2" name="method" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="receiver" type="Object" /> + <argument index="2" name="method" type="StringName" /> <description> Sets the function to call when any body/area enters or exits the area. This callback will be called for any object interacting with the area, and takes five parameters: 1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area. @@ -193,1124 +146,832 @@ </description> </method> <method name="area_set_monitorable"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="monitorable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="monitorable" type="bool" /> <description> </description> </method> <method name="area_set_param"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer3D.AreaParameter"> - </argument> - <argument index="2" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer3D.AreaParameter" /> + <argument index="2" name="value" type="Variant" /> <description> Sets the value for an area parameter. A list of available parameters is on the [enum AreaParameter] constants. </description> </method> <method name="area_set_ray_pickable"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="enable" type="bool" /> <description> Sets object pickable with rays. </description> </method> <method name="area_set_shape"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> - <argument index="2" name="shape" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> + <argument index="2" name="shape" type="RID" /> <description> Substitutes a given area shape by another. The old shape is selected by its index, the new one by its [RID]. </description> </method> <method name="area_set_shape_disabled"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> - <argument index="2" name="disabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> + <argument index="2" name="disabled" type="bool" /> <description> </description> </method> <method name="area_set_shape_transform"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> - <argument index="2" name="transform" type="Transform3D"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> + <argument index="2" name="transform" type="Transform3D" /> <description> Sets the transform matrix for an area shape. </description> </method> <method name="area_set_space"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="space" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="space" type="RID" /> <description> Assigns a space to the area. </description> </method> <method name="area_set_space_override_mode"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="mode" type="int" enum="PhysicsServer3D.AreaSpaceOverrideMode"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="mode" type="int" enum="PhysicsServer3D.AreaSpaceOverrideMode" /> <description> Sets the space override mode for the area. The modes are described in the [enum AreaSpaceOverrideMode] constants. </description> </method> <method name="area_set_transform"> - <return type="void"> - </return> - <argument index="0" name="area" type="RID"> - </argument> - <argument index="1" name="transform" type="Transform3D"> - </argument> + <return type="void" /> + <argument index="0" name="area" type="RID" /> + <argument index="1" name="transform" type="Transform3D" /> <description> Sets the transform matrix for an area. </description> </method> <method name="body_add_central_force"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="force" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="force" type="Vector3" /> <description> </description> </method> <method name="body_add_collision_exception"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="excepted_body" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="excepted_body" type="RID" /> <description> Adds a body to the list of bodies exempt from collisions. </description> </method> <method name="body_add_force"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="force" type="Vector3"> - </argument> - <argument index="2" name="position" type="Vector3" default="Vector3(0, 0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="force" type="Vector3" /> + <argument index="2" name="position" type="Vector3" default="Vector3(0, 0, 0)" /> <description> </description> </method> <method name="body_add_shape"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="shape" type="RID"> - </argument> - <argument index="2" name="transform" type="Transform3D" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)"> - </argument> - <argument index="3" name="disabled" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="shape" type="RID" /> + <argument index="2" name="transform" type="Transform3D" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)" /> + <argument index="3" name="disabled" type="bool" default="false" /> <description> Adds a shape to the body, along with a transform matrix. Shapes are usually referenced by their index, so you should track which shape has a given index. </description> </method> <method name="body_add_torque"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="torque" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="torque" type="Vector3" /> <description> </description> </method> <method name="body_apply_central_impulse"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="impulse" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="impulse" type="Vector3" /> <description> </description> </method> <method name="body_apply_impulse"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="impulse" type="Vector3"> - </argument> - <argument index="2" name="position" type="Vector3" default="Vector3(0, 0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="impulse" type="Vector3" /> + <argument index="2" name="position" type="Vector3" default="Vector3(0, 0, 0)" /> <description> Gives the body a push at a [code]position[/code] in the direction of the [code]impulse[/code]. </description> </method> <method name="body_apply_torque_impulse"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="impulse" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="impulse" type="Vector3" /> <description> Gives the body a push to rotate it. </description> </method> <method name="body_attach_object_instance_id"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="id" type="int" /> <description> Assigns the area to a descendant of [Object], so it can exist in the node tree. </description> </method> <method name="body_clear_shapes"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> <description> Removes all shapes from a body. </description> </method> <method name="body_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="body_get_collision_layer" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="body" type="RID" /> <description> Returns the physics layer or layers a body belongs to. </description> </method> <method name="body_get_collision_mask" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="body" type="RID" /> <description> Returns the physics layer or layers a body can collide with. - </description> </method> <method name="body_get_direct_state"> - <return type="PhysicsDirectBodyState3D"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="PhysicsDirectBodyState3D" /> + <argument index="0" name="body" type="RID" /> <description> Returns the [PhysicsDirectBodyState3D] of the body. </description> </method> <method name="body_get_max_contacts_reported" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="body" type="RID" /> <description> Returns the maximum contacts that can be reported. See [method body_set_max_contacts_reported]. </description> </method> <method name="body_get_mode" qualifiers="const"> - <return type="int" enum="PhysicsServer3D.BodyMode"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="int" enum="PhysicsServer3D.BodyMode" /> + <argument index="0" name="body" type="RID" /> <description> Returns the body mode. </description> </method> <method name="body_get_object_instance_id" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="body" type="RID" /> <description> Gets the instance ID of the object the area is assigned to. </description> </method> <method name="body_get_param" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer3D.BodyParameter"> - </argument> + <return type="Variant" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer3D.BodyParameter" /> <description> Returns the value of a body parameter. A list of available parameters is on the [enum BodyParameter] constants. </description> </method> <method name="body_get_shape" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> + <return type="RID" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> <description> Returns the [RID] of the nth shape of a body. </description> </method> <method name="body_get_shape_count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="body" type="RID" /> <description> Returns the number of shapes assigned to a body. </description> </method> <method name="body_get_shape_transform" qualifiers="const"> - <return type="Transform3D"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> <description> Returns the transform matrix of a body shape. </description> </method> <method name="body_get_space" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="RID" /> + <argument index="0" name="body" type="RID" /> <description> Returns the [RID] of the space assigned to a body. </description> </method> <method name="body_get_state" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="state" type="int" enum="PhysicsServer3D.BodyState"> - </argument> + <return type="Variant" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="state" type="int" enum="PhysicsServer3D.BodyState" /> <description> Returns a body state. </description> </method> <method name="body_is_axis_locked" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="axis" type="int" enum="PhysicsServer3D.BodyAxis"> - </argument> + <return type="bool" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="axis" type="int" enum="PhysicsServer3D.BodyAxis" /> <description> </description> </method> <method name="body_is_continuous_collision_detection_enabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="body" type="RID" /> <description> If [code]true[/code], the continuous collision detection mode is enabled. </description> </method> <method name="body_is_omitting_force_integration" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="body" type="RID" /> <description> Returns whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]). </description> </method> <method name="body_remove_collision_exception"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="excepted_body" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="excepted_body" type="RID" /> <description> Removes a body from the list of bodies exempt from collisions. Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. </description> </method> <method name="body_remove_shape"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> <description> Removes a shape from a body. The shape is not deleted, so it can be reused afterwards. </description> </method> + <method name="body_reset_mass_properties"> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <description> + Restores the default inertia and center of mass based on shapes to cancel any custom values previously set using [method body_set_param]. + </description> + </method> <method name="body_set_axis_lock"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="axis" type="int" enum="PhysicsServer3D.BodyAxis"> - </argument> - <argument index="2" name="lock" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="axis" type="int" enum="PhysicsServer3D.BodyAxis" /> + <argument index="2" name="lock" type="bool" /> <description> </description> </method> <method name="body_set_axis_velocity"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="axis_velocity" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="axis_velocity" type="Vector3" /> <description> Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. </description> </method> <method name="body_set_collision_layer"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="layer" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="layer" type="int" /> <description> Sets the physics layer or layers a body belongs to. </description> </method> <method name="body_set_collision_mask"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="mask" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="mask" type="int" /> <description> Sets the physics layer or layers a body can collide with. </description> </method> <method name="body_set_enable_continuous_collision_detection"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="enable" type="bool" /> <description> If [code]true[/code], the continuous collision detection mode is enabled. Continuous collision detection tries to predict where a moving body will collide, instead of moving it and correcting its movement if it collided. </description> </method> <method name="body_set_force_integration_callback"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="callable" type="Callable"> - </argument> - <argument index="2" name="userdata" type="Variant" default="null"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="callable" type="Callable" /> + <argument index="2" name="userdata" type="Variant" default="null" /> <description> Sets the function used to calculate physics for an object, if that object allows it (see [method body_set_omit_force_integration]). + The force integration function takes 2 arguments: + [code]state:[/code] [PhysicsDirectBodyState3D] used to retrieve and modify the body's state. + [code]userdata:[/code] Optional user data, if it was passed when calling [code]body_set_force_integration_callback[/code]. </description> </method> <method name="body_set_max_contacts_reported"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="amount" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="amount" type="int" /> <description> Sets the maximum contacts to report. Bodies can keep a log of the contacts with other bodies, this is enabled by setting the maximum amount of contacts reported to a number greater than 0. </description> </method> <method name="body_set_mode"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="mode" type="int" enum="PhysicsServer3D.BodyMode"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="mode" type="int" enum="PhysicsServer3D.BodyMode" /> <description> Sets the body mode, from one of the [enum BodyMode] constants. </description> </method> <method name="body_set_omit_force_integration"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="enable" type="bool" /> <description> Sets whether a body uses a callback function to calculate its own physics (see [method body_set_force_integration_callback]). </description> </method> <method name="body_set_param"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer3D.BodyParameter"> - </argument> - <argument index="2" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer3D.BodyParameter" /> + <argument index="2" name="value" type="Variant" /> <description> Sets a body parameter. A list of available parameters is on the [enum BodyParameter] constants. </description> </method> <method name="body_set_ray_pickable"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="enable" type="bool" /> <description> Sets the body pickable with rays if [code]enabled[/code] is set. </description> </method> <method name="body_set_shape"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> - <argument index="2" name="shape" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> + <argument index="2" name="shape" type="RID" /> <description> Substitutes a given body shape by another. The old shape is selected by its index, the new one by its [RID]. </description> </method> <method name="body_set_shape_disabled"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> - <argument index="2" name="disabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> + <argument index="2" name="disabled" type="bool" /> <description> </description> </method> <method name="body_set_shape_transform"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="shape_idx" type="int"> - </argument> - <argument index="2" name="transform" type="Transform3D"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="shape_idx" type="int" /> + <argument index="2" name="transform" type="Transform3D" /> <description> Sets the transform matrix for a body shape. </description> </method> <method name="body_set_space"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="space" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="space" type="RID" /> <description> Assigns a space to the body (see [method space_create]). </description> </method> <method name="body_set_state"> - <return type="void"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="state" type="int" enum="PhysicsServer3D.BodyState"> - </argument> - <argument index="2" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="state" type="int" enum="PhysicsServer3D.BodyState" /> + <argument index="2" name="value" type="Variant" /> <description> Sets a body state (see [enum BodyState] constants). </description> </method> <method name="body_test_motion"> - <return type="bool"> - </return> - <argument index="0" name="body" type="RID"> - </argument> - <argument index="1" name="from" type="Transform3D"> - </argument> - <argument index="2" name="motion" type="Vector3"> - </argument> - <argument index="3" name="infinite_inertia" type="bool"> - </argument> - <argument index="4" name="margin" type="float" default="0.001"> - </argument> - <argument index="5" name="result" type="PhysicsTestMotionResult3D" default="null"> - </argument> + <return type="bool" /> + <argument index="0" name="body" type="RID" /> + <argument index="1" name="from" type="Transform3D" /> + <argument index="2" name="motion" type="Vector3" /> + <argument index="3" name="margin" type="float" default="0.001" /> + <argument index="4" name="result" type="PhysicsTestMotionResult3D" default="null" /> + <argument index="5" name="collide_separation_ray" type="bool" default="false" /> + <argument index="6" name="exclude" type="Array" default="[]" /> <description> Returns [code]true[/code] if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. [PhysicsTestMotionResult3D] can be passed to return additional information in. </description> </method> <method name="box_shape_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="capsule_shape_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="concave_polygon_shape_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="cone_twist_joint_get_param" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer3D.ConeTwistJointParam"> - </argument> + <return type="float" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer3D.ConeTwistJointParam" /> <description> Gets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants). </description> </method> <method name="cone_twist_joint_set_param"> - <return type="void"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer3D.ConeTwistJointParam"> - </argument> - <argument index="2" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer3D.ConeTwistJointParam" /> + <argument index="2" name="value" type="float" /> <description> Sets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants). </description> </method> <method name="convex_polygon_shape_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="custom_shape_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="cylinder_shape_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="free_rid"> - <return type="void"> - </return> - <argument index="0" name="rid" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="rid" type="RID" /> <description> Destroys any of the objects created by PhysicsServer3D. If the [RID] passed is not one of the objects that can be created by PhysicsServer3D, an error will be sent to the console. </description> </method> <method name="generic_6dof_joint_get_flag" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="axis" type="int" enum="Vector3.Axis"> - </argument> - <argument index="2" name="flag" type="int" enum="PhysicsServer3D.G6DOFJointAxisFlag"> - </argument> + <return type="bool" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="axis" type="int" enum="Vector3.Axis" /> + <argument index="2" name="flag" type="int" enum="PhysicsServer3D.G6DOFJointAxisFlag" /> <description> Gets a generic_6_DOF_joint flag (see [enum G6DOFJointAxisFlag] constants). </description> </method> <method name="generic_6dof_joint_get_param" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="axis" type="int" enum="Vector3.Axis"> - </argument> - <argument index="2" name="param" type="int" enum="PhysicsServer3D.G6DOFJointAxisParam"> - </argument> + <return type="float" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="axis" type="int" enum="Vector3.Axis" /> + <argument index="2" name="param" type="int" enum="PhysicsServer3D.G6DOFJointAxisParam" /> <description> Gets a generic_6_DOF_joint parameter (see [enum G6DOFJointAxisParam] constants). </description> </method> <method name="generic_6dof_joint_set_flag"> - <return type="void"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="axis" type="int" enum="Vector3.Axis"> - </argument> - <argument index="2" name="flag" type="int" enum="PhysicsServer3D.G6DOFJointAxisFlag"> - </argument> - <argument index="3" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="axis" type="int" enum="Vector3.Axis" /> + <argument index="2" name="flag" type="int" enum="PhysicsServer3D.G6DOFJointAxisFlag" /> + <argument index="3" name="enable" type="bool" /> <description> Sets a generic_6_DOF_joint flag (see [enum G6DOFJointAxisFlag] constants). </description> </method> <method name="generic_6dof_joint_set_param"> - <return type="void"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="axis" type="int" enum="Vector3.Axis"> - </argument> - <argument index="2" name="param" type="int" enum="PhysicsServer3D.G6DOFJointAxisParam"> - </argument> - <argument index="3" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="axis" type="int" enum="Vector3.Axis" /> + <argument index="2" name="param" type="int" enum="PhysicsServer3D.G6DOFJointAxisParam" /> + <argument index="3" name="value" type="float" /> <description> Sets a generic_6_DOF_joint parameter (see [enum G6DOFJointAxisParam] constants). </description> </method> <method name="get_process_info"> - <return type="int"> - </return> - <argument index="0" name="process_info" type="int" enum="PhysicsServer3D.ProcessInfo"> - </argument> + <return type="int" /> + <argument index="0" name="process_info" type="int" enum="PhysicsServer3D.ProcessInfo" /> <description> Returns an Info defined by the [enum ProcessInfo] input given. </description> </method> <method name="heightmap_shape_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="hinge_joint_get_flag" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="flag" type="int" enum="PhysicsServer3D.HingeJointFlag"> - </argument> + <return type="bool" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="flag" type="int" enum="PhysicsServer3D.HingeJointFlag" /> <description> Gets a hinge_joint flag (see [enum HingeJointFlag] constants). </description> </method> <method name="hinge_joint_get_param" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer3D.HingeJointParam"> - </argument> + <return type="float" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer3D.HingeJointParam" /> <description> Gets a hinge_joint parameter (see [enum HingeJointParam]). </description> </method> <method name="hinge_joint_set_flag"> - <return type="void"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="flag" type="int" enum="PhysicsServer3D.HingeJointFlag"> - </argument> - <argument index="2" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="flag" type="int" enum="PhysicsServer3D.HingeJointFlag" /> + <argument index="2" name="enabled" type="bool" /> <description> Sets a hinge_joint flag (see [enum HingeJointFlag] constants). </description> </method> <method name="hinge_joint_set_param"> - <return type="void"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer3D.HingeJointParam"> - </argument> - <argument index="2" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer3D.HingeJointParam" /> + <argument index="2" name="value" type="float" /> <description> Sets a hinge_joint parameter (see [enum HingeJointParam] constants). </description> </method> <method name="joint_clear"> - <return type="void"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="joint" type="RID" /> <description> </description> </method> <method name="joint_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="joint_get_solver_priority" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="joint" type="RID" /> <description> Gets the priority value of the Joint3D. </description> </method> <method name="joint_get_type" qualifiers="const"> - <return type="int" enum="PhysicsServer3D.JointType"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> + <return type="int" enum="PhysicsServer3D.JointType" /> + <argument index="0" name="joint" type="RID" /> <description> Returns the type of the Joint3D. </description> </method> <method name="joint_make_cone_twist"> - <return type="void"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="body_A" type="RID"> - </argument> - <argument index="2" name="local_ref_A" type="Transform3D"> - </argument> - <argument index="3" name="body_B" type="RID"> - </argument> - <argument index="4" name="local_ref_B" type="Transform3D"> - </argument> + <return type="void" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="body_A" type="RID" /> + <argument index="2" name="local_ref_A" type="Transform3D" /> + <argument index="3" name="body_B" type="RID" /> + <argument index="4" name="local_ref_B" type="Transform3D" /> <description> </description> </method> <method name="joint_make_generic_6dof"> - <return type="void"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="body_A" type="RID"> - </argument> - <argument index="2" name="local_ref_A" type="Transform3D"> - </argument> - <argument index="3" name="body_B" type="RID"> - </argument> - <argument index="4" name="local_ref_B" type="Transform3D"> - </argument> + <return type="void" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="body_A" type="RID" /> + <argument index="2" name="local_ref_A" type="Transform3D" /> + <argument index="3" name="body_B" type="RID" /> + <argument index="4" name="local_ref_B" type="Transform3D" /> <description> </description> </method> <method name="joint_make_hinge"> - <return type="void"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="body_A" type="RID"> - </argument> - <argument index="2" name="hinge_A" type="Transform3D"> - </argument> - <argument index="3" name="body_B" type="RID"> - </argument> - <argument index="4" name="hinge_B" type="Transform3D"> - </argument> + <return type="void" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="body_A" type="RID" /> + <argument index="2" name="hinge_A" type="Transform3D" /> + <argument index="3" name="body_B" type="RID" /> + <argument index="4" name="hinge_B" type="Transform3D" /> <description> </description> </method> <method name="joint_make_pin"> - <return type="void"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="body_A" type="RID"> - </argument> - <argument index="2" name="local_A" type="Vector3"> - </argument> - <argument index="3" name="body_B" type="RID"> - </argument> - <argument index="4" name="local_B" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="body_A" type="RID" /> + <argument index="2" name="local_A" type="Vector3" /> + <argument index="3" name="body_B" type="RID" /> + <argument index="4" name="local_B" type="Vector3" /> <description> </description> </method> <method name="joint_make_slider"> - <return type="void"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="body_A" type="RID"> - </argument> - <argument index="2" name="local_ref_A" type="Transform3D"> - </argument> - <argument index="3" name="body_B" type="RID"> - </argument> - <argument index="4" name="local_ref_B" type="Transform3D"> - </argument> + <return type="void" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="body_A" type="RID" /> + <argument index="2" name="local_ref_A" type="Transform3D" /> + <argument index="3" name="body_B" type="RID" /> + <argument index="4" name="local_ref_B" type="Transform3D" /> <description> </description> </method> <method name="joint_set_solver_priority"> - <return type="void"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="priority" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="priority" type="int" /> <description> Sets the priority value of the Joint3D. </description> </method> <method name="pin_joint_get_local_a" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> + <return type="Vector3" /> + <argument index="0" name="joint" type="RID" /> <description> Returns position of the joint in the local space of body a of the joint. </description> </method> <method name="pin_joint_get_local_b" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> + <return type="Vector3" /> + <argument index="0" name="joint" type="RID" /> <description> Returns position of the joint in the local space of body b of the joint. </description> </method> <method name="pin_joint_get_param" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer3D.PinJointParam"> - </argument> + <return type="float" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer3D.PinJointParam" /> <description> Gets a pin_joint parameter (see [enum PinJointParam] constants). </description> </method> <method name="pin_joint_set_local_a"> - <return type="void"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="local_A" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="local_A" type="Vector3" /> <description> Sets position of the joint in the local space of body a of the joint. </description> </method> <method name="pin_joint_set_local_b"> - <return type="void"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="local_B" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="local_B" type="Vector3" /> <description> Sets position of the joint in the local space of body b of the joint. </description> </method> <method name="pin_joint_set_param"> - <return type="void"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer3D.PinJointParam"> - </argument> - <argument index="2" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer3D.PinJointParam" /> + <argument index="2" name="value" type="float" /> <description> Sets a pin_joint parameter (see [enum PinJointParam] constants). </description> </method> <method name="plane_shape_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> - <method name="ray_shape_create"> - <return type="RID"> - </return> + <method name="separation_ray_shape_create"> + <return type="RID" /> <description> </description> </method> <method name="set_active"> - <return type="void"> - </return> - <argument index="0" name="active" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="active" type="bool" /> <description> Activates or deactivates the 3D physics engine. </description> </method> + <method name="set_collision_iterations"> + <return type="void" /> + <argument index="0" name="iterations" type="int" /> + <description> + Sets the amount of iterations for calculating velocities of colliding bodies. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. The default value is [code]8[/code]. + [b]Note:[/b] Only has an effect when using the default GodotPhysics engine, not the Bullet physics engine. + </description> + </method> <method name="shape_get_data" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="shape" type="RID"> - </argument> + <return type="Variant" /> + <argument index="0" name="shape" type="RID" /> <description> Returns the shape data. </description> </method> <method name="shape_get_type" qualifiers="const"> - <return type="int" enum="PhysicsServer3D.ShapeType"> - </return> - <argument index="0" name="shape" type="RID"> - </argument> + <return type="int" enum="PhysicsServer3D.ShapeType" /> + <argument index="0" name="shape" type="RID" /> <description> Returns the type of shape (see [enum ShapeType] constants). </description> </method> <method name="shape_set_data"> - <return type="void"> - </return> - <argument index="0" name="shape" type="RID"> - </argument> - <argument index="1" name="data" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="shape" type="RID" /> + <argument index="1" name="data" type="Variant" /> <description> Sets the shape data that defines its shape and size. The data to be passed depends on the kind of shape created [method shape_get_type]. </description> </method> <method name="slider_joint_get_param" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer3D.SliderJointParam"> - </argument> + <return type="float" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer3D.SliderJointParam" /> <description> Gets a slider_joint parameter (see [enum SliderJointParam] constants). </description> </method> <method name="slider_joint_set_param"> - <return type="void"> - </return> - <argument index="0" name="joint" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer3D.SliderJointParam"> - </argument> - <argument index="2" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="joint" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer3D.SliderJointParam" /> + <argument index="2" name="value" type="float" /> <description> Gets a slider_joint parameter (see [enum SliderJointParam] constants). </description> </method> <method name="soft_body_get_bounds" qualifiers="const"> - <return type="AABB"> - </return> - <argument index="0" name="body" type="RID"> - </argument> + <return type="AABB" /> + <argument index="0" name="body" type="RID" /> <description> </description> </method> <method name="space_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates a space. A space is a collection of parameters for the physics engine that can be assigned to an area or a body. It can be assigned to an area with [method area_set_space], or to a body with [method body_set_space]. </description> </method> <method name="space_get_direct_state"> - <return type="PhysicsDirectSpaceState3D"> - </return> - <argument index="0" name="space" type="RID"> - </argument> + <return type="PhysicsDirectSpaceState3D" /> + <argument index="0" name="space" type="RID" /> <description> Returns the state of a space, a [PhysicsDirectSpaceState3D]. This object can be used to make collision/intersection queries. </description> </method> <method name="space_get_param" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="space" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer3D.SpaceParameter"> - </argument> + <return type="float" /> + <argument index="0" name="space" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer3D.SpaceParameter" /> <description> Returns the value of a space parameter. </description> </method> <method name="space_is_active" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="space" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="space" type="RID" /> <description> Returns whether the space is active. </description> </method> <method name="space_set_active"> - <return type="void"> - </return> - <argument index="0" name="space" type="RID"> - </argument> - <argument index="1" name="active" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="space" type="RID" /> + <argument index="1" name="active" type="bool" /> <description> Marks a space as active. It will not have an effect, unless it is assigned to an area or body. </description> </method> <method name="space_set_param"> - <return type="void"> - </return> - <argument index="0" name="space" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="PhysicsServer3D.SpaceParameter"> - </argument> - <argument index="2" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="space" type="RID" /> + <argument index="1" name="param" type="int" enum="PhysicsServer3D.SpaceParameter" /> + <argument index="2" name="value" type="float" /> <description> Sets the value for a space parameter. A list of available parameters is on the [enum SpaceParameter] constants. </description> </method> <method name="sphere_shape_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> @@ -1526,8 +1187,8 @@ <constant name="SHAPE_PLANE" value="0" enum="ShapeType"> The [Shape3D] is a [WorldMarginShape3D]. </constant> - <constant name="SHAPE_RAY" value="1" enum="ShapeType"> - The [Shape3D] is a [RayShape3D]. + <constant name="SHAPE_SEPARATION_RAY" value="1" enum="ShapeType"> + The [Shape3D] is a [SeparationRayShape3D]. </constant> <constant name="SHAPE_SPHERE" value="2" enum="ShapeType"> The [Shape3D] is a [SphereShape3D]. @@ -1580,6 +1241,18 @@ <constant name="AREA_PARAM_PRIORITY" value="7" enum="AreaParameter"> Constant to set/get the priority (order of processing) of an area. </constant> + <constant name="AREA_PARAM_WIND_FORCE_MAGNITUDE" value="8" enum="AreaParameter"> + Constant to set/get the magnitude of area-specific wind force. + </constant> + <constant name="AREA_PARAM_WIND_SOURCE" value="9" enum="AreaParameter"> + Constant to set/get the 3D vector that specifies the origin from which an area-specific wind blows. + </constant> + <constant name="AREA_PARAM_WIND_DIRECTION" value="10" enum="AreaParameter"> + Constant to set/get the 3D vector that specifies the direction in which an area-specific wind blows. + </constant> + <constant name="AREA_PARAM_WIND_ATTENUATION_FACTOR" value="11" enum="AreaParameter"> + Constant to set/get the exponential rate at which wind force decreases with distance from its origin. + </constant> <constant name="AREA_SPACE_OVERRIDE_DISABLED" value="0" enum="AreaSpaceOverrideMode"> This area does not affect gravity/damp. These are generally areas that exist only to detect collisions, and objects entering or exiting them. </constant> @@ -1596,7 +1269,7 @@ This area replaces any gravity/damp calculated so far, but keeps calculating the rest of the areas, down to the default one. </constant> <constant name="BODY_MODE_STATIC" value="0" enum="BodyMode"> - Constant for static bodies. In this mode, a body can be only moved by user code. + Constant for static bodies. In this mode, a body can be only moved by user code and doesn't collide with other bodies along its path when moved. </constant> <constant name="BODY_MODE_KINEMATIC" value="1" enum="BodyMode"> Constant for kinematic bodies. In this mode, a body can be only moved by user code and collides with other bodies along its path. @@ -1616,16 +1289,22 @@ <constant name="BODY_PARAM_MASS" value="2" enum="BodyParameter"> Constant to set/get a body's mass. </constant> - <constant name="BODY_PARAM_GRAVITY_SCALE" value="3" enum="BodyParameter"> + <constant name="BODY_PARAM_INERTIA" value="3" enum="BodyParameter"> + Constant to set/get a body's inertia. + </constant> + <constant name="BODY_PARAM_CENTER_OF_MASS" value="4" enum="BodyParameter"> + Constant to set/get a body's center of mass. + </constant> + <constant name="BODY_PARAM_GRAVITY_SCALE" value="5" enum="BodyParameter"> Constant to set/get a body's gravity multiplier. </constant> - <constant name="BODY_PARAM_LINEAR_DAMP" value="4" enum="BodyParameter"> + <constant name="BODY_PARAM_LINEAR_DAMP" value="6" enum="BodyParameter"> Constant to set/get a body's linear dampening factor. </constant> - <constant name="BODY_PARAM_ANGULAR_DAMP" value="5" enum="BodyParameter"> + <constant name="BODY_PARAM_ANGULAR_DAMP" value="7" enum="BodyParameter"> Constant to set/get a body's angular dampening factor. </constant> - <constant name="BODY_PARAM_MAX" value="6" enum="BodyParameter"> + <constant name="BODY_PARAM_MAX" value="8" enum="BodyParameter"> Represents the size of the [enum BodyParameter] enum. </constant> <constant name="BODY_STATE_TRANSFORM" value="0" enum="BodyState"> diff --git a/doc/classes/PhysicsShapeQueryParameters2D.xml b/doc/classes/PhysicsShapeQueryParameters2D.xml index 229a40638a..b54de15d15 100644 --- a/doc/classes/PhysicsShapeQueryParameters2D.xml +++ b/doc/classes/PhysicsShapeQueryParameters2D.xml @@ -17,8 +17,8 @@ <member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled" default="true"> If [code]true[/code], the query will take [PhysicsBody2D]s into account. </member> - <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="2147483647"> - The physics layer(s) the query will take into account (as a bitmask). See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295"> + The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]"> The list of objects or object [RID]s that will be excluded from collisions. diff --git a/doc/classes/PhysicsShapeQueryParameters3D.xml b/doc/classes/PhysicsShapeQueryParameters3D.xml index 9ca892acb3..f74d1b5e48 100644 --- a/doc/classes/PhysicsShapeQueryParameters3D.xml +++ b/doc/classes/PhysicsShapeQueryParameters3D.xml @@ -17,8 +17,8 @@ <member name="collide_with_bodies" type="bool" setter="set_collide_with_bodies" getter="is_collide_with_bodies_enabled" default="true"> If [code]true[/code], the query will take [PhysicsBody3D]s into account. </member> - <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="2147483647"> - The physics layer(s) the query will take into account (as a bitmask). See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="4294967295"> + The physics layers the query will detect (as a bitmask). By default, all collision layers are detected. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="exclude" type="Array" setter="set_exclude" getter="get_exclude" default="[]"> The list of objects or object [RID]s that will be excluded from collisions. diff --git a/doc/classes/PhysicsTestMotionResult2D.xml b/doc/classes/PhysicsTestMotionResult2D.xml index bf3497386e..9c5d525f85 100644 --- a/doc/classes/PhysicsTestMotionResult2D.xml +++ b/doc/classes/PhysicsTestMotionResult2D.xml @@ -29,9 +29,9 @@ </member> <member name="collision_unsafe_fraction" type="float" setter="" getter="get_collision_unsafe_fraction" default="0.0"> </member> - <member name="motion" type="Vector2" setter="" getter="get_motion" default="Vector2(0, 0)"> + <member name="remainder" type="Vector2" setter="" getter="get_remainder" default="Vector2(0, 0)"> </member> - <member name="motion_remainder" type="Vector2" setter="" getter="get_motion_remainder" default="Vector2(0, 0)"> + <member name="travel" type="Vector2" setter="" getter="get_travel" default="Vector2(0, 0)"> </member> </members> <constants> diff --git a/doc/classes/PhysicsTestMotionResult3D.xml b/doc/classes/PhysicsTestMotionResult3D.xml index 08c72ba965..6c18a097a1 100644 --- a/doc/classes/PhysicsTestMotionResult3D.xml +++ b/doc/classes/PhysicsTestMotionResult3D.xml @@ -29,9 +29,9 @@ </member> <member name="collision_unsafe_fraction" type="float" setter="" getter="get_collision_unsafe_fraction" default="0.0"> </member> - <member name="motion" type="Vector3" setter="" getter="get_motion" default="Vector3(0, 0, 0)"> + <member name="remainder" type="Vector3" setter="" getter="get_remainder" default="Vector3(0, 0, 0)"> </member> - <member name="motion_remainder" type="Vector3" setter="" getter="get_motion_remainder" default="Vector3(0, 0, 0)"> + <member name="travel" type="Vector3" setter="" getter="get_travel" default="Vector3(0, 0, 0)"> </member> </members> <constants> diff --git a/doc/classes/PinJoint3D.xml b/doc/classes/PinJoint3D.xml index 37a85e497f..84b60c0d8c 100644 --- a/doc/classes/PinJoint3D.xml +++ b/doc/classes/PinJoint3D.xml @@ -10,21 +10,16 @@ </tutorials> <methods> <method name="get_param" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="param" type="int" enum="PinJoint3D.Param"> - </argument> + <return type="float" /> + <argument index="0" name="param" type="int" enum="PinJoint3D.Param" /> <description> Returns the value of the specified parameter. </description> </method> <method name="set_param"> - <return type="void"> - </return> - <argument index="0" name="param" type="int" enum="PinJoint3D.Param"> - </argument> - <argument index="1" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="param" type="int" enum="PinJoint3D.Param" /> + <argument index="1" name="value" type="float" /> <description> Sets the value of the specified parameter. </description> diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml index 12869061c4..c243c3ad15 100644 --- a/doc/classes/Plane.xml +++ b/doc/classes/Plane.xml @@ -11,189 +11,143 @@ </tutorials> <methods> <method name="Plane" qualifiers="constructor"> - <return type="Plane"> - </return> + <return type="Plane" /> <description> Constructs a default-initialized [Plane] with all components set to [code]0[/code]. </description> </method> <method name="Plane" qualifiers="constructor"> - <return type="Plane"> - </return> - <argument index="0" name="from" type="Plane"> - </argument> + <return type="Plane" /> + <argument index="0" name="from" type="Plane" /> <description> Constructs a [Plane] as a copy of the given [Plane]. </description> </method> <method name="Plane" qualifiers="constructor"> - <return type="Plane"> - </return> - <argument index="0" name="a" type="float"> - </argument> - <argument index="1" name="b" type="float"> - </argument> - <argument index="2" name="c" type="float"> - </argument> - <argument index="3" name="d" type="float"> - </argument> + <return type="Plane" /> + <argument index="0" name="a" type="float" /> + <argument index="1" name="b" type="float" /> + <argument index="2" name="c" type="float" /> + <argument index="3" name="d" type="float" /> <description> Creates a plane from the four parameters. The three components of the resulting plane's [member normal] are [code]a[/code], [code]b[/code] and [code]c[/code], and the plane has a distance of [code]d[/code] from the origin. </description> </method> <method name="Plane" qualifiers="constructor"> - <return type="Plane"> - </return> - <argument index="0" name="normal" type="Vector3"> - </argument> - <argument index="1" name="d" type="float"> - </argument> + <return type="Plane" /> + <argument index="0" name="normal" type="Vector3" /> + <argument index="1" name="d" type="float" /> <description> Creates a plane from the normal and the plane's distance to the origin. </description> </method> <method name="Plane" qualifiers="constructor"> - <return type="Plane"> - </return> - <argument index="0" name="point" type="Vector3"> - </argument> - <argument index="1" name="normal" type="Vector3"> - </argument> + <return type="Plane" /> + <argument index="0" name="point" type="Vector3" /> + <argument index="1" name="normal" type="Vector3" /> <description> Creates a plane from the given position and a plane normal. </description> </method> <method name="Plane" qualifiers="constructor"> - <return type="Plane"> - </return> - <argument index="0" name="point1" type="Vector3"> - </argument> - <argument index="1" name="point2" type="Vector3"> - </argument> - <argument index="2" name="point3" type="Vector3"> - </argument> + <return type="Plane" /> + <argument index="0" name="point1" type="Vector3" /> + <argument index="1" name="point2" type="Vector3" /> + <argument index="2" name="point3" type="Vector3" /> <description> Creates a plane from the three points, given in clockwise order. </description> </method> <method name="center" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns the center of the plane. </description> </method> <method name="distance_to" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="point" type="Vector3"> - </argument> + <return type="float" /> + <argument index="0" name="point" type="Vector3" /> <description> Returns the shortest distance from the plane to the position [code]point[/code]. </description> </method> <method name="has_point" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="point" type="Vector3"> - </argument> - <argument index="1" name="epsilon" type="float" default="1e-05"> - </argument> + <return type="bool" /> + <argument index="0" name="point" type="Vector3" /> + <argument index="1" name="epsilon" type="float" default="1e-05" /> <description> Returns [code]true[/code] if [code]point[/code] is inside the plane. Comparison uses a custom minimum [code]epsilon[/code] threshold. </description> </method> <method name="intersect_3" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="b" type="Plane"> - </argument> - <argument index="1" name="c" type="Plane"> - </argument> + <return type="Variant" /> + <argument index="0" name="b" type="Plane" /> + <argument index="1" name="c" type="Plane" /> <description> Returns the intersection point of the three planes [code]b[/code], [code]c[/code] and this plane. If no intersection is found, [code]null[/code] is returned. </description> </method> <method name="intersects_ray" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="from" type="Vector3"> - </argument> - <argument index="1" name="dir" type="Vector3"> - </argument> + <return type="Variant" /> + <argument index="0" name="from" type="Vector3" /> + <argument index="1" name="dir" type="Vector3" /> <description> Returns the intersection point of a ray consisting of the position [code]from[/code] and the direction normal [code]dir[/code] with this plane. If no intersection is found, [code]null[/code] is returned. </description> </method> <method name="intersects_segment" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="from" type="Vector3"> - </argument> - <argument index="1" name="to" type="Vector3"> - </argument> + <return type="Variant" /> + <argument index="0" name="from" type="Vector3" /> + <argument index="1" name="to" type="Vector3" /> <description> Returns the intersection point of a segment from position [code]begin[/code] to position [code]end[/code] with this plane. If no intersection is found, [code]null[/code] is returned. </description> </method> <method name="is_equal_approx" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="to_plane" type="Plane"> - </argument> + <return type="bool" /> + <argument index="0" name="to_plane" type="Plane" /> <description> Returns [code]true[/code] if this plane and [code]plane[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. </description> </method> <method name="is_point_over" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="plane" type="Vector3"> - </argument> + <return type="bool" /> + <argument index="0" name="plane" type="Vector3" /> <description> Returns [code]true[/code] if [code]point[/code] is located above the plane. </description> </method> <method name="normalized" qualifiers="const"> - <return type="Plane"> - </return> + <return type="Plane" /> <description> Returns a copy of the plane, normalized. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Plane"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Plane" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Plane"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Plane" /> <description> </description> </method> <method name="operator unary+" qualifiers="operator"> - <return type="Plane"> - </return> + <return type="Plane" /> <description> </description> </method> <method name="operator unary-" qualifiers="operator"> - <return type="Plane"> - </return> + <return type="Plane" /> <description> </description> </method> <method name="project" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="point" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="point" type="Vector3" /> <description> Returns the orthogonal projection of [code]point[/code] into a point in the plane. </description> diff --git a/doc/classes/PlaneMesh.xml b/doc/classes/PlaneMesh.xml index c95ba29ea2..56bf98772b 100644 --- a/doc/classes/PlaneMesh.xml +++ b/doc/classes/PlaneMesh.xml @@ -12,6 +12,9 @@ <methods> </methods> <members> + <member name="center_offset" type="Vector3" setter="set_center_offset" getter="get_center_offset" default="Vector3(0, 0, 0)"> + Offset of the generated plane. Useful for particles. + </member> <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(2, 2)"> Size of the generated plane. </member> diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml index 5a53063148..23106cddf7 100644 --- a/doc/classes/Polygon2D.xml +++ b/doc/classes/Polygon2D.xml @@ -10,75 +10,58 @@ </tutorials> <methods> <method name="add_bone"> - <return type="void"> - </return> - <argument index="0" name="path" type="NodePath"> - </argument> - <argument index="1" name="weights" type="PackedFloat32Array"> - </argument> + <return type="void" /> + <argument index="0" name="path" type="NodePath" /> + <argument index="1" name="weights" type="PackedFloat32Array" /> <description> Adds a bone with the specified [code]path[/code] and [code]weights[/code]. </description> </method> <method name="clear_bones"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all bones from this [Polygon2D]. </description> </method> <method name="erase_bone"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> <description> Removes the specified bone from this [Polygon2D]. </description> </method> <method name="get_bone_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of bones in this [Polygon2D]. </description> </method> <method name="get_bone_path" qualifiers="const"> - <return type="NodePath"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="NodePath" /> + <argument index="0" name="index" type="int" /> <description> Returns the path to the node associated with the specified bone. </description> </method> <method name="get_bone_weights" qualifiers="const"> - <return type="PackedFloat32Array"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="PackedFloat32Array" /> + <argument index="0" name="index" type="int" /> <description> Returns the height values of the specified bone. </description> </method> <method name="set_bone_path"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="path" type="NodePath"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> + <argument index="1" name="path" type="NodePath" /> <description> Sets the path to the node associated with the specified bone. </description> </method> <method name="set_bone_weights"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="weights" type="PackedFloat32Array"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> + <argument index="1" name="weights" type="PackedFloat32Array" /> <description> Sets the weight values for the specified bone. </description> diff --git a/doc/classes/PolygonPathFinder.xml b/doc/classes/PolygonPathFinder.xml index 49453d32ac..f77912bafe 100644 --- a/doc/classes/PolygonPathFinder.xml +++ b/doc/classes/PolygonPathFinder.xml @@ -8,72 +8,53 @@ </tutorials> <methods> <method name="find_path"> - <return type="PackedVector2Array"> - </return> - <argument index="0" name="from" type="Vector2"> - </argument> - <argument index="1" name="to" type="Vector2"> - </argument> + <return type="PackedVector2Array" /> + <argument index="0" name="from" type="Vector2" /> + <argument index="1" name="to" type="Vector2" /> <description> </description> </method> <method name="get_bounds" qualifiers="const"> - <return type="Rect2"> - </return> + <return type="Rect2" /> <description> </description> </method> <method name="get_closest_point" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="point" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="point" type="Vector2" /> <description> </description> </method> <method name="get_intersections" qualifiers="const"> - <return type="PackedVector2Array"> - </return> - <argument index="0" name="from" type="Vector2"> - </argument> - <argument index="1" name="to" type="Vector2"> - </argument> + <return type="PackedVector2Array" /> + <argument index="0" name="from" type="Vector2" /> + <argument index="1" name="to" type="Vector2" /> <description> </description> </method> <method name="get_point_penalty" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="idx" type="int" /> <description> </description> </method> <method name="is_point_inside" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="point" type="Vector2"> - </argument> + <return type="bool" /> + <argument index="0" name="point" type="Vector2" /> <description> </description> </method> <method name="set_point_penalty"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="penalty" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="penalty" type="float" /> <description> </description> </method> <method name="setup"> - <return type="void"> - </return> - <argument index="0" name="points" type="PackedVector2Array"> - </argument> - <argument index="1" name="connections" type="PackedInt32Array"> - </argument> + <return type="void" /> + <argument index="0" name="points" type="PackedVector2Array" /> + <argument index="1" name="connections" type="PackedInt32Array" /> <description> </description> </method> diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index 3489c5435a..61b5aa89a6 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -12,14 +12,10 @@ </tutorials> <methods> <method name="add_check_item"> - <return type="void"> - </return> - <argument index="0" name="label" type="String"> - </argument> - <argument index="1" name="id" type="int" default="-1"> - </argument> - <argument index="2" name="accel" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="label" type="String" /> + <argument index="1" name="id" type="int" default="-1" /> + <argument index="2" name="accel" type="int" default="0" /> <description> Adds a new checkable item with text [code]label[/code]. An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. @@ -27,14 +23,10 @@ </description> </method> <method name="add_check_shortcut"> - <return type="void"> - </return> - <argument index="0" name="shortcut" type="Shortcut"> - </argument> - <argument index="1" name="id" type="int" default="-1"> - </argument> - <argument index="2" name="global" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="shortcut" type="Shortcut" /> + <argument index="1" name="id" type="int" default="-1" /> + <argument index="2" name="global" type="bool" default="false" /> <description> Adds a new checkable item and assigns the specified [Shortcut] to it. Sets the label of the checkbox to the [Shortcut]'s name. An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index. @@ -42,16 +34,11 @@ </description> </method> <method name="add_icon_check_item"> - <return type="void"> - </return> - <argument index="0" name="texture" type="Texture2D"> - </argument> - <argument index="1" name="label" type="String"> - </argument> - <argument index="2" name="id" type="int" default="-1"> - </argument> - <argument index="3" name="accel" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="texture" type="Texture2D" /> + <argument index="1" name="label" type="String" /> + <argument index="2" name="id" type="int" default="-1" /> + <argument index="3" name="accel" type="int" default="0" /> <description> Adds a new checkable item with text [code]label[/code] and icon [code]texture[/code]. An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. @@ -59,16 +46,11 @@ </description> </method> <method name="add_icon_check_shortcut"> - <return type="void"> - </return> - <argument index="0" name="texture" type="Texture2D"> - </argument> - <argument index="1" name="shortcut" type="Shortcut"> - </argument> - <argument index="2" name="id" type="int" default="-1"> - </argument> - <argument index="3" name="global" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="texture" type="Texture2D" /> + <argument index="1" name="shortcut" type="Shortcut" /> + <argument index="2" name="id" type="int" default="-1" /> + <argument index="3" name="global" type="bool" default="false" /> <description> Adds a new checkable item and assigns the specified [Shortcut] and icon [code]texture[/code] to it. Sets the label of the checkbox to the [Shortcut]'s name. An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index. @@ -76,94 +58,64 @@ </description> </method> <method name="add_icon_item"> - <return type="void"> - </return> - <argument index="0" name="texture" type="Texture2D"> - </argument> - <argument index="1" name="label" type="String"> - </argument> - <argument index="2" name="id" type="int" default="-1"> - </argument> - <argument index="3" name="accel" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="texture" type="Texture2D" /> + <argument index="1" name="label" type="String" /> + <argument index="2" name="id" type="int" default="-1" /> + <argument index="3" name="accel" type="int" default="0" /> <description> Adds a new item with text [code]label[/code] and icon [code]texture[/code]. An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. </description> </method> <method name="add_icon_radio_check_item"> - <return type="void"> - </return> - <argument index="0" name="texture" type="Texture2D"> - </argument> - <argument index="1" name="label" type="String"> - </argument> - <argument index="2" name="id" type="int" default="-1"> - </argument> - <argument index="3" name="accel" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="texture" type="Texture2D" /> + <argument index="1" name="label" type="String" /> + <argument index="2" name="id" type="int" default="-1" /> + <argument index="3" name="accel" type="int" default="0" /> <description> Same as [method add_icon_check_item], but uses a radio check button. </description> </method> <method name="add_icon_radio_check_shortcut"> - <return type="void"> - </return> - <argument index="0" name="texture" type="Texture2D"> - </argument> - <argument index="1" name="shortcut" type="Shortcut"> - </argument> - <argument index="2" name="id" type="int" default="-1"> - </argument> - <argument index="3" name="global" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="texture" type="Texture2D" /> + <argument index="1" name="shortcut" type="Shortcut" /> + <argument index="2" name="id" type="int" default="-1" /> + <argument index="3" name="global" type="bool" default="false" /> <description> Same as [method add_icon_check_shortcut], but uses a radio check button. </description> </method> <method name="add_icon_shortcut"> - <return type="void"> - </return> - <argument index="0" name="texture" type="Texture2D"> - </argument> - <argument index="1" name="shortcut" type="Shortcut"> - </argument> - <argument index="2" name="id" type="int" default="-1"> - </argument> - <argument index="3" name="global" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="texture" type="Texture2D" /> + <argument index="1" name="shortcut" type="Shortcut" /> + <argument index="2" name="id" type="int" default="-1" /> + <argument index="3" name="global" type="bool" default="false" /> <description> Adds a new item and assigns the specified [Shortcut] and icon [code]texture[/code] to it. Sets the label of the checkbox to the [Shortcut]'s name. An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index. </description> </method> <method name="add_item"> - <return type="void"> - </return> - <argument index="0" name="label" type="String"> - </argument> - <argument index="1" name="id" type="int" default="-1"> - </argument> - <argument index="2" name="accel" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="label" type="String" /> + <argument index="1" name="id" type="int" default="-1" /> + <argument index="2" name="accel" type="int" default="0" /> <description> Adds a new item with text [code]label[/code]. An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. </description> </method> <method name="add_multistate_item"> - <return type="void"> - </return> - <argument index="0" name="label" type="String"> - </argument> - <argument index="1" name="max_states" type="int"> - </argument> - <argument index="2" name="default_state" type="int" default="0"> - </argument> - <argument index="3" name="id" type="int" default="-1"> - </argument> - <argument index="4" name="accel" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="label" type="String" /> + <argument index="1" name="max_states" type="int" /> + <argument index="2" name="default_state" type="int" default="0" /> + <argument index="3" name="id" type="int" default="-1" /> + <argument index="4" name="accel" type="int" default="0" /> <description> Adds a new multistate item with text [code]label[/code]. Contrarily to normal binary items, multistate items can have more than two states, as defined by [code]max_states[/code]. Each press or activate of the item will increase the state by one. The default value is defined by [code]default_state[/code]. @@ -171,14 +123,10 @@ </description> </method> <method name="add_radio_check_item"> - <return type="void"> - </return> - <argument index="0" name="label" type="String"> - </argument> - <argument index="1" name="id" type="int" default="-1"> - </argument> - <argument index="2" name="accel" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="label" type="String" /> + <argument index="1" name="id" type="int" default="-1" /> + <argument index="2" name="accel" type="int" default="0" /> <description> Adds a new radio check button with text [code]label[/code]. An [code]id[/code] can optionally be provided, as well as an accelerator ([code]accel[/code]). If no [code]id[/code] is provided, one will be created from the index. If no [code]accel[/code] is provided then the default [code]0[/code] will be assigned to it. See [method get_item_accelerator] for more info on accelerators. @@ -186,14 +134,10 @@ </description> </method> <method name="add_radio_check_shortcut"> - <return type="void"> - </return> - <argument index="0" name="shortcut" type="Shortcut"> - </argument> - <argument index="1" name="id" type="int" default="-1"> - </argument> - <argument index="2" name="global" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="shortcut" type="Shortcut" /> + <argument index="1" name="id" type="int" default="-1" /> + <argument index="2" name="global" type="bool" default="false" /> <description> Adds a new radio check button and assigns a [Shortcut] to it. Sets the label of the checkbox to the [Shortcut]'s name. An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index. @@ -201,469 +145,354 @@ </description> </method> <method name="add_separator"> - <return type="void"> - </return> - <argument index="0" name="label" type="String" default=""""> - </argument> - <argument index="1" name="id" type="int" default="-1"> - </argument> + <return type="void" /> + <argument index="0" name="label" type="String" default="""" /> + <argument index="1" name="id" type="int" default="-1" /> <description> Adds a separator between items. Separators also occupy an index, which you can set by using the [code]id[/code] parameter. A [code]label[/code] can optionally be provided, which will appear at the center of the separator. </description> </method> <method name="add_shortcut"> - <return type="void"> - </return> - <argument index="0" name="shortcut" type="Shortcut"> - </argument> - <argument index="1" name="id" type="int" default="-1"> - </argument> - <argument index="2" name="global" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="shortcut" type="Shortcut" /> + <argument index="1" name="id" type="int" default="-1" /> + <argument index="2" name="global" type="bool" default="false" /> <description> Adds a [Shortcut]. An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index. </description> </method> <method name="add_submenu_item"> - <return type="void"> - </return> - <argument index="0" name="label" type="String"> - </argument> - <argument index="1" name="submenu" type="String"> - </argument> - <argument index="2" name="id" type="int" default="-1"> - </argument> + <return type="void" /> + <argument index="0" name="label" type="String" /> + <argument index="1" name="submenu" type="String" /> + <argument index="2" name="id" type="int" default="-1" /> <description> Adds an item that will act as a submenu of the parent [PopupMenu] node when clicked. The [code]submenu[/code] argument is the name of the child [PopupMenu] node that will be shown when the item is clicked. An [code]id[/code] can optionally be provided. If no [code]id[/code] is provided, one will be created from the index. </description> </method> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all items from the [PopupMenu]. </description> </method> <method name="clear_item_opentype_features"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> <description> Removes all OpenType features form the item's text. </description> </method> <method name="get_current_index" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the index of the currently focused item. Returns [code]-1[/code] if no item is focused. </description> </method> <method name="get_item_accelerator" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="idx" type="int" /> <description> Returns the accelerator of the item at index [code]idx[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused. </description> </method> <method name="get_item_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of items in the [PopupMenu]. </description> </method> <method name="get_item_icon" qualifiers="const"> - <return type="Texture2D"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Texture2D" /> + <argument index="0" name="idx" type="int" /> <description> Returns the icon of the item at index [code]idx[/code]. </description> </method> <method name="get_item_id" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="idx" type="int" /> <description> Returns the id of the item at index [code]idx[/code]. [code]id[/code] can be manually assigned, while index can not. </description> </method> <method name="get_item_index" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="id" type="int" /> <description> Returns the index of the item containing the specified [code]id[/code]. Index is automatically assigned to each item by the engine. Index can not be set manually. </description> </method> <method name="get_item_language" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="idx" type="int" /> <description> Returns item's text language code. </description> </method> <method name="get_item_metadata" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Variant" /> + <argument index="0" name="idx" type="int" /> <description> Returns the metadata of the specified item, which might be of any type. You can set it with [method set_item_metadata], which provides a simple way of assigning context data to items. </description> </method> <method name="get_item_opentype_feature" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="tag" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="tag" type="String" /> <description> Returns OpenType feature [code]tag[/code] of the item's text. </description> </method> <method name="get_item_shortcut" qualifiers="const"> - <return type="Shortcut"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Shortcut" /> + <argument index="0" name="idx" type="int" /> <description> Returns the [Shortcut] associated with the specified [code]idx[/code] item. </description> </method> <method name="get_item_submenu" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="idx" type="int" /> <description> Returns the submenu name of the item at index [code]idx[/code]. See [method add_submenu_item] for more info on how to add a submenu. </description> </method> <method name="get_item_text" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="idx" type="int" /> <description> Returns the text of the item at index [code]idx[/code]. </description> </method> <method name="get_item_text_direction" qualifiers="const"> - <return type="int" enum="Control.TextDirection"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="int" enum="Control.TextDirection" /> + <argument index="0" name="idx" type="int" /> <description> Returns item's text base writing direction. </description> </method> <method name="get_item_tooltip" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="idx" type="int" /> <description> Returns the tooltip associated with the specified index index [code]idx[/code]. </description> </method> <method name="is_item_checkable" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="idx" type="int" /> <description> Returns [code]true[/code] if the item at index [code]idx[/code] is checkable in some way, i.e. if it has a checkbox or radio button. [b]Note:[/b] Checkable items just display a checkmark or radio button, but don't have any built-in checking behavior and must be checked/unchecked manually. </description> </method> <method name="is_item_checked" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="idx" type="int" /> <description> Returns [code]true[/code] if the item at index [code]idx[/code] is checked. </description> </method> <method name="is_item_disabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="idx" type="int" /> <description> Returns [code]true[/code] if the item at index [code]idx[/code] is disabled. When it is disabled it can't be selected, or its action invoked. See [method set_item_disabled] for more info on how to disable an item. </description> </method> <method name="is_item_radio_checkable" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="idx" type="int" /> <description> Returns [code]true[/code] if the item at index [code]idx[/code] has radio button-style checkability. [b]Note:[/b] This is purely cosmetic; you must add the logic for checking/unchecking items in radio groups. </description> </method> <method name="is_item_separator" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="idx" type="int" /> <description> Returns [code]true[/code] if the item is a separator. If it is, it will be displayed as a line. See [method add_separator] for more info on how to add a separator. </description> </method> <method name="is_item_shortcut_disabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="idx" type="int" /> <description> Returns [code]true[/code] if the specified item's shortcut is disabled. </description> </method> <method name="remove_item"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> <description> Removes the item at index [code]idx[/code] from the menu. [b]Note:[/b] The indices of items after the removed item will be shifted by one. </description> </method> <method name="set_item_accelerator"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="accel" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="accel" type="int" /> <description> Sets the accelerator of the item at index [code]idx[/code]. Accelerators are special combinations of keys that activate the item, no matter which control is focused. </description> </method> <method name="set_item_as_checkable"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="enable" type="bool" /> <description> Sets whether the item at index [code]idx[/code] has a checkbox. If [code]false[/code], sets the type of the item to plain text. [b]Note:[/b] Checkable items just display a checkmark, but don't have any built-in checking behavior and must be checked/unchecked manually. </description> </method> <method name="set_item_as_radio_checkable"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="enable" type="bool" /> <description> Sets the type of the item at the specified index [code]idx[/code] to radio button. If [code]false[/code], sets the type of the item to plain text. </description> </method> <method name="set_item_as_separator"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="enable" type="bool" /> <description> Mark the item at index [code]idx[/code] as a separator, which means that it would be displayed as a line. If [code]false[/code], sets the type of the item to plain text. </description> </method> <method name="set_item_checked"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="checked" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="checked" type="bool" /> <description> Sets the checkstate status of the item at index [code]idx[/code]. </description> </method> <method name="set_item_disabled"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="disabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="disabled" type="bool" /> <description> Enables/disables the item at index [code]idx[/code]. When it is disabled, it can't be selected and its action can't be invoked. </description> </method> <method name="set_item_icon"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="icon" type="Texture2D"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="icon" type="Texture2D" /> <description> Replaces the [Texture2D] icon of the specified [code]idx[/code]. </description> </method> <method name="set_item_id"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="id" type="int" /> <description> Sets the [code]id[/code] of the item at index [code]idx[/code]. </description> </method> <method name="set_item_language"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="language" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="language" type="String" /> <description> Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead. </description> </method> <method name="set_item_metadata"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="metadata" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="metadata" type="Variant" /> <description> Sets the metadata of an item, which may be of any type. You can later get it with [method get_item_metadata], which provides a simple way of assigning context data to items. </description> </method> <method name="set_item_multistate"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="state" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="state" type="int" /> <description> Sets the state of a multistate item. See [method add_multistate_item] for details. </description> </method> <method name="set_item_opentype_feature"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="tag" type="String"> - </argument> - <argument index="2" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="tag" type="String" /> + <argument index="2" name="value" type="int" /> <description> Sets OpenType feature [code]tag[/code] for the item's text. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. </description> </method> <method name="set_item_shortcut"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="shortcut" type="Shortcut"> - </argument> - <argument index="2" name="global" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="shortcut" type="Shortcut" /> + <argument index="2" name="global" type="bool" default="false" /> <description> Sets a [Shortcut] for the specified item [code]idx[/code]. </description> </method> <method name="set_item_shortcut_disabled"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="disabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="disabled" type="bool" /> <description> Disables the [Shortcut] of the specified index [code]idx[/code]. </description> </method> <method name="set_item_submenu"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="submenu" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="submenu" type="String" /> <description> Sets the submenu of the item at index [code]idx[/code]. The submenu is the name of a child [PopupMenu] node that would be shown when the item is clicked. </description> </method> <method name="set_item_text"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="text" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="text" type="String" /> <description> Sets the text of the item at index [code]idx[/code]. </description> </method> <method name="set_item_text_direction"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="direction" type="int" enum="Control.TextDirection"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="direction" type="int" enum="Control.TextDirection" /> <description> Sets item's text base writing direction. </description> </method> <method name="set_item_tooltip"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="tooltip" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="tooltip" type="String" /> <description> Sets the [String] tooltip of the item at the specified index [code]idx[/code]. </description> </method> <method name="toggle_item_checked"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> <description> Toggles the check state of the item of the specified index [code]idx[/code]. </description> </method> <method name="toggle_item_multistate"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> <description> Cycle to the next state of a multistate item. See [method add_multistate_item] for details. </description> @@ -688,22 +517,19 @@ </members> <signals> <signal name="id_focused"> - <argument index="0" name="id" type="int"> - </argument> + <argument index="0" name="id" type="int" /> <description> Emitted when user navigated to an item of some [code]id[/code] using [code]ui_up[/code] or [code]ui_down[/code] action. </description> </signal> <signal name="id_pressed"> - <argument index="0" name="id" type="int"> - </argument> + <argument index="0" name="id" type="int" /> <description> Emitted when an item of some [code]id[/code] is pressed or its accelerator is activated. </description> </signal> <signal name="index_pressed"> - <argument index="0" name="index" type="int"> - </argument> + <argument index="0" name="index" type="int" /> <description> Emitted when an item of some [code]index[/code] is pressed or its accelerator is activated. </description> @@ -712,77 +538,77 @@ <constants> </constants> <theme_items> - <theme_item name="checked" type="Texture2D"> + <theme_item name="checked" data_type="icon" type="Texture2D"> [Texture2D] icon for the checked checkbox items. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> [Font] used for the menu items. </theme_item> - <theme_item name="font_accelerator_color" type="Color" default="Color(0.7, 0.7, 0.7, 0.8)"> + <theme_item name="font_accelerator_color" data_type="color" type="Color" default="Color(0.7, 0.7, 0.7, 0.8)"> The text [Color] used for shortcuts and accelerators that show next to the menu item name when defined. See [method get_item_accelerator] for more info on accelerators. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> The default text [Color] for menu items' names. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color(0.4, 0.4, 0.4, 0.8)"> + <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.4, 0.4, 0.4, 0.8)"> [Color] used for disabled menu items' text. </theme_item> - <theme_item name="font_hover_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="font_hover_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> [Color] used for the hovered text. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the menu item. </theme_item> - <theme_item name="font_separator_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="font_separator_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> [Color] used for labeled separators' text. See [method add_separator]. </theme_item> - <theme_item name="font_size" type="int"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the menu items. </theme_item> - <theme_item name="hover" type="StyleBox"> + <theme_item name="hover" data_type="style" type="StyleBox"> [StyleBox] displayed when the [PopupMenu] item is hovered. </theme_item> - <theme_item name="hseparation" type="int" default="4"> + <theme_item name="hseparation" data_type="constant" type="int" default="4"> The horizontal space between the item's name and the shortcut text/submenu arrow. </theme_item> - <theme_item name="item_end_padding" type="int" default="2"> + <theme_item name="item_end_padding" data_type="constant" type="int" default="2"> </theme_item> - <theme_item name="item_start_padding" type="int" default="2"> + <theme_item name="item_start_padding" data_type="constant" type="int" default="2"> </theme_item> - <theme_item name="labeled_separator_left" type="StyleBox"> + <theme_item name="labeled_separator_left" data_type="style" type="StyleBox"> [StyleBox] for the left side of labeled separator. See [method add_separator]. </theme_item> - <theme_item name="labeled_separator_right" type="StyleBox"> + <theme_item name="labeled_separator_right" data_type="style" type="StyleBox"> [StyleBox] for the right side of labeled separator. See [method add_separator]. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the item text outline. </theme_item> - <theme_item name="panel" type="StyleBox"> + <theme_item name="panel" data_type="style" type="StyleBox"> Default [StyleBox] of the [PopupMenu] items. </theme_item> - <theme_item name="panel_disabled" type="StyleBox"> + <theme_item name="panel_disabled" data_type="style" type="StyleBox"> [StyleBox] used when the [PopupMenu] item is disabled. </theme_item> - <theme_item name="radio_checked" type="Texture2D"> + <theme_item name="radio_checked" data_type="icon" type="Texture2D"> [Texture2D] icon for the checked radio button items. </theme_item> - <theme_item name="radio_unchecked" type="Texture2D"> + <theme_item name="radio_unchecked" data_type="icon" type="Texture2D"> [Texture2D] icon for the unchecked radio button items. </theme_item> - <theme_item name="separator" type="StyleBox"> + <theme_item name="separator" data_type="style" type="StyleBox"> [StyleBox] used for the separators. See [method add_separator]. </theme_item> - <theme_item name="submenu" type="Texture2D"> + <theme_item name="submenu" data_type="icon" type="Texture2D"> [Texture2D] icon for the submenu arrow (for left-to-right layouts). </theme_item> - <theme_item name="submenu_mirrored" type="Texture2D"> + <theme_item name="submenu_mirrored" data_type="icon" type="Texture2D"> [Texture2D] icon for the submenu arrow (for right-to-left layouts). </theme_item> - <theme_item name="unchecked" type="Texture2D"> + <theme_item name="unchecked" data_type="icon" type="Texture2D"> [Texture2D] icon for the unchecked checkbox items. </theme_item> - <theme_item name="vseparation" type="int" default="4"> + <theme_item name="vseparation" data_type="constant" type="int" default="4"> The vertical space between each menu item. </theme_item> </theme_items> diff --git a/doc/classes/PopupPanel.xml b/doc/classes/PopupPanel.xml index 72045c5559..56833f3f79 100644 --- a/doc/classes/PopupPanel.xml +++ b/doc/classes/PopupPanel.xml @@ -13,7 +13,7 @@ <constants> </constants> <theme_items> - <theme_item name="panel" type="StyleBox"> + <theme_item name="panel" data_type="style" type="StyleBox"> The background panel style of this [PopupPanel]. </theme_item> </theme_items> diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml index ca41c367c8..36bec3ff61 100644 --- a/doc/classes/PrimitiveMesh.xml +++ b/doc/classes/PrimitiveMesh.xml @@ -10,8 +10,7 @@ </tutorials> <methods> <method name="get_mesh_arrays" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns mesh arrays used to constitute surface of [Mesh]. The result can be passed to [method ArrayMesh.add_surface_from_arrays] to create a new surface. For example: [codeblocks] diff --git a/doc/classes/ProgressBar.xml b/doc/classes/ProgressBar.xml index c33f6f636d..8bd013c86c 100644 --- a/doc/classes/ProgressBar.xml +++ b/doc/classes/ProgressBar.xml @@ -20,28 +20,28 @@ <constants> </constants> <theme_items> - <theme_item name="bg" type="StyleBox"> + <theme_item name="bg" data_type="style" type="StyleBox"> The style of the background. </theme_item> - <theme_item name="fg" type="StyleBox"> + <theme_item name="fg" data_type="style" type="StyleBox"> The style of the progress (i.e. the part that fills the bar). </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> Font used to draw the fill percentage if [member percent_visible] is [code]true[/code]. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> The color of the text. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [ProgressBar]. </theme_item> - <theme_item name="font_shadow_color" type="Color" default="Color(0, 0, 0, 1)"> + <theme_item name="font_shadow_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> The color of the text's shadow. </theme_item> - <theme_item name="font_size" type="int"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size used to draw the fill percentage if [member percent_visible] is [code]true[/code]. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. </theme_item> </theme_items> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 52bfd3b759..21d974e233 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -16,10 +16,8 @@ </tutorials> <methods> <method name="add_property_info"> - <return type="void"> - </return> - <argument index="0" name="hint" type="Dictionary"> - </argument> + <return type="void" /> + <argument index="0" name="hint" type="Dictionary" /> <description> Adds a custom property info to a property. The dictionary must contain: - [code]name[/code]: [String] (the property's name) @@ -56,28 +54,22 @@ </description> </method> <method name="clear"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> <description> Clears the whole configuration (not recommended, may break things). </description> </method> <method name="get_order" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="name" type="String" /> <description> Returns the order of a configuration value (influences when saved to the config file). </description> </method> <method name="get_setting" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="Variant" /> + <argument index="0" name="name" type="String" /> <description> Returns the value of a setting. [b]Example:[/b] @@ -92,10 +84,8 @@ </description> </method> <method name="globalize_path" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="String" /> + <argument index="0" name="path" type="String" /> <description> Returns the absolute, native OS path corresponding to the localized [code]path[/code] (starting with [code]res://[/code] or [code]user://[/code]). The returned path will vary depending on the operating system and user preferences. See [url=https://docs.godotengine.org/en/latest/tutorials/io/data_paths.html]File paths in Godot projects[/url] to see what those paths convert to. See also [method localize_path]. [b]Note:[/b] [method globalize_path] with [code]res://[/code] will not work in an exported project. Instead, prepend the executable's base directory to the path when running from an exported project: @@ -115,23 +105,17 @@ </description> </method> <method name="has_setting" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="String" /> <description> Returns [code]true[/code] if a configuration value is present. </description> </method> <method name="load_resource_pack"> - <return type="bool"> - </return> - <argument index="0" name="pack" type="String"> - </argument> - <argument index="1" name="replace_files" type="bool" default="true"> - </argument> - <argument index="2" name="offset" type="int" default="0"> - </argument> + <return type="bool" /> + <argument index="0" name="pack" type="String" /> + <argument index="1" name="replace_files" type="bool" default="true" /> + <argument index="2" name="offset" type="int" default="0" /> <description> Loads the contents of the .pck or .zip file specified by [code]pack[/code] into the resource filesystem ([code]res://[/code]). Returns [code]true[/code] on success. [b]Note:[/b] If a file from [code]pack[/code] shares the same path as a file already in the resource filesystem, any attempts to load that file will use the file from [code]pack[/code] unless [code]replace_files[/code] is set to [code]false[/code]. @@ -139,78 +123,60 @@ </description> </method> <method name="localize_path" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="String" /> + <argument index="0" name="path" type="String" /> <description> Returns the localized path (starting with [code]res://[/code]) corresponding to the absolute, native OS [code]path[/code]. See also [method globalize_path]. </description> </method> <method name="property_can_revert"> - <return type="bool"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="String" /> <description> Returns [code]true[/code] if the specified property exists and its initial value differs from the current value. </description> </method> <method name="property_get_revert"> - <return type="Variant"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="Variant" /> + <argument index="0" name="name" type="String" /> <description> Returns the specified property's initial value. Returns [code]null[/code] if the property does not exist. </description> </method> <method name="save"> - <return type="int" enum="Error"> - </return> + <return type="int" enum="Error" /> <description> Saves the configuration to the [code]project.godot[/code] file. [b]Note:[/b] This method is intended to be used by editor plugins, as modified [ProjectSettings] can't be loaded back in the running app. If you want to change project settings in exported projects, use [method save_custom] to save [code]override.cfg[/code] file. </description> </method> <method name="save_custom"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="file" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="file" type="String" /> <description> Saves the configuration to a custom file. The file extension must be [code].godot[/code] (to save in text-based [ConfigFile] format) or [code].binary[/code] (to save in binary format). You can also save [code]override.cfg[/code] file, which is also text, but can be used in exported projects unlike other formats. </description> </method> <method name="set_initial_value"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> + <argument index="1" name="value" type="Variant" /> <description> Sets the specified property's initial value. This is the value the property reverts to. </description> </method> <method name="set_order"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> - <argument index="1" name="position" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> + <argument index="1" name="position" type="int" /> <description> Sets the order of a configuration value (influences when saved to the config file). </description> </method> <method name="set_setting"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> + <argument index="1" name="value" type="Variant" /> <description> Sets the value of a setting. [b]Example:[/b] @@ -457,6 +423,8 @@ <member name="debug/settings/stdout/print_fps" type="bool" setter="" getter="" default="false"> Print frames per second to standard output every second. </member> + <member name="debug/settings/stdout/print_gpu_profile" type="bool" setter="" getter="" default="false"> + </member> <member name="debug/settings/stdout/verbose_stdout" type="bool" setter="" getter="" default="false"> Print more information to standard output when running. It displays information such as memory leaks, which scenes and resources are being loaded, etc. </member> @@ -532,7 +500,7 @@ <member name="display/window/size/width" type="int" setter="" getter="" default="1024"> Sets the game's main viewport width. On desktop platforms, this is the default window size. Stretch mode settings also use this as a reference when enabled. </member> - <member name="display/window/vsync/vsync_mode" type="String" setter="" getter="" default=""Enabled""> + <member name="display/window/vsync/vsync_mode" type="int" setter="" getter="" default="1"> Sets the VSync mode for the main game window. See [enum DisplayServer.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 [code]Enabled[/code], if the desired mode is not supported. @@ -657,19 +625,19 @@ </member> <member name="input/ui_text_backspace_all_to_left" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_backspace_all_to_left.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_backspace_all_to_left.osx" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_backspace_word" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_backspace_word.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_backspace_word.osx" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_caret_document_end" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_caret_document_end.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_caret_document_end.osx" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_caret_document_start" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_caret_document_start.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_caret_document_start.osx" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_caret_down" type="Dictionary" setter="" getter=""> </member> @@ -677,11 +645,11 @@ </member> <member name="input/ui_text_caret_line_end" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_caret_line_end.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_caret_line_end.osx" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_caret_line_start" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_caret_line_start.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_caret_line_start.osx" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_caret_page_down" type="Dictionary" setter="" getter=""> </member> @@ -693,11 +661,11 @@ </member> <member name="input/ui_text_caret_word_left" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_caret_word_left.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_caret_word_left.osx" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_caret_word_right" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_caret_word_right.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_caret_word_right.osx" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_completion_accept" type="Dictionary" setter="" getter=""> </member> @@ -711,11 +679,11 @@ </member> <member name="input/ui_text_delete_all_to_right" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_delete_all_to_right.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_delete_all_to_right.osx" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_delete_word" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_delete_word.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_delete_word.osx" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_indent" type="Dictionary" setter="" getter=""> </member> @@ -727,11 +695,11 @@ </member> <member name="input/ui_text_scroll_down" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_scroll_down.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_scroll_down.osx" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_scroll_up" type="Dictionary" setter="" getter=""> </member> - <member name="input/ui_text_scroll_up.OSX" type="Dictionary" setter="" getter=""> + <member name="input/ui_text_scroll_up.osx" type="Dictionary" setter="" getter=""> </member> <member name="input/ui_text_select_all" type="Dictionary" setter="" getter=""> </member> @@ -749,10 +717,16 @@ Default [InputEventAction] to move up in the UI. [b]Note:[/b] Default [code]ui_*[/code] actions cannot be removed as they are necessary for the internal logic of several [Control]s. The events assigned to the action can however be modified. </member> + <member name="input_devices/buffering/agile_event_flushing" type="bool" setter="" getter="" default="false"> + If [code]true[/code], key/touch/joystick events will be flushed just before every idle and physics frame. + If [code]false[/code], such events will be flushed only once per process frame, between iterations of the engine. + Enabling this can greatly improve the responsiveness to input, specially in devices that need to run multiple physics frames per visible (process) frame, because they can't run at the target frame rate. + [b]Note:[/b] Currently implemented only on Android. + </member> <member name="input_devices/pen_tablet/driver" type="String" setter="" getter=""> Specifies the tablet driver to use. If left empty, the default driver will be used. </member> - <member name="input_devices/pen_tablet/driver.Windows" type="String" setter="" getter=""> + <member name="input_devices/pen_tablet/driver.windows" type="String" setter="" getter=""> Override for [member input_devices/pen_tablet/driver] on Windows. </member> <member name="input_devices/pointing/emulate_mouse_from_touch" type="bool" setter="" getter="" default="true"> @@ -775,15 +749,40 @@ <member name="internationalization/locale/test" type="String" setter="" getter="" default=""""> If non-empty, this locale will be used when running the project from the editor. </member> + <member name="internationalization/pseudolocalization/double_vowels" type="bool" setter="" getter="" default="false"> + Double vowels in strings during pseudolocalization to simulate the lengthening of text due to localization. + </member> + <member name="internationalization/pseudolocalization/expansion_ratio" type="float" setter="" getter="" default="0.0"> + The expansion ratio to use during pseudolocalization. A value of [code]0.3[/code] is sufficient for most practical purposes, and will increase the length of each string by 30%. + </member> + <member name="internationalization/pseudolocalization/fake_bidi" type="bool" setter="" getter="" default="false"> + If [code]true[/code], emulate bidirectional (right-to-left) text when pseudolocalization is enabled. This can be used to spot issues with RTL layout and UI mirroring that will crop up if the project is localized to RTL languages such as Arabic or Hebrew. + </member> + <member name="internationalization/pseudolocalization/override" type="bool" setter="" getter="" default="false"> + Replace all characters in the string with [code]*[/code]. Useful for finding non-localizable strings. + </member> + <member name="internationalization/pseudolocalization/prefix" type="String" setter="" getter="" default=""[""> + Prefix that will be prepended to the pseudolocalized string. + </member> + <member name="internationalization/pseudolocalization/replace_with_accents" type="bool" setter="" getter="" default="true"> + Replace all characters with their accented variants during pseudolocalization. + </member> + <member name="internationalization/pseudolocalization/skip_placeholders" type="bool" setter="" getter="" default="true"> + Skip placeholders for string formatting like [code]%s[/code] or [code]%f[/code] during pseudolocalization. Useful to identify strings which need additional control characters to display correctly. + </member> + <member name="internationalization/pseudolocalization/suffix" type="String" setter="" getter="" default=""]""> + Suffix that will be appended to the pseudolocalized string. + </member> + <member name="internationalization/pseudolocalization/use_pseudolocalization" type="bool" setter="" getter="" default="false"> + If [code]true[/code], enables pseudolocalization for the project. This can be used to spot untranslatable strings or layout issues that may occur once the project is localized to languages that have longer strings than the source language. + [b]Note:[/b] This property is only read when the project starts. To toggle pseudolocalization at run-time, use [member TranslationServer.pseudolocalization_enabled] instead. + </member> <member name="internationalization/rendering/force_right_to_left_layout_direction" type="bool" setter="" getter="" default="false"> Force layout direction and text writing direction to RTL for all locales. </member> <member name="internationalization/rendering/text_driver" type="String" setter="" getter="" default=""""> Specifies the [TextServer] to use. If left empty, the default will be used. </member> - <member name="layer_names/2d_navigation/layer_0" type="String" setter="" getter="" default=""""> - Optional name for the 2D navigation layer 0. If left empty, the layer will display as "Layer 0". - </member> <member name="layer_names/2d_navigation/layer_1" type="String" setter="" getter="" default=""""> Optional name for the 2D navigation layer 1. If left empty, the layer will display as "Layer 1". </member> @@ -820,9 +819,48 @@ <member name="layer_names/2d_navigation/layer_2" type="String" setter="" getter="" default=""""> Optional name for the 2D navigation layer 2. If left empty, the layer will display as "Layer 2". </member> + <member name="layer_names/2d_navigation/layer_20" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 20. If left empty, the layer will display as "Layer 20". + </member> + <member name="layer_names/2d_navigation/layer_21" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 21. If left empty, the layer will display as "Layer 21". + </member> + <member name="layer_names/2d_navigation/layer_22" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 22. If left empty, the layer will display as "Layer 22". + </member> + <member name="layer_names/2d_navigation/layer_23" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 23. If left empty, the layer will display as "Layer 23". + </member> + <member name="layer_names/2d_navigation/layer_24" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 24. If left empty, the layer will display as "Layer 24". + </member> + <member name="layer_names/2d_navigation/layer_25" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 25. If left empty, the layer will display as "Layer 25". + </member> + <member name="layer_names/2d_navigation/layer_26" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 26. If left empty, the layer will display as "Layer 26". + </member> + <member name="layer_names/2d_navigation/layer_27" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 27. If left empty, the layer will display as "Layer 27". + </member> + <member name="layer_names/2d_navigation/layer_28" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 28. If left empty, the layer will display as "Layer 28". + </member> + <member name="layer_names/2d_navigation/layer_29" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 29. If left empty, the layer will display as "Layer 29". + </member> <member name="layer_names/2d_navigation/layer_3" type="String" setter="" getter="" default=""""> Optional name for the 2D navigation layer 3. If left empty, the layer will display as "Layer 3". </member> + <member name="layer_names/2d_navigation/layer_30" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 30. If left empty, the layer will display as "Layer 30". + </member> + <member name="layer_names/2d_navigation/layer_31" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 31. If left empty, the layer will display as "Layer 31". + </member> + <member name="layer_names/2d_navigation/layer_32" type="String" setter="" getter="" default=""""> + Optional name for the 2D navigation layer 32. If left empty, the layer will display as "Layer 32". + </member> <member name="layer_names/2d_navigation/layer_4" type="String" setter="" getter="" default=""""> Optional name for the 2D navigation layer 4. If left empty, the layer will display as "Layer 4". </member> @@ -841,9 +879,6 @@ <member name="layer_names/2d_navigation/layer_9" type="String" setter="" getter="" default=""""> Optional name for the 2D navigation layer 9. If left empty, the layer will display as "Layer 9". </member> - <member name="layer_names/2d_physics/layer_0" type="String" setter="" getter="" default=""""> - Optional name for the 2D physics layer 0. If left empty, the layer will display as "Layer 0". - </member> <member name="layer_names/2d_physics/layer_1" type="String" setter="" getter="" default=""""> Optional name for the 2D physics layer 1. If left empty, the layer will display as "Layer 1". </member> @@ -880,9 +915,48 @@ <member name="layer_names/2d_physics/layer_2" type="String" setter="" getter="" default=""""> Optional name for the 2D physics layer 2. If left empty, the layer will display as "Layer 2". </member> + <member name="layer_names/2d_physics/layer_20" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 20. If left empty, the layer will display as "Layer 20". + </member> + <member name="layer_names/2d_physics/layer_21" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 21. If left empty, the layer will display as "Layer 21". + </member> + <member name="layer_names/2d_physics/layer_22" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 22. If left empty, the layer will display as "Layer 22". + </member> + <member name="layer_names/2d_physics/layer_23" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 23. If left empty, the layer will display as "Layer 23". + </member> + <member name="layer_names/2d_physics/layer_24" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 24. If left empty, the layer will display as "Layer 24". + </member> + <member name="layer_names/2d_physics/layer_25" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 25. If left empty, the layer will display as "Layer 25". + </member> + <member name="layer_names/2d_physics/layer_26" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 26. If left empty, the layer will display as "Layer 26". + </member> + <member name="layer_names/2d_physics/layer_27" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 27. If left empty, the layer will display as "Layer 27". + </member> + <member name="layer_names/2d_physics/layer_28" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 28. If left empty, the layer will display as "Layer 28". + </member> + <member name="layer_names/2d_physics/layer_29" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 29. If left empty, the layer will display as "Layer 29". + </member> <member name="layer_names/2d_physics/layer_3" type="String" setter="" getter="" default=""""> Optional name for the 2D physics layer 3. If left empty, the layer will display as "Layer 3". </member> + <member name="layer_names/2d_physics/layer_30" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 30. If left empty, the layer will display as "Layer 30". + </member> + <member name="layer_names/2d_physics/layer_31" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 31. If left empty, the layer will display as "Layer 31". + </member> + <member name="layer_names/2d_physics/layer_32" type="String" setter="" getter="" default=""""> + Optional name for the 2D physics layer 32. If left empty, the layer will display as "Layer 32". + </member> <member name="layer_names/2d_physics/layer_4" type="String" setter="" getter="" default=""""> Optional name for the 2D physics layer 4. If left empty, the layer will display as "Layer 4". </member> @@ -901,9 +975,6 @@ <member name="layer_names/2d_physics/layer_9" type="String" setter="" getter="" default=""""> Optional name for the 2D physics layer 9. If left empty, the layer will display as "Layer 9". </member> - <member name="layer_names/2d_render/layer_0" type="String" setter="" getter="" default=""""> - Optional name for the 2D render layer 0. If left empty, the layer will display as "Layer 0". - </member> <member name="layer_names/2d_render/layer_1" type="String" setter="" getter="" default=""""> Optional name for the 2D render layer 1. If left empty, the layer will display as "Layer 1". </member> @@ -940,6 +1011,9 @@ <member name="layer_names/2d_render/layer_2" type="String" setter="" getter="" default=""""> Optional name for the 2D render layer 2. If left empty, the layer will display as "Layer 2". </member> + <member name="layer_names/2d_render/layer_20" type="String" setter="" getter="" default=""""> + Optional name for the 2D render layer 20. If left empty, the layer will display as "Layer 20". + </member> <member name="layer_names/2d_render/layer_3" type="String" setter="" getter="" default=""""> Optional name for the 2D render layer 3. If left empty, the layer will display as "Layer 3". </member> @@ -961,9 +1035,6 @@ <member name="layer_names/2d_render/layer_9" type="String" setter="" getter="" default=""""> Optional name for the 2D render layer 9. If left empty, the layer will display as "Layer 9". </member> - <member name="layer_names/3d_navigation/layer_0" type="String" setter="" getter="" default=""""> - Optional name for the 3D navigation layer 0. If left empty, the layer will display as "Layer 0". - </member> <member name="layer_names/3d_navigation/layer_1" type="String" setter="" getter="" default=""""> Optional name for the 3D navigation layer 1. If left empty, the layer will display as "Layer 1". </member> @@ -1000,9 +1071,48 @@ <member name="layer_names/3d_navigation/layer_2" type="String" setter="" getter="" default=""""> Optional name for the 3D navigation layer 2. If left empty, the layer will display as "Layer 2". </member> + <member name="layer_names/3d_navigation/layer_20" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 20. If left empty, the layer will display as "Layer 20". + </member> + <member name="layer_names/3d_navigation/layer_21" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 21. If left empty, the layer will display as "Layer 21". + </member> + <member name="layer_names/3d_navigation/layer_22" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 22. If left empty, the layer will display as "Layer 22". + </member> + <member name="layer_names/3d_navigation/layer_23" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 23. If left empty, the layer will display as "Layer 23". + </member> + <member name="layer_names/3d_navigation/layer_24" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 24. If left empty, the layer will display as "Layer 24". + </member> + <member name="layer_names/3d_navigation/layer_25" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 25. If left empty, the layer will display as "Layer 25". + </member> + <member name="layer_names/3d_navigation/layer_26" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 26. If left empty, the layer will display as "Layer 26". + </member> + <member name="layer_names/3d_navigation/layer_27" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 27. If left empty, the layer will display as "Layer 27". + </member> + <member name="layer_names/3d_navigation/layer_28" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 28. If left empty, the layer will display as "Layer 28". + </member> + <member name="layer_names/3d_navigation/layer_29" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 29. If left empty, the layer will display as "Layer 29". + </member> <member name="layer_names/3d_navigation/layer_3" type="String" setter="" getter="" default=""""> Optional name for the 3D navigation layer 3. If left empty, the layer will display as "Layer 3". </member> + <member name="layer_names/3d_navigation/layer_30" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 30. If left empty, the layer will display as "Layer 30". + </member> + <member name="layer_names/3d_navigation/layer_31" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 31. If left empty, the layer will display as "Layer 31". + </member> + <member name="layer_names/3d_navigation/layer_32" type="String" setter="" getter="" default=""""> + Optional name for the 3D navigation layer 32. If left empty, the layer will display as "Layer 32". + </member> <member name="layer_names/3d_navigation/layer_4" type="String" setter="" getter="" default=""""> Optional name for the 3D navigation layer 4. If left empty, the layer will display as "Layer 4". </member> @@ -1021,9 +1131,6 @@ <member name="layer_names/3d_navigation/layer_9" type="String" setter="" getter="" default=""""> Optional name for the 3D navigation layer 9. If left empty, the layer will display as "Layer 9". </member> - <member name="layer_names/3d_physics/layer_0" type="String" setter="" getter="" default=""""> - Optional name for the 3D physics layer 0. If left empty, the layer will display as "Layer 0". - </member> <member name="layer_names/3d_physics/layer_1" type="String" setter="" getter="" default=""""> Optional name for the 3D physics layer 1. If left empty, the layer will display as "Layer 1". </member> @@ -1060,9 +1167,48 @@ <member name="layer_names/3d_physics/layer_2" type="String" setter="" getter="" default=""""> Optional name for the 3D physics layer 2. If left empty, the layer will display as "Layer 2". </member> + <member name="layer_names/3d_physics/layer_20" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 20. If left empty, the layer will display as "Layer 20". + </member> + <member name="layer_names/3d_physics/layer_21" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 21. If left empty, the layer will display as "Layer 21". + </member> + <member name="layer_names/3d_physics/layer_22" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 22. If left empty, the layer will display as "Layer 22". + </member> + <member name="layer_names/3d_physics/layer_23" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 23. If left empty, the layer will display as "Layer 23". + </member> + <member name="layer_names/3d_physics/layer_24" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 24. If left empty, the layer will display as "Layer 24". + </member> + <member name="layer_names/3d_physics/layer_25" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 25. If left empty, the layer will display as "Layer 25". + </member> + <member name="layer_names/3d_physics/layer_26" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 26. If left empty, the layer will display as "Layer 26". + </member> + <member name="layer_names/3d_physics/layer_27" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 27. If left empty, the layer will display as "Layer 27". + </member> + <member name="layer_names/3d_physics/layer_28" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 28. If left empty, the layer will display as "Layer 28". + </member> + <member name="layer_names/3d_physics/layer_29" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 29. If left empty, the layer will display as "Layer 29". + </member> <member name="layer_names/3d_physics/layer_3" type="String" setter="" getter="" default=""""> Optional name for the 3D physics layer 3. If left empty, the layer will display as "Layer 3". </member> + <member name="layer_names/3d_physics/layer_30" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 30. If left empty, the layer will display as "Layer 30". + </member> + <member name="layer_names/3d_physics/layer_31" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 31. If left empty, the layer will display as "Layer 31". + </member> + <member name="layer_names/3d_physics/layer_32" type="String" setter="" getter="" default=""""> + Optional name for the 3D physics layer 32. If left empty, the layer will display as "Layer 32". + </member> <member name="layer_names/3d_physics/layer_4" type="String" setter="" getter="" default=""""> Optional name for the 3D physics layer 4. If left empty, the layer will display as "Layer 4". </member> @@ -1081,9 +1227,6 @@ <member name="layer_names/3d_physics/layer_9" type="String" setter="" getter="" default=""""> Optional name for the 3D physics layer 9. If left empty, the layer will display as "Layer 9". </member> - <member name="layer_names/3d_render/layer_0" type="String" setter="" getter="" default=""""> - Optional name for the 2D render layer 0. If left empty, the layer will display as "Layer 0". - </member> <member name="layer_names/3d_render/layer_1" type="String" setter="" getter="" default=""""> Optional name for the 3D render layer 1. If left empty, the layer will display as "Layer 1". </member> @@ -1120,6 +1263,9 @@ <member name="layer_names/3d_render/layer_2" type="String" setter="" getter="" default=""""> Optional name for the 3D render layer 2. If left empty, the layer will display as "Layer 2". </member> + <member name="layer_names/3d_render/layer_20" type="String" setter="" getter="" default=""""> + Optional name for the 3D render layer 20. If left empty, the layer will display as "Layer 20". + </member> <member name="layer_names/3d_render/layer_3" type="String" setter="" getter="" default=""""> Optional name for the 3D render layer 3. If left empty, the layer will display as "Layer 3". </member> @@ -1206,7 +1352,7 @@ </member> <member name="physics/2d/default_angular_damp" type="float" setter="" getter="" default="1.0"> The default angular damp in 2D. - [b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_fps], [code]60[/code] by default) will bring the object to a stop in one iteration. + [b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_ticks_per_second], [code]60[/code] by default) will bring the object to a stop in one iteration. </member> <member name="physics/2d/default_gravity" type="float" setter="" getter="" default="980.0"> The default gravity strength in 2D (in pixels per second squared). @@ -1238,7 +1384,7 @@ </member> <member name="physics/2d/default_linear_damp" type="float" setter="" getter="" default="0.1"> The default linear damp in 2D. - [b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_fps], [code]60[/code] by default) will bring the object to a stop in one iteration. + [b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_ticks_per_second], [code]60[/code] by default) will bring the object to a stop in one iteration. </member> <member name="physics/2d/physics_engine" type="String" setter="" getter="" default=""DEFAULT""> Sets which physics engine to use for 2D physics. @@ -1258,7 +1404,7 @@ </member> <member name="physics/3d/default_angular_damp" type="float" setter="" getter="" default="0.1"> The default angular damp in 3D. - [b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_fps], [code]60[/code] by default) will bring the object to a stop in one iteration. + [b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_ticks_per_second], [code]60[/code] by default) will bring the object to a stop in one iteration. </member> <member name="physics/3d/default_gravity" type="float" setter="" getter="" default="9.8"> The default gravity strength in 3D (in meters per second squared). @@ -1290,7 +1436,7 @@ </member> <member name="physics/3d/default_linear_damp" type="float" setter="" getter="" default="0.1"> The default linear damp in 3D. - [b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_fps], [code]60[/code] by default) will bring the object to a stop in one iteration. + [b]Note:[/b] Good values are in the range [code]0[/code] to [code]1[/code]. At value [code]0[/code] objects will keep moving with the same velocity. Values greater than [code]1[/code] will aim to reduce the velocity to [code]0[/code] in less than a second e.g. a value of [code]2[/code] will aim to reduce the velocity to [code]0[/code] in half a second. A value equal to or greater than the physics frame rate ([member ProjectSettings.physics/common/physics_ticks_per_second], [code]60[/code] by default) will bring the object to a stop in one iteration. </member> <member name="physics/3d/physics_engine" type="String" setter="" getter="" default=""DEFAULT""> Sets which physics engine to use for 3D physics. @@ -1308,15 +1454,15 @@ <member name="physics/common/enable_object_picking" type="bool" setter="" getter="" default="true"> Enables [member Viewport.physics_object_picking] on the root viewport. </member> - <member name="physics/common/physics_fps" type="int" setter="" getter="" default="60"> - The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. - [b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.iterations_per_second] instead. - </member> <member name="physics/common/physics_jitter_fix" type="float" setter="" getter="" default="0.5"> Controls how much physics ticks are synchronized with real time. For 0 or less, the ticks are synchronized. Such values are recommended for network games, where clock synchronization matters. Higher values cause higher deviation of in-game clock and real clock, but allows smoothing out framerate jitters. The default value of 0.5 should be fine for most; values above 2 could cause the game to react to dropped frames with a noticeable delay and are not recommended. [b]Note:[/b] For best results, when using a custom physics interpolation solution, the physics jitter fix should be disabled by setting [member physics/common/physics_jitter_fix] to [code]0[/code]. [b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_jitter_fix] instead. </member> + <member name="physics/common/physics_ticks_per_second" type="int" setter="" getter="" default="60"> + The number of fixed iterations per second. This controls how often physics simulation and [method Node._physics_process] methods are run. + [b]Note:[/b] This property is only read when the project starts. To change the physics FPS at runtime, set [member Engine.physics_ticks_per_second] instead. + </member> <member name="rendering/2d/sdf/oversize" type="int" setter="" getter="" default="1"> </member> <member name="rendering/2d/sdf/scale" type="int" setter="" getter="" default="1"> @@ -1327,6 +1473,9 @@ </member> <member name="rendering/2d/snap/snap_2d_vertices_to_pixel" type="bool" setter="" getter="" default="false"> </member> + <member name="rendering/3d/viewport/scale" type="int" setter="" getter="" default="0"> + Scale the 3D render buffer based on the viewport size. The smaller the faster 3D rendering is performed but at the cost of quality. + </member> <member name="rendering/anti_aliasing/quality/msaa" type="int" setter="" getter="" default="0"> Sets the number of MSAA samples to use (as a power of two). MSAA is used to reduce aliasing around the edges of polygons. A higher MSAA value results in smoother edges but can be significantly slower on some hardware. </member> @@ -1342,7 +1491,7 @@ </member> <member name="rendering/anti_aliasing/screen_space_roughness_limiter/limit" type="float" setter="" getter="" default="0.18"> </member> - <member name="rendering/camera/depth_of_field/depth_of_field_bokeh_quality" type="int" setter="" getter="" default="2"> + <member name="rendering/camera/depth_of_field/depth_of_field_bokeh_quality" type="int" setter="" getter="" default="1"> Sets the quality of the depth of field effect. Higher quality takes more samples, which is slower but looks smoother. </member> <member name="rendering/camera/depth_of_field/depth_of_field_bokeh_shape" type="int" setter="" getter="" default="1"> @@ -1569,11 +1718,17 @@ <member name="rendering/shadows/shadows/soft_shadow_quality.mobile" type="int" setter="" getter="" default="0"> Lower-end override for [member rendering/shadows/shadows/soft_shadow_quality] on mobile devices, due to performance concerns or driver support. </member> + <member name="rendering/textures/decals/filter" type="int" setter="" getter="" default="3"> + </member> <member name="rendering/textures/default_filters/anisotropic_filtering_level" type="int" setter="" getter="" default="2"> Sets the maximum number of samples to take when using anisotropic filtering on textures (as a power of two). A higher sample count will result in sharper textures at oblique angles, but is more expensive to compute. A value of [code]0[/code] forcibly disables anisotropic filtering, even on materials where it is enabled. + [b]Note:[/b] This property is only read when the project starts. There is currently no way to change this setting at run-time. </member> <member name="rendering/textures/default_filters/use_nearest_mipmap_filter" type="bool" setter="" getter="" default="false"> If [code]true[/code], uses nearest-neighbor mipmap filtering when using mipmaps (also called "bilinear filtering"), which will result in visible seams appearing between mipmap stages. This may increase performance in mobile as less memory bandwidth is used. If [code]false[/code], linear mipmap filtering (also called "trilinear filtering") is used. + [b]Note:[/b] This property is only read when the project starts. There is currently no way to change this setting at run-time. + </member> + <member name="rendering/textures/light_projectors/filter" type="int" setter="" getter="" default="3"> </member> <member name="rendering/textures/lossless_compression/force_png" type="bool" setter="" getter="" default="false"> If [code]true[/code], the texture importer will import lossless textures using the PNG format. Otherwise, it will default to using WebP. diff --git a/doc/classes/PropertyTweener.xml b/doc/classes/PropertyTweener.xml index 1e77bb33c6..7914b26676 100644 --- a/doc/classes/PropertyTweener.xml +++ b/doc/classes/PropertyTweener.xml @@ -11,8 +11,7 @@ </tutorials> <methods> <method name="as_relative"> - <return type="PropertyTweener"> - </return> + <return type="PropertyTweener" /> <description> When called, the final value will be used as a relative value instead. Example: [codeblock] @@ -22,10 +21,8 @@ </description> </method> <method name="from"> - <return type="PropertyTweener"> - </return> - <argument index="0" name="value" type="Variant"> - </argument> + <return type="PropertyTweener" /> + <argument index="0" name="value" type="Variant" /> <description> Sets a custom initial value to the [PropertyTweener]. Example: [codeblock] @@ -35,8 +32,7 @@ </description> </method> <method name="from_current"> - <return type="PropertyTweener"> - </return> + <return type="PropertyTweener" /> <description> Makes the [PropertyTweener] use the current property value (i.e. at the time of creating this [PropertyTweener]) as a starting point. This is equivalent of using [method from] with the current value. These two calls will do the same: [codeblock] @@ -46,28 +42,22 @@ </description> </method> <method name="set_delay"> - <return type="PropertyTweener"> - </return> - <argument index="0" name="delay" type="float"> - </argument> + <return type="PropertyTweener" /> + <argument index="0" name="delay" type="float" /> <description> Sets the time in seconds after which the [PropertyTweener] will start interpolating. By default there's no delay. </description> </method> <method name="set_ease"> - <return type="PropertyTweener"> - </return> - <argument index="0" name="ease" type="int" enum="Tween.EaseType"> - </argument> + <return type="PropertyTweener" /> + <argument index="0" name="ease" type="int" enum="Tween.EaseType" /> <description> Sets the type of used easing from [enum Tween.EaseType]. If not set, the default easing is used from the [Tween] that contains this Tweener. </description> </method> <method name="set_trans"> - <return type="PropertyTweener"> - </return> - <argument index="0" name="trans" type="int" enum="Tween.TransitionType"> - </argument> + <return type="PropertyTweener" /> + <argument index="0" name="trans" type="int" enum="Tween.TransitionType" /> <description> Sets the type of used transition from [enum Tween.TransitionType]. If not set, the default transition is used from the [Tween] that contains this Tweener. </description> diff --git a/doc/classes/ProximityGroup3D.xml b/doc/classes/ProximityGroup3D.xml index 22e397b832..15735bd6f6 100644 --- a/doc/classes/ProximityGroup3D.xml +++ b/doc/classes/ProximityGroup3D.xml @@ -10,12 +10,9 @@ </tutorials> <methods> <method name="broadcast"> - <return type="void"> - </return> - <argument index="0" name="method" type="String"> - </argument> - <argument index="1" name="parameters" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="method" type="String" /> + <argument index="1" name="parameters" type="Variant" /> <description> </description> </method> @@ -30,10 +27,8 @@ </members> <signals> <signal name="broadcast"> - <argument index="0" name="method" type="String"> - </argument> - <argument index="1" name="parameters" type="Array"> - </argument> + <argument index="0" name="method" type="String" /> + <argument index="1" name="parameters" type="Array" /> <description> </description> </signal> diff --git a/doc/classes/QuadMesh.xml b/doc/classes/QuadMesh.xml index 94d638888c..4209e3db14 100644 --- a/doc/classes/QuadMesh.xml +++ b/doc/classes/QuadMesh.xml @@ -13,6 +13,9 @@ <methods> </methods> <members> + <member name="center_offset" type="Vector3" setter="set_center_offset" getter="get_center_offset" default="Vector3(0, 0, 0)"> + Offset of the generated Quad. Useful for particles. + </member> <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(1, 1)"> Size on the X and Y axes. </member> diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml index 06434ab268..720188f67e 100644 --- a/doc/classes/Quaternion.xml +++ b/doc/classes/Quaternion.xml @@ -14,279 +14,214 @@ </tutorials> <methods> <method name="Quaternion" qualifiers="constructor"> - <return type="Quaternion"> - </return> + <return type="Quaternion" /> <description> Constructs a default-initialized quaternion with all components set to [code]0[/code]. </description> </method> <method name="Quaternion" qualifiers="constructor"> - <return type="Quaternion"> - </return> - <argument index="0" name="from" type="Quaternion"> - </argument> + <return type="Quaternion" /> + <argument index="0" name="from" type="Quaternion" /> <description> Constructs a [Quaternion] as a copy of the given [Quaternion]. </description> </method> <method name="Quaternion" qualifiers="constructor"> - <return type="Quaternion"> - </return> - <argument index="0" name="arc_from" type="Vector3"> - </argument> - <argument index="1" name="arc_to" type="Vector3"> - </argument> + <return type="Quaternion" /> + <argument index="0" name="arc_from" type="Vector3" /> + <argument index="1" name="arc_to" type="Vector3" /> <description> </description> </method> <method name="Quaternion" qualifiers="constructor"> - <return type="Quaternion"> - </return> - <argument index="0" name="axis" type="Vector3"> - </argument> - <argument index="1" name="angle" type="float"> - </argument> + <return type="Quaternion" /> + <argument index="0" name="axis" type="Vector3" /> + <argument index="1" name="angle" type="float" /> <description> Constructs a quaternion that will rotate around the given axis by the specified angle. The axis must be a normalized vector. </description> </method> <method name="Quaternion" qualifiers="constructor"> - <return type="Quaternion"> - </return> - <argument index="0" name="euler" type="Vector3"> - </argument> + <return type="Quaternion" /> + <argument index="0" name="euler" type="Vector3" /> <description> Constructs a quaternion that will perform a rotation specified by Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last), given in the vector format as (X angle, Y angle, Z angle). </description> </method> <method name="Quaternion" qualifiers="constructor"> - <return type="Quaternion"> - </return> - <argument index="0" name="from" type="Basis"> - </argument> + <return type="Quaternion" /> + <argument index="0" name="from" type="Basis" /> <description> Constructs a quaternion from the given [Basis]. </description> </method> <method name="Quaternion" qualifiers="constructor"> - <return type="Quaternion"> - </return> - <argument index="0" name="x" type="float"> - </argument> - <argument index="1" name="y" type="float"> - </argument> - <argument index="2" name="z" type="float"> - </argument> - <argument index="3" name="w" type="float"> - </argument> + <return type="Quaternion" /> + <argument index="0" name="x" type="float" /> + <argument index="1" name="y" type="float" /> + <argument index="2" name="z" type="float" /> + <argument index="3" name="w" type="float" /> <description> Constructs a quaternion defined by the given values. </description> </method> <method name="angle_to" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="to" type="Quaternion"> - </argument> + <return type="float" /> + <argument index="0" name="to" type="Quaternion" /> <description> Returns the angle between this quaternion and [code]to[/code]. This is the magnitude of the angle you would need to rotate by to get from one to the other. [b]Note:[/b] This method has an abnormally high amount of floating-point error, so methods such as [code]is_zero_approx[/code] will not work reliably. </description> </method> <method name="cubic_slerp" qualifiers="const"> - <return type="Quaternion"> - </return> - <argument index="0" name="b" type="Quaternion"> - </argument> - <argument index="1" name="pre_a" type="Quaternion"> - </argument> - <argument index="2" name="post_b" type="Quaternion"> - </argument> - <argument index="3" name="weight" type="float"> - </argument> + <return type="Quaternion" /> + <argument index="0" name="b" type="Quaternion" /> + <argument index="1" name="pre_a" type="Quaternion" /> + <argument index="2" name="post_b" type="Quaternion" /> + <argument index="3" name="weight" type="float" /> <description> Performs a cubic spherical interpolation between quaternions [code]pre_a[/code], this vector, [code]b[/code], and [code]post_b[/code], by the given amount [code]weight[/code]. </description> </method> <method name="dot" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="with" type="Quaternion"> - </argument> + <return type="float" /> + <argument index="0" name="with" type="Quaternion" /> <description> Returns the dot product of two quaternions. </description> </method> <method name="get_euler" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns Euler angles (in the YXZ convention: when decomposing, first Z, then X, and Y last) corresponding to the rotation represented by the unit quaternion. Returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). </description> </method> <method name="inverse" qualifiers="const"> - <return type="Quaternion"> - </return> + <return type="Quaternion" /> <description> Returns the inverse of the quaternion. </description> </method> <method name="is_equal_approx" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="to" type="Quaternion"> - </argument> + <return type="bool" /> + <argument index="0" name="to" type="Quaternion" /> <description> Returns [code]true[/code] if this quaternion and [code]quat[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. </description> </method> <method name="is_normalized" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns whether the quaternion is normalized or not. </description> </method> <method name="length" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the length of the quaternion. </description> </method> <method name="length_squared" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the length of the quaternion, squared. </description> </method> <method name="normalized" qualifiers="const"> - <return type="Quaternion"> - </return> + <return type="Quaternion" /> <description> Returns a copy of the quaternion, normalized to unit length. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Quaternion"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Quaternion" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector3"> - </return> - <argument index="0" name="right" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="right" type="Vector3" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Quaternion"> - </return> - <argument index="0" name="right" type="Quaternion"> - </argument> + <return type="Quaternion" /> + <argument index="0" name="right" type="Quaternion" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Quaternion"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="Quaternion" /> + <argument index="0" name="right" type="float" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Quaternion"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="Quaternion" /> + <argument index="0" name="right" type="int" /> <description> </description> </method> <method name="operator +" qualifiers="operator"> - <return type="Quaternion"> - </return> - <argument index="0" name="right" type="Quaternion"> - </argument> + <return type="Quaternion" /> + <argument index="0" name="right" type="Quaternion" /> <description> </description> </method> <method name="operator -" qualifiers="operator"> - <return type="Quaternion"> - </return> - <argument index="0" name="right" type="Quaternion"> - </argument> + <return type="Quaternion" /> + <argument index="0" name="right" type="Quaternion" /> <description> </description> </method> <method name="operator /" qualifiers="operator"> - <return type="Quaternion"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="Quaternion" /> + <argument index="0" name="right" type="float" /> <description> </description> </method> <method name="operator /" qualifiers="operator"> - <return type="Quaternion"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="Quaternion" /> + <argument index="0" name="right" type="int" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Quaternion"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Quaternion" /> <description> </description> </method> <method name="operator []" qualifiers="operator"> - <return type="float"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="operator unary+" qualifiers="operator"> - <return type="Quaternion"> - </return> + <return type="Quaternion" /> <description> </description> </method> <method name="operator unary-" qualifiers="operator"> - <return type="Quaternion"> - </return> + <return type="Quaternion" /> <description> </description> </method> <method name="slerp" qualifiers="const"> - <return type="Quaternion"> - </return> - <argument index="0" name="to" type="Quaternion"> - </argument> - <argument index="1" name="weight" type="float"> - </argument> + <return type="Quaternion" /> + <argument index="0" name="to" type="Quaternion" /> + <argument index="1" name="weight" type="float" /> <description> Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code]. [b]Note:[/b] Both quaternions must be normalized. </description> </method> <method name="slerpni" qualifiers="const"> - <return type="Quaternion"> - </return> - <argument index="0" name="to" type="Quaternion"> - </argument> - <argument index="1" name="weight" type="float"> - </argument> + <return type="Quaternion" /> + <argument index="0" name="to" type="Quaternion" /> + <argument index="1" name="weight" type="float" /> <description> Returns the result of the spherical linear interpolation between this quaternion and [code]to[/code] by amount [code]weight[/code], but without checking if the rotation path is not bigger than 90 degrees. </description> diff --git a/doc/classes/RDPipelineColorBlendStateAttachment.xml b/doc/classes/RDPipelineColorBlendStateAttachment.xml index a6a1900cb5..30430d6670 100644 --- a/doc/classes/RDPipelineColorBlendStateAttachment.xml +++ b/doc/classes/RDPipelineColorBlendStateAttachment.xml @@ -8,8 +8,7 @@ </tutorials> <methods> <method name="set_as_mix"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> diff --git a/doc/classes/RDPipelineSpecializationConstant.xml b/doc/classes/RDPipelineSpecializationConstant.xml new file mode 100644 index 0000000000..4d9481b846 --- /dev/null +++ b/doc/classes/RDPipelineSpecializationConstant.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="RDPipelineSpecializationConstant" inherits="RefCounted" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="constant_id" type="int" setter="set_constant_id" getter="get_constant_id" default="0"> + </member> + <member name="value" type="Variant" setter="set_value" getter="get_value"> + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/RDShaderFile.xml b/doc/classes/RDShaderFile.xml index 346a97a1c0..22fcf9867c 100644 --- a/doc/classes/RDShaderFile.xml +++ b/doc/classes/RDShaderFile.xml @@ -7,27 +7,21 @@ <tutorials> </tutorials> <methods> - <method name="get_bytecode" qualifiers="const"> - <return type="RDShaderBytecode"> - </return> - <argument index="0" name="version" type="StringName" default="&"""> - </argument> + <method name="get_spirv" qualifiers="const"> + <return type="RDShaderSPIRV" /> + <argument index="0" name="version" type="StringName" default="&""" /> <description> </description> </method> <method name="get_version_list" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> </description> </method> <method name="set_bytecode"> - <return type="void"> - </return> - <argument index="0" name="bytecode" type="RDShaderBytecode"> - </argument> - <argument index="1" name="version" type="StringName" default="&"""> - </argument> + <return type="void" /> + <argument index="0" name="bytecode" type="RDShaderSPIRV" /> + <argument index="1" name="version" type="StringName" default="&""" /> <description> </description> </method> diff --git a/doc/classes/RDShaderBytecode.xml b/doc/classes/RDShaderSPIRV.xml index 20bf9bdd72..20de8230aa 100644 --- a/doc/classes/RDShaderBytecode.xml +++ b/doc/classes/RDShaderSPIRV.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="RDShaderBytecode" inherits="Resource" version="4.0"> +<class name="RDShaderSPIRV" inherits="Resource" version="4.0"> <brief_description> </brief_description> <description> @@ -8,38 +8,28 @@ </tutorials> <methods> <method name="get_stage_bytecode" qualifiers="const"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage"> - </argument> + <return type="PackedByteArray" /> + <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage" /> <description> </description> </method> <method name="get_stage_compile_error" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage"> - </argument> + <return type="String" /> + <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage" /> <description> </description> </method> <method name="set_stage_bytecode"> - <return type="void"> - </return> - <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage"> - </argument> - <argument index="1" name="bytecode" type="PackedByteArray"> - </argument> + <return type="void" /> + <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage" /> + <argument index="1" name="bytecode" type="PackedByteArray" /> <description> </description> </method> <method name="set_stage_compile_error"> - <return type="void"> - </return> - <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage"> - </argument> - <argument index="1" name="compile_error" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage" /> + <argument index="1" name="compile_error" type="String" /> <description> </description> </method> diff --git a/doc/classes/RDShaderSource.xml b/doc/classes/RDShaderSource.xml index 68fc43d8ef..2d37ce37f2 100644 --- a/doc/classes/RDShaderSource.xml +++ b/doc/classes/RDShaderSource.xml @@ -8,20 +8,15 @@ </tutorials> <methods> <method name="get_stage_source" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage"> - </argument> + <return type="String" /> + <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage" /> <description> </description> </method> <method name="set_stage_source"> - <return type="void"> - </return> - <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage"> - </argument> - <argument index="1" name="source" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="stage" type="int" enum="RenderingDevice.ShaderStage" /> + <argument index="1" name="source" type="String" /> <description> </description> </method> diff --git a/doc/classes/RDTextureFormat.xml b/doc/classes/RDTextureFormat.xml index ccfa6d1b95..2588dcfc40 100644 --- a/doc/classes/RDTextureFormat.xml +++ b/doc/classes/RDTextureFormat.xml @@ -8,18 +8,14 @@ </tutorials> <methods> <method name="add_shareable_format"> - <return type="void"> - </return> - <argument index="0" name="format" type="int" enum="RenderingDevice.DataFormat"> - </argument> + <return type="void" /> + <argument index="0" name="format" type="int" enum="RenderingDevice.DataFormat" /> <description> </description> </method> <method name="remove_shareable_format"> - <return type="void"> - </return> - <argument index="0" name="format" type="int" enum="RenderingDevice.DataFormat"> - </argument> + <return type="void" /> + <argument index="0" name="format" type="int" enum="RenderingDevice.DataFormat" /> <description> </description> </method> diff --git a/doc/classes/RDUniform.xml b/doc/classes/RDUniform.xml index 666935d663..93adecc7de 100644 --- a/doc/classes/RDUniform.xml +++ b/doc/classes/RDUniform.xml @@ -8,22 +8,18 @@ </tutorials> <methods> <method name="add_id"> - <return type="void"> - </return> - <argument index="0" name="id" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="RID" /> <description> </description> </method> <method name="clear_ids"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> <method name="get_ids" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> </description> </method> diff --git a/doc/classes/RID.xml b/doc/classes/RID.xml index e686a4b8fd..ddd30dbc82 100644 --- a/doc/classes/RID.xml +++ b/doc/classes/RID.xml @@ -10,73 +10,57 @@ </tutorials> <methods> <method name="RID" qualifiers="constructor"> - <return type="RID"> - </return> + <return type="RID" /> <description> Constructs an empty [RID] with the invalid ID [code]0[/code]. </description> </method> <method name="RID" qualifiers="constructor"> - <return type="RID"> - </return> - <argument index="0" name="from" type="RID"> - </argument> + <return type="RID" /> + <argument index="0" name="from" type="RID" /> <description> Constructs a [RID] as a copy of the given [RID]. </description> </method> <method name="get_id" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the ID of the referenced resource. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="RID" /> <description> </description> </method> <method name="operator <" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="RID" /> <description> </description> </method> <method name="operator <=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="RID" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="RID" /> <description> </description> </method> <method name="operator >" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="RID" /> <description> </description> </method> <method name="operator >=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="RID" /> <description> </description> </method> diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml index 9c84cdd03e..fed6568d22 100644 --- a/doc/classes/RandomNumberGenerator.xml +++ b/doc/classes/RandomNumberGenerator.xml @@ -4,7 +4,7 @@ A class for generating pseudo-random numbers. </brief_description> <description> - RandomNumberGenerator is a class for generating pseudo-random numbers. It currently uses [url=http://www.pcg-random.org/]PCG32[/url]. + RandomNumberGenerator is a class for generating pseudo-random numbers. It currently uses [url=https://www.pcg-random.org/]PCG32[/url]. [b]Note:[/b] The underlying algorithm is an implementation detail. As a result, it should not be depended upon for reproducible random streams across Godot versions. To generate a random float number (within a given range) based on a time-dependant seed: [codeblock] @@ -20,55 +20,43 @@ </tutorials> <methods> <method name="randf"> - <return type="float"> - </return> + <return type="float" /> <description> Returns a pseudo-random float between [code]0.0[/code] and [code]1.0[/code] (inclusive). </description> </method> <method name="randf_range"> - <return type="float"> - </return> - <argument index="0" name="from" type="float"> - </argument> - <argument index="1" name="to" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="from" type="float" /> + <argument index="1" name="to" type="float" /> <description> Returns a pseudo-random float between [code]from[/code] and [code]to[/code] (inclusive). </description> </method> <method name="randfn"> - <return type="float"> - </return> - <argument index="0" name="mean" type="float" default="0.0"> - </argument> - <argument index="1" name="deviation" type="float" default="1.0"> - </argument> + <return type="float" /> + <argument index="0" name="mean" type="float" default="0.0" /> + <argument index="1" name="deviation" type="float" default="1.0" /> <description> Returns a [url=https://en.wikipedia.org/wiki/Normal_distribution]normally-distributed[/url] pseudo-random number, using Box-Muller transform with the specified [code]mean[/code] and a standard [code]deviation[/code]. This is also called Gaussian distribution. </description> </method> <method name="randi"> - <return type="int"> - </return> + <return type="int" /> <description> Returns a pseudo-random 32-bit unsigned integer between [code]0[/code] and [code]4294967295[/code] (inclusive). </description> </method> <method name="randi_range"> - <return type="int"> - </return> - <argument index="0" name="from" type="int"> - </argument> - <argument index="1" name="to" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="from" type="int" /> + <argument index="1" name="to" type="int" /> <description> Returns a pseudo-random 32-bit signed integer between [code]from[/code] and [code]to[/code] (inclusive). </description> </method> <method name="randomize"> - <return type="void"> - </return> + <return type="void" /> <description> Setups a time-based seed to for this [RandomNumberGenerator] instance. Unlike the [@GlobalScope] random number generation functions, different [RandomNumberGenerator] instances can use different seeds. </description> diff --git a/doc/classes/Range.xml b/doc/classes/Range.xml index 8690f6d7e7..30b915b437 100644 --- a/doc/classes/Range.xml +++ b/doc/classes/Range.xml @@ -10,17 +10,14 @@ </tutorials> <methods> <method name="share"> - <return type="void"> - </return> - <argument index="0" name="with" type="Node"> - </argument> + <return type="void" /> + <argument index="0" name="with" type="Node" /> <description> Binds two ranges together along with any ranges previously grouped with either of them. When any of range's member variables change, it will share the new value with all other ranges in its group. </description> </method> <method name="unshare"> - <return type="void"> - </return> + <return type="void" /> <description> Stops range from sharing its member variables with any other. </description> @@ -65,8 +62,7 @@ </description> </signal> <signal name="value_changed"> - <argument index="0" name="value" type="float"> - </argument> + <argument index="0" name="value" type="float" /> <description> Emitted when [member value] changes. </description> diff --git a/doc/classes/RayCast2D.xml b/doc/classes/RayCast2D.xml index 14b67b46df..1d32db8078 100644 --- a/doc/classes/RayCast2D.xml +++ b/doc/classes/RayCast2D.xml @@ -15,110 +15,90 @@ </tutorials> <methods> <method name="add_exception"> - <return type="void"> - </return> - <argument index="0" name="node" type="Object"> - </argument> + <return type="void" /> + <argument index="0" name="node" type="Object" /> <description> Adds a collision exception so the ray does not report collisions with the specified node. </description> </method> <method name="add_exception_rid"> - <return type="void"> - </return> - <argument index="0" name="rid" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="rid" type="RID" /> <description> Adds a collision exception so the ray does not report collisions with the specified [RID]. </description> </method> <method name="clear_exceptions"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all collision exceptions for this ray. </description> </method> <method name="force_raycast_update"> - <return type="void"> - </return> + <return type="void" /> <description> Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state. [b]Note:[/b] [member enabled] does not need to be [code]true[/code] for this to work. </description> </method> <method name="get_collider" qualifiers="const"> - <return type="Object"> - </return> + <return type="Object" /> <description> Returns the first object that the ray intersects, or [code]null[/code] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]). </description> </method> <method name="get_collider_shape" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the shape ID of the first object that the ray intersects, or [code]0[/code] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]). </description> </method> - <method name="get_collision_mask_bit" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="bit" type="int"> - </argument> + <method name="get_collision_mask_value" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns an individual bit on the collision mask. + Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. </description> </method> <method name="get_collision_normal" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the normal of the intersecting object's shape at the collision point. </description> </method> <method name="get_collision_point" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the collision point at which the ray intersects the closest object. [b]Note:[/b] this point is in the [b]global[/b] coordinate system. </description> </method> <method name="is_colliding" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns whether any object is intersecting with the ray's vector (considering the vector length). </description> </method> <method name="remove_exception"> - <return type="void"> - </return> - <argument index="0" name="node" type="Object"> - </argument> + <return type="void" /> + <argument index="0" name="node" type="Object" /> <description> Removes a collision exception so the ray does report collisions with the specified node. </description> </method> <method name="remove_exception_rid"> - <return type="void"> - </return> - <argument index="0" name="rid" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="rid" type="RID" /> <description> Removes a collision exception so the ray does report collisions with the specified [RID]. </description> </method> - <method name="set_collision_mask_bit"> - <return type="void"> - </return> - <argument index="0" name="bit" type="int"> - </argument> - <argument index="1" name="value" type="bool"> - </argument> + <method name="set_collision_mask_value"> + <return type="void" /> + <argument index="0" name="layer_number" type="int" /> + <argument index="1" name="value" type="bool" /> <description> - Sets or clears individual bits on the collision mask. This makes selecting the areas scanned easier. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32. </description> </method> </methods> diff --git a/doc/classes/RayCast3D.xml b/doc/classes/RayCast3D.xml index 98c8c96403..8628ab7dac 100644 --- a/doc/classes/RayCast3D.xml +++ b/doc/classes/RayCast3D.xml @@ -16,33 +16,27 @@ </tutorials> <methods> <method name="add_exception"> - <return type="void"> - </return> - <argument index="0" name="node" type="Object"> - </argument> + <return type="void" /> + <argument index="0" name="node" type="Object" /> <description> Adds a collision exception so the ray does not report collisions with the specified node. </description> </method> <method name="add_exception_rid"> - <return type="void"> - </return> - <argument index="0" name="rid" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="rid" type="RID" /> <description> Adds a collision exception so the ray does not report collisions with the specified [RID]. </description> </method> <method name="clear_exceptions"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all collision exceptions for this ray. </description> </method> <method name="force_raycast_update"> - <return type="void"> - </return> + <return type="void" /> <description> Updates the collision information for the ray. Use this method to update the collision information immediately instead of waiting for the next [code]_physics_process[/code] call, for example if the ray or its parent has changed state. @@ -50,79 +44,63 @@ </description> </method> <method name="get_collider" qualifiers="const"> - <return type="Object"> - </return> + <return type="Object" /> <description> Returns the first object that the ray intersects, or [code]null[/code] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]). </description> </method> <method name="get_collider_shape" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the shape ID of the first object that the ray intersects, or [code]0[/code] if no object is intersecting the ray (i.e. [method is_colliding] returns [code]false[/code]). </description> </method> - <method name="get_collision_mask_bit" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="bit" type="int"> - </argument> + <method name="get_collision_mask_value" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns [code]true[/code] if the bit index passed is turned on. - [b]Note:[/b] Bit indices range from 0-19. + Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. </description> </method> <method name="get_collision_normal" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns the normal of the intersecting object's shape at the collision point. </description> </method> <method name="get_collision_point" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns the collision point at which the ray intersects the closest object. [b]Note:[/b] This point is in the [b]global[/b] coordinate system. </description> </method> <method name="is_colliding" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns whether any object is intersecting with the ray's vector (considering the vector length). </description> </method> <method name="remove_exception"> - <return type="void"> - </return> - <argument index="0" name="node" type="Object"> - </argument> + <return type="void" /> + <argument index="0" name="node" type="Object" /> <description> Removes a collision exception so the ray does report collisions with the specified node. </description> </method> <method name="remove_exception_rid"> - <return type="void"> - </return> - <argument index="0" name="rid" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="rid" type="RID" /> <description> Removes a collision exception so the ray does report collisions with the specified [RID]. </description> </method> - <method name="set_collision_mask_bit"> - <return type="void"> - </return> - <argument index="0" name="bit" type="int"> - </argument> - <argument index="1" name="value" type="bool"> - </argument> + <method name="set_collision_mask_value"> + <return type="void" /> + <argument index="0" name="layer_number" type="int" /> + <argument index="1" name="value" type="bool" /> <description> - Sets the bit index passed to the [code]value[/code] passed. - [b]Note:[/b] Bit indexes range from 0-19. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32. </description> </method> </methods> diff --git a/doc/classes/RayShape2D.xml b/doc/classes/RayShape2D.xml deleted file mode 100644 index 432c650074..0000000000 --- a/doc/classes/RayShape2D.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="RayShape2D" inherits="Shape2D" version="4.0"> - <brief_description> - Ray shape for 2D collisions. - </brief_description> - <description> - Ray shape for 2D collisions. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <members> - <member name="length" type="float" setter="set_length" getter="get_length" default="20.0"> - The ray's length. - </member> - <member name="slips_on_slope" type="bool" setter="set_slips_on_slope" getter="get_slips_on_slope" default="false"> - If [code]true[/code], allow the shape to return the correct normal. - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/RayShape3D.xml b/doc/classes/RayShape3D.xml deleted file mode 100644 index 9839044c30..0000000000 --- a/doc/classes/RayShape3D.xml +++ /dev/null @@ -1,23 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="RayShape3D" inherits="Shape3D" version="4.0"> - <brief_description> - Ray shape for 3D collisions. - </brief_description> - <description> - Ray shape for 3D collisions, which can be set into a [PhysicsBody3D] or [Area3D]. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <members> - <member name="length" type="float" setter="set_length" getter="get_length" default="1.0"> - The ray's length. - </member> - <member name="slips_on_slope" type="bool" setter="set_slips_on_slope" getter="get_slips_on_slope" default="false"> - If [code]true[/code], allow the shape to return the correct normal. - </member> - </members> - <constants> - </constants> -</class> diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml index 627c488b01..e6c8ff86b6 100644 --- a/doc/classes/Rect2.xml +++ b/doc/classes/Rect2.xml @@ -15,200 +15,153 @@ </tutorials> <methods> <method name="Rect2" qualifiers="constructor"> - <return type="Rect2"> - </return> + <return type="Rect2" /> <description> Constructs a default-initialized [Rect2] with default (zero) values of [member position] and [member size]. </description> </method> <method name="Rect2" qualifiers="constructor"> - <return type="Rect2"> - </return> - <argument index="0" name="from" type="Rect2"> - </argument> + <return type="Rect2" /> + <argument index="0" name="from" type="Rect2" /> <description> Constructs a [Rect2] as a copy of the given [Rect2]. </description> </method> <method name="Rect2" qualifiers="constructor"> - <return type="Rect2"> - </return> - <argument index="0" name="from" type="Rect2i"> - </argument> + <return type="Rect2" /> + <argument index="0" name="from" type="Rect2i" /> <description> Constructs a [Rect2] from a [Rect2i]. </description> </method> <method name="Rect2" qualifiers="constructor"> - <return type="Rect2"> - </return> - <argument index="0" name="position" type="Vector2"> - </argument> - <argument index="1" name="size" type="Vector2"> - </argument> + <return type="Rect2" /> + <argument index="0" name="position" type="Vector2" /> + <argument index="1" name="size" type="Vector2" /> <description> Constructs a [Rect2] by position and size. </description> </method> <method name="Rect2" qualifiers="constructor"> - <return type="Rect2"> - </return> - <argument index="0" name="x" type="float"> - </argument> - <argument index="1" name="y" type="float"> - </argument> - <argument index="2" name="width" type="float"> - </argument> - <argument index="3" name="height" type="float"> - </argument> + <return type="Rect2" /> + <argument index="0" name="x" type="float" /> + <argument index="1" name="y" type="float" /> + <argument index="2" name="width" type="float" /> + <argument index="3" name="height" type="float" /> <description> Constructs a [Rect2] by x, y, width, and height. </description> </method> <method name="abs" qualifiers="const"> - <return type="Rect2"> - </return> + <return type="Rect2" /> <description> Returns a [Rect2] with equivalent position and area, modified so that the top-left corner is the origin and [code]width[/code] and [code]height[/code] are positive. </description> </method> <method name="encloses" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="b" type="Rect2"> - </argument> + <return type="bool" /> + <argument index="0" name="b" type="Rect2" /> <description> Returns [code]true[/code] if this [Rect2] completely encloses another one. </description> </method> <method name="expand" qualifiers="const"> - <return type="Rect2"> - </return> - <argument index="0" name="to" type="Vector2"> - </argument> + <return type="Rect2" /> + <argument index="0" name="to" type="Vector2" /> <description> Returns this [Rect2] expanded to include a given point. </description> </method> <method name="get_area" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the area of the [Rect2]. </description> </method> <method name="grow" qualifiers="const"> - <return type="Rect2"> - </return> - <argument index="0" name="amount" type="float"> - </argument> + <return type="Rect2" /> + <argument index="0" name="amount" type="float" /> <description> Returns a copy of the [Rect2] grown by the specified [code]amount[/code] on all sides. </description> </method> <method name="grow_individual" qualifiers="const"> - <return type="Rect2"> - </return> - <argument index="0" name="left" type="float"> - </argument> - <argument index="1" name="top" type="float"> - </argument> - <argument index="2" name="right" type="float"> - </argument> - <argument index="3" name="bottom" type="float"> - </argument> + <return type="Rect2" /> + <argument index="0" name="left" type="float" /> + <argument index="1" name="top" type="float" /> + <argument index="2" name="right" type="float" /> + <argument index="3" name="bottom" type="float" /> <description> Returns a copy of the [Rect2] grown by the specified amount on each side individually. </description> </method> <method name="grow_side" qualifiers="const"> - <return type="Rect2"> - </return> - <argument index="0" name="side" type="int"> - </argument> - <argument index="1" name="amount" type="float"> - </argument> + <return type="Rect2" /> + <argument index="0" name="side" type="int" /> + <argument index="1" name="amount" type="float" /> <description> Returns a copy of the [Rect2] grown by the specified [code]amount[/code] on the specified [enum Side]. </description> </method> <method name="has_no_area" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the [Rect2] is flat or empty. </description> </method> <method name="has_point" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="point" type="Vector2"> - </argument> + <return type="bool" /> + <argument index="0" name="point" type="Vector2" /> <description> Returns [code]true[/code] if the [Rect2] contains a point. </description> </method> <method name="intersection" qualifiers="const"> - <return type="Rect2"> - </return> - <argument index="0" name="b" type="Rect2"> - </argument> + <return type="Rect2" /> + <argument index="0" name="b" type="Rect2" /> <description> Returns the intersection of this [Rect2] and [code]b[/code]. If the rectangles do not intersect, an empty [Rect2] is returned. </description> </method> <method name="intersects" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="b" type="Rect2"> - </argument> - <argument index="1" name="include_borders" type="bool" default="false"> - </argument> + <return type="bool" /> + <argument index="0" name="b" type="Rect2" /> + <argument index="1" name="include_borders" type="bool" default="false" /> <description> Returns [code]true[/code] if the [Rect2] overlaps with [code]b[/code] (i.e. they have at least one point in common). If [code]include_borders[/code] is [code]true[/code], they will also be considered overlapping if their borders touch, even without intersection. </description> </method> <method name="is_equal_approx" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="rect" type="Rect2"> - </argument> + <return type="bool" /> + <argument index="0" name="rect" type="Rect2" /> <description> Returns [code]true[/code] if this [Rect2] and [code]rect[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component. </description> </method> <method name="merge" qualifiers="const"> - <return type="Rect2"> - </return> - <argument index="0" name="b" type="Rect2"> - </argument> + <return type="Rect2" /> + <argument index="0" name="b" type="Rect2" /> <description> Returns a larger [Rect2] that contains this [Rect2] and [code]b[/code]. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Rect2"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Rect2" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Rect2"> - </return> - <argument index="0" name="right" type="Transform2D"> - </argument> + <return type="Rect2" /> + <argument index="0" name="right" type="Transform2D" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Rect2"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Rect2" /> <description> </description> </method> diff --git a/doc/classes/Rect2i.xml b/doc/classes/Rect2i.xml index 67d148084f..a75c31a007 100644 --- a/doc/classes/Rect2i.xml +++ b/doc/classes/Rect2i.xml @@ -13,181 +13,139 @@ </tutorials> <methods> <method name="Rect2i" qualifiers="constructor"> - <return type="Rect2i"> - </return> + <return type="Rect2i" /> <description> Constructs a default-initialized [Rect2i] with default (zero) values of [member position] and [member size]. </description> </method> <method name="Rect2i" qualifiers="constructor"> - <return type="Rect2i"> - </return> - <argument index="0" name="from" type="Rect2i"> - </argument> + <return type="Rect2i" /> + <argument index="0" name="from" type="Rect2i" /> <description> Constructs a [Rect2i] as a copy of the given [Rect2i]. </description> </method> <method name="Rect2i" qualifiers="constructor"> - <return type="Rect2i"> - </return> - <argument index="0" name="from" type="Rect2"> - </argument> + <return type="Rect2i" /> + <argument index="0" name="from" type="Rect2" /> <description> Constructs a new [Rect2i] from [Rect2]. The floating point coordinates will be truncated. </description> </method> <method name="Rect2i" qualifiers="constructor"> - <return type="Rect2i"> - </return> - <argument index="0" name="position" type="Vector2i"> - </argument> - <argument index="1" name="size" type="Vector2i"> - </argument> + <return type="Rect2i" /> + <argument index="0" name="position" type="Vector2i" /> + <argument index="1" name="size" type="Vector2i" /> <description> Constructs a [Rect2i] by position and size. </description> </method> <method name="Rect2i" qualifiers="constructor"> - <return type="Rect2i"> - </return> - <argument index="0" name="x" type="int"> - </argument> - <argument index="1" name="y" type="int"> - </argument> - <argument index="2" name="width" type="int"> - </argument> - <argument index="3" name="height" type="int"> - </argument> + <return type="Rect2i" /> + <argument index="0" name="x" type="int" /> + <argument index="1" name="y" type="int" /> + <argument index="2" name="width" type="int" /> + <argument index="3" name="height" type="int" /> <description> Constructs a [Rect2i] by x, y, width, and height. </description> </method> <method name="abs" qualifiers="const"> - <return type="Rect2i"> - </return> + <return type="Rect2i" /> <description> Returns a [Rect2i] with equivalent position and area, modified so that the top-left corner is the origin and [code]width[/code] and [code]height[/code] are positive. </description> </method> <method name="encloses" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="b" type="Rect2i"> - </argument> + <return type="bool" /> + <argument index="0" name="b" type="Rect2i" /> <description> Returns [code]true[/code] if this [Rect2i] completely encloses another one. </description> </method> <method name="expand" qualifiers="const"> - <return type="Rect2i"> - </return> - <argument index="0" name="to" type="Vector2i"> - </argument> + <return type="Rect2i" /> + <argument index="0" name="to" type="Vector2i" /> <description> Returns this [Rect2i] expanded to include a given point. </description> </method> <method name="get_area" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the area of the [Rect2i]. </description> </method> <method name="grow" qualifiers="const"> - <return type="Rect2i"> - </return> - <argument index="0" name="amount" type="int"> - </argument> + <return type="Rect2i" /> + <argument index="0" name="amount" type="int" /> <description> Returns a copy of the [Rect2i] grown by the specified [code]amount[/code] on all sides. </description> </method> <method name="grow_individual" qualifiers="const"> - <return type="Rect2i"> - </return> - <argument index="0" name="left" type="int"> - </argument> - <argument index="1" name="top" type="int"> - </argument> - <argument index="2" name="right" type="int"> - </argument> - <argument index="3" name="bottom" type="int"> - </argument> + <return type="Rect2i" /> + <argument index="0" name="left" type="int" /> + <argument index="1" name="top" type="int" /> + <argument index="2" name="right" type="int" /> + <argument index="3" name="bottom" type="int" /> <description> Returns a copy of the [Rect2i] grown by the specified amount on each side individually. </description> </method> <method name="grow_side" qualifiers="const"> - <return type="Rect2i"> - </return> - <argument index="0" name="side" type="int"> - </argument> - <argument index="1" name="amount" type="int"> - </argument> + <return type="Rect2i" /> + <argument index="0" name="side" type="int" /> + <argument index="1" name="amount" type="int" /> <description> Returns a copy of the [Rect2i] grown by the specified [code]amount[/code] on the specified [enum Side]. </description> </method> <method name="has_no_area" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the [Rect2i] is flat or empty. </description> </method> <method name="has_point" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="point" type="Vector2i"> - </argument> + <return type="bool" /> + <argument index="0" name="point" type="Vector2i" /> <description> Returns [code]true[/code] if the [Rect2i] contains a point. </description> </method> <method name="intersection" qualifiers="const"> - <return type="Rect2i"> - </return> - <argument index="0" name="b" type="Rect2i"> - </argument> + <return type="Rect2i" /> + <argument index="0" name="b" type="Rect2i" /> <description> Returns the intersection of this [Rect2i] and [code]b[/code]. If the rectangles do not intersect, an empty [Rect2i] is returned. </description> </method> <method name="intersects" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="b" type="Rect2i"> - </argument> + <return type="bool" /> + <argument index="0" name="b" type="Rect2i" /> <description> Returns [code]true[/code] if the [Rect2i] overlaps with [code]b[/code] (i.e. they have at least one point in common). If [code]include_borders[/code] is [code]true[/code], they will also be considered overlapping if their borders touch, even without intersection. </description> </method> <method name="merge" qualifiers="const"> - <return type="Rect2i"> - </return> - <argument index="0" name="b" type="Rect2i"> - </argument> + <return type="Rect2i" /> + <argument index="0" name="b" type="Rect2i" /> <description> Returns a larger [Rect2i] that contains this [Rect2i] and [code]b[/code]. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Rect2i"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Rect2i" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Rect2i"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Rect2i" /> <description> </description> </method> diff --git a/doc/classes/RefCounted.xml b/doc/classes/RefCounted.xml index cf96514203..bf52c34777 100644 --- a/doc/classes/RefCounted.xml +++ b/doc/classes/RefCounted.xml @@ -14,24 +14,21 @@ </tutorials> <methods> <method name="init_ref"> - <return type="bool"> - </return> + <return type="bool" /> <description> Initializes the internal reference counter. Use this only if you really know what you are doing. Returns whether the initialization was successful. </description> </method> <method name="reference"> - <return type="bool"> - </return> + <return type="bool" /> <description> Increments the internal reference counter. Use this only if you really know what you are doing. Returns [code]true[/code] if the increment was successful, [code]false[/code] otherwise. </description> </method> <method name="unreference"> - <return type="bool"> - </return> + <return type="bool" /> <description> Decrements the internal reference counter. Use this only if you really know what you are doing. Returns [code]true[/code] if the decrement was successful, [code]false[/code] otherwise. diff --git a/doc/classes/RemoteTransform2D.xml b/doc/classes/RemoteTransform2D.xml index 84ec673920..613726b555 100644 --- a/doc/classes/RemoteTransform2D.xml +++ b/doc/classes/RemoteTransform2D.xml @@ -11,8 +11,7 @@ </tutorials> <methods> <method name="force_update_cache"> - <return type="void"> - </return> + <return type="void" /> <description> [RemoteTransform2D] caches the remote node. It may not notice if the remote node disappears; [method force_update_cache] forces it to update the cache again. </description> diff --git a/doc/classes/RemoteTransform3D.xml b/doc/classes/RemoteTransform3D.xml index 453177496f..cc19d5c25d 100644 --- a/doc/classes/RemoteTransform3D.xml +++ b/doc/classes/RemoteTransform3D.xml @@ -11,8 +11,7 @@ </tutorials> <methods> <method name="force_update_cache"> - <return type="void"> - </return> + <return type="void" /> <description> [RemoteTransform3D] caches the remote node. It may not notice if the remote node disappears; [method force_update_cache] forces it to update the cache again. </description> diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml index f2b22af8c6..24f7f4274e 100644 --- a/doc/classes/RenderingDevice.xml +++ b/doc/classes/RenderingDevice.xml @@ -8,884 +8,629 @@ </tutorials> <methods> <method name="barrier"> - <return type="void"> - </return> - <argument index="0" name="from" type="int" default="7"> - </argument> - <argument index="1" name="to" type="int" default="7"> - </argument> + <return type="void" /> + <argument index="0" name="from" type="int" default="7" /> + <argument index="1" name="to" type="int" default="7" /> <description> </description> </method> <method name="buffer_clear"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="buffer" type="RID"> - </argument> - <argument index="1" name="offset" type="int"> - </argument> - <argument index="2" name="size_bytes" type="int"> - </argument> - <argument index="3" name="post_barrier" type="int" default="7"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="buffer" type="RID" /> + <argument index="1" name="offset" type="int" /> + <argument index="2" name="size_bytes" type="int" /> + <argument index="3" name="post_barrier" type="int" default="7" /> <description> </description> </method> <method name="buffer_get_data"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="buffer" type="RID"> - </argument> + <return type="PackedByteArray" /> + <argument index="0" name="buffer" type="RID" /> <description> </description> </method> <method name="buffer_update"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="buffer" type="RID"> - </argument> - <argument index="1" name="offset" type="int"> - </argument> - <argument index="2" name="size_bytes" type="int"> - </argument> - <argument index="3" name="data" type="PackedByteArray"> - </argument> - <argument index="4" name="post_barrier" type="int" default="7"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="buffer" type="RID" /> + <argument index="1" name="offset" type="int" /> + <argument index="2" name="size_bytes" type="int" /> + <argument index="3" name="data" type="PackedByteArray" /> + <argument index="4" name="post_barrier" type="int" default="7" /> <description> </description> </method> <method name="capture_timestamp"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> <description> </description> </method> <method name="compute_list_add_barrier"> - <return type="void"> - </return> - <argument index="0" name="compute_list" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="compute_list" type="int" /> <description> </description> </method> <method name="compute_list_begin"> - <return type="int"> - </return> - <argument index="0" name="allow_draw_overlap" type="bool" default="false"> - </argument> + <return type="int" /> + <argument index="0" name="allow_draw_overlap" type="bool" default="false" /> <description> </description> </method> <method name="compute_list_bind_compute_pipeline"> - <return type="void"> - </return> - <argument index="0" name="compute_list" type="int"> - </argument> - <argument index="1" name="compute_pipeline" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="compute_list" type="int" /> + <argument index="1" name="compute_pipeline" type="RID" /> <description> </description> </method> <method name="compute_list_bind_uniform_set"> - <return type="void"> - </return> - <argument index="0" name="compute_list" type="int"> - </argument> - <argument index="1" name="uniform_set" type="RID"> - </argument> - <argument index="2" name="set_index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="compute_list" type="int" /> + <argument index="1" name="uniform_set" type="RID" /> + <argument index="2" name="set_index" type="int" /> <description> </description> </method> <method name="compute_list_dispatch"> - <return type="void"> - </return> - <argument index="0" name="compute_list" type="int"> - </argument> - <argument index="1" name="x_groups" type="int"> - </argument> - <argument index="2" name="y_groups" type="int"> - </argument> - <argument index="3" name="z_groups" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="compute_list" type="int" /> + <argument index="1" name="x_groups" type="int" /> + <argument index="2" name="y_groups" type="int" /> + <argument index="3" name="z_groups" type="int" /> <description> </description> </method> <method name="compute_list_end"> - <return type="void"> - </return> - <argument index="0" name="post_barrier" type="int" default="7"> - </argument> + <return type="void" /> + <argument index="0" name="post_barrier" type="int" default="7" /> <description> </description> </method> <method name="compute_list_set_push_constant"> - <return type="void"> - </return> - <argument index="0" name="compute_list" type="int"> - </argument> - <argument index="1" name="buffer" type="PackedByteArray"> - </argument> - <argument index="2" name="size_bytes" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="compute_list" type="int" /> + <argument index="1" name="buffer" type="PackedByteArray" /> + <argument index="2" name="size_bytes" type="int" /> <description> </description> </method> <method name="compute_pipeline_create"> - <return type="RID"> - </return> - <argument index="0" name="shader" type="RID"> - </argument> + <return type="RID" /> + <argument index="0" name="shader" type="RID" /> + <argument index="1" name="specialization_constants" type="RDPipelineSpecializationConstant[]" default="[]" /> <description> </description> </method> <method name="compute_pipeline_is_valid"> - <return type="bool"> - </return> - <argument index="0" name="compute_pieline" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="compute_pieline" type="RID" /> <description> </description> </method> <method name="create_local_device"> - <return type="RenderingDevice"> - </return> + <return type="RenderingDevice" /> <description> </description> </method> <method name="draw_command_begin_label"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> + <argument index="1" name="color" type="Color" /> <description> </description> </method> <method name="draw_command_end_label"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> <method name="draw_command_insert_label"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> + <argument index="1" name="color" type="Color" /> <description> </description> </method> <method name="draw_list_begin"> - <return type="int"> - </return> - <argument index="0" name="framebuffer" type="RID"> - </argument> - <argument index="1" name="initial_color_action" type="int" enum="RenderingDevice.InitialAction"> - </argument> - <argument index="2" name="final_color_action" type="int" enum="RenderingDevice.FinalAction"> - </argument> - <argument index="3" name="initial_depth_action" type="int" enum="RenderingDevice.InitialAction"> - </argument> - <argument index="4" name="final_depth_action" type="int" enum="RenderingDevice.FinalAction"> - </argument> - <argument index="5" name="clear_color_values" type="PackedColorArray" default="PackedColorArray()"> - </argument> - <argument index="6" name="clear_depth" type="float" default="1.0"> - </argument> - <argument index="7" name="clear_stencil" type="int" default="0"> - </argument> - <argument index="8" name="region" type="Rect2" default="Rect2i(0, 0, 0, 0)"> - </argument> - <argument index="9" name="storage_textures" type="Array" default="[]"> - </argument> + <return type="int" /> + <argument index="0" name="framebuffer" type="RID" /> + <argument index="1" name="initial_color_action" type="int" enum="RenderingDevice.InitialAction" /> + <argument index="2" name="final_color_action" type="int" enum="RenderingDevice.FinalAction" /> + <argument index="3" name="initial_depth_action" type="int" enum="RenderingDevice.InitialAction" /> + <argument index="4" name="final_depth_action" type="int" enum="RenderingDevice.FinalAction" /> + <argument index="5" name="clear_color_values" type="PackedColorArray" default="PackedColorArray()" /> + <argument index="6" name="clear_depth" type="float" default="1.0" /> + <argument index="7" name="clear_stencil" type="int" default="0" /> + <argument index="8" name="region" type="Rect2" default="Rect2(0, 0, 0, 0)" /> + <argument index="9" name="storage_textures" type="Array" default="[]" /> <description> </description> </method> <method name="draw_list_begin_for_screen"> - <return type="int"> - </return> - <argument index="0" name="screen" type="int" default="0"> - </argument> - <argument index="1" name="clear_color" type="Color" default="Color(0, 0, 0, 1)"> - </argument> + <return type="int" /> + <argument index="0" name="screen" type="int" default="0" /> + <argument index="1" name="clear_color" type="Color" default="Color(0, 0, 0, 1)" /> <description> </description> </method> <method name="draw_list_begin_split"> - <return type="PackedInt64Array"> - </return> - <argument index="0" name="framebuffer" type="RID"> - </argument> - <argument index="1" name="splits" type="int"> - </argument> - <argument index="2" name="initial_color_action" type="int" enum="RenderingDevice.InitialAction"> - </argument> - <argument index="3" name="final_color_action" type="int" enum="RenderingDevice.FinalAction"> - </argument> - <argument index="4" name="initial_depth_action" type="int" enum="RenderingDevice.InitialAction"> - </argument> - <argument index="5" name="final_depth_action" type="int" enum="RenderingDevice.FinalAction"> - </argument> - <argument index="6" name="clear_color_values" type="PackedColorArray" default="PackedColorArray()"> - </argument> - <argument index="7" name="clear_depth" type="float" default="1.0"> - </argument> - <argument index="8" name="clear_stencil" type="int" default="0"> - </argument> - <argument index="9" name="region" type="Rect2" default="Rect2i(0, 0, 0, 0)"> - </argument> - <argument index="10" name="storage_textures" type="RID[]" default="[]"> - </argument> + <return type="PackedInt64Array" /> + <argument index="0" name="framebuffer" type="RID" /> + <argument index="1" name="splits" type="int" /> + <argument index="2" name="initial_color_action" type="int" enum="RenderingDevice.InitialAction" /> + <argument index="3" name="final_color_action" type="int" enum="RenderingDevice.FinalAction" /> + <argument index="4" name="initial_depth_action" type="int" enum="RenderingDevice.InitialAction" /> + <argument index="5" name="final_depth_action" type="int" enum="RenderingDevice.FinalAction" /> + <argument index="6" name="clear_color_values" type="PackedColorArray" default="PackedColorArray()" /> + <argument index="7" name="clear_depth" type="float" default="1.0" /> + <argument index="8" name="clear_stencil" type="int" default="0" /> + <argument index="9" name="region" type="Rect2" default="Rect2(0, 0, 0, 0)" /> + <argument index="10" name="storage_textures" type="RID[]" default="[]" /> <description> </description> </method> <method name="draw_list_bind_index_array"> - <return type="void"> - </return> - <argument index="0" name="draw_list" type="int"> - </argument> - <argument index="1" name="index_array" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="draw_list" type="int" /> + <argument index="1" name="index_array" type="RID" /> <description> </description> </method> <method name="draw_list_bind_render_pipeline"> - <return type="void"> - </return> - <argument index="0" name="draw_list" type="int"> - </argument> - <argument index="1" name="render_pipeline" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="draw_list" type="int" /> + <argument index="1" name="render_pipeline" type="RID" /> <description> </description> </method> <method name="draw_list_bind_uniform_set"> - <return type="void"> - </return> - <argument index="0" name="draw_list" type="int"> - </argument> - <argument index="1" name="uniform_set" type="RID"> - </argument> - <argument index="2" name="set_index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="draw_list" type="int" /> + <argument index="1" name="uniform_set" type="RID" /> + <argument index="2" name="set_index" type="int" /> <description> </description> </method> <method name="draw_list_bind_vertex_array"> - <return type="void"> - </return> - <argument index="0" name="draw_list" type="int"> - </argument> - <argument index="1" name="vertex_array" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="draw_list" type="int" /> + <argument index="1" name="vertex_array" type="RID" /> <description> </description> </method> <method name="draw_list_disable_scissor"> - <return type="void"> - </return> - <argument index="0" name="draw_list" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="draw_list" type="int" /> <description> </description> </method> <method name="draw_list_draw"> - <return type="void"> - </return> - <argument index="0" name="draw_list" type="int"> - </argument> - <argument index="1" name="use_indices" type="bool"> - </argument> - <argument index="2" name="instances" type="int"> - </argument> - <argument index="3" name="procedural_vertex_count" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="draw_list" type="int" /> + <argument index="1" name="use_indices" type="bool" /> + <argument index="2" name="instances" type="int" /> + <argument index="3" name="procedural_vertex_count" type="int" default="0" /> <description> </description> </method> <method name="draw_list_enable_scissor"> - <return type="void"> - </return> - <argument index="0" name="draw_list" type="int"> - </argument> - <argument index="1" name="rect" type="Rect2" default="Rect2i(0, 0, 0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="draw_list" type="int" /> + <argument index="1" name="rect" type="Rect2" default="Rect2(0, 0, 0, 0)" /> <description> </description> </method> <method name="draw_list_end"> - <return type="void"> - </return> - <argument index="0" name="post_barrier" type="int" default="7"> - </argument> + <return type="void" /> + <argument index="0" name="post_barrier" type="int" default="7" /> <description> </description> </method> <method name="draw_list_set_push_constant"> - <return type="void"> - </return> - <argument index="0" name="draw_list" type="int"> - </argument> - <argument index="1" name="buffer" type="PackedByteArray"> - </argument> - <argument index="2" name="size_bytes" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="draw_list" type="int" /> + <argument index="1" name="buffer" type="PackedByteArray" /> + <argument index="2" name="size_bytes" type="int" /> <description> </description> </method> <method name="draw_list_switch_to_next_pass"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> <method name="draw_list_switch_to_next_pass_split"> - <return type="PackedInt64Array"> - </return> - <argument index="0" name="splits" type="int"> - </argument> + <return type="PackedInt64Array" /> + <argument index="0" name="splits" type="int" /> <description> </description> </method> <method name="framebuffer_create"> - <return type="RID"> - </return> - <argument index="0" name="textures" type="RID[]"> - </argument> - <argument index="1" name="validate_with_format" type="int" default="-1"> - </argument> - <argument index="2" name="view_count" type="int" default="1"> - </argument> + <return type="RID" /> + <argument index="0" name="textures" type="RID[]" /> + <argument index="1" name="validate_with_format" type="int" default="-1" /> + <argument index="2" name="view_count" type="int" default="1" /> <description> </description> </method> <method name="framebuffer_create_empty"> - <return type="RID"> - </return> - <argument index="0" name="size" type="Vector2i"> - </argument> - <argument index="1" name="samples" type="int" enum="RenderingDevice.TextureSamples" default="0"> - </argument> - <argument index="2" name="validate_with_format" type="int" default="-1"> - </argument> + <return type="RID" /> + <argument index="0" name="size" type="Vector2i" /> + <argument index="1" name="samples" type="int" enum="RenderingDevice.TextureSamples" default="0" /> + <argument index="2" name="validate_with_format" type="int" default="-1" /> <description> </description> </method> <method name="framebuffer_create_multipass"> - <return type="RID"> - </return> - <argument index="0" name="textures" type="RID[]"> - </argument> - <argument index="1" name="passes" type="RDFramebufferPass[]"> - </argument> - <argument index="2" name="validate_with_format" type="int" default="-1"> - </argument> - <argument index="3" name="view_count" type="int" default="1"> - </argument> + <return type="RID" /> + <argument index="0" name="textures" type="RID[]" /> + <argument index="1" name="passes" type="RDFramebufferPass[]" /> + <argument index="2" name="validate_with_format" type="int" default="-1" /> + <argument index="3" name="view_count" type="int" default="1" /> <description> </description> </method> <method name="framebuffer_format_create"> - <return type="int"> - </return> - <argument index="0" name="attachments" type="RDAttachmentFormat[]"> - </argument> - <argument index="1" name="view_count" type="int" default="1"> - </argument> + <return type="int" /> + <argument index="0" name="attachments" type="RDAttachmentFormat[]" /> + <argument index="1" name="view_count" type="int" default="1" /> <description> </description> </method> <method name="framebuffer_format_create_empty"> - <return type="int"> - </return> - <argument index="0" name="samples" type="int" enum="RenderingDevice.TextureSamples" default="0"> - </argument> + <return type="int" /> + <argument index="0" name="samples" type="int" enum="RenderingDevice.TextureSamples" default="0" /> <description> </description> </method> <method name="framebuffer_format_create_multipass"> - <return type="int"> - </return> - <argument index="0" name="attachments" type="RDAttachmentFormat[]"> - </argument> - <argument index="1" name="passes" type="RDFramebufferPass[]"> - </argument> - <argument index="2" name="view_count" type="int" default="1"> - </argument> + <return type="int" /> + <argument index="0" name="attachments" type="RDAttachmentFormat[]" /> + <argument index="1" name="passes" type="RDFramebufferPass[]" /> + <argument index="2" name="view_count" type="int" default="1" /> <description> </description> </method> <method name="framebuffer_format_get_texture_samples"> - <return type="int" enum="RenderingDevice.TextureSamples"> - </return> - <argument index="0" name="format" type="int"> - </argument> - <argument index="1" name="render_pass" type="int" default="0"> - </argument> + <return type="int" enum="RenderingDevice.TextureSamples" /> + <argument index="0" name="format" type="int" /> + <argument index="1" name="render_pass" type="int" default="0" /> <description> </description> </method> <method name="framebuffer_get_format"> - <return type="int"> - </return> - <argument index="0" name="framebuffer" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="framebuffer" type="RID" /> <description> </description> </method> <method name="free"> - <return type="void"> - </return> - <argument index="0" name="rid" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="rid" type="RID" /> <description> </description> </method> <method name="full_barrier"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> <method name="get_captured_timestamp_cpu_time" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="get_captured_timestamp_gpu_time" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="get_captured_timestamp_name" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="get_captured_timestamps_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> <method name="get_captured_timestamps_frame" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> <method name="get_device_name" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> </description> </method> <method name="get_device_pipeline_cache_uuid" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> </description> </method> <method name="get_device_vendor_name" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> </description> </method> <method name="get_frame_delay" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> <method name="get_memory_usage" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="arg0" type="int" enum="RenderingDevice.MemoryType"> - </argument> + <return type="int" /> + <argument index="0" name="arg0" type="int" enum="RenderingDevice.MemoryType" /> <description> </description> </method> <method name="index_array_create"> - <return type="RID"> - </return> - <argument index="0" name="index_buffer" type="RID"> - </argument> - <argument index="1" name="index_offset" type="int"> - </argument> - <argument index="2" name="index_count" type="int"> - </argument> + <return type="RID" /> + <argument index="0" name="index_buffer" type="RID" /> + <argument index="1" name="index_offset" type="int" /> + <argument index="2" name="index_count" type="int" /> <description> </description> </method> <method name="index_buffer_create"> - <return type="RID"> - </return> - <argument index="0" name="size_indices" type="int"> - </argument> - <argument index="1" name="format" type="int" enum="RenderingDevice.IndexBufferFormat"> - </argument> - <argument index="2" name="data" type="PackedByteArray" default="PackedByteArray()"> - </argument> - <argument index="3" name="use_restart_indices" type="bool" default="false"> - </argument> + <return type="RID" /> + <argument index="0" name="size_indices" type="int" /> + <argument index="1" name="format" type="int" enum="RenderingDevice.IndexBufferFormat" /> + <argument index="2" name="data" type="PackedByteArray" default="PackedByteArray()" /> + <argument index="3" name="use_restart_indices" type="bool" default="false" /> <description> </description> </method> <method name="limit_get"> - <return type="int"> - </return> - <argument index="0" name="limit" type="int" enum="RenderingDevice.Limit"> - </argument> + <return type="int" /> + <argument index="0" name="limit" type="int" enum="RenderingDevice.Limit" /> <description> </description> </method> <method name="render_pipeline_create"> - <return type="RID"> - </return> - <argument index="0" name="shader" type="RID"> - </argument> - <argument index="1" name="framebuffer_format" type="int"> - </argument> - <argument index="2" name="vertex_format" type="int"> - </argument> - <argument index="3" name="primitive" type="int" enum="RenderingDevice.RenderPrimitive"> - </argument> - <argument index="4" name="rasterization_state" type="RDPipelineRasterizationState"> - </argument> - <argument index="5" name="multisample_state" type="RDPipelineMultisampleState"> - </argument> - <argument index="6" name="stencil_state" type="RDPipelineDepthStencilState"> - </argument> - <argument index="7" name="color_blend_state" type="RDPipelineColorBlendState"> - </argument> - <argument index="8" name="dynamic_state_flags" type="int" default="0"> - </argument> - <argument index="9" name="for_render_pass" type="int" default="0"> - </argument> + <return type="RID" /> + <argument index="0" name="shader" type="RID" /> + <argument index="1" name="framebuffer_format" type="int" /> + <argument index="2" name="vertex_format" type="int" /> + <argument index="3" name="primitive" type="int" enum="RenderingDevice.RenderPrimitive" /> + <argument index="4" name="rasterization_state" type="RDPipelineRasterizationState" /> + <argument index="5" name="multisample_state" type="RDPipelineMultisampleState" /> + <argument index="6" name="stencil_state" type="RDPipelineDepthStencilState" /> + <argument index="7" name="color_blend_state" type="RDPipelineColorBlendState" /> + <argument index="8" name="dynamic_state_flags" type="int" default="0" /> + <argument index="9" name="for_render_pass" type="int" default="0" /> + <argument index="10" name="specialization_constants" type="RDPipelineSpecializationConstant[]" default="[]" /> <description> </description> </method> <method name="render_pipeline_is_valid"> - <return type="bool"> - </return> - <argument index="0" name="render_pipeline" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="render_pipeline" type="RID" /> <description> </description> </method> <method name="sampler_create"> - <return type="RID"> - </return> - <argument index="0" name="state" type="RDSamplerState"> - </argument> + <return type="RID" /> + <argument index="0" name="state" type="RDSamplerState" /> <description> </description> </method> <method name="screen_get_framebuffer_format" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> <method name="screen_get_height" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="screen" type="int" default="0"> - </argument> + <return type="int" /> + <argument index="0" name="screen" type="int" default="0" /> <description> </description> </method> <method name="screen_get_width" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="screen" type="int" default="0"> - </argument> + <return type="int" /> + <argument index="0" name="screen" type="int" default="0" /> <description> </description> </method> <method name="set_resource_name"> - <return type="void"> - </return> - <argument index="0" name="id" type="RID"> - </argument> - <argument index="1" name="name" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="RID" /> + <argument index="1" name="name" type="String" /> <description> </description> </method> - <method name="shader_compile_from_source"> - <return type="RDShaderBytecode"> - </return> - <argument index="0" name="shader_source" type="RDShaderSource"> - </argument> - <argument index="1" name="allow_cache" type="bool" default="true"> - </argument> + <method name="shader_compile_binary_from_spirv"> + <return type="PackedByteArray" /> + <argument index="0" name="spirv_data" type="RDShaderSPIRV" /> + <argument index="1" name="name" type="String" default="""" /> <description> </description> </method> - <method name="shader_create"> - <return type="RID"> - </return> - <argument index="0" name="shader_data" type="RDShaderBytecode"> - </argument> + <method name="shader_compile_spirv_from_source"> + <return type="RDShaderSPIRV" /> + <argument index="0" name="shader_source" type="RDShaderSource" /> + <argument index="1" name="allow_cache" type="bool" default="true" /> + <description> + </description> + </method> + <method name="shader_create_from_bytecode"> + <return type="RID" /> + <argument index="0" name="binary_data" type="PackedByteArray" /> + <description> + </description> + </method> + <method name="shader_create_from_spirv"> + <return type="RID" /> + <argument index="0" name="spirv_data" type="RDShaderSPIRV" /> + <argument index="1" name="name" type="String" default="""" /> <description> </description> </method> <method name="shader_get_vertex_input_attribute_mask"> - <return type="int"> - </return> - <argument index="0" name="shader" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="shader" type="RID" /> <description> </description> </method> <method name="storage_buffer_create"> - <return type="RID"> - </return> - <argument index="0" name="size_bytes" type="int"> - </argument> - <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray()"> - </argument> - <argument index="2" name="usage" type="int" default="0"> - </argument> + <return type="RID" /> + <argument index="0" name="size_bytes" type="int" /> + <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray()" /> + <argument index="2" name="usage" type="int" default="0" /> <description> </description> </method> <method name="submit"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> <method name="sync"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> <method name="texture_buffer_create"> - <return type="RID"> - </return> - <argument index="0" name="size_bytes" type="int"> - </argument> - <argument index="1" name="format" type="int" enum="RenderingDevice.DataFormat"> - </argument> - <argument index="2" name="data" type="PackedByteArray" default="PackedByteArray()"> - </argument> + <return type="RID" /> + <argument index="0" name="size_bytes" type="int" /> + <argument index="1" name="format" type="int" enum="RenderingDevice.DataFormat" /> + <argument index="2" name="data" type="PackedByteArray" default="PackedByteArray()" /> <description> </description> </method> <method name="texture_clear"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> - <argument index="2" name="base_mipmap" type="int"> - </argument> - <argument index="3" name="mipmap_count" type="int"> - </argument> - <argument index="4" name="base_layer" type="int"> - </argument> - <argument index="5" name="layer_count" type="int"> - </argument> - <argument index="6" name="post_barrier" type="int" default="7"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="texture" type="RID" /> + <argument index="1" name="color" type="Color" /> + <argument index="2" name="base_mipmap" type="int" /> + <argument index="3" name="mipmap_count" type="int" /> + <argument index="4" name="base_layer" type="int" /> + <argument index="5" name="layer_count" type="int" /> + <argument index="6" name="post_barrier" type="int" default="7" /> <description> </description> </method> <method name="texture_copy"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="from_texture" type="RID"> - </argument> - <argument index="1" name="to_texture" type="RID"> - </argument> - <argument index="2" name="from_pos" type="Vector3"> - </argument> - <argument index="3" name="to_pos" type="Vector3"> - </argument> - <argument index="4" name="size" type="Vector3"> - </argument> - <argument index="5" name="src_mipmap" type="int"> - </argument> - <argument index="6" name="dst_mipmap" type="int"> - </argument> - <argument index="7" name="src_layer" type="int"> - </argument> - <argument index="8" name="dst_layer" type="int"> - </argument> - <argument index="9" name="post_barrier" type="int" default="7"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="from_texture" type="RID" /> + <argument index="1" name="to_texture" type="RID" /> + <argument index="2" name="from_pos" type="Vector3" /> + <argument index="3" name="to_pos" type="Vector3" /> + <argument index="4" name="size" type="Vector3" /> + <argument index="5" name="src_mipmap" type="int" /> + <argument index="6" name="dst_mipmap" type="int" /> + <argument index="7" name="src_layer" type="int" /> + <argument index="8" name="dst_layer" type="int" /> + <argument index="9" name="post_barrier" type="int" default="7" /> <description> </description> </method> <method name="texture_create"> - <return type="RID"> - </return> - <argument index="0" name="format" type="RDTextureFormat"> - </argument> - <argument index="1" name="view" type="RDTextureView"> - </argument> - <argument index="2" name="data" type="PackedByteArray[]" default="[]"> - </argument> + <return type="RID" /> + <argument index="0" name="format" type="RDTextureFormat" /> + <argument index="1" name="view" type="RDTextureView" /> + <argument index="2" name="data" type="PackedByteArray[]" default="[]" /> <description> </description> </method> <method name="texture_create_shared"> - <return type="RID"> - </return> - <argument index="0" name="view" type="RDTextureView"> - </argument> - <argument index="1" name="with_texture" type="RID"> - </argument> + <return type="RID" /> + <argument index="0" name="view" type="RDTextureView" /> + <argument index="1" name="with_texture" type="RID" /> <description> </description> </method> <method name="texture_create_shared_from_slice"> - <return type="RID"> - </return> - <argument index="0" name="view" type="RDTextureView"> - </argument> - <argument index="1" name="with_texture" type="RID"> - </argument> - <argument index="2" name="layer" type="int"> - </argument> - <argument index="3" name="mipmap" type="int"> - </argument> - <argument index="4" name="slice_type" type="int" enum="RenderingDevice.TextureSliceType" default="0"> - </argument> + <return type="RID" /> + <argument index="0" name="view" type="RDTextureView" /> + <argument index="1" name="with_texture" type="RID" /> + <argument index="2" name="layer" type="int" /> + <argument index="3" name="mipmap" type="int" /> + <argument index="4" name="slice_type" type="int" enum="RenderingDevice.TextureSliceType" default="0" /> <description> </description> </method> <method name="texture_get_data"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <argument index="1" name="layer" type="int"> - </argument> + <return type="PackedByteArray" /> + <argument index="0" name="texture" type="RID" /> + <argument index="1" name="layer" type="int" /> <description> </description> </method> <method name="texture_is_format_supported_for_usage" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="format" type="int" enum="RenderingDevice.DataFormat"> - </argument> - <argument index="1" name="usage_flags" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="format" type="int" enum="RenderingDevice.DataFormat" /> + <argument index="1" name="usage_flags" type="int" /> <description> </description> </method> <method name="texture_is_shared"> - <return type="bool"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="texture" type="RID" /> <description> </description> </method> <method name="texture_is_valid"> - <return type="bool"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="texture" type="RID" /> <description> </description> </method> <method name="texture_resolve_multisample"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="from_texture" type="RID"> - </argument> - <argument index="1" name="to_texture" type="RID"> - </argument> - <argument index="2" name="post_barrier" type="int" default="7"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="from_texture" type="RID" /> + <argument index="1" name="to_texture" type="RID" /> + <argument index="2" name="post_barrier" type="int" default="7" /> <description> </description> </method> <method name="texture_update"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <argument index="1" name="layer" type="int"> - </argument> - <argument index="2" name="data" type="PackedByteArray"> - </argument> - <argument index="3" name="post_barrier" type="int" default="7"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="texture" type="RID" /> + <argument index="1" name="layer" type="int" /> + <argument index="2" name="data" type="PackedByteArray" /> + <argument index="3" name="post_barrier" type="int" default="7" /> <description> </description> </method> <method name="uniform_buffer_create"> - <return type="RID"> - </return> - <argument index="0" name="size_bytes" type="int"> - </argument> - <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray()"> - </argument> + <return type="RID" /> + <argument index="0" name="size_bytes" type="int" /> + <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray()" /> <description> </description> </method> <method name="uniform_set_create"> - <return type="RID"> - </return> - <argument index="0" name="uniforms" type="Array"> - </argument> - <argument index="1" name="shader" type="RID"> - </argument> - <argument index="2" name="shader_set" type="int"> - </argument> + <return type="RID" /> + <argument index="0" name="uniforms" type="Array" /> + <argument index="1" name="shader" type="RID" /> + <argument index="2" name="shader_set" type="int" /> <description> </description> </method> <method name="uniform_set_is_valid"> - <return type="bool"> - </return> - <argument index="0" name="uniform_set" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="uniform_set" type="RID" /> <description> </description> </method> <method name="vertex_buffer_create"> - <return type="RID"> - </return> - <argument index="0" name="size_bytes" type="int"> - </argument> - <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray()"> - </argument> - <argument index="2" name="use_as_storage" type="bool" default="false"> - </argument> + <return type="RID" /> + <argument index="0" name="size_bytes" type="int" /> + <argument index="1" name="data" type="PackedByteArray" default="PackedByteArray()" /> + <argument index="2" name="use_as_storage" type="bool" default="false" /> <description> </description> </method> <method name="vertex_format_create"> - <return type="int"> - </return> - <argument index="0" name="vertex_descriptions" type="RDVertexAttribute[]"> - </argument> + <return type="int" /> + <argument index="0" name="vertex_descriptions" type="RDVertexAttribute[]" /> <description> </description> </method> @@ -1405,7 +1150,7 @@ </constant> <constant name="TEXTURE_USAGE_CAN_COPY_TO_BIT" value="256" enum="TextureUsageBits"> </constant> - <constant name="TEXTURE_USAGE_RESOLVE_ATTACHMENT_BIT" value="512" enum="TextureUsageBits"> + <constant name="TEXTURE_USAGE_INPUT_ATTACHMENT_BIT" value="512" enum="TextureUsageBits"> </constant> <constant name="TEXTURE_SWIZZLE_IDENTITY" value="0" enum="TextureSwizzle"> </constant> @@ -1709,6 +1454,12 @@ </constant> <constant name="SHADER_LANGUAGE_HLSL" value="1" enum="ShaderLanguage"> </constant> + <constant name="PIPELINE_SPECIALIZATION_CONSTANT_TYPE_BOOL" value="0" enum="PipelineSpecializationConstantType"> + </constant> + <constant name="PIPELINE_SPECIALIZATION_CONSTANT_TYPE_INT" value="1" enum="PipelineSpecializationConstantType"> + </constant> + <constant name="PIPELINE_SPECIALIZATION_CONSTANT_TYPE_FLOAT" value="2" enum="PipelineSpecializationConstantType"> + </constant> <constant name="LIMIT_MAX_BOUND_UNIFORM_SETS" value="0" enum="Limit"> </constant> <constant name="LIMIT_MAX_FRAMEBUFFER_COLOR_ATTACHMENTS" value="1" enum="Limit"> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 6b45653bf2..638c657492 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -19,1199 +19,840 @@ </tutorials> <methods> <method name="bake_render_uv2"> - <return type="Image[]"> - </return> - <argument index="0" name="base" type="RID"> - </argument> - <argument index="1" name="material_overrides" type="Array"> - </argument> - <argument index="2" name="image_size" type="Vector2i"> - </argument> + <return type="Image[]" /> + <argument index="0" name="base" type="RID" /> + <argument index="1" name="material_overrides" type="Array" /> + <argument index="2" name="image_size" type="Vector2i" /> <description> </description> </method> <method name="camera_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates a camera and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]camera_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. </description> </method> <method name="camera_effects_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="camera_effects_set_custom_exposure"> - <return type="void"> - </return> - <argument index="0" name="camera_effects" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> - <argument index="2" name="exposure" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="camera_effects" type="RID" /> + <argument index="1" name="enable" type="bool" /> + <argument index="2" name="exposure" type="float" /> <description> </description> </method> <method name="camera_effects_set_dof_blur"> - <return type="void"> - </return> - <argument index="0" name="camera_effects" type="RID"> - </argument> - <argument index="1" name="far_enable" type="bool"> - </argument> - <argument index="2" name="far_distance" type="float"> - </argument> - <argument index="3" name="far_transition" type="float"> - </argument> - <argument index="4" name="near_enable" type="bool"> - </argument> - <argument index="5" name="near_distance" type="float"> - </argument> - <argument index="6" name="near_transition" type="float"> - </argument> - <argument index="7" name="amount" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="camera_effects" type="RID" /> + <argument index="1" name="far_enable" type="bool" /> + <argument index="2" name="far_distance" type="float" /> + <argument index="3" name="far_transition" type="float" /> + <argument index="4" name="near_enable" type="bool" /> + <argument index="5" name="near_distance" type="float" /> + <argument index="6" name="near_transition" type="float" /> + <argument index="7" name="amount" type="float" /> <description> </description> </method> <method name="camera_effects_set_dof_blur_bokeh_shape"> - <return type="void"> - </return> - <argument index="0" name="shape" type="int" enum="RenderingServer.DOFBokehShape"> - </argument> + <return type="void" /> + <argument index="0" name="shape" type="int" enum="RenderingServer.DOFBokehShape" /> <description> </description> </method> <method name="camera_effects_set_dof_blur_quality"> - <return type="void"> - </return> - <argument index="0" name="quality" type="int" enum="RenderingServer.DOFBlurQuality"> - </argument> - <argument index="1" name="use_jitter" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="quality" type="int" enum="RenderingServer.DOFBlurQuality" /> + <argument index="1" name="use_jitter" type="bool" /> <description> </description> </method> <method name="camera_set_camera_effects"> - <return type="void"> - </return> - <argument index="0" name="camera" type="RID"> - </argument> - <argument index="1" name="effects" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="camera" type="RID" /> + <argument index="1" name="effects" type="RID" /> <description> </description> </method> <method name="camera_set_cull_mask"> - <return type="void"> - </return> - <argument index="0" name="camera" type="RID"> - </argument> - <argument index="1" name="layers" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="camera" type="RID" /> + <argument index="1" name="layers" type="int" /> <description> Sets the cull mask associated with this camera. The cull mask describes which 3D layers are rendered by this camera. Equivalent to [member Camera3D.cull_mask]. </description> </method> <method name="camera_set_environment"> - <return type="void"> - </return> - <argument index="0" name="camera" type="RID"> - </argument> - <argument index="1" name="env" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="camera" type="RID" /> + <argument index="1" name="env" type="RID" /> <description> Sets the environment used by this camera. Equivalent to [member Camera3D.environment]. </description> </method> <method name="camera_set_frustum"> - <return type="void"> - </return> - <argument index="0" name="camera" type="RID"> - </argument> - <argument index="1" name="size" type="float"> - </argument> - <argument index="2" name="offset" type="Vector2"> - </argument> - <argument index="3" name="z_near" type="float"> - </argument> - <argument index="4" name="z_far" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="camera" type="RID" /> + <argument index="1" name="size" type="float" /> + <argument index="2" name="offset" type="Vector2" /> + <argument index="3" name="z_near" type="float" /> + <argument index="4" name="z_far" type="float" /> <description> Sets camera to use frustum projection. This mode allows adjusting the [code]offset[/code] argument to create "tilted frustum" effects. </description> </method> <method name="camera_set_orthogonal"> - <return type="void"> - </return> - <argument index="0" name="camera" type="RID"> - </argument> - <argument index="1" name="size" type="float"> - </argument> - <argument index="2" name="z_near" type="float"> - </argument> - <argument index="3" name="z_far" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="camera" type="RID" /> + <argument index="1" name="size" type="float" /> + <argument index="2" name="z_near" type="float" /> + <argument index="3" name="z_far" type="float" /> <description> Sets camera to use orthogonal projection, also known as orthographic projection. Objects remain the same size on the screen no matter how far away they are. </description> </method> <method name="camera_set_perspective"> - <return type="void"> - </return> - <argument index="0" name="camera" type="RID"> - </argument> - <argument index="1" name="fovy_degrees" type="float"> - </argument> - <argument index="2" name="z_near" type="float"> - </argument> - <argument index="3" name="z_far" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="camera" type="RID" /> + <argument index="1" name="fovy_degrees" type="float" /> + <argument index="2" name="z_near" type="float" /> + <argument index="3" name="z_far" type="float" /> <description> Sets camera to use perspective projection. Objects on the screen becomes smaller when they are far away. </description> </method> <method name="camera_set_transform"> - <return type="void"> - </return> - <argument index="0" name="camera" type="RID"> - </argument> - <argument index="1" name="transform" type="Transform3D"> - </argument> + <return type="void" /> + <argument index="0" name="camera" type="RID" /> + <argument index="1" name="transform" type="Transform3D" /> <description> Sets [Transform3D] of camera. </description> </method> <method name="camera_set_use_vertical_aspect"> - <return type="void"> - </return> - <argument index="0" name="camera" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="camera" type="RID" /> + <argument index="1" name="enable" type="bool" /> <description> If [code]true[/code], preserves the horizontal aspect ratio which is equivalent to [constant Camera3D.KEEP_WIDTH]. If [code]false[/code], preserves the vertical aspect ratio which is equivalent to [constant Camera3D.KEEP_HEIGHT]. </description> </method> <method name="canvas_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates a canvas and returns the assigned [RID]. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. </description> </method> <method name="canvas_item_add_circle"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="pos" type="Vector2"> - </argument> - <argument index="2" name="radius" type="float"> - </argument> - <argument index="3" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="pos" type="Vector2" /> + <argument index="2" name="radius" type="float" /> + <argument index="3" name="color" type="Color" /> <description> </description> </method> <method name="canvas_item_add_clip_ignore"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="ignore" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="ignore" type="bool" /> <description> </description> </method> <method name="canvas_item_add_line"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="from" type="Vector2"> - </argument> - <argument index="2" name="to" type="Vector2"> - </argument> - <argument index="3" name="color" type="Color"> - </argument> - <argument index="4" name="width" type="float" default="1.0"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="from" type="Vector2" /> + <argument index="2" name="to" type="Vector2" /> + <argument index="3" name="color" type="Color" /> + <argument index="4" name="width" type="float" default="1.0" /> <description> </description> </method> <method name="canvas_item_add_mesh"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="mesh" type="RID"> - </argument> - <argument index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)"> - </argument> - <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <argument index="4" name="texture" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="mesh" type="RID" /> + <argument index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)" /> + <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> + <argument index="4" name="texture" type="RID" /> <description> </description> </method> <method name="canvas_item_add_multimesh"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="mesh" type="RID"> - </argument> - <argument index="2" name="texture" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="mesh" type="RID" /> + <argument index="2" name="texture" type="RID" /> <description> </description> </method> <method name="canvas_item_add_nine_patch"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="rect" type="Rect2"> - </argument> - <argument index="2" name="source" type="Rect2"> - </argument> - <argument index="3" name="texture" type="RID"> - </argument> - <argument index="4" name="topleft" type="Vector2"> - </argument> - <argument index="5" name="bottomright" type="Vector2"> - </argument> - <argument index="6" name="x_axis_mode" type="int" enum="RenderingServer.NinePatchAxisMode" default="0"> - </argument> - <argument index="7" name="y_axis_mode" type="int" enum="RenderingServer.NinePatchAxisMode" default="0"> - </argument> - <argument index="8" name="draw_center" type="bool" default="true"> - </argument> - <argument index="9" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="rect" type="Rect2" /> + <argument index="2" name="source" type="Rect2" /> + <argument index="3" name="texture" type="RID" /> + <argument index="4" name="topleft" type="Vector2" /> + <argument index="5" name="bottomright" type="Vector2" /> + <argument index="6" name="x_axis_mode" type="int" enum="RenderingServer.NinePatchAxisMode" default="0" /> + <argument index="7" name="y_axis_mode" type="int" enum="RenderingServer.NinePatchAxisMode" default="0" /> + <argument index="8" name="draw_center" type="bool" default="true" /> + <argument index="9" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> <description> </description> </method> <method name="canvas_item_add_particles"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="particles" type="RID"> - </argument> - <argument index="2" name="texture" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="particles" type="RID" /> + <argument index="2" name="texture" type="RID" /> <description> </description> </method> <method name="canvas_item_add_polygon"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="points" type="PackedVector2Array"> - </argument> - <argument index="2" name="colors" type="PackedColorArray"> - </argument> - <argument index="3" name="uvs" type="PackedVector2Array" default="PackedVector2Array()"> - </argument> - <argument index="4" name="texture" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="points" type="PackedVector2Array" /> + <argument index="2" name="colors" type="PackedColorArray" /> + <argument index="3" name="uvs" type="PackedVector2Array" default="PackedVector2Array()" /> + <argument index="4" name="texture" type="RID" /> <description> </description> </method> <method name="canvas_item_add_polyline"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="points" type="PackedVector2Array"> - </argument> - <argument index="2" name="colors" type="PackedColorArray"> - </argument> - <argument index="3" name="width" type="float" default="1.0"> - </argument> - <argument index="4" name="antialiased" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="points" type="PackedVector2Array" /> + <argument index="2" name="colors" type="PackedColorArray" /> + <argument index="3" name="width" type="float" default="1.0" /> + <argument index="4" name="antialiased" type="bool" default="false" /> <description> </description> </method> <method name="canvas_item_add_primitive"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="points" type="PackedVector2Array"> - </argument> - <argument index="2" name="colors" type="PackedColorArray"> - </argument> - <argument index="3" name="uvs" type="PackedVector2Array"> - </argument> - <argument index="4" name="texture" type="RID"> - </argument> - <argument index="5" name="width" type="float" default="1.0"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="points" type="PackedVector2Array" /> + <argument index="2" name="colors" type="PackedColorArray" /> + <argument index="3" name="uvs" type="PackedVector2Array" /> + <argument index="4" name="texture" type="RID" /> + <argument index="5" name="width" type="float" default="1.0" /> <description> </description> </method> <method name="canvas_item_add_rect"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="rect" type="Rect2"> - </argument> - <argument index="2" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="rect" type="Rect2" /> + <argument index="2" name="color" type="Color" /> <description> </description> </method> <method name="canvas_item_add_set_transform"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="transform" type="Transform2D"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="transform" type="Transform2D" /> <description> </description> </method> <method name="canvas_item_add_texture_rect"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="rect" type="Rect2"> - </argument> - <argument index="2" name="texture" type="RID"> - </argument> - <argument index="3" name="tile" type="bool" default="false"> - </argument> - <argument index="4" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <argument index="5" name="transpose" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="rect" type="Rect2" /> + <argument index="2" name="texture" type="RID" /> + <argument index="3" name="tile" type="bool" default="false" /> + <argument index="4" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> + <argument index="5" name="transpose" type="bool" default="false" /> <description> </description> </method> <method name="canvas_item_add_texture_rect_region"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="rect" type="Rect2"> - </argument> - <argument index="2" name="texture" type="RID"> - </argument> - <argument index="3" name="src_rect" type="Rect2"> - </argument> - <argument index="4" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <argument index="5" name="transpose" type="bool" default="false"> - </argument> - <argument index="6" name="clip_uv" type="bool" default="true"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="rect" type="Rect2" /> + <argument index="2" name="texture" type="RID" /> + <argument index="3" name="src_rect" type="Rect2" /> + <argument index="4" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> + <argument index="5" name="transpose" type="bool" default="false" /> + <argument index="6" name="clip_uv" type="bool" default="true" /> <description> </description> </method> <method name="canvas_item_add_triangle_array"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="indices" type="PackedInt32Array"> - </argument> - <argument index="2" name="points" type="PackedVector2Array"> - </argument> - <argument index="3" name="colors" type="PackedColorArray"> - </argument> - <argument index="4" name="uvs" type="PackedVector2Array" default="PackedVector2Array()"> - </argument> - <argument index="5" name="bones" type="PackedInt32Array" default="PackedInt32Array()"> - </argument> - <argument index="6" name="weights" type="PackedFloat32Array" default="PackedFloat32Array()"> - </argument> - <argument index="7" name="texture" type="RID"> - </argument> - <argument index="8" name="count" type="int" default="-1"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="indices" type="PackedInt32Array" /> + <argument index="2" name="points" type="PackedVector2Array" /> + <argument index="3" name="colors" type="PackedColorArray" /> + <argument index="4" name="uvs" type="PackedVector2Array" default="PackedVector2Array()" /> + <argument index="5" name="bones" type="PackedInt32Array" default="PackedInt32Array()" /> + <argument index="6" name="weights" type="PackedFloat32Array" default="PackedFloat32Array()" /> + <argument index="7" name="texture" type="RID" /> + <argument index="8" name="count" type="int" default="-1" /> <description> </description> </method> <method name="canvas_item_clear"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> <description> Clears the [CanvasItem] and removes all commands in it. </description> </method> <method name="canvas_item_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="canvas_item_set_canvas_group_mode"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="mode" type="int" enum="RenderingServer.CanvasGroupMode"> - </argument> - <argument index="2" name="clear_margin" type="float" default="5.0"> - </argument> - <argument index="3" name="fit_empty" type="bool" default="false"> - </argument> - <argument index="4" name="fit_margin" type="float" default="0.0"> - </argument> - <argument index="5" name="blur_mipmaps" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="mode" type="int" enum="RenderingServer.CanvasGroupMode" /> + <argument index="2" name="clear_margin" type="float" default="5.0" /> + <argument index="3" name="fit_empty" type="bool" default="false" /> + <argument index="4" name="fit_margin" type="float" default="0.0" /> + <argument index="5" name="blur_mipmaps" type="bool" default="false" /> <description> </description> </method> <method name="canvas_item_set_clip"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="clip" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="clip" type="bool" /> <description> </description> </method> <method name="canvas_item_set_copy_to_backbuffer"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> - <argument index="2" name="rect" type="Rect2"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="enabled" type="bool" /> + <argument index="2" name="rect" type="Rect2" /> <description> Sets the [CanvasItem] to copy a rect to the backbuffer. </description> </method> <method name="canvas_item_set_custom_rect"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="use_custom_rect" type="bool"> - </argument> - <argument index="2" name="rect" type="Rect2" default="Rect2(0, 0, 0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="use_custom_rect" type="bool" /> + <argument index="2" name="rect" type="Rect2" default="Rect2(0, 0, 0, 0)" /> <description> </description> </method> <method name="canvas_item_set_default_texture_filter"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="filter" type="int" enum="RenderingServer.CanvasItemTextureFilter"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="filter" type="int" enum="RenderingServer.CanvasItemTextureFilter" /> <description> </description> </method> <method name="canvas_item_set_default_texture_repeat"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="repeat" type="int" enum="RenderingServer.CanvasItemTextureRepeat"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="repeat" type="int" enum="RenderingServer.CanvasItemTextureRepeat" /> <description> </description> </method> <method name="canvas_item_set_distance_field_mode"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="enabled" type="bool" /> <description> </description> </method> <method name="canvas_item_set_draw_behind_parent"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="enabled" type="bool" /> <description> </description> </method> <method name="canvas_item_set_draw_index"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="index" type="int" /> <description> Sets the index for the [CanvasItem]. </description> </method> <method name="canvas_item_set_light_mask"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="mask" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="mask" type="int" /> <description> </description> </method> <method name="canvas_item_set_material"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="material" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="material" type="RID" /> <description> Sets a new material to the [CanvasItem]. </description> </method> <method name="canvas_item_set_modulate"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="color" type="Color" /> <description> </description> </method> <method name="canvas_item_set_parent"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="parent" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="parent" type="RID" /> <description> </description> </method> <method name="canvas_item_set_self_modulate"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="color" type="Color" /> <description> </description> </method> <method name="canvas_item_set_sort_children_by_y"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="enabled" type="bool" /> <description> </description> </method> <method name="canvas_item_set_transform"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="transform" type="Transform2D"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="transform" type="Transform2D" /> <description> </description> </method> <method name="canvas_item_set_use_parent_material"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="enabled" type="bool" /> <description> Sets if the [CanvasItem] uses its parent's material. </description> </method> <method name="canvas_item_set_visibility_notifier"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> - <argument index="2" name="area" type="Rect2"> - </argument> - <argument index="3" name="enter_callable" type="Callable"> - </argument> - <argument index="4" name="exit_callable" type="Callable"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="enable" type="bool" /> + <argument index="2" name="area" type="Rect2" /> + <argument index="3" name="enter_callable" type="Callable" /> + <argument index="4" name="exit_callable" type="Callable" /> <description> </description> </method> <method name="canvas_item_set_visible"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="visible" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="visible" type="bool" /> <description> </description> </method> <method name="canvas_item_set_z_as_relative_to_parent"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="enabled" type="bool" /> <description> If this is enabled, the Z index of the parent will be added to the children's Z index. </description> </method> <method name="canvas_item_set_z_index"> - <return type="void"> - </return> - <argument index="0" name="item" type="RID"> - </argument> - <argument index="1" name="z_index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="RID" /> + <argument index="1" name="z_index" type="int" /> <description> Sets the [CanvasItem]'s Z index, i.e. its draw order (lower indexes are drawn first). </description> </method> <method name="canvas_light_attach_to_canvas"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="canvas" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="canvas" type="RID" /> <description> Attaches the canvas light to the canvas. Removes it from its previous canvas. </description> </method> <method name="canvas_light_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates a canvas light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_light_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. </description> </method> <method name="canvas_light_occluder_attach_to_canvas"> - <return type="void"> - </return> - <argument index="0" name="occluder" type="RID"> - </argument> - <argument index="1" name="canvas" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="occluder" type="RID" /> + <argument index="1" name="canvas" type="RID" /> <description> Attaches a light occluder to the canvas. Removes it from its previous canvas. </description> </method> <method name="canvas_light_occluder_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates a light occluder and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_light_ocluder_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. </description> </method> <method name="canvas_light_occluder_set_as_sdf_collision"> - <return type="void"> - </return> - <argument index="0" name="occluder" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="occluder" type="RID" /> + <argument index="1" name="enable" type="bool" /> <description> </description> </method> <method name="canvas_light_occluder_set_enabled"> - <return type="void"> - </return> - <argument index="0" name="occluder" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="occluder" type="RID" /> + <argument index="1" name="enabled" type="bool" /> <description> Enables or disables light occluder. </description> </method> <method name="canvas_light_occluder_set_light_mask"> - <return type="void"> - </return> - <argument index="0" name="occluder" type="RID"> - </argument> - <argument index="1" name="mask" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="occluder" type="RID" /> + <argument index="1" name="mask" type="int" /> <description> The light mask. See [LightOccluder2D] for more information on light masks. </description> </method> <method name="canvas_light_occluder_set_polygon"> - <return type="void"> - </return> - <argument index="0" name="occluder" type="RID"> - </argument> - <argument index="1" name="polygon" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="occluder" type="RID" /> + <argument index="1" name="polygon" type="RID" /> <description> Sets a light occluder's polygon. </description> </method> <method name="canvas_light_occluder_set_transform"> - <return type="void"> - </return> - <argument index="0" name="occluder" type="RID"> - </argument> - <argument index="1" name="transform" type="Transform2D"> - </argument> + <return type="void" /> + <argument index="0" name="occluder" type="RID" /> + <argument index="1" name="transform" type="Transform2D" /> <description> Sets a light occluder's [Transform2D]. </description> </method> <method name="canvas_light_set_color"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="color" type="Color" /> <description> Sets the color for a light. </description> </method> <method name="canvas_light_set_enabled"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="enabled" type="bool" /> <description> Enables or disables a canvas light. </description> </method> <method name="canvas_light_set_energy"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="energy" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="energy" type="float" /> <description> Sets a canvas light's energy. </description> </method> <method name="canvas_light_set_height"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="height" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="height" type="float" /> <description> Sets a canvas light's height. </description> </method> <method name="canvas_light_set_item_cull_mask"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="mask" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="mask" type="int" /> <description> The light mask. See [LightOccluder2D] for more information on light masks. </description> </method> <method name="canvas_light_set_item_shadow_cull_mask"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="mask" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="mask" type="int" /> <description> The binary mask used to determine which layers this canvas light's shadows affects. See [LightOccluder2D] for more information on light masks. </description> </method> <method name="canvas_light_set_layer_range"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="min_layer" type="int"> - </argument> - <argument index="2" name="max_layer" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="min_layer" type="int" /> + <argument index="2" name="max_layer" type="int" /> <description> The layer range that gets rendered with this light. </description> </method> <method name="canvas_light_set_mode"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="mode" type="int" enum="RenderingServer.CanvasLightMode"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="mode" type="int" enum="RenderingServer.CanvasLightMode" /> <description> The mode of the light, see [enum CanvasLightMode] constants. </description> </method> <method name="canvas_light_set_shadow_color"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="color" type="Color" /> <description> Sets the color of the canvas light's shadow. </description> </method> <method name="canvas_light_set_shadow_enabled"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="enabled" type="bool" /> <description> Enables or disables the canvas light's shadow. </description> </method> <method name="canvas_light_set_shadow_filter"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="filter" type="int" enum="RenderingServer.CanvasLightShadowFilter"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="filter" type="int" enum="RenderingServer.CanvasLightShadowFilter" /> <description> Sets the canvas light's shadow's filter, see [enum CanvasLightShadowFilter] constants. </description> </method> <method name="canvas_light_set_shadow_smooth"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="smooth" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="smooth" type="float" /> <description> Smoothens the shadow. The lower, the smoother. </description> </method> <method name="canvas_light_set_texture"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="texture" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="texture" type="RID" /> <description> Sets the texture to be used by a [PointLight2D]. Equivalent to [member PointLight2D.texture]. </description> </method> <method name="canvas_light_set_texture_offset"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="offset" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="offset" type="Vector2" /> <description> Sets the offset of a [PointLight2D]'s texture. Equivalent to [member PointLight2D.offset]. </description> </method> <method name="canvas_light_set_texture_scale"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="scale" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="scale" type="float" /> <description> Sets the scale factor of a [PointLight2D]'s texture. Equivalent to [member PointLight2D.texture_scale]. </description> </method> <method name="canvas_light_set_transform"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="transform" type="Transform2D"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="transform" type="Transform2D" /> <description> Sets the canvas light's [Transform2D]. </description> </method> <method name="canvas_light_set_z_range"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="min_z" type="int"> - </argument> - <argument index="2" name="max_z" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="min_z" type="int" /> + <argument index="2" name="max_z" type="int" /> <description> Sets the Z range of objects that will be affected by this light. Equivalent to [member Light2D.range_z_min] and [member Light2D.range_z_max]. </description> </method> <method name="canvas_occluder_polygon_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates a new light occluder polygon and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_occluder_polygon_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. </description> </method> <method name="canvas_occluder_polygon_set_cull_mode"> - <return type="void"> - </return> - <argument index="0" name="occluder_polygon" type="RID"> - </argument> - <argument index="1" name="mode" type="int" enum="RenderingServer.CanvasOccluderPolygonCullMode"> - </argument> + <return type="void" /> + <argument index="0" name="occluder_polygon" type="RID" /> + <argument index="1" name="mode" type="int" enum="RenderingServer.CanvasOccluderPolygonCullMode" /> <description> Sets an occluder polygons cull mode. See [enum CanvasOccluderPolygonCullMode] constants. </description> </method> <method name="canvas_occluder_polygon_set_shape"> - <return type="void"> - </return> - <argument index="0" name="occluder_polygon" type="RID"> - </argument> - <argument index="1" name="shape" type="PackedVector2Array"> - </argument> - <argument index="2" name="closed" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="occluder_polygon" type="RID" /> + <argument index="1" name="shape" type="PackedVector2Array" /> + <argument index="2" name="closed" type="bool" /> <description> Sets the shape of the occluder polygon. </description> </method> <method name="canvas_set_disable_scale"> - <return type="void"> - </return> - <argument index="0" name="disable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="disable" type="bool" /> <description> </description> </method> <method name="canvas_set_item_mirroring"> - <return type="void"> - </return> - <argument index="0" name="canvas" type="RID"> - </argument> - <argument index="1" name="item" type="RID"> - </argument> - <argument index="2" name="mirroring" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="canvas" type="RID" /> + <argument index="1" name="item" type="RID" /> + <argument index="2" name="mirroring" type="Vector2" /> <description> A copy of the canvas item will be drawn with a local offset of the mirroring [Vector2]. </description> </method> <method name="canvas_set_modulate"> - <return type="void"> - </return> - <argument index="0" name="canvas" type="RID"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="canvas" type="RID" /> + <argument index="1" name="color" type="Color" /> <description> Modulates all colors in the given canvas. </description> </method> <method name="canvas_set_shadow_texture_size"> - <return type="void"> - </return> - <argument index="0" name="size" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="size" type="int" /> <description> </description> </method> <method name="canvas_texture_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="canvas_texture_set_channel"> - <return type="void"> - </return> - <argument index="0" name="canvas_texture" type="RID"> - </argument> - <argument index="1" name="channel" type="int" enum="RenderingServer.CanvasTextureChannel"> - </argument> - <argument index="2" name="texture" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="canvas_texture" type="RID" /> + <argument index="1" name="channel" type="int" enum="RenderingServer.CanvasTextureChannel" /> + <argument index="2" name="texture" type="RID" /> <description> </description> </method> <method name="canvas_texture_set_shading_parameters"> - <return type="void"> - </return> - <argument index="0" name="canvas_texture" type="RID"> - </argument> - <argument index="1" name="base_color" type="Color"> - </argument> - <argument index="2" name="shininess" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="canvas_texture" type="RID" /> + <argument index="1" name="base_color" type="Color" /> + <argument index="2" name="shininess" type="float" /> <description> </description> </method> <method name="canvas_texture_set_texture_filter"> - <return type="void"> - </return> - <argument index="0" name="canvas_texture" type="RID"> - </argument> - <argument index="1" name="filter" type="int" enum="RenderingServer.CanvasItemTextureFilter"> - </argument> + <return type="void" /> + <argument index="0" name="canvas_texture" type="RID" /> + <argument index="1" name="filter" type="int" enum="RenderingServer.CanvasItemTextureFilter" /> <description> </description> </method> <method name="canvas_texture_set_texture_repeat"> - <return type="void"> - </return> - <argument index="0" name="canvas_texture" type="RID"> - </argument> - <argument index="1" name="repeat" type="int" enum="RenderingServer.CanvasItemTextureRepeat"> - </argument> + <return type="void" /> + <argument index="0" name="canvas_texture" type="RID" /> + <argument index="1" name="repeat" type="int" enum="RenderingServer.CanvasItemTextureRepeat" /> <description> </description> </method> <method name="create_local_rendering_device" qualifiers="const"> - <return type="RenderingDevice"> - </return> + <return type="RenderingDevice" /> <description> </description> </method> <method name="decal_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="decal_set_albedo_mix"> - <return type="void"> - </return> - <argument index="0" name="decal" type="RID"> - </argument> - <argument index="1" name="albedo_mix" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="decal" type="RID" /> + <argument index="1" name="albedo_mix" type="float" /> <description> </description> </method> <method name="decal_set_cull_mask"> - <return type="void"> - </return> - <argument index="0" name="decal" type="RID"> - </argument> - <argument index="1" name="mask" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="decal" type="RID" /> + <argument index="1" name="mask" type="int" /> <description> </description> </method> <method name="decal_set_distance_fade"> - <return type="void"> - </return> - <argument index="0" name="decal" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> - <argument index="2" name="begin" type="float"> - </argument> - <argument index="3" name="length" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="decal" type="RID" /> + <argument index="1" name="enabled" type="bool" /> + <argument index="2" name="begin" type="float" /> + <argument index="3" name="length" type="float" /> <description> </description> </method> <method name="decal_set_emission_energy"> - <return type="void"> - </return> - <argument index="0" name="decal" type="RID"> - </argument> - <argument index="1" name="energy" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="decal" type="RID" /> + <argument index="1" name="energy" type="float" /> <description> </description> </method> <method name="decal_set_extents"> - <return type="void"> - </return> - <argument index="0" name="decal" type="RID"> - </argument> - <argument index="1" name="extents" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="decal" type="RID" /> + <argument index="1" name="extents" type="Vector3" /> <description> </description> </method> <method name="decal_set_fade"> - <return type="void"> - </return> - <argument index="0" name="decal" type="RID"> - </argument> - <argument index="1" name="above" type="float"> - </argument> - <argument index="2" name="below" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="decal" type="RID" /> + <argument index="1" name="above" type="float" /> + <argument index="2" name="below" type="float" /> <description> </description> </method> <method name="decal_set_modulate"> - <return type="void"> - </return> - <argument index="0" name="decal" type="RID"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="decal" type="RID" /> + <argument index="1" name="color" type="Color" /> <description> </description> </method> <method name="decal_set_normal_fade"> - <return type="void"> - </return> - <argument index="0" name="decal" type="RID"> - </argument> - <argument index="1" name="fade" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="decal" type="RID" /> + <argument index="1" name="fade" type="float" /> <description> </description> </method> <method name="decal_set_texture"> - <return type="void"> - </return> - <argument index="0" name="decal" type="RID"> - </argument> - <argument index="1" name="type" type="int" enum="RenderingServer.DecalTexture"> - </argument> - <argument index="2" name="texture" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="decal" type="RID" /> + <argument index="1" name="type" type="int" enum="RenderingServer.DecalTexture" /> + <argument index="2" name="texture" type="RID" /> + <description> + </description> + </method> + <method name="decals_set_filter"> + <return type="void" /> + <argument index="0" name="filter" type="int" enum="RenderingServer.DecalFilter" /> <description> </description> </method> <method name="directional_light_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates a directional light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. @@ -1219,610 +860,423 @@ </description> </method> <method name="directional_shadow_atlas_set_size"> - <return type="void"> - </return> - <argument index="0" name="size" type="int"> - </argument> - <argument index="1" name="is_16bits" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="size" type="int" /> + <argument index="1" name="is_16bits" type="bool" /> <description> </description> </method> <method name="directional_shadow_quality_set"> - <return type="void"> - </return> - <argument index="0" name="quality" type="int" enum="RenderingServer.ShadowQuality"> - </argument> + <return type="void" /> + <argument index="0" name="quality" type="int" enum="RenderingServer.ShadowQuality" /> <description> </description> </method> <method name="environment_bake_panorama"> - <return type="Image"> - </return> - <argument index="0" name="environment" type="RID"> - </argument> - <argument index="1" name="bake_irradiance" type="bool"> - </argument> - <argument index="2" name="size" type="Vector2i"> - </argument> + <return type="Image" /> + <argument index="0" name="environment" type="RID" /> + <argument index="1" name="bake_irradiance" type="bool" /> + <argument index="2" name="size" type="Vector2i" /> <description> </description> </method> <method name="environment_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates an environment and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]environment_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. </description> </method> <method name="environment_glow_set_use_bicubic_upscale"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enable" type="bool" /> <description> </description> </method> <method name="environment_glow_set_use_high_quality"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enable" type="bool" /> <description> </description> </method> <method name="environment_set_adjustment"> - <return type="void"> - </return> - <argument index="0" name="env" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> - <argument index="2" name="brightness" type="float"> - </argument> - <argument index="3" name="contrast" type="float"> - </argument> - <argument index="4" name="saturation" type="float"> - </argument> - <argument index="5" name="use_1d_color_correction" type="bool"> - </argument> - <argument index="6" name="color_correction" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="env" type="RID" /> + <argument index="1" name="enable" type="bool" /> + <argument index="2" name="brightness" type="float" /> + <argument index="3" name="contrast" type="float" /> + <argument index="4" name="saturation" type="float" /> + <argument index="5" name="use_1d_color_correction" type="bool" /> + <argument index="6" name="color_correction" type="RID" /> <description> Sets the values to be used with the "Adjustment" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_ambient_light"> - <return type="void"> - </return> - <argument index="0" name="env" type="RID"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> - <argument index="2" name="ambient" type="int" enum="RenderingServer.EnvironmentAmbientSource" default="0"> - </argument> - <argument index="3" name="energy" type="float" default="1.0"> - </argument> - <argument index="4" name="sky_contibution" type="float" default="0.0"> - </argument> - <argument index="5" name="reflection_source" type="int" enum="RenderingServer.EnvironmentReflectionSource" default="0"> - </argument> - <argument index="6" name="ao_color" type="Color" default="Color(0, 0, 0, 1)"> - </argument> + <return type="void" /> + <argument index="0" name="env" type="RID" /> + <argument index="1" name="color" type="Color" /> + <argument index="2" name="ambient" type="int" enum="RenderingServer.EnvironmentAmbientSource" default="0" /> + <argument index="3" name="energy" type="float" default="1.0" /> + <argument index="4" name="sky_contibution" type="float" default="0.0" /> + <argument index="5" name="reflection_source" type="int" enum="RenderingServer.EnvironmentReflectionSource" default="0" /> + <argument index="6" name="ao_color" type="Color" default="Color(0, 0, 0, 1)" /> <description> </description> </method> <method name="environment_set_background"> - <return type="void"> - </return> - <argument index="0" name="env" type="RID"> - </argument> - <argument index="1" name="bg" type="int" enum="RenderingServer.EnvironmentBG"> - </argument> + <return type="void" /> + <argument index="0" name="env" type="RID" /> + <argument index="1" name="bg" type="int" enum="RenderingServer.EnvironmentBG" /> <description> Sets the [i]BGMode[/i] of the environment. Equivalent to [member Environment.background_mode]. </description> </method> <method name="environment_set_bg_color"> - <return type="void"> - </return> - <argument index="0" name="env" type="RID"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="env" type="RID" /> + <argument index="1" name="color" type="Color" /> <description> Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes). </description> </method> <method name="environment_set_bg_energy"> - <return type="void"> - </return> - <argument index="0" name="env" type="RID"> - </argument> - <argument index="1" name="energy" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="env" type="RID" /> + <argument index="1" name="energy" type="float" /> <description> Sets the intensity of the background color. </description> </method> <method name="environment_set_canvas_max_layer"> - <return type="void"> - </return> - <argument index="0" name="env" type="RID"> - </argument> - <argument index="1" name="max_layer" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="env" type="RID" /> + <argument index="1" name="max_layer" type="int" /> <description> Sets the maximum layer to use if using Canvas background mode. </description> </method> <method name="environment_set_fog"> - <return type="void"> - </return> - <argument index="0" name="env" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> - <argument index="2" name="light_color" type="Color"> - </argument> - <argument index="3" name="light_energy" type="float"> - </argument> - <argument index="4" name="sun_scatter" type="float"> - </argument> - <argument index="5" name="density" type="float"> - </argument> - <argument index="6" name="height" type="float"> - </argument> - <argument index="7" name="height_density" type="float"> - </argument> - <argument index="8" name="aerial_perspective" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="env" type="RID" /> + <argument index="1" name="enable" type="bool" /> + <argument index="2" name="light_color" type="Color" /> + <argument index="3" name="light_energy" type="float" /> + <argument index="4" name="sun_scatter" type="float" /> + <argument index="5" name="density" type="float" /> + <argument index="6" name="height" type="float" /> + <argument index="7" name="height_density" type="float" /> + <argument index="8" name="aerial_perspective" type="float" /> <description> </description> </method> <method name="environment_set_glow"> - <return type="void"> - </return> - <argument index="0" name="env" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> - <argument index="2" name="levels" type="PackedFloat32Array"> - </argument> - <argument index="3" name="intensity" type="float"> - </argument> - <argument index="4" name="strength" type="float"> - </argument> - <argument index="5" name="mix" type="float"> - </argument> - <argument index="6" name="bloom_threshold" type="float"> - </argument> - <argument index="7" name="blend_mode" type="int" enum="RenderingServer.EnvironmentGlowBlendMode"> - </argument> - <argument index="8" name="hdr_bleed_threshold" type="float"> - </argument> - <argument index="9" name="hdr_bleed_scale" type="float"> - </argument> - <argument index="10" name="hdr_luminance_cap" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="env" type="RID" /> + <argument index="1" name="enable" type="bool" /> + <argument index="2" name="levels" type="PackedFloat32Array" /> + <argument index="3" name="intensity" type="float" /> + <argument index="4" name="strength" type="float" /> + <argument index="5" name="mix" type="float" /> + <argument index="6" name="bloom_threshold" type="float" /> + <argument index="7" name="blend_mode" type="int" enum="RenderingServer.EnvironmentGlowBlendMode" /> + <argument index="8" name="hdr_bleed_threshold" type="float" /> + <argument index="9" name="hdr_bleed_scale" type="float" /> + <argument index="10" name="hdr_luminance_cap" type="float" /> <description> </description> </method> <method name="environment_set_sdfgi"> - <return type="void"> - </return> - <argument index="0" name="env" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> - <argument index="2" name="cascades" type="int" enum="RenderingServer.EnvironmentSDFGICascades"> - </argument> - <argument index="3" name="min_cell_size" type="float"> - </argument> - <argument index="4" name="y_scale" type="int" enum="RenderingServer.EnvironmentSDFGIYScale"> - </argument> - <argument index="5" name="use_occlusion" type="bool"> - </argument> - <argument index="6" name="bounce_feedback" type="float"> - </argument> - <argument index="7" name="read_sky" type="bool"> - </argument> - <argument index="8" name="energy" type="float"> - </argument> - <argument index="9" name="normal_bias" type="float"> - </argument> - <argument index="10" name="probe_bias" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="env" type="RID" /> + <argument index="1" name="enable" type="bool" /> + <argument index="2" name="cascades" type="int" enum="RenderingServer.EnvironmentSDFGICascades" /> + <argument index="3" name="min_cell_size" type="float" /> + <argument index="4" name="y_scale" type="int" enum="RenderingServer.EnvironmentSDFGIYScale" /> + <argument index="5" name="use_occlusion" type="bool" /> + <argument index="6" name="bounce_feedback" type="float" /> + <argument index="7" name="read_sky" type="bool" /> + <argument index="8" name="energy" type="float" /> + <argument index="9" name="normal_bias" type="float" /> + <argument index="10" name="probe_bias" type="float" /> <description> </description> </method> <method name="environment_set_sdfgi_frames_to_converge"> - <return type="void"> - </return> - <argument index="0" name="frames" type="int" enum="RenderingServer.EnvironmentSDFGIFramesToConverge"> - </argument> + <return type="void" /> + <argument index="0" name="frames" type="int" enum="RenderingServer.EnvironmentSDFGIFramesToConverge" /> <description> </description> </method> <method name="environment_set_sdfgi_frames_to_update_light"> - <return type="void"> - </return> - <argument index="0" name="frames" type="int" enum="RenderingServer.EnvironmentSDFGIFramesToUpdateLight"> - </argument> + <return type="void" /> + <argument index="0" name="frames" type="int" enum="RenderingServer.EnvironmentSDFGIFramesToUpdateLight" /> <description> </description> </method> <method name="environment_set_sdfgi_ray_count"> - <return type="void"> - </return> - <argument index="0" name="ray_count" type="int" enum="RenderingServer.EnvironmentSDFGIRayCount"> - </argument> + <return type="void" /> + <argument index="0" name="ray_count" type="int" enum="RenderingServer.EnvironmentSDFGIRayCount" /> <description> </description> </method> <method name="environment_set_sky"> - <return type="void"> - </return> - <argument index="0" name="env" type="RID"> - </argument> - <argument index="1" name="sky" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="env" type="RID" /> + <argument index="1" name="sky" type="RID" /> <description> Sets the [Sky] to be used as the environment's background when using [i]BGMode[/i] sky. Equivalent to [member Environment.sky]. </description> </method> <method name="environment_set_sky_custom_fov"> - <return type="void"> - </return> - <argument index="0" name="env" type="RID"> - </argument> - <argument index="1" name="scale" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="env" type="RID" /> + <argument index="1" name="scale" type="float" /> <description> Sets a custom field of view for the background [Sky]. Equivalent to [member Environment.sky_custom_fov]. </description> </method> <method name="environment_set_sky_orientation"> - <return type="void"> - </return> - <argument index="0" name="env" type="RID"> - </argument> - <argument index="1" name="orientation" type="Basis"> - </argument> + <return type="void" /> + <argument index="0" name="env" type="RID" /> + <argument index="1" name="orientation" type="Basis" /> <description> Sets the rotation of the background [Sky] expressed as a [Basis]. Equivalent to [member Environment.sky_rotation], where the rotation vector is used to construct the [Basis]. </description> </method> <method name="environment_set_ssao"> - <return type="void"> - </return> - <argument index="0" name="env" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> - <argument index="2" name="radius" type="float"> - </argument> - <argument index="3" name="intensity" type="float"> - </argument> - <argument index="4" name="power" type="float"> - </argument> - <argument index="5" name="detail" type="float"> - </argument> - <argument index="6" name="horizon" type="float"> - </argument> - <argument index="7" name="sharpness" type="float"> - </argument> - <argument index="8" name="light_affect" type="float"> - </argument> - <argument index="9" name="ao_channel_affect" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="env" type="RID" /> + <argument index="1" name="enable" type="bool" /> + <argument index="2" name="radius" type="float" /> + <argument index="3" name="intensity" type="float" /> + <argument index="4" name="power" type="float" /> + <argument index="5" name="detail" type="float" /> + <argument index="6" name="horizon" type="float" /> + <argument index="7" name="sharpness" type="float" /> + <argument index="8" name="light_affect" type="float" /> + <argument index="9" name="ao_channel_affect" type="float" /> <description> Sets the variables to be used with the "screen space ambient occlusion" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_ssao_quality"> - <return type="void"> - </return> - <argument index="0" name="quality" type="int" enum="RenderingServer.EnvironmentSSAOQuality"> - </argument> - <argument index="1" name="half_size" type="bool"> - </argument> - <argument index="2" name="adaptive_target" type="float"> - </argument> - <argument index="3" name="blur_passes" type="int"> - </argument> - <argument index="4" name="fadeout_from" type="float"> - </argument> - <argument index="5" name="fadeout_to" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="quality" type="int" enum="RenderingServer.EnvironmentSSAOQuality" /> + <argument index="1" name="half_size" type="bool" /> + <argument index="2" name="adaptive_target" type="float" /> + <argument index="3" name="blur_passes" type="int" /> + <argument index="4" name="fadeout_from" type="float" /> + <argument index="5" name="fadeout_to" type="float" /> <description> </description> </method> <method name="environment_set_ssr"> - <return type="void"> - </return> - <argument index="0" name="env" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> - <argument index="2" name="max_steps" type="int"> - </argument> - <argument index="3" name="fade_in" type="float"> - </argument> - <argument index="4" name="fade_out" type="float"> - </argument> - <argument index="5" name="depth_tolerance" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="env" type="RID" /> + <argument index="1" name="enable" type="bool" /> + <argument index="2" name="max_steps" type="int" /> + <argument index="3" name="fade_in" type="float" /> + <argument index="4" name="fade_out" type="float" /> + <argument index="5" name="depth_tolerance" type="float" /> <description> Sets the variables to be used with the "screen space reflections" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_ssr_roughness_quality"> - <return type="void"> - </return> - <argument index="0" name="quality" type="int" enum="RenderingServer.EnvironmentSSRRoughnessQuality"> - </argument> + <return type="void" /> + <argument index="0" name="quality" type="int" enum="RenderingServer.EnvironmentSSRRoughnessQuality" /> <description> </description> </method> <method name="environment_set_tonemap"> - <return type="void"> - </return> - <argument index="0" name="env" type="RID"> - </argument> - <argument index="1" name="tone_mapper" type="int" enum="RenderingServer.EnvironmentToneMapper"> - </argument> - <argument index="2" name="exposure" type="float"> - </argument> - <argument index="3" name="white" type="float"> - </argument> - <argument index="4" name="auto_exposure" type="bool"> - </argument> - <argument index="5" name="min_luminance" type="float"> - </argument> - <argument index="6" name="max_luminance" type="float"> - </argument> - <argument index="7" name="auto_exp_speed" type="float"> - </argument> - <argument index="8" name="auto_exp_grey" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="env" type="RID" /> + <argument index="1" name="tone_mapper" type="int" enum="RenderingServer.EnvironmentToneMapper" /> + <argument index="2" name="exposure" type="float" /> + <argument index="3" name="white" type="float" /> + <argument index="4" name="auto_exposure" type="bool" /> + <argument index="5" name="min_luminance" type="float" /> + <argument index="6" name="max_luminance" type="float" /> + <argument index="7" name="auto_exp_speed" type="float" /> + <argument index="8" name="auto_exp_grey" type="float" /> <description> Sets the variables to be used with the "tonemap" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_volumetric_fog"> - <return type="void"> - </return> - <argument index="0" name="env" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> - <argument index="2" name="density" type="float"> - </argument> - <argument index="3" name="light" type="Color"> - </argument> - <argument index="4" name="light_energy" type="float"> - </argument> - <argument index="5" name="length" type="float"> - </argument> - <argument index="6" name="p_detail_spread" type="float"> - </argument> - <argument index="7" name="gi_inject" type="float"> - </argument> - <argument index="8" name="temporal_reprojection" type="bool"> - </argument> - <argument index="9" name="temporal_reprojection_amount" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="env" type="RID" /> + <argument index="1" name="enable" type="bool" /> + <argument index="2" name="density" type="float" /> + <argument index="3" name="light" type="Color" /> + <argument index="4" name="light_energy" type="float" /> + <argument index="5" name="length" type="float" /> + <argument index="6" name="p_detail_spread" type="float" /> + <argument index="7" name="gi_inject" type="float" /> + <argument index="8" name="temporal_reprojection" type="bool" /> + <argument index="9" name="temporal_reprojection_amount" type="float" /> <description> </description> </method> <method name="environment_set_volumetric_fog_filter_active"> - <return type="void"> - </return> - <argument index="0" name="active" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="active" type="bool" /> <description> </description> </method> <method name="environment_set_volumetric_fog_volume_size"> - <return type="void"> - </return> - <argument index="0" name="size" type="int"> - </argument> - <argument index="1" name="depth" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="size" type="int" /> + <argument index="1" name="depth" type="int" /> <description> </description> </method> <method name="force_draw"> - <return type="void"> - </return> - <argument index="0" name="swap_buffers" type="bool" default="true"> - </argument> - <argument index="1" name="frame_step" type="float" default="0.0"> - </argument> + <return type="void" /> + <argument index="0" name="swap_buffers" type="bool" default="true" /> + <argument index="1" name="frame_step" type="float" default="0.0" /> <description> </description> </method> <method name="force_sync"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> <method name="free_rid"> - <return type="void"> - </return> - <argument index="0" name="rid" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="rid" type="RID" /> <description> Tries to free an object in the RenderingServer. </description> </method> <method name="get_frame_setup_time_cpu" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> </description> </method> <method name="get_rendering_info"> - <return type="int"> - </return> - <argument index="0" name="info" type="int" enum="RenderingServer.RenderingInfo"> - </argument> + <return type="int" /> + <argument index="0" name="info" type="int" enum="RenderingServer.RenderingInfo" /> <description> </description> </method> <method name="get_test_cube"> - <return type="RID"> - </return> + <return type="RID" /> <description> Returns the id of the test cube. Creates one if none exists. </description> </method> <method name="get_test_texture"> - <return type="RID"> - </return> + <return type="RID" /> <description> Returns the id of the test texture. Creates one if none exists. </description> </method> <method name="get_video_adapter_name" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the name of the video adapter (e.g. "GeForce GTX 1080/PCIe/SSE2"). [b]Note:[/b] When running a headless or server binary, this function returns an empty string. </description> </method> <method name="get_video_adapter_vendor" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the vendor of the video adapter (e.g. "NVIDIA Corporation"). [b]Note:[/b] When running a headless or server binary, this function returns an empty string. </description> </method> <method name="get_white_texture"> - <return type="RID"> - </return> + <return type="RID" /> <description> Returns the id of a white texture. Creates one if none exists. </description> </method> <method name="global_variable_add"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="type" type="int" enum="RenderingServer.GlobalVariableType"> - </argument> - <argument index="2" name="default_value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="type" type="int" enum="RenderingServer.GlobalVariableType" /> + <argument index="2" name="default_value" type="Variant" /> <description> </description> </method> <method name="global_variable_get" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="Variant" /> + <argument index="0" name="name" type="StringName" /> <description> </description> </method> <method name="global_variable_get_list" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> </description> </method> <method name="global_variable_get_type" qualifiers="const"> - <return type="int" enum="RenderingServer.GlobalVariableType"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="int" enum="RenderingServer.GlobalVariableType" /> + <argument index="0" name="name" type="StringName" /> <description> </description> </method> <method name="global_variable_remove"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> <description> </description> </method> <method name="global_variable_set"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="value" type="Variant" /> <description> </description> </method> <method name="global_variable_set_override"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="value" type="Variant" /> <description> </description> </method> <method name="has_changed" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if changes have been made to the RenderingServer's data. [method force_draw] is usually called if this happens. </description> </method> <method name="has_feature" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="feature" type="int" enum="RenderingServer.Features"> - </argument> + <return type="bool" /> + <argument index="0" name="feature" type="int" enum="RenderingServer.Features" /> <description> Not yet implemented. Always returns [code]false[/code]. </description> </method> <method name="has_os_feature" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="feature" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="feature" type="String" /> <description> Returns [code]true[/code] if the OS supports a certain feature. Features might be [code]s3tc[/code], [code]etc[/code], [code]etc2[/code] and [code]pvrtc[/code]. </description> </method> <method name="instance_attach_object_instance_id"> - <return type="void"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <argument index="1" name="id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="instance" type="RID" /> + <argument index="1" name="id" type="int" /> <description> Attaches a unique Object ID to instance. Object ID must be attached to instance for proper culling with [method instances_cull_aabb], [method instances_cull_convex], and [method instances_cull_ray]. </description> </method> <method name="instance_attach_skeleton"> - <return type="void"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <argument index="1" name="skeleton" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="instance" type="RID" /> + <argument index="1" name="skeleton" type="RID" /> <description> Attaches a skeleton to an instance. Removes the previous skeleton from the instance. </description> </method> <method name="instance_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates a visual instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]instance_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. @@ -1830,652 +1284,473 @@ </description> </method> <method name="instance_create2"> - <return type="RID"> - </return> - <argument index="0" name="base" type="RID"> - </argument> - <argument index="1" name="scenario" type="RID"> - </argument> + <return type="RID" /> + <argument index="0" name="base" type="RID" /> + <argument index="1" name="scenario" type="RID" /> <description> Creates a visual instance, adds it to the RenderingServer, and sets both base and scenario. It can be accessed with the RID that is returned. This RID will be used in all [code]instance_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. </description> </method> <method name="instance_geometry_get_shader_parameter" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <argument index="1" name="parameter" type="StringName"> - </argument> + <return type="Variant" /> + <argument index="0" name="instance" type="RID" /> + <argument index="1" name="parameter" type="StringName" /> <description> </description> </method> <method name="instance_geometry_get_shader_parameter_default_value" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <argument index="1" name="parameter" type="StringName"> - </argument> + <return type="Variant" /> + <argument index="0" name="instance" type="RID" /> + <argument index="1" name="parameter" type="StringName" /> <description> </description> </method> <method name="instance_geometry_get_shader_parameter_list" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> + <return type="Array" /> + <argument index="0" name="instance" type="RID" /> <description> </description> </method> <method name="instance_geometry_set_cast_shadows_setting"> - <return type="void"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <argument index="1" name="shadow_casting_setting" type="int" enum="RenderingServer.ShadowCastingSetting"> - </argument> + <return type="void" /> + <argument index="0" name="instance" type="RID" /> + <argument index="1" name="shadow_casting_setting" type="int" enum="RenderingServer.ShadowCastingSetting" /> <description> Sets the shadow casting setting to one of [enum ShadowCastingSetting]. Equivalent to [member GeometryInstance3D.cast_shadow]. </description> </method> <method name="instance_geometry_set_flag"> - <return type="void"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <argument index="1" name="flag" type="int" enum="RenderingServer.InstanceFlags"> - </argument> - <argument index="2" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="instance" type="RID" /> + <argument index="1" name="flag" type="int" enum="RenderingServer.InstanceFlags" /> + <argument index="2" name="enabled" type="bool" /> <description> Sets the flag for a given [enum InstanceFlags]. See [enum InstanceFlags] for more details. </description> </method> <method name="instance_geometry_set_lightmap"> - <return type="void"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <argument index="1" name="lightmap" type="RID"> - </argument> - <argument index="2" name="lightmap_uv_scale" type="Rect2"> - </argument> - <argument index="3" name="lightmap_slice" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="instance" type="RID" /> + <argument index="1" name="lightmap" type="RID" /> + <argument index="2" name="lightmap_uv_scale" type="Rect2" /> + <argument index="3" name="lightmap_slice" type="int" /> <description> </description> </method> <method name="instance_geometry_set_lod_bias"> - <return type="void"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <argument index="1" name="lod_bias" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="instance" type="RID" /> + <argument index="1" name="lod_bias" type="float" /> <description> </description> </method> <method name="instance_geometry_set_material_override"> - <return type="void"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <argument index="1" name="material" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="instance" type="RID" /> + <argument index="1" name="material" type="RID" /> <description> Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to [member GeometryInstance3D.material_override]. </description> </method> <method name="instance_geometry_set_shader_parameter"> - <return type="void"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <argument index="1" name="parameter" type="StringName"> - </argument> - <argument index="2" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="instance" type="RID" /> + <argument index="1" name="parameter" type="StringName" /> + <argument index="2" name="value" type="Variant" /> <description> </description> </method> <method name="instance_geometry_set_visibility_range"> - <return type="void"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <argument index="1" name="min" type="float"> - </argument> - <argument index="2" name="max" type="float"> - </argument> - <argument index="3" name="min_margin" type="float"> - </argument> - <argument index="4" name="max_margin" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="instance" type="RID" /> + <argument index="1" name="min" type="float" /> + <argument index="2" name="max" type="float" /> + <argument index="3" name="min_margin" type="float" /> + <argument index="4" name="max_margin" type="float" /> <description> Sets the visibility range values for the given geometry instance. Equivalent to [member GeometryInstance3D.visibility_range_begin] and related properties. </description> </method> <method name="instance_set_base"> - <return type="void"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <argument index="1" name="base" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="instance" type="RID" /> + <argument index="1" name="base" type="RID" /> <description> Sets the base of the instance. A base can be any of the 3D objects that are created in the RenderingServer that can be displayed. For example, any of the light types, mesh, multimesh, immediate geometry, particle system, reflection probe, lightmap, and the GI probe are all types that can be set as the base of an instance in order to be displayed in the scenario. </description> </method> <method name="instance_set_blend_shape_weight"> - <return type="void"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <argument index="1" name="shape" type="int"> - </argument> - <argument index="2" name="weight" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="instance" type="RID" /> + <argument index="1" name="shape" type="int" /> + <argument index="2" name="weight" type="float" /> <description> Sets the weight for a given blend shape associated with this instance. </description> </method> <method name="instance_set_custom_aabb"> - <return type="void"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <argument index="1" name="aabb" type="AABB"> - </argument> + <return type="void" /> + <argument index="0" name="instance" type="RID" /> + <argument index="1" name="aabb" type="AABB" /> <description> Sets a custom AABB to use when culling objects from the view frustum. Equivalent to [method GeometryInstance3D.set_custom_aabb]. </description> </method> <method name="instance_set_extra_visibility_margin"> - <return type="void"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <argument index="1" name="margin" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="instance" type="RID" /> + <argument index="1" name="margin" type="float" /> <description> Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you to avoid culling objects that fall outside the view frustum. Equivalent to [member GeometryInstance3D.extra_cull_margin]. </description> </method> <method name="instance_set_layer_mask"> - <return type="void"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <argument index="1" name="mask" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="instance" type="RID" /> + <argument index="1" name="mask" type="int" /> <description> Sets the render layers that this instance will be drawn to. Equivalent to [member VisualInstance3D.layers]. </description> </method> <method name="instance_set_scenario"> - <return type="void"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <argument index="1" name="scenario" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="instance" type="RID" /> + <argument index="1" name="scenario" type="RID" /> <description> Sets the scenario that the instance is in. The scenario is the 3D world that the objects will be displayed in. </description> </method> <method name="instance_set_surface_override_material"> - <return type="void"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <argument index="1" name="surface" type="int"> - </argument> - <argument index="2" name="material" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="instance" type="RID" /> + <argument index="1" name="surface" type="int" /> + <argument index="2" name="material" type="RID" /> <description> Sets the override material of a specific surface. Equivalent to [method MeshInstance3D.set_surface_override_material]. </description> </method> <method name="instance_set_transform"> - <return type="void"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <argument index="1" name="transform" type="Transform3D"> - </argument> + <return type="void" /> + <argument index="0" name="instance" type="RID" /> + <argument index="1" name="transform" type="Transform3D" /> <description> Sets the world space transform of the instance. Equivalent to [member Node3D.transform]. </description> </method> <method name="instance_set_visibility_parent"> - <return type="void"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <argument index="1" name="parent" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="instance" type="RID" /> + <argument index="1" name="parent" type="RID" /> <description> Sets the visibility parent for the given instance. Equivalent to [member Node3D.visibility_parent]. </description> </method> <method name="instance_set_visible"> - <return type="void"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <argument index="1" name="visible" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="instance" type="RID" /> + <argument index="1" name="visible" type="bool" /> <description> Sets whether an instance is drawn or not. Equivalent to [member Node3D.visible]. </description> </method> <method name="instances_cull_aabb" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="aabb" type="AABB"> - </argument> - <argument index="1" name="scenario" type="RID"> - </argument> + <return type="Array" /> + <argument index="0" name="aabb" type="AABB" /> + <argument index="1" name="scenario" type="RID" /> <description> Returns an array of object IDs intersecting with the provided AABB. Only visual 3D nodes are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GlobalScope.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update. [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. </description> </method> <method name="instances_cull_convex" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="convex" type="Array"> - </argument> - <argument index="1" name="scenario" type="RID"> - </argument> + <return type="Array" /> + <argument index="0" name="convex" type="Array" /> + <argument index="1" name="scenario" type="RID" /> <description> Returns an array of object IDs intersecting with the provided convex shape. Only visual 3D nodes are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GlobalScope.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update. [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. </description> </method> <method name="instances_cull_ray" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="from" type="Vector3"> - </argument> - <argument index="1" name="to" type="Vector3"> - </argument> - <argument index="2" name="scenario" type="RID"> - </argument> + <return type="Array" /> + <argument index="0" name="from" type="Vector3" /> + <argument index="1" name="to" type="Vector3" /> + <argument index="2" name="scenario" type="RID" /> <description> Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as [MeshInstance3D] or [DirectionalLight3D]. Use [method @GlobalScope.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World3D] you want to query. This forces an update for all resources queued to update. [b]Warning:[/b] This function is primarily intended for editor usage. For in-game use cases, prefer physics collision. </description> </method> <method name="light_directional_set_blend_splits"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="enable" type="bool" /> <description> If [code]true[/code], this directional light will blend between shadow map splits resulting in a smoother transition between them. Equivalent to [member DirectionalLight3D.directional_shadow_blend_splits]. </description> </method> <method name="light_directional_set_shadow_mode"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="mode" type="int" enum="RenderingServer.LightDirectionalShadowMode"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="mode" type="int" enum="RenderingServer.LightDirectionalShadowMode" /> <description> Sets the shadow mode for this directional light. Equivalent to [member DirectionalLight3D.directional_shadow_mode]. See [enum LightDirectionalShadowMode] for options. </description> </method> <method name="light_directional_set_sky_only"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="enable" type="bool" /> <description> If [code]true[/code], this light will not be used for anything except sky shaders. Use this for lights that impact your sky shader that you may want to hide from affecting the rest of the scene. For example, you may want to enable this when the sun in your sky shader falls below the horizon. </description> </method> <method name="light_omni_set_shadow_mode"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="mode" type="int" enum="RenderingServer.LightOmniShadowMode"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="mode" type="int" enum="RenderingServer.LightOmniShadowMode" /> <description> Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual paraboloid is faster but may suffer from artifacts. Equivalent to [member OmniLight3D.omni_shadow_mode]. </description> </method> + <method name="light_projectors_set_filter"> + <return type="void" /> + <argument index="0" name="filter" type="int" enum="RenderingServer.LightProjectorFilter" /> + <description> + </description> + </method> <method name="light_set_bake_mode"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="bake_mode" type="int" enum="RenderingServer.LightBakeMode"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="bake_mode" type="int" enum="RenderingServer.LightBakeMode" /> <description> </description> </method> <method name="light_set_color"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="color" type="Color" /> <description> Sets the color of the light. Equivalent to [member Light3D.light_color]. </description> </method> <method name="light_set_cull_mask"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="mask" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="mask" type="int" /> <description> Sets the cull mask for this Light3D. Lights only affect objects in the selected layers. Equivalent to [member Light3D.light_cull_mask]. </description> </method> <method name="light_set_max_sdfgi_cascade"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="cascade" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="cascade" type="int" /> <description> </description> </method> <method name="light_set_negative"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="enable" type="bool" /> <description> If [code]true[/code], light will subtract light instead of adding light. Equivalent to [member Light3D.light_negative]. </description> </method> <method name="light_set_param"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="param" type="int" enum="RenderingServer.LightParam"> - </argument> - <argument index="2" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="param" type="int" enum="RenderingServer.LightParam" /> + <argument index="2" name="value" type="float" /> <description> Sets the specified light parameter. See [enum LightParam] for options. Equivalent to [method Light3D.set_param]. </description> </method> <method name="light_set_projector"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="texture" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="texture" type="RID" /> <description> Not implemented in Godot 3.x. </description> </method> <method name="light_set_reverse_cull_face_mode"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="enabled" type="bool" /> <description> If [code]true[/code], reverses the backface culling of the mesh. This can be useful when you have a flat mesh that has a light behind it. If you need to cast a shadow on both sides of the mesh, set the mesh to use double-sided shadows with [method instance_geometry_set_cast_shadows_setting]. Equivalent to [member Light3D.shadow_reverse_cull_face]. </description> </method> <method name="light_set_shadow"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="enabled" type="bool" /> <description> If [code]true[/code], light will cast shadows. Equivalent to [member Light3D.shadow_enabled]. </description> </method> <method name="light_set_shadow_color"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="light" type="RID" /> + <argument index="1" name="color" type="Color" /> <description> Sets the color of the shadow cast by the light. Equivalent to [member Light3D.shadow_color]. </description> </method> <method name="lightmap_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="lightmap_get_probe_capture_bsp_tree" qualifiers="const"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="lightmap" type="RID"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="lightmap" type="RID" /> <description> </description> </method> <method name="lightmap_get_probe_capture_points" qualifiers="const"> - <return type="PackedVector3Array"> - </return> - <argument index="0" name="lightmap" type="RID"> - </argument> + <return type="PackedVector3Array" /> + <argument index="0" name="lightmap" type="RID" /> <description> </description> </method> <method name="lightmap_get_probe_capture_sh" qualifiers="const"> - <return type="PackedColorArray"> - </return> - <argument index="0" name="lightmap" type="RID"> - </argument> + <return type="PackedColorArray" /> + <argument index="0" name="lightmap" type="RID" /> <description> </description> </method> <method name="lightmap_get_probe_capture_tetrahedra" qualifiers="const"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="lightmap" type="RID"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="lightmap" type="RID" /> <description> </description> </method> <method name="lightmap_set_probe_bounds"> - <return type="void"> - </return> - <argument index="0" name="lightmap" type="RID"> - </argument> - <argument index="1" name="bounds" type="AABB"> - </argument> + <return type="void" /> + <argument index="0" name="lightmap" type="RID" /> + <argument index="1" name="bounds" type="AABB" /> <description> </description> </method> <method name="lightmap_set_probe_capture_data"> - <return type="void"> - </return> - <argument index="0" name="lightmap" type="RID"> - </argument> - <argument index="1" name="points" type="PackedVector3Array"> - </argument> - <argument index="2" name="point_sh" type="PackedColorArray"> - </argument> - <argument index="3" name="tetrahedra" type="PackedInt32Array"> - </argument> - <argument index="4" name="bsp_tree" type="PackedInt32Array"> - </argument> + <return type="void" /> + <argument index="0" name="lightmap" type="RID" /> + <argument index="1" name="points" type="PackedVector3Array" /> + <argument index="2" name="point_sh" type="PackedColorArray" /> + <argument index="3" name="tetrahedra" type="PackedInt32Array" /> + <argument index="4" name="bsp_tree" type="PackedInt32Array" /> <description> </description> </method> <method name="lightmap_set_probe_capture_update_speed"> - <return type="void"> - </return> - <argument index="0" name="speed" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="speed" type="float" /> <description> </description> </method> <method name="lightmap_set_probe_interior"> - <return type="void"> - </return> - <argument index="0" name="lightmap" type="RID"> - </argument> - <argument index="1" name="interior" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="lightmap" type="RID" /> + <argument index="1" name="interior" type="bool" /> <description> </description> </method> <method name="lightmap_set_textures"> - <return type="void"> - </return> - <argument index="0" name="lightmap" type="RID"> - </argument> - <argument index="1" name="light" type="RID"> - </argument> - <argument index="2" name="uses_sh" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="lightmap" type="RID" /> + <argument index="1" name="light" type="RID" /> + <argument index="2" name="uses_sh" type="bool" /> <description> </description> </method> <method name="make_sphere_mesh"> - <return type="RID"> - </return> - <argument index="0" name="latitudes" type="int"> - </argument> - <argument index="1" name="longitudes" type="int"> - </argument> - <argument index="2" name="radius" type="float"> - </argument> + <return type="RID" /> + <argument index="0" name="latitudes" type="int" /> + <argument index="1" name="longitudes" type="int" /> + <argument index="2" name="radius" type="float" /> <description> Returns a mesh of a sphere with the given amount of horizontal and vertical subdivisions. </description> </method> <method name="material_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates an empty material and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]material_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. </description> </method> <method name="material_get_param" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="material" type="RID"> - </argument> - <argument index="1" name="parameter" type="StringName"> - </argument> + <return type="Variant" /> + <argument index="0" name="material" type="RID" /> + <argument index="1" name="parameter" type="StringName" /> <description> Returns the value of a certain material's parameter. </description> </method> <method name="material_set_next_pass"> - <return type="void"> - </return> - <argument index="0" name="material" type="RID"> - </argument> - <argument index="1" name="next_material" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="material" type="RID" /> + <argument index="1" name="next_material" type="RID" /> <description> Sets an object's next material. </description> </method> <method name="material_set_param"> - <return type="void"> - </return> - <argument index="0" name="material" type="RID"> - </argument> - <argument index="1" name="parameter" type="StringName"> - </argument> - <argument index="2" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="material" type="RID" /> + <argument index="1" name="parameter" type="StringName" /> + <argument index="2" name="value" type="Variant" /> <description> Sets a material's parameter. </description> </method> <method name="material_set_render_priority"> - <return type="void"> - </return> - <argument index="0" name="material" type="RID"> - </argument> - <argument index="1" name="priority" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="material" type="RID" /> + <argument index="1" name="priority" type="int" /> <description> Sets a material's render priority. </description> </method> <method name="material_set_shader"> - <return type="void"> - </return> - <argument index="0" name="shader_material" type="RID"> - </argument> - <argument index="1" name="shader" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="shader_material" type="RID" /> + <argument index="1" name="shader" type="RID" /> <description> Sets a shader material's shader. </description> </method> <method name="mesh_add_surface"> - <return type="void"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="surface" type="Dictionary"> - </argument> + <return type="void" /> + <argument index="0" name="mesh" type="RID" /> + <argument index="1" name="surface" type="Dictionary" /> <description> </description> </method> <method name="mesh_add_surface_from_arrays"> - <return type="void"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="primitive" type="int" enum="RenderingServer.PrimitiveType"> - </argument> - <argument index="2" name="arrays" type="Array"> - </argument> - <argument index="3" name="blend_shapes" type="Array" default="[]"> - </argument> + <return type="void" /> + <argument index="0" name="mesh" type="RID" /> + <argument index="1" name="primitive" type="int" enum="RenderingServer.PrimitiveType" /> + <argument index="2" name="arrays" type="Array" /> + <argument index="3" name="blend_shapes" type="Array" default="[]" /> <argument index="4" name="lods" type="Dictionary" default="{ -}"> - </argument> - <argument index="5" name="compress_format" type="int" default="0"> - </argument> +}" /> + <argument index="5" name="compress_format" type="int" default="0" /> <description> </description> </method> <method name="mesh_clear"> - <return type="void"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="mesh" type="RID" /> <description> Removes all surfaces from a mesh. </description> </method> <method name="mesh_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates a new mesh and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]mesh_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. @@ -2483,242 +1758,171 @@ </description> </method> <method name="mesh_create_from_surfaces"> - <return type="RID"> - </return> - <argument index="0" name="surfaces" type="Dictionary[]"> - </argument> - <argument index="1" name="blend_shape_count" type="int" default="0"> - </argument> + <return type="RID" /> + <argument index="0" name="surfaces" type="Dictionary[]" /> + <argument index="1" name="blend_shape_count" type="int" default="0" /> <description> </description> </method> <method name="mesh_get_blend_shape_count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="mesh" type="RID" /> <description> Returns a mesh's blend shape count. </description> </method> <method name="mesh_get_blend_shape_mode" qualifiers="const"> - <return type="int" enum="RenderingServer.BlendShapeMode"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> + <return type="int" enum="RenderingServer.BlendShapeMode" /> + <argument index="0" name="mesh" type="RID" /> <description> Returns a mesh's blend shape mode. </description> </method> <method name="mesh_get_custom_aabb" qualifiers="const"> - <return type="AABB"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> + <return type="AABB" /> + <argument index="0" name="mesh" type="RID" /> <description> Returns a mesh's custom aabb. </description> </method> <method name="mesh_get_surface"> - <return type="Dictionary"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="surface" type="int"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="mesh" type="RID" /> + <argument index="1" name="surface" type="int" /> <description> </description> </method> <method name="mesh_get_surface_count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="mesh" type="RID" /> <description> Returns a mesh's number of surfaces. </description> </method> <method name="mesh_set_blend_shape_mode"> - <return type="void"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="mode" type="int" enum="RenderingServer.BlendShapeMode"> - </argument> + <return type="void" /> + <argument index="0" name="mesh" type="RID" /> + <argument index="1" name="mode" type="int" enum="RenderingServer.BlendShapeMode" /> <description> Sets a mesh's blend shape mode. </description> </method> <method name="mesh_set_custom_aabb"> - <return type="void"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="aabb" type="AABB"> - </argument> + <return type="void" /> + <argument index="0" name="mesh" type="RID" /> + <argument index="1" name="aabb" type="AABB" /> <description> Sets a mesh's custom aabb. </description> </method> <method name="mesh_set_shadow_mesh"> - <return type="void"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="shadow_mesh" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="mesh" type="RID" /> + <argument index="1" name="shadow_mesh" type="RID" /> <description> </description> </method> <method name="mesh_surface_get_arrays" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="surface" type="int"> - </argument> + <return type="Array" /> + <argument index="0" name="mesh" type="RID" /> + <argument index="1" name="surface" type="int" /> <description> Returns a mesh's surface's buffer arrays. </description> </method> <method name="mesh_surface_get_blend_shape_arrays" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="surface" type="int"> - </argument> + <return type="Array" /> + <argument index="0" name="mesh" type="RID" /> + <argument index="1" name="surface" type="int" /> <description> Returns a mesh's surface's arrays for blend shapes. </description> </method> <method name="mesh_surface_get_format_attribute_stride" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="format" type="int"> - </argument> - <argument index="1" name="vertex_count" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="format" type="int" /> + <argument index="1" name="vertex_count" type="int" /> <description> </description> </method> <method name="mesh_surface_get_format_offset" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="format" type="int"> - </argument> - <argument index="1" name="vertex_count" type="int"> - </argument> - <argument index="2" name="array_index" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="format" type="int" /> + <argument index="1" name="vertex_count" type="int" /> + <argument index="2" name="array_index" type="int" /> <description> </description> </method> <method name="mesh_surface_get_format_skin_stride" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="format" type="int"> - </argument> - <argument index="1" name="vertex_count" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="format" type="int" /> + <argument index="1" name="vertex_count" type="int" /> <description> </description> </method> <method name="mesh_surface_get_format_vertex_stride" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="format" type="int"> - </argument> - <argument index="1" name="vertex_count" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="format" type="int" /> + <argument index="1" name="vertex_count" type="int" /> <description> </description> </method> <method name="mesh_surface_get_material" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="surface" type="int"> - </argument> + <return type="RID" /> + <argument index="0" name="mesh" type="RID" /> + <argument index="1" name="surface" type="int" /> <description> Returns a mesh's surface's material. </description> </method> <method name="mesh_surface_set_material"> - <return type="void"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="surface" type="int"> - </argument> - <argument index="2" name="material" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="mesh" type="RID" /> + <argument index="1" name="surface" type="int" /> + <argument index="2" name="material" type="RID" /> <description> Sets a mesh's surface's material. </description> </method> <method name="mesh_surface_update_attribute_region"> - <return type="void"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="surface" type="int"> - </argument> - <argument index="2" name="offset" type="int"> - </argument> - <argument index="3" name="data" type="PackedByteArray"> - </argument> + <return type="void" /> + <argument index="0" name="mesh" type="RID" /> + <argument index="1" name="surface" type="int" /> + <argument index="2" name="offset" type="int" /> + <argument index="3" name="data" type="PackedByteArray" /> <description> </description> </method> <method name="mesh_surface_update_skin_region"> - <return type="void"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="surface" type="int"> - </argument> - <argument index="2" name="offset" type="int"> - </argument> - <argument index="3" name="data" type="PackedByteArray"> - </argument> + <return type="void" /> + <argument index="0" name="mesh" type="RID" /> + <argument index="1" name="surface" type="int" /> + <argument index="2" name="offset" type="int" /> + <argument index="3" name="data" type="PackedByteArray" /> <description> </description> </method> <method name="mesh_surface_update_vertex_region"> - <return type="void"> - </return> - <argument index="0" name="mesh" type="RID"> - </argument> - <argument index="1" name="surface" type="int"> - </argument> - <argument index="2" name="offset" type="int"> - </argument> - <argument index="3" name="data" type="PackedByteArray"> - </argument> + <return type="void" /> + <argument index="0" name="mesh" type="RID" /> + <argument index="1" name="surface" type="int" /> + <argument index="2" name="offset" type="int" /> + <argument index="3" name="data" type="PackedByteArray" /> <description> </description> </method> <method name="multimesh_allocate_data"> - <return type="void"> - </return> - <argument index="0" name="multimesh" type="RID"> - </argument> - <argument index="1" name="instances" type="int"> - </argument> - <argument index="2" name="transform_format" type="int" enum="RenderingServer.MultimeshTransformFormat"> - </argument> - <argument index="3" name="color_format" type="bool" default="false"> - </argument> - <argument index="4" name="custom_data_format" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="multimesh" type="RID" /> + <argument index="1" name="instances" type="int" /> + <argument index="2" name="transform_format" type="int" enum="RenderingServer.MultimeshTransformFormat" /> + <argument index="3" name="color_format" type="bool" default="false" /> + <argument index="4" name="custom_data_format" type="bool" default="false" /> <description> </description> </method> <method name="multimesh_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates a new multimesh on the RenderingServer and returns an [RID] handle. This RID will be used in all [code]multimesh_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. @@ -2726,198 +1930,145 @@ </description> </method> <method name="multimesh_get_aabb" qualifiers="const"> - <return type="AABB"> - </return> - <argument index="0" name="multimesh" type="RID"> - </argument> + <return type="AABB" /> + <argument index="0" name="multimesh" type="RID" /> <description> Calculates and returns the axis-aligned bounding box that encloses all instances within the multimesh. </description> </method> <method name="multimesh_get_buffer" qualifiers="const"> - <return type="PackedFloat32Array"> - </return> - <argument index="0" name="multimesh" type="RID"> - </argument> + <return type="PackedFloat32Array" /> + <argument index="0" name="multimesh" type="RID" /> <description> </description> </method> <method name="multimesh_get_instance_count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="multimesh" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="multimesh" type="RID" /> <description> Returns the number of instances allocated for this multimesh. </description> </method> <method name="multimesh_get_mesh" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="multimesh" type="RID"> - </argument> + <return type="RID" /> + <argument index="0" name="multimesh" type="RID" /> <description> Returns the RID of the mesh that will be used in drawing this multimesh. </description> </method> <method name="multimesh_get_visible_instances" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="multimesh" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="multimesh" type="RID" /> <description> Returns the number of visible instances for this multimesh. </description> </method> <method name="multimesh_instance_get_color" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="multimesh" type="RID"> - </argument> - <argument index="1" name="index" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="multimesh" type="RID" /> + <argument index="1" name="index" type="int" /> <description> Returns the color by which the specified instance will be modulated. </description> </method> <method name="multimesh_instance_get_custom_data" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="multimesh" type="RID"> - </argument> - <argument index="1" name="index" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="multimesh" type="RID" /> + <argument index="1" name="index" type="int" /> <description> Returns the custom data associated with the specified instance. </description> </method> <method name="multimesh_instance_get_transform" qualifiers="const"> - <return type="Transform3D"> - </return> - <argument index="0" name="multimesh" type="RID"> - </argument> - <argument index="1" name="index" type="int"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="multimesh" type="RID" /> + <argument index="1" name="index" type="int" /> <description> Returns the [Transform3D] of the specified instance. </description> </method> <method name="multimesh_instance_get_transform_2d" qualifiers="const"> - <return type="Transform2D"> - </return> - <argument index="0" name="multimesh" type="RID"> - </argument> - <argument index="1" name="index" type="int"> - </argument> + <return type="Transform2D" /> + <argument index="0" name="multimesh" type="RID" /> + <argument index="1" name="index" type="int" /> <description> Returns the [Transform2D] of the specified instance. For use when the multimesh is set to use 2D transforms. </description> </method> <method name="multimesh_instance_set_color"> - <return type="void"> - </return> - <argument index="0" name="multimesh" type="RID"> - </argument> - <argument index="1" name="index" type="int"> - </argument> - <argument index="2" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="multimesh" type="RID" /> + <argument index="1" name="index" type="int" /> + <argument index="2" name="color" type="Color" /> <description> Sets the color by which this instance will be modulated. Equivalent to [method MultiMesh.set_instance_color]. </description> </method> <method name="multimesh_instance_set_custom_data"> - <return type="void"> - </return> - <argument index="0" name="multimesh" type="RID"> - </argument> - <argument index="1" name="index" type="int"> - </argument> - <argument index="2" name="custom_data" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="multimesh" type="RID" /> + <argument index="1" name="index" type="int" /> + <argument index="2" name="custom_data" type="Color" /> <description> Sets the custom data for this instance. Custom data is passed as a [Color], but is interpreted as a [code]vec4[/code] in the shader. Equivalent to [method MultiMesh.set_instance_custom_data]. </description> </method> <method name="multimesh_instance_set_transform"> - <return type="void"> - </return> - <argument index="0" name="multimesh" type="RID"> - </argument> - <argument index="1" name="index" type="int"> - </argument> - <argument index="2" name="transform" type="Transform3D"> - </argument> + <return type="void" /> + <argument index="0" name="multimesh" type="RID" /> + <argument index="1" name="index" type="int" /> + <argument index="2" name="transform" type="Transform3D" /> <description> Sets the [Transform3D] for this instance. Equivalent to [method MultiMesh.set_instance_transform]. </description> </method> <method name="multimesh_instance_set_transform_2d"> - <return type="void"> - </return> - <argument index="0" name="multimesh" type="RID"> - </argument> - <argument index="1" name="index" type="int"> - </argument> - <argument index="2" name="transform" type="Transform2D"> - </argument> + <return type="void" /> + <argument index="0" name="multimesh" type="RID" /> + <argument index="1" name="index" type="int" /> + <argument index="2" name="transform" type="Transform2D" /> <description> Sets the [Transform2D] for this instance. For use when multimesh is used in 2D. Equivalent to [method MultiMesh.set_instance_transform_2d]. </description> </method> <method name="multimesh_set_buffer"> - <return type="void"> - </return> - <argument index="0" name="multimesh" type="RID"> - </argument> - <argument index="1" name="buffer" type="PackedFloat32Array"> - </argument> + <return type="void" /> + <argument index="0" name="multimesh" type="RID" /> + <argument index="1" name="buffer" type="PackedFloat32Array" /> <description> </description> </method> <method name="multimesh_set_mesh"> - <return type="void"> - </return> - <argument index="0" name="multimesh" type="RID"> - </argument> - <argument index="1" name="mesh" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="multimesh" type="RID" /> + <argument index="1" name="mesh" type="RID" /> <description> Sets the mesh to be drawn by the multimesh. Equivalent to [member MultiMesh.mesh]. </description> </method> <method name="multimesh_set_visible_instances"> - <return type="void"> - </return> - <argument index="0" name="multimesh" type="RID"> - </argument> - <argument index="1" name="visible" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="multimesh" type="RID" /> + <argument index="1" name="visible" type="int" /> <description> Sets the number of instances visible at a given time. If -1, all instances that have been allocated are drawn. Equivalent to [member MultiMesh.visible_instance_count]. </description> </method> <method name="occluder_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="occluder_set_mesh"> - <return type="void"> - </return> - <argument index="0" name="occluder" type="RID"> - </argument> - <argument index="1" name="vertices" type="PackedVector3Array"> - </argument> - <argument index="2" name="indices" type="PackedInt32Array"> - </argument> + <return type="void" /> + <argument index="0" name="occluder" type="RID" /> + <argument index="1" name="vertices" type="PackedVector3Array" /> + <argument index="2" name="indices" type="PackedInt32Array" /> <description> </description> </method> <method name="omni_light_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates a new omni light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. @@ -2925,112 +2076,81 @@ </description> </method> <method name="particles_collision_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="particles_collision_height_field_update"> - <return type="void"> - </return> - <argument index="0" name="particles_collision" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="particles_collision" type="RID" /> <description> </description> </method> <method name="particles_collision_set_attractor_attenuation"> - <return type="void"> - </return> - <argument index="0" name="particles_collision" type="RID"> - </argument> - <argument index="1" name="curve" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="particles_collision" type="RID" /> + <argument index="1" name="curve" type="float" /> <description> </description> </method> <method name="particles_collision_set_attractor_directionality"> - <return type="void"> - </return> - <argument index="0" name="particles_collision" type="RID"> - </argument> - <argument index="1" name="amount" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="particles_collision" type="RID" /> + <argument index="1" name="amount" type="float" /> <description> </description> </method> <method name="particles_collision_set_attractor_strength"> - <return type="void"> - </return> - <argument index="0" name="particles_collision" type="RID"> - </argument> - <argument index="1" name="setrngth" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="particles_collision" type="RID" /> + <argument index="1" name="setrngth" type="float" /> <description> </description> </method> <method name="particles_collision_set_box_extents"> - <return type="void"> - </return> - <argument index="0" name="particles_collision" type="RID"> - </argument> - <argument index="1" name="extents" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="particles_collision" type="RID" /> + <argument index="1" name="extents" type="Vector3" /> <description> </description> </method> <method name="particles_collision_set_collision_type"> - <return type="void"> - </return> - <argument index="0" name="particles_collision" type="RID"> - </argument> - <argument index="1" name="type" type="int" enum="RenderingServer.ParticlesCollisionType"> - </argument> + <return type="void" /> + <argument index="0" name="particles_collision" type="RID" /> + <argument index="1" name="type" type="int" enum="RenderingServer.ParticlesCollisionType" /> <description> </description> </method> <method name="particles_collision_set_cull_mask"> - <return type="void"> - </return> - <argument index="0" name="particles_collision" type="RID"> - </argument> - <argument index="1" name="mask" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="particles_collision" type="RID" /> + <argument index="1" name="mask" type="int" /> <description> </description> </method> <method name="particles_collision_set_field_texture"> - <return type="void"> - </return> - <argument index="0" name="particles_collision" type="RID"> - </argument> - <argument index="1" name="texture" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="particles_collision" type="RID" /> + <argument index="1" name="texture" type="RID" /> <description> </description> </method> <method name="particles_collision_set_height_field_resolution"> - <return type="void"> - </return> - <argument index="0" name="particles_collision" type="RID"> - </argument> - <argument index="1" name="resolution" type="int" enum="RenderingServer.ParticlesCollisionHeightfieldResolution"> - </argument> + <return type="void" /> + <argument index="0" name="particles_collision" type="RID" /> + <argument index="1" name="resolution" type="int" enum="RenderingServer.ParticlesCollisionHeightfieldResolution" /> <description> </description> </method> <method name="particles_collision_set_sphere_radius"> - <return type="void"> - </return> - <argument index="0" name="particles_collision" type="RID"> - </argument> - <argument index="1" name="radius" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="particles_collision" type="RID" /> + <argument index="1" name="radius" type="float" /> <description> </description> </method> <method name="particles_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates a particle system and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]particles_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. @@ -3038,332 +2158,240 @@ </description> </method> <method name="particles_emit"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="transform" type="Transform3D"> - </argument> - <argument index="2" name="velocity" type="Vector3"> - </argument> - <argument index="3" name="color" type="Color"> - </argument> - <argument index="4" name="custom" type="Color"> - </argument> - <argument index="5" name="emit_flags" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="transform" type="Transform3D" /> + <argument index="2" name="velocity" type="Vector3" /> + <argument index="3" name="color" type="Color" /> + <argument index="4" name="custom" type="Color" /> + <argument index="5" name="emit_flags" type="int" /> <description> </description> </method> <method name="particles_get_current_aabb"> - <return type="AABB"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> + <return type="AABB" /> + <argument index="0" name="particles" type="RID" /> <description> Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to [method GPUParticles3D.capture_aabb]. </description> </method> <method name="particles_get_emitting"> - <return type="bool"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="particles" type="RID" /> <description> Returns [code]true[/code] if particles are currently set to emitting. </description> </method> <method name="particles_is_inactive"> - <return type="bool"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="particles" type="RID" /> <description> Returns [code]true[/code] if particles are not emitting and particles are set to inactive. </description> </method> <method name="particles_request_process"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> <description> Add particle system to list of particle systems that need to be updated. Update will take place on the next frame, or on the next call to [method instances_cull_aabb], [method instances_cull_convex], or [method instances_cull_ray]. </description> </method> <method name="particles_restart"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> <description> Reset the particles on the next update. Equivalent to [method GPUParticles3D.restart]. </description> </method> <method name="particles_set_amount"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="amount" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="amount" type="int" /> <description> Sets the number of particles to be drawn and allocates the memory for them. Equivalent to [member GPUParticles3D.amount]. </description> </method> <method name="particles_set_collision_base_size"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="size" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="size" type="float" /> <description> </description> </method> <method name="particles_set_custom_aabb"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="aabb" type="AABB"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="aabb" type="AABB" /> <description> Sets a custom axis-aligned bounding box for the particle system. Equivalent to [member GPUParticles3D.visibility_aabb]. </description> </method> <method name="particles_set_draw_order"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="order" type="int" enum="RenderingServer.ParticlesDrawOrder"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="order" type="int" enum="RenderingServer.ParticlesDrawOrder" /> <description> Sets the draw order of the particles to one of the named enums from [enum ParticlesDrawOrder]. See [enum ParticlesDrawOrder] for options. Equivalent to [member GPUParticles3D.draw_order]. </description> </method> <method name="particles_set_draw_pass_mesh"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="pass" type="int"> - </argument> - <argument index="2" name="mesh" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="pass" type="int" /> + <argument index="2" name="mesh" type="RID" /> <description> Sets the mesh to be used for the specified draw pass. Equivalent to [member GPUParticles3D.draw_pass_1], [member GPUParticles3D.draw_pass_2], [member GPUParticles3D.draw_pass_3], and [member GPUParticles3D.draw_pass_4]. </description> </method> <method name="particles_set_draw_passes"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="count" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="count" type="int" /> <description> Sets the number of draw passes to use. Equivalent to [member GPUParticles3D.draw_passes]. </description> </method> <method name="particles_set_emission_transform"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="transform" type="Transform3D"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="transform" type="Transform3D" /> <description> Sets the [Transform3D] that will be used by the particles when they first emit. </description> </method> <method name="particles_set_emitting"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="emitting" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="emitting" type="bool" /> <description> If [code]true[/code], particles will emit over time. Setting to false does not reset the particles, but only stops their emission. Equivalent to [member GPUParticles3D.emitting]. </description> </method> <method name="particles_set_explosiveness_ratio"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="ratio" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="ratio" type="float" /> <description> Sets the explosiveness ratio. Equivalent to [member GPUParticles3D.explosiveness]. </description> </method> <method name="particles_set_fixed_fps"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="fps" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="fps" type="int" /> <description> Sets the frame rate that the particle system rendering will be fixed to. Equivalent to [member GPUParticles3D.fixed_fps]. </description> </method> <method name="particles_set_fractional_delta"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="enable" type="bool" /> <description> If [code]true[/code], uses fractional delta which smooths the movement of the particles. Equivalent to [member GPUParticles3D.fract_delta]. </description> </method> <method name="particles_set_interpolate"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="enable" type="bool" /> <description> </description> </method> <method name="particles_set_lifetime"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="lifetime" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="lifetime" type="float" /> <description> Sets the lifetime of each particle in the system. Equivalent to [member GPUParticles3D.lifetime]. </description> </method> <method name="particles_set_mode"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="mode" type="int" enum="RenderingServer.ParticlesMode"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="mode" type="int" enum="RenderingServer.ParticlesMode" /> <description> </description> </method> <method name="particles_set_one_shot"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="one_shot" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="one_shot" type="bool" /> <description> If [code]true[/code], particles will emit once and then stop. Equivalent to [member GPUParticles3D.one_shot]. </description> </method> <method name="particles_set_pre_process_time"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="time" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="time" type="float" /> <description> Sets the preprocess time for the particles' animation. This lets you delay starting an animation until after the particles have begun emitting. Equivalent to [member GPUParticles3D.preprocess]. </description> </method> <method name="particles_set_process_material"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="material" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="material" type="RID" /> <description> Sets the material for processing the particles. Note: this is not the material used to draw the materials. Equivalent to [member GPUParticles3D.process_material]. </description> </method> <method name="particles_set_randomness_ratio"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="ratio" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="ratio" type="float" /> <description> Sets the emission randomness ratio. This randomizes the emission of particles within their phase. Equivalent to [member GPUParticles3D.randomness]. </description> </method> <method name="particles_set_speed_scale"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="scale" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="scale" type="float" /> <description> Sets the speed scale of the particle system. Equivalent to [member GPUParticles3D.speed_scale]. </description> </method> <method name="particles_set_subemitter"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="subemitter_particles" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="subemitter_particles" type="RID" /> <description> </description> </method> <method name="particles_set_trail_bind_poses"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="bind_poses" type="Transform3D[]"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="bind_poses" type="Transform3D[]" /> <description> </description> </method> <method name="particles_set_trails"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> - <argument index="2" name="length_sec" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="enable" type="bool" /> + <argument index="2" name="length_sec" type="float" /> <description> </description> </method> <method name="particles_set_transform_align"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="align" type="int" enum="RenderingServer.ParticlesTransformAlign"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="align" type="int" enum="RenderingServer.ParticlesTransformAlign" /> <description> </description> </method> <method name="particles_set_use_local_coordinates"> - <return type="void"> - </return> - <argument index="0" name="particles" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="particles" type="RID" /> + <argument index="1" name="enable" type="bool" /> <description> If [code]true[/code], particles use local coordinates. If [code]false[/code] they use global coordinates. Equivalent to [member GPUParticles3D.local_coords]. </description> </method> <method name="reflection_probe_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates a reflection probe and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]reflection_probe_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. @@ -3371,171 +2399,124 @@ </description> </method> <method name="reflection_probe_set_ambient_color"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="probe" type="RID" /> + <argument index="1" name="color" type="Color" /> <description> </description> </method> <method name="reflection_probe_set_ambient_energy"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="energy" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="probe" type="RID" /> + <argument index="1" name="energy" type="float" /> <description> </description> </method> <method name="reflection_probe_set_ambient_mode"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="mode" type="int" enum="RenderingServer.ReflectionProbeAmbientMode"> - </argument> + <return type="void" /> + <argument index="0" name="probe" type="RID" /> + <argument index="1" name="mode" type="int" enum="RenderingServer.ReflectionProbeAmbientMode" /> <description> </description> </method> <method name="reflection_probe_set_as_interior"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="probe" type="RID" /> + <argument index="1" name="enable" type="bool" /> <description> If [code]true[/code], reflections will ignore sky contribution. Equivalent to [member ReflectionProbe.interior]. </description> </method> <method name="reflection_probe_set_cull_mask"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="layers" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="probe" type="RID" /> + <argument index="1" name="layers" type="int" /> <description> Sets the render cull mask for this reflection probe. Only instances with a matching cull mask will be rendered by this probe. Equivalent to [member ReflectionProbe.cull_mask]. </description> </method> <method name="reflection_probe_set_enable_box_projection"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="probe" type="RID" /> + <argument index="1" name="enable" type="bool" /> <description> If [code]true[/code], uses box projection. This can make reflections look more correct in certain situations. Equivalent to [member ReflectionProbe.box_projection]. </description> </method> <method name="reflection_probe_set_enable_shadows"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="probe" type="RID" /> + <argument index="1" name="enable" type="bool" /> <description> If [code]true[/code], computes shadows in the reflection probe. This makes the reflection much slower to compute. Equivalent to [member ReflectionProbe.enable_shadows]. </description> </method> <method name="reflection_probe_set_extents"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="extents" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="probe" type="RID" /> + <argument index="1" name="extents" type="Vector3" /> <description> Sets the size of the area that the reflection probe will capture. Equivalent to [member ReflectionProbe.extents]. </description> </method> <method name="reflection_probe_set_intensity"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="intensity" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="probe" type="RID" /> + <argument index="1" name="intensity" type="float" /> <description> Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to [member ReflectionProbe.intensity]. </description> </method> <method name="reflection_probe_set_lod_threshold"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="pixels" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="probe" type="RID" /> + <argument index="1" name="pixels" type="float" /> <description> </description> </method> <method name="reflection_probe_set_max_distance"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="distance" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="probe" type="RID" /> + <argument index="1" name="distance" type="float" /> <description> Sets the max distance away from the probe an object can be before it is culled. Equivalent to [member ReflectionProbe.max_distance]. </description> </method> <method name="reflection_probe_set_origin_offset"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="offset" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="probe" type="RID" /> + <argument index="1" name="offset" type="Vector3" /> <description> Sets the origin offset to be used when this reflection probe is in box project mode. Equivalent to [member ReflectionProbe.origin_offset]. </description> </method> <method name="reflection_probe_set_resolution"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="resolution" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="probe" type="RID" /> + <argument index="1" name="resolution" type="int" /> <description> </description> </method> <method name="reflection_probe_set_update_mode"> - <return type="void"> - </return> - <argument index="0" name="probe" type="RID"> - </argument> - <argument index="1" name="mode" type="int" enum="RenderingServer.ReflectionProbeUpdateMode"> - </argument> + <return type="void" /> + <argument index="0" name="probe" type="RID" /> + <argument index="1" name="mode" type="int" enum="RenderingServer.ReflectionProbeUpdateMode" /> <description> Sets how often the reflection probe updates. Can either be once or every frame. See [enum ReflectionProbeUpdateMode] for options. </description> </method> <method name="request_frame_drawn_callback"> - <return type="void"> - </return> - <argument index="0" name="where" type="Object"> - </argument> - <argument index="1" name="method" type="StringName"> - </argument> - <argument index="2" name="userdata" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="where" type="Object" /> + <argument index="1" name="method" type="StringName" /> + <argument index="2" name="userdata" type="Variant" /> <description> Schedules a callback to the corresponding named [code]method[/code] on [code]where[/code] after a frame has been drawn. The callback method must use only 1 argument which will be called with [code]userdata[/code]. </description> </method> <method name="scenario_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates a scenario and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]scenario_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. @@ -3543,293 +2524,214 @@ </description> </method> <method name="scenario_set_camera_effects"> - <return type="void"> - </return> - <argument index="0" name="scenario" type="RID"> - </argument> - <argument index="1" name="effects" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="scenario" type="RID" /> + <argument index="1" name="effects" type="RID" /> <description> </description> </method> <method name="scenario_set_environment"> - <return type="void"> - </return> - <argument index="0" name="scenario" type="RID"> - </argument> - <argument index="1" name="environment" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="scenario" type="RID" /> + <argument index="1" name="environment" type="RID" /> <description> Sets the environment that will be used with this scenario. </description> </method> <method name="scenario_set_fallback_environment"> - <return type="void"> - </return> - <argument index="0" name="scenario" type="RID"> - </argument> - <argument index="1" name="environment" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="scenario" type="RID" /> + <argument index="1" name="environment" type="RID" /> <description> Sets the fallback environment to be used by this scenario. The fallback environment is used if no environment is set. Internally, this is used by the editor to provide a default environment. </description> </method> <method name="screen_space_roughness_limiter_set_active"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> - <argument index="1" name="amount" type="float"> - </argument> - <argument index="2" name="limit" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="enable" type="bool" /> + <argument index="1" name="amount" type="float" /> + <argument index="2" name="limit" type="float" /> <description> </description> </method> <method name="set_boot_image"> - <return type="void"> - </return> - <argument index="0" name="image" type="Image"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> - <argument index="2" name="scale" type="bool"> - </argument> - <argument index="3" name="use_filter" type="bool" default="true"> - </argument> + <return type="void" /> + <argument index="0" name="image" type="Image" /> + <argument index="1" name="color" type="Color" /> + <argument index="2" name="scale" type="bool" /> + <argument index="3" name="use_filter" type="bool" default="true" /> <description> Sets a boot image. The color defines the background color. If [code]scale[/code] is [code]true[/code], the image will be scaled to fit the screen size. If [code]use_filter[/code] is [code]true[/code], the image will be scaled with linear interpolation. If [code]use_filter[/code] is [code]false[/code], the image will be scaled with nearest-neighbor interpolation. </description> </method> <method name="set_debug_generate_wireframes"> - <return type="void"> - </return> - <argument index="0" name="generate" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="generate" type="bool" /> <description> If [code]true[/code], the engine will generate wireframes for use with the wireframe debug mode. </description> </method> <method name="set_default_clear_color"> - <return type="void"> - </return> - <argument index="0" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="color" type="Color" /> <description> Sets the default clear color which is used when a specific clear color has not been selected. </description> </method> <method name="shader_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates an empty shader and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]shader_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. </description> </method> <method name="shader_get_code" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="shader" type="RID"> - </argument> + <return type="String" /> + <argument index="0" name="shader" type="RID" /> <description> Returns a shader's code. </description> </method> <method name="shader_get_default_texture_param" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="shader" type="RID"> - </argument> - <argument index="1" name="param" type="StringName"> - </argument> + <return type="RID" /> + <argument index="0" name="shader" type="RID" /> + <argument index="1" name="param" type="StringName" /> <description> Returns a default texture from a shader searched by name. </description> </method> <method name="shader_get_param_default" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="shader" type="RID"> - </argument> - <argument index="1" name="param" type="StringName"> - </argument> + <return type="Variant" /> + <argument index="0" name="shader" type="RID" /> + <argument index="1" name="param" type="StringName" /> <description> </description> </method> <method name="shader_get_param_list" qualifiers="const"> - <return type="Dictionary[]"> - </return> - <argument index="0" name="shader" type="RID"> - </argument> + <return type="Dictionary[]" /> + <argument index="0" name="shader" type="RID" /> <description> Returns the parameters of a shader. </description> </method> <method name="shader_set_default_texture_param"> - <return type="void"> - </return> - <argument index="0" name="shader" type="RID"> - </argument> - <argument index="1" name="param" type="StringName"> - </argument> - <argument index="2" name="texture" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="shader" type="RID" /> + <argument index="1" name="param" type="StringName" /> + <argument index="2" name="texture" type="RID" /> <description> Sets a shader's default texture. Overwrites the texture given by name. </description> </method> <method name="shadows_quality_set"> - <return type="void"> - </return> - <argument index="0" name="quality" type="int" enum="RenderingServer.ShadowQuality"> - </argument> + <return type="void" /> + <argument index="0" name="quality" type="int" enum="RenderingServer.ShadowQuality" /> <description> </description> </method> <method name="skeleton_allocate_data"> - <return type="void"> - </return> - <argument index="0" name="skeleton" type="RID"> - </argument> - <argument index="1" name="bones" type="int"> - </argument> - <argument index="2" name="is_2d_skeleton" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="skeleton" type="RID" /> + <argument index="1" name="bones" type="int" /> + <argument index="2" name="is_2d_skeleton" type="bool" default="false" /> <description> </description> </method> <method name="skeleton_bone_get_transform" qualifiers="const"> - <return type="Transform3D"> - </return> - <argument index="0" name="skeleton" type="RID"> - </argument> - <argument index="1" name="bone" type="int"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="skeleton" type="RID" /> + <argument index="1" name="bone" type="int" /> <description> Returns the [Transform3D] set for a specific bone of this skeleton. </description> </method> <method name="skeleton_bone_get_transform_2d" qualifiers="const"> - <return type="Transform2D"> - </return> - <argument index="0" name="skeleton" type="RID"> - </argument> - <argument index="1" name="bone" type="int"> - </argument> + <return type="Transform2D" /> + <argument index="0" name="skeleton" type="RID" /> + <argument index="1" name="bone" type="int" /> <description> Returns the [Transform2D] set for a specific bone of this skeleton. </description> </method> <method name="skeleton_bone_set_transform"> - <return type="void"> - </return> - <argument index="0" name="skeleton" type="RID"> - </argument> - <argument index="1" name="bone" type="int"> - </argument> - <argument index="2" name="transform" type="Transform3D"> - </argument> + <return type="void" /> + <argument index="0" name="skeleton" type="RID" /> + <argument index="1" name="bone" type="int" /> + <argument index="2" name="transform" type="Transform3D" /> <description> Sets the [Transform3D] for a specific bone of this skeleton. </description> </method> <method name="skeleton_bone_set_transform_2d"> - <return type="void"> - </return> - <argument index="0" name="skeleton" type="RID"> - </argument> - <argument index="1" name="bone" type="int"> - </argument> - <argument index="2" name="transform" type="Transform2D"> - </argument> + <return type="void" /> + <argument index="0" name="skeleton" type="RID" /> + <argument index="1" name="bone" type="int" /> + <argument index="2" name="transform" type="Transform2D" /> <description> Sets the [Transform2D] for a specific bone of this skeleton. </description> </method> <method name="skeleton_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates a skeleton and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]skeleton_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. </description> </method> <method name="skeleton_get_bone_count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="skeleton" type="RID"> - </argument> + <return type="int" /> + <argument index="0" name="skeleton" type="RID" /> <description> Returns the number of bones allocated for this skeleton. </description> </method> <method name="skeleton_set_base_transform_2d"> - <return type="void"> - </return> - <argument index="0" name="skeleton" type="RID"> - </argument> - <argument index="1" name="base_transform" type="Transform2D"> - </argument> + <return type="void" /> + <argument index="0" name="skeleton" type="RID" /> + <argument index="1" name="base_transform" type="Transform2D" /> <description> </description> </method> <method name="sky_bake_panorama"> - <return type="Image"> - </return> - <argument index="0" name="sky" type="RID"> - </argument> - <argument index="1" name="energy" type="float"> - </argument> - <argument index="2" name="bake_irradiance" type="bool"> - </argument> - <argument index="3" name="size" type="Vector2i"> - </argument> + <return type="Image" /> + <argument index="0" name="sky" type="RID" /> + <argument index="1" name="energy" type="float" /> + <argument index="2" name="bake_irradiance" type="bool" /> + <argument index="3" name="size" type="Vector2i" /> <description> </description> </method> <method name="sky_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates an empty sky and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]sky_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. </description> </method> <method name="sky_set_material"> - <return type="void"> - </return> - <argument index="0" name="sky" type="RID"> - </argument> - <argument index="1" name="material" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="sky" type="RID" /> + <argument index="1" name="material" type="RID" /> <description> Sets the material that the sky uses to render the background and reflection maps. </description> </method> <method name="sky_set_mode"> - <return type="void"> - </return> - <argument index="0" name="sky" type="RID"> - </argument> - <argument index="1" name="mode" type="int" enum="RenderingServer.SkyMode"> - </argument> + <return type="void" /> + <argument index="0" name="sky" type="RID" /> + <argument index="1" name="mode" type="int" enum="RenderingServer.SkyMode" /> <description> </description> </method> <method name="sky_set_radiance_size"> - <return type="void"> - </return> - <argument index="0" name="sky" type="RID"> - </argument> - <argument index="1" name="radiance_size" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="sky" type="RID" /> + <argument index="1" name="radiance_size" type="int" /> <description> </description> </method> <method name="spot_light_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates a spot light and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. @@ -3837,226 +2739,161 @@ </description> </method> <method name="sub_surface_scattering_set_quality"> - <return type="void"> - </return> - <argument index="0" name="quality" type="int" enum="RenderingServer.SubSurfaceScatteringQuality"> - </argument> + <return type="void" /> + <argument index="0" name="quality" type="int" enum="RenderingServer.SubSurfaceScatteringQuality" /> <description> </description> </method> <method name="sub_surface_scattering_set_scale"> - <return type="void"> - </return> - <argument index="0" name="scale" type="float"> - </argument> - <argument index="1" name="depth_scale" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="scale" type="float" /> + <argument index="1" name="depth_scale" type="float" /> <description> </description> </method> <method name="texture_2d_create"> - <return type="RID"> - </return> - <argument index="0" name="image" type="Image"> - </argument> + <return type="RID" /> + <argument index="0" name="image" type="Image" /> <description> </description> </method> <method name="texture_2d_get" qualifiers="const"> - <return type="Image"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> + <return type="Image" /> + <argument index="0" name="texture" type="RID" /> <description> </description> </method> <method name="texture_2d_layer_get" qualifiers="const"> - <return type="Image"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <argument index="1" name="layer" type="int"> - </argument> + <return type="Image" /> + <argument index="0" name="texture" type="RID" /> + <argument index="1" name="layer" type="int" /> <description> </description> </method> <method name="texture_2d_layered_create"> - <return type="RID"> - </return> - <argument index="0" name="layers" type="Image[]"> - </argument> - <argument index="1" name="layered_type" type="int" enum="RenderingServer.TextureLayeredType"> - </argument> + <return type="RID" /> + <argument index="0" name="layers" type="Image[]" /> + <argument index="1" name="layered_type" type="int" enum="RenderingServer.TextureLayeredType" /> <description> </description> </method> <method name="texture_2d_layered_placeholder_create"> - <return type="RID"> - </return> - <argument index="0" name="layered_type" type="int" enum="RenderingServer.TextureLayeredType"> - </argument> + <return type="RID" /> + <argument index="0" name="layered_type" type="int" enum="RenderingServer.TextureLayeredType" /> <description> </description> </method> <method name="texture_2d_placeholder_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="texture_2d_update"> - <return type="void"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <argument index="1" name="image" type="Image"> - </argument> - <argument index="2" name="layer" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="texture" type="RID" /> + <argument index="1" name="image" type="Image" /> + <argument index="2" name="layer" type="int" /> <description> </description> </method> <method name="texture_3d_create"> - <return type="RID"> - </return> - <argument index="0" name="format" type="int" enum="Image.Format"> - </argument> - <argument index="1" name="width" type="int"> - </argument> - <argument index="2" name="height" type="int"> - </argument> - <argument index="3" name="depth" type="int"> - </argument> - <argument index="4" name="mipmaps" type="bool"> - </argument> - <argument index="5" name="data" type="Image[]"> - </argument> + <return type="RID" /> + <argument index="0" name="format" type="int" enum="Image.Format" /> + <argument index="1" name="width" type="int" /> + <argument index="2" name="height" type="int" /> + <argument index="3" name="depth" type="int" /> + <argument index="4" name="mipmaps" type="bool" /> + <argument index="5" name="data" type="Image[]" /> <description> </description> </method> <method name="texture_3d_get" qualifiers="const"> - <return type="Image[]"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> + <return type="Image[]" /> + <argument index="0" name="texture" type="RID" /> <description> </description> </method> <method name="texture_3d_placeholder_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="texture_3d_update"> - <return type="void"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <argument index="1" name="data" type="Image[]"> - </argument> + <return type="void" /> + <argument index="0" name="texture" type="RID" /> + <argument index="1" name="data" type="Image[]" /> <description> </description> </method> <method name="texture_get_path" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> + <return type="String" /> + <argument index="0" name="texture" type="RID" /> <description> </description> </method> <method name="texture_proxy_create"> - <return type="RID"> - </return> - <argument index="0" name="base" type="RID"> - </argument> + <return type="RID" /> + <argument index="0" name="base" type="RID" /> <description> </description> </method> <method name="texture_proxy_update"> - <return type="void"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <argument index="1" name="proxy_to" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="texture" type="RID" /> + <argument index="1" name="proxy_to" type="RID" /> <description> </description> </method> <method name="texture_replace"> - <return type="void"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <argument index="1" name="by_texture" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="texture" type="RID" /> + <argument index="1" name="by_texture" type="RID" /> <description> </description> </method> <method name="texture_set_force_redraw_if_visible"> - <return type="void"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="texture" type="RID" /> + <argument index="1" name="enable" type="bool" /> <description> </description> </method> <method name="texture_set_path"> - <return type="void"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <argument index="1" name="path" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="texture" type="RID" /> + <argument index="1" name="path" type="String" /> <description> </description> </method> <method name="texture_set_size_override"> - <return type="void"> - </return> - <argument index="0" name="texture" type="RID"> - </argument> - <argument index="1" name="width" type="int"> - </argument> - <argument index="2" name="height" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="texture" type="RID" /> + <argument index="1" name="width" type="int" /> + <argument index="2" name="height" type="int" /> <description> </description> </method> <method name="viewport_attach_camera"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="camera" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="camera" type="RID" /> <description> Sets a viewport's camera. </description> </method> <method name="viewport_attach_canvas"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="canvas" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="canvas" type="RID" /> <description> Sets a viewport's canvas. </description> </method> <method name="viewport_attach_to_screen"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="rect" type="Rect2" default="Rect2(0, 0, 0, 0)"> - </argument> - <argument index="2" name="screen" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="rect" type="Rect2" default="Rect2(0, 0, 0, 0)" /> + <argument index="2" name="screen" type="int" default="0" /> <description> Copies the viewport to a region of the screen specified by [code]rect[/code]. If [method viewport_set_render_direct_to_screen] is [code]true[/code], then the viewport does not use a framebuffer and the contents of the viewport are rendered directly to screen. However, note that the root viewport is drawn last, therefore it will draw over the screen. Accordingly, you must set the root viewport to an area that does not cover the area that you have attached this viewport to. For example, you can set the root viewport to not render at all with the following code: @@ -4072,570 +2909,416 @@ </description> </method> <method name="viewport_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> Creates an empty viewport and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]viewport_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. </description> </method> <method name="viewport_get_measured_render_time_cpu" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> + <return type="float" /> + <argument index="0" name="viewport" type="RID" /> <description> </description> </method> <method name="viewport_get_measured_render_time_gpu" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> + <return type="float" /> + <argument index="0" name="viewport" type="RID" /> <description> </description> </method> <method name="viewport_get_render_info"> - <return type="int"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="type" type="int" enum="RenderingServer.ViewportRenderInfoType"> - </argument> - <argument index="2" name="info" type="int" enum="RenderingServer.ViewportRenderInfo"> - </argument> + <return type="int" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="type" type="int" enum="RenderingServer.ViewportRenderInfoType" /> + <argument index="2" name="info" type="int" enum="RenderingServer.ViewportRenderInfo" /> <description> </description> </method> <method name="viewport_get_texture" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> + <return type="RID" /> + <argument index="0" name="viewport" type="RID" /> <description> Returns the viewport's last rendered frame. </description> </method> <method name="viewport_remove_canvas"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="canvas" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="canvas" type="RID" /> <description> Detaches a viewport from a canvas and vice versa. </description> </method> <method name="viewport_set_active"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="active" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="active" type="bool" /> <description> If [code]true[/code], sets the viewport active, else sets it inactive. </description> </method> <method name="viewport_set_canvas_stacking"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="canvas" type="RID"> - </argument> - <argument index="2" name="layer" type="int"> - </argument> - <argument index="3" name="sublayer" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="canvas" type="RID" /> + <argument index="2" name="layer" type="int" /> + <argument index="3" name="sublayer" type="int" /> <description> Sets the stacking order for a viewport's canvas. [code]layer[/code] is the actual canvas layer, while [code]sublayer[/code] specifies the stacking order of the canvas among those in the same layer. </description> </method> <method name="viewport_set_canvas_transform"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="canvas" type="RID"> - </argument> - <argument index="2" name="offset" type="Transform2D"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="canvas" type="RID" /> + <argument index="2" name="offset" type="Transform2D" /> <description> Sets the transformation of a viewport's canvas. </description> </method> <method name="viewport_set_clear_mode"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="clear_mode" type="int" enum="RenderingServer.ViewportClearMode"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="clear_mode" type="int" enum="RenderingServer.ViewportClearMode" /> <description> Sets the clear mode of a viewport. See [enum ViewportClearMode] for options. </description> </method> <method name="viewport_set_debug_draw"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="draw" type="int" enum="RenderingServer.ViewportDebugDraw"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="draw" type="int" enum="RenderingServer.ViewportDebugDraw" /> <description> Sets the debug draw mode of a viewport. See [enum ViewportDebugDraw] for options. </description> </method> <method name="viewport_set_default_canvas_item_texture_filter"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="filter" type="int" enum="RenderingServer.CanvasItemTextureFilter"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="filter" type="int" enum="RenderingServer.CanvasItemTextureFilter" /> <description> </description> </method> <method name="viewport_set_default_canvas_item_texture_repeat"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="repeat" type="int" enum="RenderingServer.CanvasItemTextureRepeat"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="repeat" type="int" enum="RenderingServer.CanvasItemTextureRepeat" /> <description> </description> </method> <method name="viewport_set_disable_2d"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="disable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="disable" type="bool" /> <description> If [code]true[/code], the viewport's canvas is not rendered. </description> </method> <method name="viewport_set_disable_3d"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="disable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="disable" type="bool" /> <description> </description> </method> <method name="viewport_set_disable_environment"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="disabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="disabled" type="bool" /> <description> If [code]true[/code], rendering of a viewport's environment is disabled. </description> </method> <method name="viewport_set_global_canvas_transform"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="transform" type="Transform2D"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="transform" type="Transform2D" /> <description> Sets the viewport's global transformation matrix. </description> </method> <method name="viewport_set_measure_render_time"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="enable" type="bool" /> <description> </description> </method> <method name="viewport_set_msaa"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="msaa" type="int" enum="RenderingServer.ViewportMSAA"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="msaa" type="int" enum="RenderingServer.ViewportMSAA" /> <description> Sets the anti-aliasing mode. See [enum ViewportMSAA] for options. </description> </method> <method name="viewport_set_occlusion_culling_build_quality"> - <return type="void"> - </return> - <argument index="0" name="quality" type="int" enum="RenderingServer.ViewportOcclusionCullingBuildQuality"> - </argument> + <return type="void" /> + <argument index="0" name="quality" type="int" enum="RenderingServer.ViewportOcclusionCullingBuildQuality" /> <description> </description> </method> <method name="viewport_set_occlusion_rays_per_thread"> - <return type="void"> - </return> - <argument index="0" name="rays_per_thread" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="rays_per_thread" type="int" /> <description> </description> </method> <method name="viewport_set_parent_viewport"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="parent_viewport" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="parent_viewport" type="RID" /> <description> Sets the viewport's parent to another viewport. </description> </method> <method name="viewport_set_render_direct_to_screen"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="enabled" type="bool" /> <description> If [code]true[/code], render the contents of the viewport directly to screen. This allows a low-level optimization where you can skip drawing a viewport to the root viewport. While this optimization can result in a significant increase in speed (especially on older devices), it comes at a cost of usability. When this is enabled, you cannot read from the viewport or from the [code]SCREEN_TEXTURE[/code]. You also lose the benefit of certain window settings, such as the various stretch modes. Another consequence to be aware of is that in 2D the rendering happens in window coordinates, so if you have a viewport that is double the size of the window, and you set this, then only the portion that fits within the window will be drawn, no automatic scaling is possible, even if your game scene is significantly larger than the window size. </description> </method> + <method name="viewport_set_scale_3d"> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="scale" type="int" enum="RenderingServer.ViewportScale3D" /> + <description> + Sets the scale at which we render 3D contents. + </description> + </method> <method name="viewport_set_scenario"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="scenario" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="scenario" type="RID" /> <description> Sets a viewport's scenario. The scenario contains information about environment information, reflection atlas etc. </description> </method> <method name="viewport_set_screen_space_aa"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="mode" type="int" enum="RenderingServer.ViewportScreenSpaceAA"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="mode" type="int" enum="RenderingServer.ViewportScreenSpaceAA" /> <description> </description> </method> <method name="viewport_set_sdf_oversize_and_scale"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="oversize" type="int" enum="RenderingServer.ViewportSDFOversize"> - </argument> - <argument index="2" name="scale" type="int" enum="RenderingServer.ViewportSDFScale"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="oversize" type="int" enum="RenderingServer.ViewportSDFOversize" /> + <argument index="2" name="scale" type="int" enum="RenderingServer.ViewportSDFScale" /> <description> </description> </method> <method name="viewport_set_shadow_atlas_quadrant_subdivision"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="quadrant" type="int"> - </argument> - <argument index="2" name="subdivision" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="quadrant" type="int" /> + <argument index="2" name="subdivision" type="int" /> <description> Sets the shadow atlas quadrant's subdivision. </description> </method> <method name="viewport_set_shadow_atlas_size"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="size" type="int"> - </argument> - <argument index="2" name="use_16_bits" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="use_16_bits" type="bool" default="false" /> <description> Sets the size of the shadow atlas's images (used for omni and spot lights). The value will be rounded up to the nearest power of 2. </description> </method> <method name="viewport_set_size"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="width" type="int"> - </argument> - <argument index="2" name="height" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="width" type="int" /> + <argument index="2" name="height" type="int" /> <description> Sets the viewport's width and height. </description> </method> <method name="viewport_set_snap_2d_transforms_to_pixel"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="enabled" type="bool" /> <description> </description> </method> <method name="viewport_set_snap_2d_vertices_to_pixel"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="enabled" type="bool" /> <description> </description> </method> <method name="viewport_set_transparent_background"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="enabled" type="bool" /> <description> If [code]true[/code], the viewport renders its background as transparent. </description> </method> <method name="viewport_set_update_mode"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="update_mode" type="int" enum="RenderingServer.ViewportUpdateMode"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="update_mode" type="int" enum="RenderingServer.ViewportUpdateMode" /> <description> Sets when the viewport should be updated. See [enum ViewportUpdateMode] constants for options. </description> </method> <method name="viewport_set_use_debanding"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="enable" type="bool" /> <description> </description> </method> <method name="viewport_set_use_occlusion_culling"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="enable" type="bool" /> <description> </description> </method> <method name="viewport_set_use_xr"> - <return type="void"> - </return> - <argument index="0" name="viewport" type="RID"> - </argument> - <argument index="1" name="use_xr" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="viewport" type="RID" /> + <argument index="1" name="use_xr" type="bool" /> <description> If [code]true[/code], the viewport uses augmented or virtual reality technologies. See [XRInterface]. </description> </method> <method name="visibility_notifier_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="visibility_notifier_set_aabb"> - <return type="void"> - </return> - <argument index="0" name="notifier" type="RID"> - </argument> - <argument index="1" name="aabb" type="AABB"> - </argument> + <return type="void" /> + <argument index="0" name="notifier" type="RID" /> + <argument index="1" name="aabb" type="AABB" /> <description> </description> </method> <method name="visibility_notifier_set_callbacks"> - <return type="void"> - </return> - <argument index="0" name="notifier" type="RID"> - </argument> - <argument index="1" name="enter_callable" type="Callable"> - </argument> - <argument index="2" name="exit_callable" type="Callable"> - </argument> + <return type="void" /> + <argument index="0" name="notifier" type="RID" /> + <argument index="1" name="enter_callable" type="Callable" /> + <argument index="2" name="exit_callable" type="Callable" /> <description> </description> </method> <method name="voxel_gi_allocate_data"> - <return type="void"> - </return> - <argument index="0" name="voxel_gi" type="RID"> - </argument> - <argument index="1" name="to_cell_xform" type="Transform3D"> - </argument> - <argument index="2" name="aabb" type="AABB"> - </argument> - <argument index="3" name="octree_size" type="Vector3i"> - </argument> - <argument index="4" name="octree_cells" type="PackedByteArray"> - </argument> - <argument index="5" name="data_cells" type="PackedByteArray"> - </argument> - <argument index="6" name="distance_field" type="PackedByteArray"> - </argument> - <argument index="7" name="level_counts" type="PackedInt32Array"> - </argument> + <return type="void" /> + <argument index="0" name="voxel_gi" type="RID" /> + <argument index="1" name="to_cell_xform" type="Transform3D" /> + <argument index="2" name="aabb" type="AABB" /> + <argument index="3" name="octree_size" type="Vector3i" /> + <argument index="4" name="octree_cells" type="PackedByteArray" /> + <argument index="5" name="data_cells" type="PackedByteArray" /> + <argument index="6" name="distance_field" type="PackedByteArray" /> + <argument index="7" name="level_counts" type="PackedInt32Array" /> <description> </description> </method> <method name="voxel_gi_create"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="voxel_gi_get_data_cells" qualifiers="const"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="voxel_gi" type="RID"> - </argument> + <return type="PackedByteArray" /> + <argument index="0" name="voxel_gi" type="RID" /> <description> </description> </method> <method name="voxel_gi_get_distance_field" qualifiers="const"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="voxel_gi" type="RID"> - </argument> + <return type="PackedByteArray" /> + <argument index="0" name="voxel_gi" type="RID" /> <description> </description> </method> <method name="voxel_gi_get_level_counts" qualifiers="const"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="voxel_gi" type="RID"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="voxel_gi" type="RID" /> <description> </description> </method> <method name="voxel_gi_get_octree_cells" qualifiers="const"> - <return type="PackedByteArray"> - </return> - <argument index="0" name="voxel_gi" type="RID"> - </argument> + <return type="PackedByteArray" /> + <argument index="0" name="voxel_gi" type="RID" /> <description> </description> </method> <method name="voxel_gi_get_octree_size" qualifiers="const"> - <return type="Vector3i"> - </return> - <argument index="0" name="voxel_gi" type="RID"> - </argument> + <return type="Vector3i" /> + <argument index="0" name="voxel_gi" type="RID" /> <description> </description> </method> <method name="voxel_gi_get_to_cell_xform" qualifiers="const"> - <return type="Transform3D"> - </return> - <argument index="0" name="voxel_gi" type="RID"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="voxel_gi" type="RID" /> <description> </description> </method> <method name="voxel_gi_set_bias"> - <return type="void"> - </return> - <argument index="0" name="voxel_gi" type="RID"> - </argument> - <argument index="1" name="bias" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="voxel_gi" type="RID" /> + <argument index="1" name="bias" type="float" /> <description> </description> </method> <method name="voxel_gi_set_dynamic_range"> - <return type="void"> - </return> - <argument index="0" name="voxel_gi" type="RID"> - </argument> - <argument index="1" name="range" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="voxel_gi" type="RID" /> + <argument index="1" name="range" type="float" /> <description> </description> </method> <method name="voxel_gi_set_energy"> - <return type="void"> - </return> - <argument index="0" name="voxel_gi" type="RID"> - </argument> - <argument index="1" name="energy" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="voxel_gi" type="RID" /> + <argument index="1" name="energy" type="float" /> <description> </description> </method> <method name="voxel_gi_set_interior"> - <return type="void"> - </return> - <argument index="0" name="voxel_gi" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="voxel_gi" type="RID" /> + <argument index="1" name="enable" type="bool" /> <description> </description> </method> <method name="voxel_gi_set_normal_bias"> - <return type="void"> - </return> - <argument index="0" name="voxel_gi" type="RID"> - </argument> - <argument index="1" name="bias" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="voxel_gi" type="RID" /> + <argument index="1" name="bias" type="float" /> <description> </description> </method> <method name="voxel_gi_set_propagation"> - <return type="void"> - </return> - <argument index="0" name="voxel_gi" type="RID"> - </argument> - <argument index="1" name="amount" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="voxel_gi" type="RID" /> + <argument index="1" name="amount" type="float" /> <description> </description> </method> <method name="voxel_gi_set_quality"> - <return type="void"> - </return> - <argument index="0" name="quality" type="int" enum="RenderingServer.VoxelGIQuality"> - </argument> + <return type="void" /> + <argument index="0" name="quality" type="int" enum="RenderingServer.VoxelGIQuality" /> <description> </description> </method> <method name="voxel_gi_set_use_two_bounces"> - <return type="void"> - </return> - <argument index="0" name="voxel_gi" type="RID"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="voxel_gi" type="RID" /> + <argument index="1" name="enable" type="bool" /> <description> </description> </method> @@ -4865,6 +3548,16 @@ <constant name="MULTIMESH_TRANSFORM_3D" value="1" enum="MultimeshTransformFormat"> Use [Transform3D] to store MultiMesh transform. </constant> + <constant name="LIGHT_PROJECTOR_FILTER_NEAREST" value="0" enum="LightProjectorFilter"> + </constant> + <constant name="LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS" value="1" enum="LightProjectorFilter"> + </constant> + <constant name="LIGHT_PROJECTOR_FILTER_LINEAR" value="2" enum="LightProjectorFilter"> + </constant> + <constant name="LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS" value="3" enum="LightProjectorFilter"> + </constant> + <constant name="LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS_ANISOTROPIC" value="4" enum="LightProjectorFilter"> + </constant> <constant name="LIGHT_DIRECTIONAL" value="0" enum="LightType"> Is a directional (sun) light. </constant> @@ -4986,6 +3679,16 @@ </constant> <constant name="DECAL_TEXTURE_MAX" value="4" enum="DecalTexture"> </constant> + <constant name="DECAL_FILTER_NEAREST" value="0" enum="DecalFilter"> + </constant> + <constant name="DECAL_FILTER_NEAREST_MIPMAPS" value="1" enum="DecalFilter"> + </constant> + <constant name="DECAL_FILTER_LINEAR" value="2" enum="DecalFilter"> + </constant> + <constant name="DECAL_FILTER_LINEAR_MIPMAPS" value="3" enum="DecalFilter"> + </constant> + <constant name="DECAL_FILTER_LINEAR_MIPMAPS_ANISOTROPIC" value="4" enum="DecalFilter"> + </constant> <constant name="VOXEL_GI_QUALITY_LOW" value="0" enum="VoxelGIQuality"> </constant> <constant name="VOXEL_GI_QUALITY_HIGH" value="1" enum="VoxelGIQuality"> @@ -5201,6 +3904,16 @@ </constant> <constant name="VIEWPORT_DEBUG_DRAW_OCCLUDERS" value="23" enum="ViewportDebugDraw"> </constant> + <constant name="VIEWPORT_SCALE_3D_DISABLED" value="0" enum="ViewportScale3D"> + </constant> + <constant name="VIEWPORT_SCALE_3D_75_PERCENT" value="1" enum="ViewportScale3D"> + </constant> + <constant name="VIEWPORT_SCALE_3D_50_PERCENT" value="2" enum="ViewportScale3D"> + </constant> + <constant name="VIEWPORT_SCALE_3D_33_PERCENT" value="3" enum="ViewportScale3D"> + </constant> + <constant name="VIEWPORT_SCALE_3D_25_PERCENT" value="4" enum="ViewportScale3D"> + </constant> <constant name="SKY_MODE_AUTOMATIC" value="0" enum="SkyMode"> </constant> <constant name="SKY_MODE_QUALITY" value="1" enum="SkyMode"> diff --git a/doc/classes/Resource.xml b/doc/classes/Resource.xml index c8800a3c25..65dedf5280 100644 --- a/doc/classes/Resource.xml +++ b/doc/classes/Resource.xml @@ -12,18 +12,9 @@ <link title="When and how to avoid using nodes for everything">https://docs.godotengine.org/en/latest/getting_started/workflow/best_practices/node_alternatives.html</link> </tutorials> <methods> - <method name="_setup_local_to_scene" qualifiers="virtual"> - <return type="void"> - </return> - <description> - Virtual function which can be overridden to customize the behavior value of [method setup_local_to_scene]. - </description> - </method> <method name="duplicate" qualifiers="const"> - <return type="Resource"> - </return> - <argument index="0" name="subresources" type="bool" default="false"> - </argument> + <return type="Resource" /> + <argument index="0" name="subresources" type="bool" default="false" /> <description> Duplicates the resource, returning a new resource. By default, sub-resources are shared between resource copies for efficiency. This can be changed by passing [code]true[/code] to the [code]subresources[/code] argument which will copy the subresources. [b]Note:[/b] If [code]subresources[/code] is [code]true[/code], this method will only perform a shallow copy. Nested resources within subresources will not be duplicated and will still be shared. @@ -31,8 +22,7 @@ </description> </method> <method name="emit_changed"> - <return type="void"> - </return> + <return type="void" /> <description> Emits the [signal changed] signal. If external objects which depend on this resource should be updated, this method must be called manually whenever the state of this resource has changed (such as modification of properties). @@ -44,32 +34,27 @@ </description> </method> <method name="get_local_scene" qualifiers="const"> - <return type="Node"> - </return> + <return type="Node" /> <description> If [member resource_local_to_scene] is enabled and the resource was loaded from a [PackedScene] instantiation, returns the local scene where this resource's unique copy is in use. Otherwise, returns [code]null[/code]. </description> </method> <method name="get_rid" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> Returns the RID of the resource (or an empty RID). Many resources (such as [Texture2D], [Mesh], etc) are high-level abstractions of resources stored in a server, so this function will return the original RID. </description> </method> <method name="setup_local_to_scene"> - <return type="void"> - </return> + <return type="void" /> <description> - This method is called when a resource with [member resource_local_to_scene] enabled is loaded from a [PackedScene] instantiation. Its behavior can be customized by overriding [method _setup_local_to_scene] from script. + This method is called when a resource with [member resource_local_to_scene] enabled is loaded from a [PackedScene] instantiation. Its behavior can be customized by connecting [signal setup_local_to_scene_requested] from script. For most resources, this method performs no base logic. [ViewportTexture] performs custom logic to properly set the proxy texture and flags in the local viewport. </description> </method> <method name="take_over_path"> - <return type="void"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="path" type="String" /> <description> Sets the path of the resource, potentially overriding an existing cache entry for this path. This differs from setting [member resource_path], as the latter would error out if another resource was already cached for the given path. </description> @@ -93,6 +78,10 @@ [b]Note:[/b] This signal is not emitted automatically for custom resources, which means that you need to create a setter and emit the signal yourself. </description> </signal> + <signal name="setup_local_to_scene_requested"> + <description> + </description> + </signal> </signals> <constants> </constants> diff --git a/doc/classes/ResourceFormatLoader.xml b/doc/classes/ResourceFormatLoader.xml index 6abe5c813b..0c2bb26c02 100644 --- a/doc/classes/ResourceFormatLoader.xml +++ b/doc/classes/ResourceFormatLoader.xml @@ -11,68 +11,64 @@ <tutorials> </tutorials> <methods> - <method name="_get_dependencies" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="add_types" type="String"> - </argument> + <method name="_exists" qualifiers="virtual const"> + <return type="bool" /> + <argument index="0" name="path" type="String" /> + <description> + </description> + </method> + <method name="_get_dependencies" qualifiers="virtual const"> + <return type="PackedStringArray" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="add_types" type="bool" /> <description> If implemented, gets the dependencies of a given resource. If [code]add_types[/code] is [code]true[/code], paths should be appended [code]::TypeName[/code], where [code]TypeName[/code] is the class name of the dependency. [b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]"Resource"[/code] for them. </description> </method> - <method name="_get_recognized_extensions" qualifiers="virtual"> - <return type="PackedStringArray"> - </return> + <method name="_get_recognized_extensions" qualifiers="virtual const"> + <return type="PackedStringArray" /> <description> Gets the list of extensions for files this loader is able to read. </description> </method> - <method name="_get_resource_type" qualifiers="virtual"> - <return type="String"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <method name="_get_resource_type" qualifiers="virtual const"> + <return type="String" /> + <argument index="0" name="path" type="String" /> <description> Gets the class name of the resource associated with the given path. If the loader cannot handle it, it should return [code]""[/code]. [b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just return [code]"Resource"[/code] for them. </description> </method> - <method name="_handles_type" qualifiers="virtual"> - <return type="bool"> - </return> - <argument index="0" name="typename" type="StringName"> - </argument> + <method name="_get_resource_uid" qualifiers="virtual const"> + <return type="int" /> + <argument index="0" name="path" type="String" /> + <description> + </description> + </method> + <method name="_handles_type" qualifiers="virtual const"> + <return type="bool" /> + <argument index="0" name="type" type="StringName" /> <description> Tells which resource class this loader can load. [b]Note:[/b] Custom resource types defined by scripts aren't known by the [ClassDB], so you might just handle [code]"Resource"[/code] for them. </description> </method> - <method name="_load" qualifiers="virtual"> - <return type="Variant"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="original_path" type="String"> - </argument> - <argument index="2" name="use_sub_threads" type="bool"> - </argument> - <argument index="3" name="cache_mode" type="int"> - </argument> + <method name="_load" qualifiers="virtual const"> + <return type="Variant" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="original_path" type="String" /> + <argument index="2" name="use_sub_threads" type="bool" /> + <argument index="3" name="cache_mode" type="int" /> <description> Loads a resource when the engine finds this loader to be compatible. If the loaded resource is the result of an import, [code]original_path[/code] will target the source file. Returns a [Resource] object on success, or an [enum Error] constant in case of failure. The [code]cache_mode[/code] property defines whether and how the cache should be used or updated when loading the resource. See [enum CacheMode] for details. </description> </method> - <method name="_rename_dependencies" qualifiers="virtual"> - <return type="int"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="renames" type="String"> - </argument> + <method name="_rename_dependencies" qualifiers="virtual const"> + <return type="int" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="renames" type="Dictionary" /> <description> If implemented, renames dependencies within the given resource and saves it. [code]renames[/code] is a dictionary [code]{ String => String }[/code] mapping old dependency paths to new paths. Returns [constant OK] on success, or an [enum Error] constant in case of failure. diff --git a/doc/classes/ResourceFormatSaver.xml b/doc/classes/ResourceFormatSaver.xml index df71e05d02..7ee8875321 100644 --- a/doc/classes/ResourceFormatSaver.xml +++ b/doc/classes/ResourceFormatSaver.xml @@ -10,33 +10,25 @@ <tutorials> </tutorials> <methods> - <method name="_get_recognized_extensions" qualifiers="virtual"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="resource" type="Resource"> - </argument> + <method name="_get_recognized_extensions" qualifiers="virtual const"> + <return type="PackedStringArray" /> + <argument index="0" name="resource" type="Resource" /> <description> Returns the list of extensions available for saving the resource object, provided it is recognized (see [method _recognize]). </description> </method> - <method name="_recognize" qualifiers="virtual"> - <return type="bool"> - </return> - <argument index="0" name="resource" type="Resource"> - </argument> + <method name="_recognize" qualifiers="virtual const"> + <return type="bool" /> + <argument index="0" name="resource" type="Resource" /> <description> Returns whether the given resource object can be saved by this saver. </description> </method> <method name="_save" qualifiers="virtual"> - <return type="int"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="resource" type="Resource"> - </argument> - <argument index="2" name="flags" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="resource" type="Resource" /> + <argument index="2" name="flags" type="int" /> <description> Saves the given resource object to a file at the target [code]path[/code]. [code]flags[/code] is a bitmask composed with [enum ResourceSaver.SaverFlags] constants. Returns [constant OK] on success, or an [enum Error] constant in case of failure. diff --git a/doc/classes/ResourceImporter.xml b/doc/classes/ResourceImporter.xml index 59900b1b73..03d47ee518 100644 --- a/doc/classes/ResourceImporter.xml +++ b/doc/classes/ResourceImporter.xml @@ -1,13 +1,22 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="ResourceImporter" inherits="RefCounted" version="4.0"> <brief_description> + Base class for the implementation of core resource importers. </brief_description> <description> + This is the base class for the resource importers implemented in core. To implement your own resource importers using editor plugins, see [EditorImportPlugin]. </description> <tutorials> + <link title="Import plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/import_plugins.html</link> </tutorials> <methods> </methods> <constants> + <constant name="IMPORT_ORDER_DEFAULT" value="0" enum="ImportOrder"> + The default import order. + </constant> + <constant name="IMPORT_ORDER_SCENE" value="100" enum="ImportOrder"> + The import order for scenes, which ensures scenes are imported [i]after[/i] all other core resources such as textures. Custom importers should generally have an import order lower than [code]100[/code] to avoid issues when importing scenes that rely on custom resources. + </constant> </constants> </class> diff --git a/doc/classes/ResourceLoader.xml b/doc/classes/ResourceLoader.xml index 682d7b97f3..81e825194b 100644 --- a/doc/classes/ResourceLoader.xml +++ b/doc/classes/ResourceLoader.xml @@ -12,54 +12,48 @@ </tutorials> <methods> <method name="exists"> - <return type="bool"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="type_hint" type="String" default=""""> - </argument> + <return type="bool" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="type_hint" type="String" default="""" /> <description> Returns whether a recognized resource exists for the given [code]path[/code]. An optional [code]type_hint[/code] can be used to further specify the [Resource] type that should be handled by the [ResourceFormatLoader]. Anything that inherits from [Resource] can be used as a type hint, for example [Image]. </description> </method> <method name="get_dependencies"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="path" type="String" /> <description> Returns the dependencies for the resource at the given [code]path[/code]. </description> </method> <method name="get_recognized_extensions_for_type"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="type" type="String"> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="type" type="String" /> <description> Returns the list of recognized extensions for a resource type. </description> </method> + <method name="get_resource_uid"> + <return type="int" /> + <argument index="0" name="path" type="String" /> + <description> + Returns the ID associated with a given resource path, or [code]-1[/code] when no such ID exists. + </description> + </method> <method name="has_cached"> - <return type="bool"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="path" type="String" /> <description> Returns whether a cached resource is available for the given [code]path[/code]. Once a resource has been loaded by the engine, it is cached in memory for faster access, and future calls to the [method load] method will use the cached version. The cached resource can be overridden by using [method Resource.take_over_path] on a new resource for that same path. </description> </method> <method name="load"> - <return type="Resource"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="type_hint" type="String" default=""""> - </argument> - <argument index="2" name="cache_mode" type="int" enum="ResourceLoader.CacheMode" default="1"> - </argument> + <return type="Resource" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="type_hint" type="String" default="""" /> + <argument index="2" name="cache_mode" type="int" enum="ResourceLoader.CacheMode" default="1" /> <description> Loads a resource at the given [code]path[/code], caching the result for further access. The registered [ResourceFormatLoader]s are queried sequentially to find the first one which can handle the file's extension, and then attempt loading. If loading fails, the remaining ResourceFormatLoaders are also attempted. @@ -70,45 +64,34 @@ </description> </method> <method name="load_threaded_get"> - <return type="Resource"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="Resource" /> + <argument index="0" name="path" type="String" /> <description> Returns the resource loaded by [method load_threaded_request]. If this is called before the loading thread is done (i.e. [method load_threaded_get_status] is not [constant THREAD_LOAD_LOADED]), the calling thread will be blocked until the resource has finished loading. </description> </method> <method name="load_threaded_get_status"> - <return type="int" enum="ResourceLoader.ThreadLoadStatus"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="progress" type="Array" default="[]"> - </argument> + <return type="int" enum="ResourceLoader.ThreadLoadStatus" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="progress" type="Array" default="[]" /> <description> Returns the status of a threaded loading operation started with [method load_threaded_request] for the resource at [code]path[/code]. See [enum ThreadLoadStatus] for possible return values. An array variable can optionally be passed via [code]progress[/code], and will return a one-element array containing the percentage of completion of the threaded loading. </description> </method> <method name="load_threaded_request"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="type_hint" type="String" default=""""> - </argument> - <argument index="2" name="use_sub_threads" type="bool" default="false"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="type_hint" type="String" default="""" /> + <argument index="2" name="use_sub_threads" type="bool" default="false" /> <description> Loads the resource using threads. If [code]use_sub_threads[/code] is [code]true[/code], multiple threads will be used to load the resource, which makes loading faster, but may affect the main thread (and thus cause game slowdowns). </description> </method> <method name="set_abort_on_missing_resources"> - <return type="void"> - </return> - <argument index="0" name="abort" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="abort" type="bool" /> <description> Changes the behavior on missing sub-resources. The default behavior is to abort loading. </description> diff --git a/doc/classes/ResourcePreloader.xml b/doc/classes/ResourcePreloader.xml index 3159a4c424..8ac8717581 100644 --- a/doc/classes/ResourcePreloader.xml +++ b/doc/classes/ResourcePreloader.xml @@ -11,57 +11,44 @@ </tutorials> <methods> <method name="add_resource"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="resource" type="Resource"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="resource" type="Resource" /> <description> Adds a resource to the preloader with the given [code]name[/code]. If a resource with the given [code]name[/code] already exists, the new resource will be renamed to "[code]name[/code] N" where N is an incrementing number starting from 2. </description> </method> <method name="get_resource" qualifiers="const"> - <return type="Resource"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="Resource" /> + <argument index="0" name="name" type="StringName" /> <description> Returns the resource associated to [code]name[/code]. </description> </method> <method name="get_resource_list" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns the list of resources inside the preloader. </description> </method> <method name="has_resource" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> <description> Returns [code]true[/code] if the preloader contains a resource associated to [code]name[/code]. </description> </method> <method name="remove_resource"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> <description> Removes the resource associated to [code]name[/code] from the preloader. </description> </method> <method name="rename_resource"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="newname" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="newname" type="StringName" /> <description> Renames a resource inside the preloader from [code]name[/code] to [code]newname[/code]. </description> diff --git a/doc/classes/ResourceSaver.xml b/doc/classes/ResourceSaver.xml index 437b0ce730..39f166db2e 100644 --- a/doc/classes/ResourceSaver.xml +++ b/doc/classes/ResourceSaver.xml @@ -11,23 +11,17 @@ </tutorials> <methods> <method name="get_recognized_extensions"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="type" type="Resource"> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="type" type="Resource" /> <description> Returns the list of extensions available for saving a resource of a given type. </description> </method> <method name="save"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> - <argument index="1" name="resource" type="Resource"> - </argument> - <argument index="2" name="flags" type="int" enum="ResourceSaver.SaverFlags" default="0"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> + <argument index="1" name="resource" type="Resource" /> + <argument index="2" name="flags" type="int" enum="ResourceSaver.SaverFlags" default="0" /> <description> Saves a resource to disk to the given path, using a [ResourceFormatSaver] that recognizes the resource object. The [code]flags[/code] bitmask can be specified to customize the save behavior. diff --git a/doc/classes/ResourceUID.xml b/doc/classes/ResourceUID.xml new file mode 100644 index 0000000000..9e3d647ccf --- /dev/null +++ b/doc/classes/ResourceUID.xml @@ -0,0 +1,64 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ResourceUID" inherits="Object" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="add_id"> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="path" type="String" /> + <description> + </description> + </method> + <method name="create_id" qualifiers="const"> + <return type="int" /> + <description> + </description> + </method> + <method name="get_id_path" qualifiers="const"> + <return type="String" /> + <argument index="0" name="id" type="int" /> + <description> + </description> + </method> + <method name="has_id" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="id" type="int" /> + <description> + </description> + </method> + <method name="id_to_text" qualifiers="const"> + <return type="String" /> + <argument index="0" name="id" type="int" /> + <description> + </description> + </method> + <method name="remove_id"> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <description> + </description> + </method> + <method name="set_id"> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="path" type="String" /> + <description> + </description> + </method> + <method name="text_to_id" qualifiers="const"> + <return type="int" /> + <argument index="0" name="text_id" type="String" /> + <description> + </description> + </method> + </methods> + <constants> + <constant name="INVALID_ID" value="-1"> + </constant> + </constants> +</class> diff --git a/doc/classes/RichTextEffect.xml b/doc/classes/RichTextEffect.xml index edab35f162..fd93f6be56 100644 --- a/doc/classes/RichTextEffect.xml +++ b/doc/classes/RichTextEffect.xml @@ -23,11 +23,9 @@ <link title="RichTextEffect test project (third-party)">https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link> </tutorials> <methods> - <method name="_process_custom_fx" qualifiers="virtual"> - <return type="bool"> - </return> - <argument index="0" name="char_fx" type="CharFXTransform"> - </argument> + <method name="_process_custom_fx" qualifiers="virtual const"> + <return type="bool" /> + <argument index="0" name="char_fx" type="CharFXTransform" /> <description> Override this method to modify properties in [code]char_fx[/code]. The method must return [code]true[/code] if the character could be transformed successfully. If the method returns [code]false[/code], it will skip transformation to avoid displaying broken text. </description> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 38884a027f..e77232a613 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -16,443 +16,346 @@ </tutorials> <methods> <method name="add_image"> - <return type="void"> - </return> - <argument index="0" name="image" type="Texture2D"> - </argument> - <argument index="1" name="width" type="int" default="0"> - </argument> - <argument index="2" name="height" type="int" default="0"> - </argument> - <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <argument index="4" name="inline_align" type="int" enum="VAlign" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="image" type="Texture2D" /> + <argument index="1" name="width" type="int" default="0" /> + <argument index="2" name="height" type="int" default="0" /> + <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" /> + <argument index="4" name="inline_align" type="int" enum="InlineAlign" default="5" /> <description> Adds an image's opening and closing tags to the tag stack, optionally providing a [code]width[/code] and [code]height[/code] to resize the image and a [code]color[/code] to tint the image. If [code]width[/code] or [code]height[/code] is set to 0, the image size will be adjusted in order to keep the original aspect ratio. </description> </method> <method name="add_text"> - <return type="void"> - </return> - <argument index="0" name="text" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="text" type="String" /> <description> Adds raw non-BBCode-parsed text to the tag stack. </description> </method> <method name="append_bbcode"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="bbcode" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="bbcode" type="String" /> <description> Parses [code]bbcode[/code] and adds tags to the tag stack as needed. Returns the result of the parsing, [constant OK] if successful. [b]Note:[/b] Using this method, you can't close a tag that was opened in a previous [method append_bbcode] call. This is done to improve performance, especially when updating large RichTextLabels since rebuilding the whole BBCode every time would be slower. If you absolutely need to close a tag in a future method call, append the [member bbcode_text] instead of using [method append_bbcode]. </description> </method> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> Clears the tag stack and sets [member bbcode_text] to an empty string. </description> </method> <method name="get_content_height" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the height of the content. </description> </method> <method name="get_line_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the total number of lines in the text. Wrapped text is counted as multiple lines. </description> </method> <method name="get_paragraph_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the total number of paragraphs (newlines or [code]p[/code] tags in the tag stack's text tags). Considers wrapped text as one paragraph. </description> </method> <method name="get_selected_text" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the current selection text. Does not include BBCodes. </description> </method> <method name="get_selection_from" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the current selection first character index if a selection is active, [code]-1[/code] otherwise. Does not include BBCodes. </description> </method> <method name="get_selection_to" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the current selection last character index if a selection is active, [code]-1[/code] otherwise. Does not include BBCodes. </description> </method> <method name="get_total_character_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the total number of characters from text tags. Does not include BBCodes. </description> </method> <method name="get_v_scroll"> - <return type="VScrollBar"> - </return> + <return type="VScrollBar" /> <description> Returns the vertical scrollbar. </description> </method> <method name="get_visible_line_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of visible lines. </description> </method> <method name="get_visible_paragraph_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of visible paragraphs. A paragraph is considered visible if at least one of its lines is visible. </description> </method> <method name="install_effect"> - <return type="void"> - </return> - <argument index="0" name="effect" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="effect" type="Variant" /> <description> Installs a custom effect. [code]effect[/code] should be a valid [RichTextEffect]. </description> </method> <method name="newline"> - <return type="void"> - </return> + <return type="void" /> <description> Adds a newline tag to the tag stack. </description> </method> <method name="parse_bbcode"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="bbcode" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="bbcode" type="String" /> <description> The assignment version of [method append_bbcode]. Clears the tag stack and inserts the new content. Returns [constant OK] if parses [code]bbcode[/code] successfully. </description> </method> <method name="parse_expressions_for_values"> - <return type="Dictionary"> - </return> - <argument index="0" name="expressions" type="PackedStringArray"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="expressions" type="PackedStringArray" /> <description> Parses BBCode parameter [code]expressions[/code] into a dictionary. </description> </method> <method name="pop"> - <return type="void"> - </return> + <return type="void" /> <description> Terminates the current tag. Use after [code]push_*[/code] methods to close BBCodes manually. Does not need to follow [code]add_*[/code] methods. </description> </method> <method name="push_bgcolor"> - <return type="void"> - </return> - <argument index="0" name="bgcolor" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="bgcolor" type="Color" /> <description> Adds a [code][bgcolor][/code] tag to the tag stack. </description> </method> <method name="push_bold"> - <return type="void"> - </return> + <return type="void" /> <description> Adds a [code][font][/code] tag with a bold font to the tag stack. This is the same as adding a [code][b][/code] tag if not currently in a [code][i][/code] tag. </description> </method> <method name="push_bold_italics"> - <return type="void"> - </return> + <return type="void" /> <description> Adds a [code][font][/code] tag with a bold italics font to the tag stack. </description> </method> <method name="push_cell"> - <return type="void"> - </return> + <return type="void" /> <description> Adds a [code][cell][/code] tag to the tag stack. Must be inside a [code][table][/code] tag. See [method push_table] for details. </description> </method> <method name="push_color"> - <return type="void"> - </return> - <argument index="0" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="color" type="Color" /> <description> Adds a [code][color][/code] tag to the tag stack. </description> </method> <method name="push_dropcap"> - <return type="void"> - </return> - <argument index="0" name="string" type="String"> - </argument> - <argument index="1" name="font" type="Font"> - </argument> - <argument index="2" name="size" type="int"> - </argument> - <argument index="3" name="dropcap_margins" type="Rect2" default="Rect2(0, 0, 0, 0)"> - </argument> - <argument index="4" name="color" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <argument index="5" name="outline_size" type="int" default="0"> - </argument> - <argument index="6" name="outline_color" type="Color" default="Color(0, 0, 0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="string" type="String" /> + <argument index="1" name="font" type="Font" /> + <argument index="2" name="size" type="int" /> + <argument index="3" name="dropcap_margins" type="Rect2" default="Rect2(0, 0, 0, 0)" /> + <argument index="4" name="color" type="Color" default="Color(1, 1, 1, 1)" /> + <argument index="5" name="outline_size" type="int" default="0" /> + <argument index="6" name="outline_color" type="Color" default="Color(0, 0, 0, 0)" /> <description> Adds a [code][dropcap][/code] tag to the tag stack. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text. </description> </method> <method name="push_fgcolor"> - <return type="void"> - </return> - <argument index="0" name="fgcolor" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="fgcolor" type="Color" /> <description> Adds a [code][fgcolor][/code] tag to the tag stack. </description> </method> <method name="push_font"> - <return type="void"> - </return> - <argument index="0" name="font" type="Font"> - </argument> + <return type="void" /> + <argument index="0" name="font" type="Font" /> <description> Adds a [code][font][/code] tag to the tag stack. Overrides default fonts for its duration. </description> </method> <method name="push_font_features"> - <return type="void"> - </return> - <argument index="0" name="opentype_features" type="Dictionary"> - </argument> + <return type="void" /> + <argument index="0" name="opentype_features" type="Dictionary" /> <description> Adds a [code][ot_feature][/code] tag to the tag stack. Overrides default OpenType font feature for its duration. </description> </method> <method name="push_font_size"> - <return type="void"> - </return> - <argument index="0" name="font_size" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="font_size" type="int" /> <description> Adds a [code][font_size][/code] tag to the tag stack. Overrides default font size for its duration. </description> </method> <method name="push_indent"> - <return type="void"> - </return> - <argument index="0" name="level" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="level" type="int" /> <description> Adds an [code][indent][/code] tag to the tag stack. Multiplies [code]level[/code] by current [member tab_size] to determine new margin length. </description> </method> <method name="push_italics"> - <return type="void"> - </return> + <return type="void" /> <description> Adds a [code][font][/code] tag with a italics font to the tag stack. This is the same as adding a [code][i][/code] tag if not currently in a [code][b][/code] tag. </description> </method> <method name="push_list"> - <return type="void"> - </return> - <argument index="0" name="level" type="int"> - </argument> - <argument index="1" name="type" type="int" enum="RichTextLabel.ListType"> - </argument> - <argument index="2" name="capitalize" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="level" type="int" /> + <argument index="1" name="type" type="int" enum="RichTextLabel.ListType" /> + <argument index="2" name="capitalize" type="bool" /> <description> Adds [code][ol][/code] or [code][ul][/code] tag to the tag stack. Multiplies [code]level[/code] by current [member tab_size] to determine new margin length. </description> </method> <method name="push_meta"> - <return type="void"> - </return> - <argument index="0" name="data" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="data" type="Variant" /> <description> Adds a [code][meta][/code] tag to the tag stack. Similar to the BBCode [code][url=something]{text}[/url][/code], but supports non-[String] metadata types. </description> </method> <method name="push_mono"> - <return type="void"> - </return> + <return type="void" /> <description> Adds a [code][font][/code] tag with a monospace font to the tag stack. </description> </method> <method name="push_normal"> - <return type="void"> - </return> + <return type="void" /> <description> Adds a [code][font][/code] tag with a normal font to the tag stack. </description> </method> <method name="push_outline_color"> - <return type="void"> - </return> - <argument index="0" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="color" type="Color" /> <description> Adds a [code][outline_color][/code] tag to the tag stack. Adds text outline for its duration. </description> </method> <method name="push_outline_size"> - <return type="void"> - </return> - <argument index="0" name="outline_size" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="outline_size" type="int" /> <description> Adds a [code][outline_size][/code] tag to the tag stack. Overrides default text outline size for its duration. </description> </method> <method name="push_paragraph"> - <return type="void"> - </return> - <argument index="0" name="align" type="int" enum="RichTextLabel.Align"> - </argument> - <argument index="1" name="base_direction" type="int" enum="Control.TextDirection" default="0"> - </argument> - <argument index="2" name="language" type="String" default=""""> - </argument> - <argument index="3" name="st_parser" type="int" enum="Control.StructuredTextParser" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="align" type="int" enum="RichTextLabel.Align" /> + <argument index="1" name="base_direction" type="int" enum="Control.TextDirection" default="0" /> + <argument index="2" name="language" type="String" default="""" /> + <argument index="3" name="st_parser" type="int" enum="Control.StructuredTextParser" default="0" /> <description> Adds a [code][p][/code] tag to the tag stack. </description> </method> <method name="push_strikethrough"> - <return type="void"> - </return> + <return type="void" /> <description> Adds a [code][s][/code] tag to the tag stack. </description> </method> <method name="push_table"> - <return type="void"> - </return> - <argument index="0" name="columns" type="int"> - </argument> - <argument index="1" name="inline_align" type="int" enum="VAlign" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="columns" type="int" /> + <argument index="1" name="inline_align" type="int" enum="InlineAlign" default="0" /> <description> Adds a [code][table=columns,inline_align][/code] tag to the tag stack. </description> </method> <method name="push_underline"> - <return type="void"> - </return> + <return type="void" /> <description> Adds a [code][u][/code] tag to the tag stack. </description> </method> <method name="remove_line"> - <return type="bool"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="line" type="int" /> <description> Removes a line of content from the label. Returns [code]true[/code] if the line exists. The [code]line[/code] argument is the index of the line to remove, it can take values in the interval [code][0, get_line_count() - 1][/code]. </description> </method> <method name="scroll_to_line"> - <return type="void"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="line" type="int" /> <description> Scrolls the window's top line to match [code]line[/code]. </description> </method> <method name="scroll_to_paragraph"> - <return type="void"> - </return> - <argument index="0" name="paragraph" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="paragraph" type="int" /> <description> Scrolls the window's top line to match first line of the [code]paragraph[/code]. </description> </method> <method name="set_cell_border_color"> - <return type="void"> - </return> - <argument index="0" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="color" type="Color" /> <description> Sets color of a table cell border. </description> </method> <method name="set_cell_padding"> - <return type="void"> - </return> - <argument index="0" name="padding" type="Rect2"> - </argument> + <return type="void" /> + <argument index="0" name="padding" type="Rect2" /> <description> Sets inner padding of a table cell. </description> </method> <method name="set_cell_row_background_color"> - <return type="void"> - </return> - <argument index="0" name="odd_row_bg" type="Color"> - </argument> - <argument index="1" name="even_row_bg" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="odd_row_bg" type="Color" /> + <argument index="1" name="even_row_bg" type="Color" /> <description> Sets color of a table cell. Separate colors for alternating rows can be specified. </description> </method> <method name="set_cell_size_override"> - <return type="void"> - </return> - <argument index="0" name="min_size" type="Vector2"> - </argument> - <argument index="1" name="max_size" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="min_size" type="Vector2" /> + <argument index="1" name="max_size" type="Vector2" /> <description> Sets minimum and maximum size overrides for a table cell. </description> </method> <method name="set_table_column_expand"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="expand" type="bool"> - </argument> - <argument index="2" name="ratio" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="expand" type="bool" /> + <argument index="2" name="ratio" type="int" /> <description> Edits the selected column's expansion options. If [code]expand[/code] is [code]true[/code], the column expands in proportion to its expansion ratio versus the other columns' ratios. For example, 2 columns with ratios 3 and 4 plus 70 pixels in available width would expand 30 and 40 pixels, respectively. @@ -522,22 +425,19 @@ </members> <signals> <signal name="meta_clicked"> - <argument index="0" name="meta" type="Variant"> - </argument> + <argument index="0" name="meta" type="Variant" /> <description> Triggered when the user clicks on content between meta tags. If the meta is defined in text, e.g. [code][url={"data"="hi"}]hi[/url][/code], then the parameter for this signal will be a [String] type. If a particular type or an object is desired, the [method push_meta] method must be used to manually insert the data into the tag stack. </description> </signal> <signal name="meta_hover_ended"> - <argument index="0" name="meta" type="Variant"> - </argument> + <argument index="0" name="meta" type="Variant" /> <description> Triggers when the mouse exits a meta tag. </description> </signal> <signal name="meta_hover_started"> - <argument index="0" name="meta" type="Variant"> - </argument> + <argument index="0" name="meta" type="Variant" /> <description> Triggers when the mouse enters a meta tag. </description> @@ -622,85 +522,85 @@ </constant> </constants> <theme_items> - <theme_item name="bold_font" type="Font"> + <theme_item name="bold_font" data_type="font" type="Font"> The font used for bold text. </theme_item> - <theme_item name="bold_font_size" type="int"> + <theme_item name="bold_font_size" data_type="font_size" type="int"> The font size used for bold text. </theme_item> - <theme_item name="bold_italics_font" type="Font"> + <theme_item name="bold_italics_font" data_type="font" type="Font"> The font used for bold italics text. </theme_item> - <theme_item name="bold_italics_font_size" type="int"> + <theme_item name="bold_italics_font_size" data_type="font_size" type="int"> The font size used for bold italics text. </theme_item> - <theme_item name="default_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="default_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The default text color. </theme_item> - <theme_item name="focus" type="StyleBox"> + <theme_item name="focus" data_type="style" type="StyleBox"> The background The background used when the [RichTextLabel] is focused. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The default tint of text outline. </theme_item> - <theme_item name="font_selected_color" type="Color" default="Color(0, 0, 0, 1)"> + <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> The color of selected text, used when [member selection_enabled] is [code]true[/code]. </theme_item> - <theme_item name="font_shadow_color" type="Color" default="Color(0, 0, 0, 0)"> + <theme_item name="font_shadow_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)"> The color of the font's shadow. </theme_item> - <theme_item name="italics_font" type="Font"> + <theme_item name="italics_font" data_type="font" type="Font"> The font used for italics text. </theme_item> - <theme_item name="italics_font_size" type="int"> + <theme_item name="italics_font_size" data_type="font_size" type="int"> The font size used for italics text. </theme_item> - <theme_item name="line_separation" type="int" default="1"> + <theme_item name="line_separation" data_type="constant" type="int" default="0"> The vertical space between lines. </theme_item> - <theme_item name="mono_font" type="Font"> + <theme_item name="mono_font" data_type="font" type="Font"> The font used for monospace text. </theme_item> - <theme_item name="mono_font_size" type="int"> + <theme_item name="mono_font_size" data_type="font_size" type="int"> The font size used for monospace text. </theme_item> - <theme_item name="normal" type="StyleBox"> + <theme_item name="normal" data_type="style" type="StyleBox"> The normal background for the [RichTextLabel]. </theme_item> - <theme_item name="normal_font" type="Font"> + <theme_item name="normal_font" data_type="font" type="Font"> The default text font. </theme_item> - <theme_item name="normal_font_size" type="int"> + <theme_item name="normal_font_size" data_type="font_size" type="int"> The default text font size. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. </theme_item> - <theme_item name="selection_color" type="Color" default="Color(0.1, 0.1, 1, 0.8)"> + <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.1, 0.1, 1, 0.8)"> The color of the selection box. </theme_item> - <theme_item name="shadow_as_outline" type="int" default="0"> + <theme_item name="shadow_as_outline" data_type="constant" type="int" default="0"> Boolean value. If 1 ([code]true[/code]), the shadow will be displayed around the whole text as an outline. </theme_item> - <theme_item name="shadow_offset_x" type="int" default="1"> + <theme_item name="shadow_offset_x" data_type="constant" type="int" default="1"> The horizontal offset of the font's shadow. </theme_item> - <theme_item name="shadow_offset_y" type="int" default="1"> + <theme_item name="shadow_offset_y" data_type="constant" type="int" default="1"> The vertical offset of the font's shadow. </theme_item> - <theme_item name="table_border" type="Color" default="Color(0, 0, 0, 0)"> + <theme_item name="table_border" data_type="color" type="Color" default="Color(0, 0, 0, 0)"> The default cell border color. </theme_item> - <theme_item name="table_even_row_bg" type="Color" default="Color(0, 0, 0, 0)"> + <theme_item name="table_even_row_bg" data_type="color" type="Color" default="Color(0, 0, 0, 0)"> The default background color for even rows. </theme_item> - <theme_item name="table_hseparation" type="int" default="3"> + <theme_item name="table_hseparation" data_type="constant" type="int" default="3"> The horizontal separation of elements in a table. </theme_item> - <theme_item name="table_odd_row_bg" type="Color" default="Color(0, 0, 0, 0)"> + <theme_item name="table_odd_row_bg" data_type="color" type="Color" default="Color(0, 0, 0, 0)"> The default background color for odd rows. </theme_item> - <theme_item name="table_vseparation" type="int" default="3"> + <theme_item name="table_vseparation" data_type="constant" type="int" default="3"> The vertical separation of elements in a table. </theme_item> </theme_items> diff --git a/doc/classes/RigidBody2D.xml b/doc/classes/RigidBody2D.xml index 64573b7282..0702955495 100644 --- a/doc/classes/RigidBody2D.xml +++ b/doc/classes/RigidBody2D.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="RigidBody2D" inherits="PhysicsBody2D" version="4.0"> <brief_description> - A body that is controlled by the 2D physics engine. + Physics Body which is moved by 2D physics simulation. Useful for objects that have gravity and can be pushed by other objects. </brief_description> <description> This node implements simulated 2D physics. You do not control a RigidBody2D directly. Instead, you apply forces to it (gravity, impulses, etc.) and the physics simulation calculates the resulting movement based on its mass, friction, and other physical properties. @@ -17,85 +17,66 @@ </tutorials> <methods> <method name="_integrate_forces" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="state" type="PhysicsDirectBodyState2D"> - </argument> + <return type="void" /> + <argument index="0" name="state" type="PhysicsDirectBodyState2D" /> <description> Allows you to read and safely modify the simulation state for the object. Use this instead of [method Node._physics_process] if you need to directly change the body's [code]position[/code] or other physics properties. By default, it works in addition to the usual physics behavior, but [member custom_integrator] allows you to disable the default behavior and write custom force integration for a body. </description> </method> <method name="add_central_force"> - <return type="void"> - </return> - <argument index="0" name="force" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="force" type="Vector2" /> <description> Adds a constant directional force without affecting rotation. </description> </method> <method name="add_force"> - <return type="void"> - </return> - <argument index="0" name="force" type="Vector2"> - </argument> - <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="force" type="Vector2" /> + <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)" /> <description> Adds a positioned force to the body. Both the force and the offset from the body origin are in global coordinates. </description> </method> <method name="add_torque"> - <return type="void"> - </return> - <argument index="0" name="torque" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="torque" type="float" /> <description> Adds a constant rotational force. </description> </method> <method name="apply_central_impulse"> - <return type="void"> - </return> - <argument index="0" name="impulse" type="Vector2" default="Vector2(0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="impulse" type="Vector2" default="Vector2(0, 0)" /> <description> Applies a directional impulse without affecting rotation. </description> </method> <method name="apply_impulse"> - <return type="void"> - </return> - <argument index="0" name="impulse" type="Vector2"> - </argument> - <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="impulse" type="Vector2" /> + <argument index="1" name="position" type="Vector2" default="Vector2(0, 0)" /> <description> Applies a positioned impulse to the body. An impulse is time-independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts (use the "_force" functions otherwise). The position uses the rotation of the global coordinate system, but is centered at the object's origin. </description> </method> <method name="apply_torque_impulse"> - <return type="void"> - </return> - <argument index="0" name="torque" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="torque" type="float" /> <description> Applies a rotational impulse to the body. </description> </method> <method name="get_colliding_bodies" qualifiers="const"> - <return type="Node2D[]"> - </return> + <return type="Node2D[]" /> <description> Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="set_axis_velocity"> - <return type="void"> - </return> - <argument index="0" name="axis_velocity" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="axis_velocity" type="Vector2" /> <description> Sets the body's velocity on the given axis. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. </description> @@ -118,6 +99,13 @@ <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true"> If [code]true[/code], the body can enter sleep mode when there is no movement. See [member sleeping]. </member> + <member name="center_of_mass" type="Vector2" setter="set_center_of_mass" getter="get_center_of_mass" default="Vector2(0, 0)"> + The body's custom center of mass, relative to the body's origin position, when [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_CUSTOM]. This is the balanced point of the body, where applied forces only cause linear acceleration. Applying forces outside of the center of mass causes angular acceleration. + When [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_AUTO] (default value), the center of mass is automatically computed. + </member> + <member name="center_of_mass_mode" type="int" setter="set_center_of_mass_mode" getter="get_center_of_mass_mode" enum="RigidBody2D.CenterOfMassMode" default="0"> + Defines the way the body's center of mass is set. See [enum CenterOfMassMode] for possible values. + </member> <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false"> If [code]true[/code], the body will emit signals when it collides with another RigidBody2D. See also [member contacts_reported]. </member> @@ -135,8 +123,9 @@ <member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0"> Multiplies the gravity applied to the body. The body's gravity is calculated from the [b]Default Gravity[/b] value in [b]Project > Project Settings > Physics > 2d[/b] and/or any additional gravity vector applied by [Area2D]s. </member> - <member name="inertia" type="float" setter="set_inertia" getter="get_inertia"> - The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this function allows you to set a custom value. Set 0 inertia to return to automatically computing it. + <member name="inertia" type="float" setter="set_inertia" getter="get_inertia" default="0.0"> + The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value. + If set to [code]0[/code], inertia is automatically computed (default value). </member> <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="-1.0"> Damps the body's [member linear_velocity]. If [code]-1[/code], the body will use the [b]Default Linear Damp[/b] in [b]Project > Project Settings > Physics > 2d[/b]. @@ -150,6 +139,7 @@ </member> <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="RigidBody2D.Mode" default="0"> The body's mode. See [enum Mode] for possible values. + For a body that uses only Static or Kinematic mode, use [StaticBody2D] or [AnimatableBody2D] instead. </member> <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> The physics material override for the body. @@ -161,30 +151,24 @@ </members> <signals> <signal name="body_entered"> - <argument index="0" name="body" type="Node"> - </argument> + <argument index="0" name="body" type="Node" /> <description> Emitted when a collision with another [PhysicsBody2D] or [TileMap] occurs. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. </description> </signal> <signal name="body_exited"> - <argument index="0" name="body" type="Node"> - </argument> + <argument index="0" name="body" type="Node" /> <description> Emitted when the collision with another [PhysicsBody2D] or [TileMap] ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody2D] or [TileMap]. </description> </signal> <signal name="body_shape_entered"> - <argument index="0" name="body_rid" type="RID"> - </argument> - <argument index="1" name="body" type="Node"> - </argument> - <argument index="2" name="body_shape" type="int"> - </argument> - <argument index="3" name="local_shape" type="int"> - </argument> + <argument index="0" name="body_rid" type="RID" /> + <argument index="1" name="body" type="Node" /> + <argument index="2" name="body_shape" type="int" /> + <argument index="3" name="local_shape" type="int" /> <description> Emitted when one of this RigidBody2D's [Shape2D]s collides with another [PhysicsBody2D] or [TileMap]'s [Shape2D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. [code]body_id[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. @@ -194,14 +178,10 @@ </description> </signal> <signal name="body_shape_exited"> - <argument index="0" name="body_rid" type="RID"> - </argument> - <argument index="1" name="body" type="Node"> - </argument> - <argument index="2" name="body_shape" type="int"> - </argument> - <argument index="3" name="local_shape" type="int"> - </argument> + <argument index="0" name="body_rid" type="RID" /> + <argument index="1" name="body" type="Node" /> + <argument index="2" name="body_shape" type="int" /> + <argument index="3" name="local_shape" type="int" /> <description> Emitted when the collision between one of this RigidBody2D's [Shape2D]s and another [PhysicsBody2D] or [TileMap]'s [Shape2D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [TileMap]s are detected if the [TileSet] has Collision [Shape2D]s. [code]body_id[/code] the [RID] of the other [PhysicsBody2D] or [TileSet]'s [CollisionObject2D] used by the [PhysicsServer2D]. @@ -228,7 +208,13 @@ Locked dynamic body mode. Similar to [constant MODE_DYNAMIC], but the body can not rotate. </constant> <constant name="MODE_KINEMATIC" value="3" enum="Mode"> - Kinematic body mode. The body behaves like a [StaticBody2D] with [member StaticBody2D.kinematic_motion] enabled, and must be moved by user code. + Kinematic body mode. The body behaves like a [AnimatableBody2D], and must be moved by code. + </constant> + <constant name="CENTER_OF_MASS_MODE_AUTO" value="0" enum="CenterOfMassMode"> + In this mode, the body's center of mass is calculated automatically based on its shapes. + </constant> + <constant name="CENTER_OF_MASS_MODE_CUSTOM" value="1" enum="CenterOfMassMode"> + In this mode, the body's center of mass is set through [member center_of_mass]. Defaults to the body's origin position. </constant> <constant name="CCD_MODE_DISABLED" value="0" enum="CCDMode"> Continuous collision detection disabled. This is the fastest way to detect body collisions, but can miss small, fast-moving objects. diff --git a/doc/classes/RigidBody3D.xml b/doc/classes/RigidBody3D.xml index fb2b9690a3..1be35b0576 100644 --- a/doc/classes/RigidBody3D.xml +++ b/doc/classes/RigidBody3D.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="RigidBody3D" inherits="PhysicsBody3D" version="4.0"> <brief_description> - Physics Body whose position is determined through physics simulation in 3D space. + Physics Body which is moved by 3D physics simulation. Useful for objects that have gravity and can be pushed by other objects. </brief_description> <description> This is the node that implements full 3D physics. This means that you do not control a RigidBody3D directly. Instead, you can apply forces to it (gravity, impulses, etc.), and the physics simulation will calculate the resulting movement, collision, bouncing, rotating, etc. @@ -17,95 +17,75 @@ </tutorials> <methods> <method name="_integrate_forces" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="state" type="PhysicsDirectBodyState3D"> - </argument> + <return type="void" /> + <argument index="0" name="state" type="PhysicsDirectBodyState3D" /> <description> Called during physics processing, allowing you to read and safely modify the simulation state for the object. By default, it works in addition to the usual physics behavior, but the [member custom_integrator] property allows you to disable the default behavior and do fully custom force integration for a body. </description> </method> <method name="add_central_force"> - <return type="void"> - </return> - <argument index="0" name="force" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="force" type="Vector3" /> <description> Adds a constant directional force (i.e. acceleration) without affecting rotation. This is equivalent to [code]add_force(force, Vector3(0,0,0))[/code]. </description> </method> <method name="add_force"> - <return type="void"> - </return> - <argument index="0" name="force" type="Vector3"> - </argument> - <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="force" type="Vector3" /> + <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" /> <description> Adds a constant directional force (i.e. acceleration). The position uses the rotation of the global coordinate system, but is centered at the object's origin. </description> </method> <method name="add_torque"> - <return type="void"> - </return> - <argument index="0" name="torque" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="torque" type="Vector3" /> <description> Adds a constant rotational force (i.e. a motor) without affecting position. </description> </method> <method name="apply_central_impulse"> - <return type="void"> - </return> - <argument index="0" name="impulse" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="impulse" type="Vector3" /> <description> Applies a directional impulse without affecting rotation. This is equivalent to [code]apply_impulse(Vector3(0,0,0), impulse)[/code]. </description> </method> <method name="apply_impulse"> - <return type="void"> - </return> - <argument index="0" name="impulse" type="Vector3"> - </argument> - <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="impulse" type="Vector3" /> + <argument index="1" name="position" type="Vector3" default="Vector3(0, 0, 0)" /> <description> Applies a positioned impulse to the body. An impulse is time independent! Applying an impulse every frame would result in a framerate-dependent force. For this reason it should only be used when simulating one-time impacts. The position uses the rotation of the global coordinate system, but is centered at the object's origin. </description> </method> <method name="apply_torque_impulse"> - <return type="void"> - </return> - <argument index="0" name="impulse" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="impulse" type="Vector3" /> <description> Applies a torque impulse which will be affected by the body mass and shape. This will rotate the body around the [code]impulse[/code] vector passed. </description> </method> <method name="get_colliding_bodies" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns a list of the bodies colliding with this one. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [b]Note:[/b] The result of this test is not immediate after moving objects. For performance, list of collisions is updated once per frame and before the physics step. Consider using signals instead. </description> </method> <method name="get_inverse_inertia_tensor" qualifiers="const"> - <return type="Basis"> - </return> + <return type="Basis" /> <description> Returns the inverse inertia tensor basis. This is used to calculate the angular acceleration resulting from a torque applied to the [RigidBody3D]. </description> </method> <method name="set_axis_velocity"> - <return type="void"> - </return> - <argument index="0" name="axis_velocity" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="axis_velocity" type="Vector3" /> <description> Sets an axis velocity. The velocity in the given vector axis will be set as the given vector length. This is useful for jumping behavior. </description> @@ -122,6 +102,13 @@ <member name="can_sleep" type="bool" setter="set_can_sleep" getter="is_able_to_sleep" default="true"> If [code]true[/code], the body can enter sleep mode when there is no movement. See [member sleeping]. </member> + <member name="center_of_mass" type="Vector3" setter="set_center_of_mass" getter="get_center_of_mass" default="Vector3(0, 0, 0)"> + The body's custom center of mass, relative to the body's origin position, when [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_CUSTOM]. This is the balanced point of the body, where applied forces only cause linear acceleration. Applying forces outside of the center of mass causes angular acceleration. + When [member center_of_mass_mode] is set to [constant CENTER_OF_MASS_MODE_AUTO] (default value), the center of mass is automatically computed. + </member> + <member name="center_of_mass_mode" type="int" setter="set_center_of_mass_mode" getter="get_center_of_mass_mode" enum="RigidBody3D.CenterOfMassMode" default="0"> + Defines the way the body's center of mass is set. See [enum CenterOfMassMode] for possible values. + </member> <member name="contact_monitor" type="bool" setter="set_contact_monitor" getter="is_contact_monitor_enabled" default="false"> If [code]true[/code], the RigidBody3D will emit signals when it collides with another RigidBody3D. See also [member contacts_reported]. </member> @@ -139,6 +126,10 @@ <member name="gravity_scale" type="float" setter="set_gravity_scale" getter="get_gravity_scale" default="1.0"> This is multiplied by the global 3D gravity setting found in [b]Project > Project Settings > Physics > 3d[/b] to produce RigidBody3D's gravity. For example, a value of 1 will be normal gravity, 2 will apply double gravity, and 0.5 will apply half gravity to this object. </member> + <member name="inertia" type="Vector3" setter="set_inertia" getter="get_inertia" default="Vector3(0, 0, 0)"> + The body's moment of inertia. This is like mass, but for rotation: it determines how much torque it takes to rotate the body on each axis. The moment of inertia is usually computed automatically from the mass and the shapes, but this property allows you to set a custom value. + If set to [code]Vector3.ZERO[/code], inertia is automatically computed (default value). + </member> <member name="linear_damp" type="float" setter="set_linear_damp" getter="get_linear_damp" default="-1.0"> The body's linear damp. Cannot be less than -1.0. If this value is different from -1.0, any linear damp derived from the world or areas will be overridden. See [member ProjectSettings.physics/3d/default_linear_damp] for more details about damping. @@ -150,7 +141,8 @@ The body's mass. </member> <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="RigidBody3D.Mode" default="0"> - The body mode. See [enum Mode] for possible values. + The body's mode. See [enum Mode] for possible values. + For a body that uses only Static or Kinematic mode, use [StaticBody3D] or [AnimatableBody3D] instead. </member> <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> The physics material override for the body. @@ -162,30 +154,24 @@ </members> <signals> <signal name="body_entered"> - <argument index="0" name="body" type="Node"> - </argument> + <argument index="0" name="body" type="Node" /> <description> Emitted when a collision with another [PhysicsBody3D] or [GridMap] occurs. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. </description> </signal> <signal name="body_exited"> - <argument index="0" name="body" type="Node"> - </argument> + <argument index="0" name="body" type="Node" /> <description> Emitted when the collision with another [PhysicsBody3D] or [GridMap] ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. [code]body[/code] the [Node], if it exists in the tree, of the other [PhysicsBody3D] or [GridMap]. </description> </signal> <signal name="body_shape_entered"> - <argument index="0" name="body_rid" type="RID"> - </argument> - <argument index="1" name="body" type="Node"> - </argument> - <argument index="2" name="body_shape" type="int"> - </argument> - <argument index="3" name="local_shape" type="int"> - </argument> + <argument index="0" name="body_rid" type="RID" /> + <argument index="1" name="body" type="Node" /> + <argument index="2" name="body_shape" type="int" /> + <argument index="3" name="local_shape" type="int" /> <description> Emitted when one of this RigidBody3D's [Shape3D]s collides with another [PhysicsBody3D] or [GridMap]'s [Shape3D]s. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. [code]body_id[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. @@ -196,14 +182,10 @@ </description> </signal> <signal name="body_shape_exited"> - <argument index="0" name="body_rid" type="RID"> - </argument> - <argument index="1" name="body" type="Node"> - </argument> - <argument index="2" name="body_shape" type="int"> - </argument> - <argument index="3" name="local_shape" type="int"> - </argument> + <argument index="0" name="body_rid" type="RID" /> + <argument index="1" name="body" type="Node" /> + <argument index="2" name="body_shape" type="int" /> + <argument index="3" name="local_shape" type="int" /> <description> Emitted when the collision between one of this RigidBody3D's [Shape3D]s and another [PhysicsBody3D] or [GridMap]'s [Shape3D]s ends. Requires [member contact_monitor] to be set to [code]true[/code] and [member contacts_reported] to be set high enough to detect all the collisions. [GridMap]s are detected if the [MeshLibrary] has Collision [Shape3D]s. [code]body_id[/code] the [RID] of the other [PhysicsBody3D] or [MeshLibrary]'s [CollisionObject3D] used by the [PhysicsServer3D]. [GridMap]s are detected if the Meshes have [Shape3D]s. @@ -231,7 +213,13 @@ Locked dynamic body mode. Similar to [constant MODE_DYNAMIC], but the body can not rotate. </constant> <constant name="MODE_KINEMATIC" value="3" enum="Mode"> - Kinematic body mode. The body behaves like a [StaticBody3D] with [member StaticBody3D.kinematic_motion] enabled, and can only move by user code. + Kinematic body mode. The body behaves like a [AnimatableBody3D], and can only move by user code. + </constant> + <constant name="CENTER_OF_MASS_MODE_AUTO" value="0" enum="CenterOfMassMode"> + In this mode, the body's center of mass is calculated automatically based on its shapes. + </constant> + <constant name="CENTER_OF_MASS_MODE_CUSTOM" value="1" enum="CenterOfMassMode"> + In this mode, the body's center of mass is set through [member center_of_mass]. Defaults to the body's origin position. </constant> </constants> </class> diff --git a/doc/classes/RootMotionView.xml b/doc/classes/RootMotionView.xml index be8d8d0078..e31ea9265e 100644 --- a/doc/classes/RootMotionView.xml +++ b/doc/classes/RootMotionView.xml @@ -1,23 +1,32 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="RootMotionView" inherits="VisualInstance3D" version="4.0"> <brief_description> + Editor-only helper for setting up root motion in [AnimationTree]. </brief_description> <description> + [i]Root motion[/i] refers to an animation technique where a mesh's skeleton is used to give impulse to a character. When working with 3D animations, a popular technique is for animators to use the root skeleton bone to give motion to the rest of the skeleton. This allows animating characters in a way where steps actually match the floor below. It also allows precise interaction with objects during cinematics. See also [AnimationTree]. + [b]Note:[/b] [RootMotionView] is only visible in the editor. It will be hidden automatically in the running project, and will also be converted to a plain [Node] in the running project. This means a script attached to a [RootMotionView] node [i]must[/i] have [code]extends Node[/code] instead of [code]extends RootMotionView[/code]. Additionally, it must not be a [code]@tool[/code] script. </description> <tutorials> + <link title="Using AnimationTree - Root motion">https://docs.godotengine.org/en/latest/tutorials/animation/animation_tree.html#root-motion</link> </tutorials> <methods> </methods> <members> <member name="animation_path" type="NodePath" setter="set_animation_path" getter="get_animation_path"> + Path to an [AnimationTree] node to use as a basis for root motion. </member> <member name="cell_size" type="float" setter="set_cell_size" getter="get_cell_size"> + The grid's cell size in 3D units. </member> <member name="color" type="Color" setter="set_color" getter="get_color"> + The grid's color. </member> <member name="radius" type="float" setter="set_radius" getter="get_radius"> + The grid's radius in 3D units. The grid's opacity will fade gradually as the distance from the origin increases until this [member radius] is reached. </member> <member name="zero_y" type="bool" setter="set_zero_y" getter="get_zero_y"> + If [code]true[/code], the grid's points will all be on the same Y coordinate ([i]local[/i] Y = 0). If [code]false[/code], the points' original Y coordinate is preserved. </member> </members> <constants> diff --git a/doc/classes/SceneState.xml b/doc/classes/SceneState.xml index 6d804cc697..1c3bac9270 100644 --- a/doc/classes/SceneState.xml +++ b/doc/classes/SceneState.xml @@ -11,187 +11,146 @@ </tutorials> <methods> <method name="get_connection_binds" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Array" /> + <argument index="0" name="idx" type="int" /> <description> Returns the list of bound parameters for the signal at [code]idx[/code]. </description> </method> <method name="get_connection_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of signal connections in the scene. The [code]idx[/code] argument used to query connection metadata in other [code]get_connection_*[/code] methods in the interval [code][0, get_connection_count() - 1][/code]. </description> </method> <method name="get_connection_flags" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="idx" type="int" /> <description> Returns the connection flags for the signal at [code]idx[/code]. See [enum Object.ConnectFlags] constants. </description> </method> <method name="get_connection_method" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="StringName" /> + <argument index="0" name="idx" type="int" /> <description> Returns the method connected to the signal at [code]idx[/code]. </description> </method> <method name="get_connection_signal" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="StringName" /> + <argument index="0" name="idx" type="int" /> <description> Returns the name of the signal at [code]idx[/code]. </description> </method> <method name="get_connection_source" qualifiers="const"> - <return type="NodePath"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="NodePath" /> + <argument index="0" name="idx" type="int" /> <description> Returns the path to the node that owns the signal at [code]idx[/code], relative to the root node. </description> </method> <method name="get_connection_target" qualifiers="const"> - <return type="NodePath"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="NodePath" /> + <argument index="0" name="idx" type="int" /> <description> Returns the path to the node that owns the method connected to the signal at [code]idx[/code], relative to the root node. </description> </method> <method name="get_node_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of nodes in the scene. The [code]idx[/code] argument used to query node data in other [code]get_node_*[/code] methods in the interval [code][0, get_node_count() - 1][/code]. </description> </method> <method name="get_node_groups" qualifiers="const"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="idx" type="int" /> <description> Returns the list of group names associated with the node at [code]idx[/code]. </description> </method> <method name="get_node_index" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="idx" type="int" /> <description> Returns the node's index, which is its position relative to its siblings. This is only relevant and saved in scenes for cases where new nodes are added to an instantiated or inherited scene among siblings from the base scene. Despite the name, this index is not related to the [code]idx[/code] argument used here and in other methods. </description> </method> <method name="get_node_instance" qualifiers="const"> - <return type="PackedScene"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="PackedScene" /> + <argument index="0" name="idx" type="int" /> <description> Returns a [PackedScene] for the node at [code]idx[/code] (i.e. the whole branch starting at this node, with its child nodes and resources), or [code]null[/code] if the node is not an instance. </description> </method> <method name="get_node_instance_placeholder" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="idx" type="int" /> <description> Returns the path to the represented scene file if the node at [code]idx[/code] is an [InstancePlaceholder]. </description> </method> <method name="get_node_name" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="StringName" /> + <argument index="0" name="idx" type="int" /> <description> Returns the name of the node at [code]idx[/code]. </description> </method> <method name="get_node_owner_path" qualifiers="const"> - <return type="NodePath"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="NodePath" /> + <argument index="0" name="idx" type="int" /> <description> Returns the path to the owner of the node at [code]idx[/code], relative to the root node. </description> </method> <method name="get_node_path" qualifiers="const"> - <return type="NodePath"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="for_parent" type="bool" default="false"> - </argument> + <return type="NodePath" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="for_parent" type="bool" default="false" /> <description> Returns the path to the node at [code]idx[/code]. If [code]for_parent[/code] is [code]true[/code], returns the path of the [code]idx[/code] node's parent instead. </description> </method> <method name="get_node_property_count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="idx" type="int" /> <description> Returns the number of exported or overridden properties for the node at [code]idx[/code]. The [code]prop_idx[/code] argument used to query node property data in other [code]get_node_property_*[/code] methods in the interval [code][0, get_node_property_count() - 1][/code]. </description> </method> <method name="get_node_property_name" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="prop_idx" type="int"> - </argument> + <return type="StringName" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="prop_idx" type="int" /> <description> Returns the name of the property at [code]prop_idx[/code] for the node at [code]idx[/code]. </description> </method> <method name="get_node_property_value" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <argument index="1" name="prop_idx" type="int"> - </argument> + <return type="Variant" /> + <argument index="0" name="idx" type="int" /> + <argument index="1" name="prop_idx" type="int" /> <description> Returns the value of the property at [code]prop_idx[/code] for the node at [code]idx[/code]. </description> </method> <method name="get_node_type" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="StringName" /> + <argument index="0" name="idx" type="int" /> <description> Returns the type of the node at [code]idx[/code]. </description> </method> <method name="is_node_instance_placeholder" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="idx" type="int" /> <description> Returns [code]true[/code] if the node at [code]idx[/code] is an [InstancePlaceholder]. </description> diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index d327e8cbca..e81eff35ac 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -14,36 +14,27 @@ </tutorials> <methods> <method name="call_group" qualifiers="vararg"> - <return type="Variant"> - </return> - <argument index="0" name="group" type="StringName"> - </argument> - <argument index="1" name="method" type="StringName"> - </argument> + <return type="Variant" /> + <argument index="0" name="group" type="StringName" /> + <argument index="1" name="method" type="StringName" /> <description> Calls [code]method[/code] on each member of the given group. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. [b]Note:[/b] [method call_group] will always call methods with an one-frame delay, in a way similar to [method Object.call_deferred]. To call methods immediately, use [method call_group_flags] with the [constant GROUP_CALL_REALTIME] flag. </description> </method> <method name="call_group_flags" qualifiers="vararg"> - <return type="Variant"> - </return> - <argument index="0" name="flags" type="int"> - </argument> - <argument index="1" name="group" type="StringName"> - </argument> - <argument index="2" name="method" type="StringName"> - </argument> + <return type="Variant" /> + <argument index="0" name="flags" type="int" /> + <argument index="1" name="group" type="StringName" /> + <argument index="2" name="method" type="StringName" /> <description> Calls [code]method[/code] on each member of the given group, respecting the given [enum GroupCallFlags]. You can pass arguments to [code]method[/code] by specifying them at the end of the method call. [b]Note:[/b] Group call flags are used to control the method calling behavior. If the [constant GROUP_CALL_REALTIME] flag is present in the [code]flags[/code] argument, methods will be called immediately. If this flag isn't present in [code]flags[/code], methods will be called with a one-frame delay in a way similar to [method call_group]. </description> </method> <method name="change_scene"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> <description> Changes the running scene to the one at the given [code]path[/code], after loading it into a [PackedScene] and creating a new instance. Returns [constant OK] on success, [constant ERR_CANT_OPEN] if the [code]path[/code] cannot be loaded into a [PackedScene], or [constant ERR_CANT_CREATE] if that scene cannot be instantiated. @@ -51,10 +42,8 @@ </description> </method> <method name="change_scene_to"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="packed_scene" type="PackedScene"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="packed_scene" type="PackedScene" /> <description> Changes the running scene to a new instance of the given [PackedScene]. Returns [constant OK] on success or [constant ERR_CANT_CREATE] if the scene cannot be instantiated. @@ -62,12 +51,9 @@ </description> </method> <method name="create_timer"> - <return type="SceneTreeTimer"> - </return> - <argument index="0" name="time_sec" type="float"> - </argument> - <argument index="1" name="process_always" type="bool" default="true"> - </argument> + <return type="SceneTreeTimer" /> + <argument index="0" name="time_sec" type="float" /> + <argument index="1" name="process_always" type="bool" default="true" /> <description> Returns a [SceneTreeTimer] which will [signal SceneTreeTimer.timeout] after the given time in seconds elapsed in this [SceneTree]. If [code]process_always[/code] is set to [code]false[/code], pausing the [SceneTree] will also pause the timer. Commonly used to create a one-shot delay timer as in the following example: @@ -91,132 +77,76 @@ </description> </method> <method name="create_tween"> - <return type="Tween"> - </return> + <return type="Tween" /> <description> Creates and returns a new [Tween]. </description> </method> <method name="get_first_node_in_group"> - <return type="Node"> - </return> - <argument index="0" name="group" type="StringName"> - </argument> + <return type="Node" /> + <argument index="0" name="group" type="StringName" /> <description> </description> </method> <method name="get_frame" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the current frame number, i.e. the total frame count since the application started. </description> </method> - <method name="get_network_connected_peers" qualifiers="const"> - <return type="PackedInt32Array"> - </return> - <description> - Returns the peer IDs of all connected peers of this [SceneTree]'s [member network_peer]. - </description> - </method> - <method name="get_network_unique_id" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the unique peer ID of this [SceneTree]'s [member network_peer]. - </description> - </method> <method name="get_node_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of nodes in this [SceneTree]. </description> </method> <method name="get_nodes_in_group"> - <return type="Array"> - </return> - <argument index="0" name="group" type="StringName"> - </argument> + <return type="Array" /> + <argument index="0" name="group" type="StringName" /> <description> Returns a list of all nodes assigned to the given group. </description> </method> <method name="get_processed_tweens"> - <return type="Array"> - </return> - <description> - Returns an array of currently exising [Tween]s in the [SceneTree] (both running and paused). - </description> - </method> - <method name="get_rpc_sender_id" qualifiers="const"> - <return type="int"> - </return> + <return type="Array" /> <description> - Returns the sender's peer ID for the most recently received RPC call. + Returns an array of currently existing [Tween]s in the [SceneTree] (both running and paused). </description> </method> <method name="has_group" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> <description> Returns [code]true[/code] if the given group exists. </description> </method> - <method name="has_network_peer" qualifiers="const"> - <return type="bool"> - </return> - <description> - Returns [code]true[/code] if there is a [member network_peer] set. - </description> - </method> - <method name="is_network_server" qualifiers="const"> - <return type="bool"> - </return> - <description> - Returns [code]true[/code] if this [SceneTree]'s [member network_peer] is in server mode (listening for connections). - </description> - </method> <method name="notify_group"> - <return type="void"> - </return> - <argument index="0" name="group" type="StringName"> - </argument> - <argument index="1" name="notification" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="group" type="StringName" /> + <argument index="1" name="notification" type="int" /> <description> Sends the given notification to all members of the [code]group[/code]. </description> </method> <method name="notify_group_flags"> - <return type="void"> - </return> - <argument index="0" name="call_flags" type="int"> - </argument> - <argument index="1" name="group" type="StringName"> - </argument> - <argument index="2" name="notification" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="call_flags" type="int" /> + <argument index="1" name="group" type="StringName" /> + <argument index="2" name="notification" type="int" /> <description> Sends the given notification to all members of the [code]group[/code], respecting the given [enum GroupCallFlags]. </description> </method> <method name="queue_delete"> - <return type="void"> - </return> - <argument index="0" name="obj" type="Object"> - </argument> + <return type="void" /> + <argument index="0" name="obj" type="Object" /> <description> Queues the given object for deletion, delaying the call to [method Object.free] to after the current frame. </description> </method> <method name="quit"> - <return type="void"> - </return> - <argument index="0" name="exit_code" type="int" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="exit_code" type="int" default="0" /> <description> Quits the application at the end of the current iteration. Argument [code]exit_code[/code] can optionally be given (defaulting to 0) to customize the exit status code. By convention, an exit code of [code]0[/code] indicates success whereas a non-zero exit code indicates an error. @@ -225,56 +155,42 @@ </description> </method> <method name="reload_current_scene"> - <return type="int" enum="Error"> - </return> + <return type="int" enum="Error" /> <description> Reloads the currently active scene. Returns [constant OK] on success, [constant ERR_UNCONFIGURED] if no [member current_scene] was defined yet, [constant ERR_CANT_OPEN] if [member current_scene] cannot be loaded into a [PackedScene], or [constant ERR_CANT_CREATE] if the scene cannot be instantiated. </description> </method> <method name="set_auto_accept_quit"> - <return type="void"> - </return> - <argument index="0" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enabled" type="bool" /> <description> If [code]true[/code], the application automatically accepts quitting. Enabled by default. For mobile platforms, see [method set_quit_on_go_back]. </description> </method> <method name="set_group"> - <return type="void"> - </return> - <argument index="0" name="group" type="StringName"> - </argument> - <argument index="1" name="property" type="String"> - </argument> - <argument index="2" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="group" type="StringName" /> + <argument index="1" name="property" type="String" /> + <argument index="2" name="value" type="Variant" /> <description> Sets the given [code]property[/code] to [code]value[/code] on all members of the given group. </description> </method> <method name="set_group_flags"> - <return type="void"> - </return> - <argument index="0" name="call_flags" type="int"> - </argument> - <argument index="1" name="group" type="StringName"> - </argument> - <argument index="2" name="property" type="String"> - </argument> - <argument index="3" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="call_flags" type="int" /> + <argument index="1" name="group" type="StringName" /> + <argument index="2" name="property" type="String" /> + <argument index="3" name="value" type="Variant" /> <description> Sets the given [code]property[/code] to [code]value[/code] on all members of the given group, respecting the given [enum GroupCallFlags]. </description> </method> <method name="set_quit_on_go_back"> - <return type="void"> - </return> - <argument index="0" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enabled" type="bool" /> <description> If [code]true[/code], the application quits automatically on going back (e.g. on Android). Enabled by default. To handle 'Go Back' button when this option is disabled, use [constant DisplayServer.WINDOW_EVENT_GO_BACK_REQUEST]. @@ -299,81 +215,45 @@ </member> <member name="multiplayer_poll" type="bool" setter="set_multiplayer_poll_enabled" getter="is_multiplayer_poll_enabled" default="true"> If [code]true[/code] (default value), enables automatic polling of the [MultiplayerAPI] for this SceneTree during [signal process_frame]. - If [code]false[/code], you need to manually call [method MultiplayerAPI.poll] to process network packets and deliver RPCs/RSETs. This allows running RPCs/RSETs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protection when accessing the [MultiplayerAPI] from threads. - </member> - <member name="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_peer"> - The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the [SceneTree] will become a network server (check with [method is_network_server]) and will set the root node's network mode to master, or it will become a regular peer with the root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to [SceneTree]'s signals. + If [code]false[/code], you need to manually call [method MultiplayerAPI.poll] to process network packets and deliver RPCs. This allows running RPCs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protection when accessing the [MultiplayerAPI] from threads. </member> <member name="paused" type="bool" setter="set_pause" getter="is_paused" default="false"> If [code]true[/code], the [SceneTree] is paused. Doing so will have the following behavior: - 2D and 3D physics will be stopped. - [method Node._process], [method Node._physics_process] and [method Node._input] will not be called anymore in nodes. </member> - <member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections" default="false"> - If [code]true[/code], the [SceneTree]'s [member network_peer] refuses new incoming connections. - </member> <member name="root" type="Window" setter="" getter="get_root"> The [SceneTree]'s root [Window]. </member> </members> <signals> - <signal name="connected_to_server"> - <description> - Emitted whenever this [SceneTree]'s [member network_peer] successfully connected to a server. Only emitted on clients. - </description> - </signal> - <signal name="connection_failed"> - <description> - Emitted whenever this [SceneTree]'s [member network_peer] fails to establish a connection to a server. Only emitted on clients. - </description> - </signal> <signal name="files_dropped"> - <argument index="0" name="files" type="PackedStringArray"> - </argument> - <argument index="1" name="screen" type="int"> - </argument> + <argument index="0" name="files" type="PackedStringArray" /> + <argument index="1" name="screen" type="int" /> <description> Emitted when files are dragged from the OS file manager and dropped in the game window. The arguments are a list of file paths and the identifier of the screen where the drag originated. </description> </signal> - <signal name="network_peer_connected"> - <argument index="0" name="id" type="int"> - </argument> - <description> - Emitted whenever this [SceneTree]'s [member network_peer] connects with a new peer. ID is the peer ID of the new peer. Clients get notified when other clients connect to the same server. Upon connecting to a server, a client also receives this signal for the server (with ID being 1). - </description> - </signal> - <signal name="network_peer_disconnected"> - <argument index="0" name="id" type="int"> - </argument> - <description> - Emitted whenever this [SceneTree]'s [member network_peer] disconnects from a peer. Clients get notified when other clients disconnect from the same server. - </description> - </signal> <signal name="node_added"> - <argument index="0" name="node" type="Node"> - </argument> + <argument index="0" name="node" type="Node" /> <description> Emitted whenever a node is added to the [SceneTree]. </description> </signal> <signal name="node_configuration_warning_changed"> - <argument index="0" name="node" type="Node"> - </argument> + <argument index="0" name="node" type="Node" /> <description> Emitted when a node's configuration changed. Only emitted in [code]tool[/code] mode. </description> </signal> <signal name="node_removed"> - <argument index="0" name="node" type="Node"> - </argument> + <argument index="0" name="node" type="Node" /> <description> Emitted whenever a node is removed from the [SceneTree]. </description> </signal> <signal name="node_renamed"> - <argument index="0" name="node" type="Node"> - </argument> + <argument index="0" name="node" type="Node" /> <description> Emitted whenever a node is renamed. </description> @@ -388,11 +268,6 @@ Emitted immediately before [method Node._process] is called on every node in the [SceneTree]. </description> </signal> - <signal name="server_disconnected"> - <description> - Emitted whenever this [SceneTree]'s [member network_peer] disconnected from server. Only emitted on clients. - </description> - </signal> <signal name="tree_changed"> <description> Emitted whenever the [SceneTree] hierarchy changed (children being moved or renamed, etc.). diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml index e7527d73e2..843d8ef9cb 100644 --- a/doc/classes/Script.xml +++ b/doc/classes/Script.xml @@ -12,100 +12,83 @@ </tutorials> <methods> <method name="can_instantiate" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the script can be instantiated. </description> </method> <method name="get_base_script" qualifiers="const"> - <return type="Script"> - </return> + <return type="Script" /> <description> Returns the script directly inherited by this script. </description> </method> <method name="get_instance_base_type" qualifiers="const"> - <return type="StringName"> - </return> + <return type="StringName" /> <description> Returns the script's base type. </description> </method> <method name="get_property_default_value"> - <return type="Variant"> - </return> - <argument index="0" name="property" type="StringName"> - </argument> + <return type="Variant" /> + <argument index="0" name="property" type="StringName" /> <description> Returns the default value of the specified property. </description> </method> <method name="get_script_constant_map"> - <return type="Dictionary"> - </return> + <return type="Dictionary" /> <description> Returns a dictionary containing constant names and their values. </description> </method> <method name="get_script_method_list"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns the list of methods in this [Script]. </description> </method> <method name="get_script_property_list"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns the list of properties in this [Script]. </description> </method> <method name="get_script_signal_list"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns the list of user signals defined in this [Script]. </description> </method> <method name="has_script_signal" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="signal_name" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="signal_name" type="StringName" /> <description> Returns [code]true[/code] if the script, or a base class, defines a signal with the given name. </description> </method> <method name="has_source_code" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the script contains non-empty source code. </description> </method> <method name="instance_has" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="base_object" type="Object"> - </argument> + <return type="bool" /> + <argument index="0" name="base_object" type="Object" /> <description> Returns [code]true[/code] if [code]base_object[/code] is an instance of this script. </description> </method> <method name="is_tool" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the script is a tool script. A tool script can run in the editor. </description> </method> <method name="reload"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="keep_state" type="bool" default="false"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="keep_state" type="bool" default="false" /> <description> Reloads the script's class implementation. Returns an error code. </description> diff --git a/doc/classes/ScriptCreateDialog.xml b/doc/classes/ScriptCreateDialog.xml index 7185213c44..189bfdc3b8 100644 --- a/doc/classes/ScriptCreateDialog.xml +++ b/doc/classes/ScriptCreateDialog.xml @@ -28,16 +28,11 @@ </tutorials> <methods> <method name="config"> - <return type="void"> - </return> - <argument index="0" name="inherits" type="String"> - </argument> - <argument index="1" name="path" type="String"> - </argument> - <argument index="2" name="built_in_enabled" type="bool" default="true"> - </argument> - <argument index="3" name="load_enabled" type="bool" default="true"> - </argument> + <return type="void" /> + <argument index="0" name="inherits" type="String" /> + <argument index="1" name="path" type="String" /> + <argument index="2" name="built_in_enabled" type="bool" default="true" /> + <argument index="3" name="load_enabled" type="bool" default="true" /> <description> Prefills required fields to configure the ScriptCreateDialog for use. </description> @@ -49,8 +44,7 @@ </members> <signals> <signal name="script_created"> - <argument index="0" name="script" type="Script"> - </argument> + <argument index="0" name="script" type="Script" /> <description> Emitted when the user clicks the OK button. </description> diff --git a/doc/classes/ScriptEditor.xml b/doc/classes/ScriptEditor.xml index 31dbf7453f..628be54e1d 100644 --- a/doc/classes/ScriptEditor.xml +++ b/doc/classes/ScriptEditor.xml @@ -10,68 +10,55 @@ </tutorials> <methods> <method name="get_current_editor" qualifiers="const"> - <return type="ScriptEditorBase"> - </return> + <return type="ScriptEditorBase" /> <description> Returns the [ScriptEditorBase] object that the user is currently editing. </description> </method> <method name="get_current_script"> - <return type="Script"> - </return> + <return type="Script" /> <description> Returns a [Script] that is currently active in editor. </description> </method> <method name="get_open_script_editors" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns an array with all [ScriptEditorBase] objects which are currently open in editor. </description> </method> <method name="get_open_scripts" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns an array with all [Script] objects which are currently open in editor. </description> </method> <method name="goto_line"> - <return type="void"> - </return> - <argument index="0" name="line_number" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="line_number" type="int" /> <description> Goes to the specified line in the current script. </description> </method> <method name="open_script_create_dialog"> - <return type="void"> - </return> - <argument index="0" name="base_name" type="String"> - </argument> - <argument index="1" name="base_path" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="base_name" type="String" /> + <argument index="1" name="base_path" type="String" /> <description> Opens the script create dialog. The script will extend [code]base_name[/code]. The file extension can be omitted from [code]base_path[/code]. It will be added based on the selected scripting language. </description> </method> <method name="register_syntax_highlighter"> - <return type="void"> - </return> - <argument index="0" name="syntax_highlighter" type="EditorSyntaxHighlighter"> - </argument> + <return type="void" /> + <argument index="0" name="syntax_highlighter" type="EditorSyntaxHighlighter" /> <description> Registers the [EditorSyntaxHighlighter] to the editor, the [EditorSyntaxHighlighter] will be available on all open scripts. [b]Note:[/b] Does not apply to scripts that are already opened. </description> </method> <method name="unregister_syntax_highlighter"> - <return type="void"> - </return> - <argument index="0" name="syntax_highlighter" type="EditorSyntaxHighlighter"> - </argument> + <return type="void" /> + <argument index="0" name="syntax_highlighter" type="EditorSyntaxHighlighter" /> <description> Unregisters the [EditorSyntaxHighlighter] from the editor. [b]Note:[/b] The [EditorSyntaxHighlighter] will still be applied to scripts that are already opened. @@ -80,15 +67,13 @@ </methods> <signals> <signal name="editor_script_changed"> - <argument index="0" name="script" type="Script"> - </argument> + <argument index="0" name="script" type="Script" /> <description> Emitted when user changed active script. Argument is a freshly activated [Script]. </description> </signal> <signal name="script_close"> - <argument index="0" name="script" type="Script"> - </argument> + <argument index="0" name="script" type="Script" /> <description> Emitted when editor is about to close the active script. Argument is a [Script] that is going to be closed. </description> diff --git a/doc/classes/ScriptEditorBase.xml b/doc/classes/ScriptEditorBase.xml index a135062bd8..08baa705e8 100644 --- a/doc/classes/ScriptEditorBase.xml +++ b/doc/classes/ScriptEditorBase.xml @@ -9,18 +9,8 @@ <tutorials> </tutorials> <methods> - <method name="_add_syntax_highlighter" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="highlighter" type="Object"> - </argument> - <description> - Adds a [EditorSyntaxHighlighter] to the open script. - </description> - </method> <method name="get_base_editor" qualifiers="const"> - <return type="Control"> - </return> + <return type="Control" /> <description> Returns the underlying [Control] used for editing scripts. This can be either [CodeEdit] (for text scripts) or [GraphEdit] (for visual scripts). </description> @@ -33,8 +23,7 @@ </description> </signal> <signal name="go_to_help"> - <argument index="0" name="what" type="String"> - </argument> + <argument index="0" name="what" type="String" /> <description> Emitted when the user requests a specific documentation page. </description> @@ -45,24 +34,20 @@ </description> </signal> <signal name="replace_in_files_requested"> - <argument index="0" name="text" type="String"> - </argument> + <argument index="0" name="text" type="String" /> <description> Emitted when the user request to find and replace text in the file system. Not used by visual scripts. </description> </signal> <signal name="request_help"> - <argument index="0" name="topic" type="String"> - </argument> + <argument index="0" name="topic" type="String" /> <description> Emitted when the user requests contextual help. </description> </signal> <signal name="request_open_script_at_line"> - <argument index="0" name="script" type="Object"> - </argument> - <argument index="1" name="line" type="int"> - </argument> + <argument index="0" name="script" type="Object" /> + <argument index="1" name="line" type="int" /> <description> Emitted when the user requests a script. </description> @@ -73,8 +58,7 @@ </description> </signal> <signal name="search_in_files_requested"> - <argument index="0" name="text" type="String"> - </argument> + <argument index="0" name="text" type="String" /> <description> Emitted when the user request to search text in the file system. Not used by visual scripts. </description> diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml index 60f3106b4b..953ab24748 100644 --- a/doc/classes/ScrollContainer.xml +++ b/doc/classes/ScrollContainer.xml @@ -12,24 +12,20 @@ </tutorials> <methods> <method name="ensure_control_visible"> - <return type="void"> - </return> - <argument index="0" name="control" type="Control"> - </argument> + <return type="void" /> + <argument index="0" name="control" type="Control" /> <description> Ensures the given [code]control[/code] is visible (must be a direct or indirect child of the ScrollContainer). Used by [member follow_focus]. </description> </method> <method name="get_h_scrollbar"> - <return type="HScrollBar"> - </return> + <return type="HScrollBar" /> <description> Returns the horizontal scrollbar [HScrollBar] of this [ScrollContainer]. </description> </method> <method name="get_v_scrollbar"> - <return type="VScrollBar"> - </return> + <return type="VScrollBar" /> <description> Returns the vertical scrollbar [VScrollBar] of this [ScrollContainer]. </description> @@ -76,7 +72,7 @@ <constants> </constants> <theme_items> - <theme_item name="bg" type="StyleBox"> + <theme_item name="bg" data_type="style" type="StyleBox"> The background [StyleBox] of the [ScrollContainer]. </theme_item> </theme_items> diff --git a/doc/classes/Semaphore.xml b/doc/classes/Semaphore.xml index e8b405e52a..7794161ac4 100644 --- a/doc/classes/Semaphore.xml +++ b/doc/classes/Semaphore.xml @@ -11,22 +11,19 @@ </tutorials> <methods> <method name="post"> - <return type="void"> - </return> + <return type="void" /> <description> Lowers the [Semaphore], allowing one more thread in. </description> </method> <method name="try_wait"> - <return type="int" enum="Error"> - </return> + <return type="int" enum="Error" /> <description> Like [method wait], but won't block, so if the value is zero, fails immediately and returns [constant ERR_BUSY]. If non-zero, it returns [constant OK] to report success. </description> </method> <method name="wait"> - <return type="void"> - </return> + <return type="void" /> <description> Waits for the [Semaphore], if its value is zero, blocks until non-zero. </description> diff --git a/doc/classes/SeparationRayShape2D.xml b/doc/classes/SeparationRayShape2D.xml new file mode 100644 index 0000000000..fb90606577 --- /dev/null +++ b/doc/classes/SeparationRayShape2D.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SeparationRayShape2D" inherits="Shape2D" version="4.0"> + <brief_description> + Separation ray shape for 2D collisions. + </brief_description> + <description> + Separation ray shape for 2D collisions. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="length" type="float" setter="set_length" getter="get_length" default="20.0"> + The ray's length. + </member> + <member name="slide_on_slope" type="bool" setter="set_slide_on_slope" getter="get_slide_on_slope" default="false"> + If [code]false[/code] (default), the shape always separates and returns a normal along its own direction. + If [code]true[/code], the shape can return the correct normal and separate in any direction, allowing sliding motion on slopes. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/SeparationRayShape3D.xml b/doc/classes/SeparationRayShape3D.xml new file mode 100644 index 0000000000..ea57e4eb59 --- /dev/null +++ b/doc/classes/SeparationRayShape3D.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SeparationRayShape3D" inherits="Shape3D" version="4.0"> + <brief_description> + Separation ray shape for 3D collisions. + </brief_description> + <description> + Separation ray shape for 3D collisions, which can be set into a [PhysicsBody3D] or [Area3D]. A ray is not really a collision body; instead, it tries to separate itself from whatever is touching its far endpoint. It's often useful for characters. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="length" type="float" setter="set_length" getter="get_length" default="1.0"> + The ray's length. + </member> + <member name="slide_on_slope" type="bool" setter="set_slide_on_slope" getter="get_slide_on_slope" default="false"> + If [code]false[/code] (default), the shape always separates and returns a normal along its own direction. + If [code]true[/code], the shape can return the correct normal and separate in any direction, allowing sliding motion on slopes. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/Shader.xml b/doc/classes/Shader.xml index a717eba438..bc5457b8ce 100644 --- a/doc/classes/Shader.xml +++ b/doc/classes/Shader.xml @@ -12,39 +12,31 @@ </tutorials> <methods> <method name="get_default_texture_param" qualifiers="const"> - <return type="Texture2D"> - </return> - <argument index="0" name="param" type="StringName"> - </argument> + <return type="Texture2D" /> + <argument index="0" name="param" type="StringName" /> <description> Returns the texture that is set as default for the specified parameter. [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly. </description> </method> <method name="get_mode" qualifiers="const"> - <return type="int" enum="Shader.Mode"> - </return> + <return type="int" enum="Shader.Mode" /> <description> Returns the shader mode for the shader, either [constant MODE_CANVAS_ITEM], [constant MODE_SPATIAL] or [constant MODE_PARTICLES]. </description> </method> <method name="has_param" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> <description> Returns [code]true[/code] if the shader has this param defined as a uniform in its code. [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly. </description> </method> <method name="set_default_texture_param"> - <return type="void"> - </return> - <argument index="0" name="param" type="StringName"> - </argument> - <argument index="1" name="texture" type="Texture2D"> - </argument> + <return type="void" /> + <argument index="0" name="param" type="StringName" /> + <argument index="1" name="texture" type="Texture2D" /> <description> Sets the default texture to be used with a texture uniform. The default is used if a texture is not set in the [ShaderMaterial]. [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly. diff --git a/doc/classes/ShaderMaterial.xml b/doc/classes/ShaderMaterial.xml index b1748703ff..fe3ddc1b60 100644 --- a/doc/classes/ShaderMaterial.xml +++ b/doc/classes/ShaderMaterial.xml @@ -11,39 +11,30 @@ </tutorials> <methods> <method name="get_shader_param" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="param" type="StringName"> - </argument> + <return type="Variant" /> + <argument index="0" name="param" type="StringName" /> <description> Returns the current value set for this material of a uniform in the shader. </description> </method> <method name="property_can_revert"> - <return type="bool"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="String" /> <description> Returns [code]true[/code] if the property identified by [code]name[/code] can be reverted to a default value. </description> </method> <method name="property_get_revert"> - <return type="Variant"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="Variant" /> + <argument index="0" name="name" type="String" /> <description> Returns the default value of the material property with given [code]name[/code]. </description> </method> <method name="set_shader_param"> - <return type="void"> - </return> - <argument index="0" name="param" type="StringName"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="param" type="StringName" /> + <argument index="1" name="value" type="Variant" /> <description> Changes the value set for this material of a uniform in the shader. [b]Note:[/b] [code]param[/code] must match the name of the uniform in the code exactly. </description> diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml index 65a37314f6..c1191aa9de 100644 --- a/doc/classes/Shape2D.xml +++ b/doc/classes/Shape2D.xml @@ -11,76 +11,53 @@ </tutorials> <methods> <method name="collide"> - <return type="bool"> - </return> - <argument index="0" name="local_xform" type="Transform2D"> - </argument> - <argument index="1" name="with_shape" type="Shape2D"> - </argument> - <argument index="2" name="shape_xform" type="Transform2D"> - </argument> + <return type="bool" /> + <argument index="0" name="local_xform" type="Transform2D" /> + <argument index="1" name="with_shape" type="Shape2D" /> + <argument index="2" name="shape_xform" type="Transform2D" /> <description> Returns [code]true[/code] if this shape is colliding with another. This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]). </description> </method> <method name="collide_and_get_contacts"> - <return type="Array"> - </return> - <argument index="0" name="local_xform" type="Transform2D"> - </argument> - <argument index="1" name="with_shape" type="Shape2D"> - </argument> - <argument index="2" name="shape_xform" type="Transform2D"> - </argument> + <return type="Array" /> + <argument index="0" name="local_xform" type="Transform2D" /> + <argument index="1" name="with_shape" type="Shape2D" /> + <argument index="2" name="shape_xform" type="Transform2D" /> <description> Returns a list of the points where this shape touches another. If there are no collisions the list is empty. This method needs the transformation matrix for this shape ([code]local_xform[/code]), the shape to check collisions with ([code]with_shape[/code]), and the transformation matrix of that shape ([code]shape_xform[/code]). </description> </method> <method name="collide_with_motion"> - <return type="bool"> - </return> - <argument index="0" name="local_xform" type="Transform2D"> - </argument> - <argument index="1" name="local_motion" type="Vector2"> - </argument> - <argument index="2" name="with_shape" type="Shape2D"> - </argument> - <argument index="3" name="shape_xform" type="Transform2D"> - </argument> - <argument index="4" name="shape_motion" type="Vector2"> - </argument> + <return type="bool" /> + <argument index="0" name="local_xform" type="Transform2D" /> + <argument index="1" name="local_motion" type="Vector2" /> + <argument index="2" name="with_shape" type="Shape2D" /> + <argument index="3" name="shape_xform" type="Transform2D" /> + <argument index="4" name="shape_motion" type="Vector2" /> <description> Returns whether this shape would collide with another, if a given movement was applied. This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]). </description> </method> <method name="collide_with_motion_and_get_contacts"> - <return type="Array"> - </return> - <argument index="0" name="local_xform" type="Transform2D"> - </argument> - <argument index="1" name="local_motion" type="Vector2"> - </argument> - <argument index="2" name="with_shape" type="Shape2D"> - </argument> - <argument index="3" name="shape_xform" type="Transform2D"> - </argument> - <argument index="4" name="shape_motion" type="Vector2"> - </argument> + <return type="Array" /> + <argument index="0" name="local_xform" type="Transform2D" /> + <argument index="1" name="local_motion" type="Vector2" /> + <argument index="2" name="with_shape" type="Shape2D" /> + <argument index="3" name="shape_xform" type="Transform2D" /> + <argument index="4" name="shape_motion" type="Vector2" /> <description> Returns a list of the points where this shape would touch another, if a given movement was applied. If there are no collisions the list is empty. This method needs the transformation matrix for this shape ([code]local_xform[/code]), the movement to test on this shape ([code]local_motion[/code]), the shape to check collisions with ([code]with_shape[/code]), the transformation matrix of that shape ([code]shape_xform[/code]), and the movement to test onto the other object ([code]shape_motion[/code]). </description> </method> <method name="draw"> - <return type="void"> - </return> - <argument index="0" name="canvas_item" type="RID"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="canvas_item" type="RID" /> + <argument index="1" name="color" type="Color" /> <description> Draws a solid shape onto a [CanvasItem] with the [RenderingServer] API filled with the specified [code]color[/code]. The exact drawing method is specific for each shape and cannot be configured. </description> diff --git a/doc/classes/Shape3D.xml b/doc/classes/Shape3D.xml index b5f70132d7..5fd16d8d36 100644 --- a/doc/classes/Shape3D.xml +++ b/doc/classes/Shape3D.xml @@ -11,8 +11,7 @@ </tutorials> <methods> <method name="get_debug_mesh"> - <return type="ArrayMesh"> - </return> + <return type="ArrayMesh" /> <description> Returns the [ArrayMesh] used to draw the debug collision for this [Shape3D]. </description> diff --git a/doc/classes/Shortcut.xml b/doc/classes/Shortcut.xml index 55bbb083c9..d9f7f98888 100644 --- a/doc/classes/Shortcut.xml +++ b/doc/classes/Shortcut.xml @@ -5,39 +5,35 @@ </brief_description> <description> A shortcut for binding input. - Shortcuts are commonly used for interacting with a [Control] element from a [InputEvent]. + Shortcuts are commonly used for interacting with a [Control] element from an [InputEvent] (also known as hotkeys). </description> <tutorials> </tutorials> <methods> <method name="get_as_text" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the shortcut's [InputEvent] as a [String]. </description> </method> - <method name="is_shortcut" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="event" type="InputEvent"> - </argument> + <method name="has_valid_event" qualifiers="const"> + <return type="bool" /> <description> - Returns [code]true[/code] if the shortcut's [InputEvent] equals [code]event[/code]. + Returns whether the shortcut has a valid [member event] assigned to it. </description> </method> - <method name="is_valid" qualifiers="const"> - <return type="bool"> - </return> + <method name="matches_event" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="event" type="InputEvent" /> <description> - If [code]true[/code], this shortcut is valid. + Returns whether the shortcut's [member event] matches [code]event[/code]. </description> </method> </methods> <members> - <member name="shortcut" type="InputEvent" setter="set_shortcut" getter="get_shortcut"> + <member name="event" type="InputEvent" setter="set_event" getter="get_event"> The shortcut's [InputEvent]. - Generally the [InputEvent] is a keyboard key, though it can be any [InputEvent]. + Generally the [InputEvent] is a keyboard key, though it can be any [InputEvent], including an [InputEventAction]. </member> </members> <constants> diff --git a/doc/classes/Signal.xml b/doc/classes/Signal.xml index 1fd70a43fd..0e44abef42 100644 --- a/doc/classes/Signal.xml +++ b/doc/classes/Signal.xml @@ -9,117 +9,93 @@ </tutorials> <methods> <method name="Signal" qualifiers="constructor"> - <return type="Signal"> - </return> + <return type="Signal" /> <description> Constructs a null [Signal] with no object nor signal name bound. </description> </method> <method name="Signal" qualifiers="constructor"> - <return type="Signal"> - </return> - <argument index="0" name="from" type="Signal"> - </argument> + <return type="Signal" /> + <argument index="0" name="from" type="Signal" /> <description> Constructs a [Signal] as a copy of the given [Signal]. </description> </method> <method name="Signal" qualifiers="constructor"> - <return type="Signal"> - </return> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="signal" type="StringName"> - </argument> + <return type="Signal" /> + <argument index="0" name="object" type="Object" /> + <argument index="1" name="signal" type="StringName" /> <description> Creates a new [Signal] with the name [code]signal[/code] in the specified [code]object[/code]. </description> </method> <method name="connect"> - <return type="int"> - </return> - <argument index="0" name="callable" type="Callable"> - </argument> - <argument index="1" name="binds" type="Array" default="[]"> - </argument> - <argument index="2" name="flags" type="int" default="0"> - </argument> + <return type="int" /> + <argument index="0" name="callable" type="Callable" /> + <argument index="1" name="binds" type="Array" default="[]" /> + <argument index="2" name="flags" type="int" default="0" /> <description> Connects this signal to the specified [Callable], optionally providing binds and connection flags. </description> </method> <method name="disconnect"> - <return type="void"> - </return> - <argument index="0" name="callable" type="Callable"> - </argument> + <return type="void" /> + <argument index="0" name="callable" type="Callable" /> <description> Disconnects this signal from the specified [Callable]. </description> </method> <method name="emit" qualifiers="vararg const"> - <return type="void"> - </return> + <return type="void" /> <description> Emits this signal to all connected objects. </description> </method> <method name="get_connections" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns the list of [Callable]s connected to this signal. </description> </method> <method name="get_name" qualifiers="const"> - <return type="StringName"> - </return> + <return type="StringName" /> <description> Returns the name of this signal. </description> </method> <method name="get_object" qualifiers="const"> - <return type="Object"> - </return> + <return type="Object" /> <description> Returns the object emitting this signal. </description> </method> <method name="get_object_id" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the ID of the object emitting this signal (see [method Object.get_instance_id]). </description> </method> <method name="is_connected" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="callable" type="Callable"> - </argument> + <return type="bool" /> + <argument index="0" name="callable" type="Callable" /> <description> Returns [code]true[/code] if the specified [Callable] is connected to this signal. </description> </method> <method name="is_null" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Signal"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Signal" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Signal"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Signal" /> <description> </description> </method> diff --git a/doc/classes/Skeleton2D.xml b/doc/classes/Skeleton2D.xml index 6665a4a9f6..839193fb61 100644 --- a/doc/classes/Skeleton2D.xml +++ b/doc/classes/Skeleton2D.xml @@ -5,83 +5,67 @@ </brief_description> <description> Skeleton2D parents a hierarchy of [Bone2D] objects. It is a requirement of [Bone2D]. Skeleton2D holds a reference to the rest pose of its children and acts as a single point of access to its bones. + To setup different types of inverse kinematics for the given Skeleton2D, a [SkeletonModificationStack2D] should be created. They can be applied by creating the desired number of modifications, which can be done by increasing [member SkeletonModificationStack2D.modification_count]. </description> <tutorials> <link title="2D skeletons">https://docs.godotengine.org/en/latest/tutorials/animation/2d_skeletons.html</link> </tutorials> <methods> <method name="execute_modifications"> - <return type="void"> - </return> - <argument index="0" name="delta" type="float"> - </argument> - <argument index="1" name="execution_mode" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="delta" type="float" /> + <argument index="1" name="execution_mode" type="int" /> <description> Executes all the modifications on the [SkeletonModificationStack2D], if the Skeleton3D has one assigned. </description> </method> <method name="get_bone"> - <return type="Bone2D"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="Bone2D" /> + <argument index="0" name="idx" type="int" /> <description> Returns a [Bone2D] from the node hierarchy parented by Skeleton2D. The object to return is identified by the parameter [code]idx[/code]. Bones are indexed by descending the node hierarchy from top to bottom, adding the children of each branch before moving to the next sibling. </description> </method> <method name="get_bone_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of [Bone2D] nodes in the node hierarchy parented by Skeleton2D. </description> </method> <method name="get_bone_local_pose_override"> - <return type="Transform2D"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> + <return type="Transform2D" /> + <argument index="0" name="bone_idx" type="int" /> <description> Returns the local pose override transform for [code]bone_idx[/code]. </description> </method> <method name="get_modification_stack" qualifiers="const"> - <return type="SkeletonModificationStack2D"> - </return> + <return type="SkeletonModificationStack2D" /> <description> Returns the [SkeletonModificationStack2D] attached to this skeleton, if one exists. </description> </method> <method name="get_skeleton" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> Returns the [RID] of a Skeleton2D instance. </description> </method> <method name="set_bone_local_pose_override"> - <return type="void"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> - <argument index="1" name="override_pose" type="Transform2D"> - </argument> - <argument index="2" name="strength" type="float"> - </argument> - <argument index="3" name="persistent" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="bone_idx" type="int" /> + <argument index="1" name="override_pose" type="Transform2D" /> + <argument index="2" name="strength" type="float" /> + <argument index="3" name="persistent" type="bool" /> <description> Sets the local pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code]. - [code]amount[/code] is the interpolation strengh that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain. + [code]amount[/code] is the interpolation strength that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain. [b]Note:[/b] The pose transform needs to be a local transform relative to the [Bone2D] node at [code]bone_idx[/code]! </description> </method> <method name="set_modification_stack"> - <return type="void"> - </return> - <argument index="0" name="modification_stack" type="SkeletonModificationStack2D"> - </argument> + <return type="void" /> + <argument index="0" name="modification_stack" type="SkeletonModificationStack2D" /> <description> Sets the [SkeletonModificationStack2D] attached to this skeleton. </description> diff --git a/doc/classes/Skeleton3D.xml b/doc/classes/Skeleton3D.xml index 136f2f0a63..2f340adb9f 100644 --- a/doc/classes/Skeleton3D.xml +++ b/doc/classes/Skeleton3D.xml @@ -14,288 +14,351 @@ </tutorials> <methods> <method name="add_bone"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> <description> Adds a bone, with name [code]name[/code]. [method get_bone_count] will become the bone index. </description> </method> - <method name="bone_transform_to_world_transform"> - <return type="Transform3D"> - </return> - <argument index="0" name="bone_transform" type="Transform3D"> - </argument> + <method name="add_bone_child"> + <return type="void" /> + <argument index="0" name="bone_idx" type="int" /> + <argument index="1" name="child_bone_idx" type="int" /> <description> Takes the given bone pose/transform and converts it to a world transform, relative to the [Skeleton3D] node. This is useful for using the bone transform in calculations with transforms from [Node3D]-based nodes. </description> </method> <method name="clear_bones"> - <return type="void"> - </return> + <return type="void" /> <description> Clear all the bones in this skeleton. </description> </method> <method name="clear_bones_global_pose_override"> - <return type="void"> - </return> + <return type="void" /> <description> Removes the global pose override on all bones in the skeleton. </description> </method> + <method name="clear_bones_local_pose_override"> + <return type="void" /> + <description> + Removes the local pose override on all bones in the skeleton. + </description> + </method> + <method name="execute_modifications"> + <return type="void" /> + <argument index="0" name="delta" type="float" /> + <argument index="1" name="execution_mode" type="int" /> + <description> + Executes all the modifications on the [SkeletonModificationStack3D], if the Skeleton3D has one assigned. + </description> + </method> <method name="find_bone" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="name" type="String" /> <description> Returns the bone index that matches [code]name[/code] as its name. </description> </method> + <method name="force_update_all_bone_transforms"> + <return type="void" /> + <description> + Force updates the bone transforms/poses for all bones in the skeleton. + </description> + </method> + <method name="force_update_bone_child_transform"> + <return type="void" /> + <argument index="0" name="bone_idx" type="int" /> + <description> + Force updates the bone transform for the bone at [code]bone_idx[/code] and all of its children. + </description> + </method> + <method name="get_bone_children"> + <return type="PackedInt32Array" /> + <argument index="0" name="bone_idx" type="int" /> + <description> + Returns an array containing the bone indexes of all the children node of the passed in bone, [code]bone_idx[/code]. + </description> + </method> <method name="get_bone_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the amount of bones in the skeleton. </description> </method> <method name="get_bone_custom_pose" qualifiers="const"> - <return type="Transform3D"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="bone_idx" type="int" /> <description> Returns the custom pose of the specified bone. Custom pose is applied on top of the rest pose. </description> </method> <method name="get_bone_global_pose" qualifiers="const"> - <return type="Transform3D"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="bone_idx" type="int" /> <description> Returns the overall transform of the specified bone, with respect to the skeleton. Being relative to the skeleton frame, this is not the actual "global" transform of the bone. </description> </method> <method name="get_bone_global_pose_no_override" qualifiers="const"> - <return type="Transform3D"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="bone_idx" type="int" /> <description> Returns the overall transform of the specified bone, with respect to the skeleton, but without any global pose overrides. Being relative to the skeleton frame, this is not the actual "global" transform of the bone. </description> </method> + <method name="get_bone_global_pose_override" qualifiers="const"> + <return type="Transform3D" /> + <argument index="0" name="bone_idx" type="int" /> + <description> + </description> + </method> + <method name="get_bone_local_pose_override" qualifiers="const"> + <return type="Transform3D" /> + <argument index="0" name="bone_idx" type="int" /> + <description> + Returns the local pose override transform for [code]bone_idx[/code]. + </description> + </method> <method name="get_bone_name" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="bone_idx" type="int" /> <description> Returns the name of the bone at index [code]index[/code]. </description> </method> <method name="get_bone_parent" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="bone_idx" type="int" /> <description> Returns the bone index which is the parent of the bone at [code]bone_idx[/code]. If -1, then bone has no parent. [b]Note:[/b] The parent bone returned will always be less than [code]bone_idx[/code]. </description> </method> <method name="get_bone_pose" qualifiers="const"> - <return type="Transform3D"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="bone_idx" type="int" /> <description> Returns the pose transform of the specified bone. Pose is applied on top of the custom pose, which is applied on top the rest pose. </description> </method> - <method name="get_bone_process_orders"> - <return type="PackedInt32Array"> - </return> + <method name="get_bone_rest" qualifiers="const"> + <return type="Transform3D" /> + <argument index="0" name="bone_idx" type="int" /> <description> + Returns the rest transform for a bone [code]bone_idx[/code]. </description> </method> - <method name="get_bone_rest" qualifiers="const"> - <return type="Transform3D"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> + <method name="get_modification_stack"> + <return type="SkeletonModificationStack3D" /> <description> - Returns the rest transform for a bone [code]bone_idx[/code]. + Returns the modification stack attached to this skeleton, if one exists. + </description> + </method> + <method name="get_parentless_bones"> + <return type="PackedInt32Array" /> + <description> + Returns an array with all of the bones that are parentless. Another way to look at this is that it returns the indexes of all the bones that are not dependent or modified by other bones in the Skeleton. + </description> + </method> + <method name="global_pose_to_local_pose"> + <return type="Transform3D" /> + <argument index="0" name="bone_idx" type="int" /> + <argument index="1" name="global_pose" type="Transform3D" /> + <description> + Takes the passed-in global pose and converts it to local pose transform. + This can be used to easily convert a global pose from [method get_bone_global_pose] to a global transform in [method set_bone_local_pose_override]. + </description> + </method> + <method name="global_pose_to_world_transform"> + <return type="Transform3D" /> + <argument index="0" name="global_pose" type="Transform3D" /> + <description> + Takes the passed-in global pose and converts it to a world transform. + This can be used to easily convert a global pose from [method get_bone_global_pose] to a global transform usable with a node's transform, like [member Node3D.global_transform] for example. + </description> + </method> + <method name="global_pose_z_forward_to_bone_forward"> + <return type="Basis" /> + <argument index="0" name="bone_idx" type="int" /> + <argument index="1" name="basis" type="Basis" /> + <description> + Rotates the given [Basis] so that the forward axis of the Basis is facing in the forward direction of the bone at [code]bone_idx[/code]. + This is helper function to make using [method Transform3D.looking_at] easier with bone poses. </description> </method> <method name="is_bone_rest_disabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="bone_idx" type="int" /> <description> Returns whether the bone rest for the bone at [code]bone_idx[/code] is disabled. </description> </method> + <method name="local_pose_to_global_pose"> + <return type="Transform3D" /> + <argument index="0" name="bone_idx" type="int" /> + <argument index="1" name="local_pose" type="Transform3D" /> + <description> + Converts the passed-in local pose to a global pose relative to the inputted bone, [code]bone_idx[/code]. + This could be used to convert [method get_bone_pose] for use with the [method set_bone_global_pose_override] function. + </description> + </method> <method name="localize_rests"> - <return type="void"> - </return> + <return type="void" /> <description> Returns all bones in the skeleton to their rest poses. </description> </method> <method name="physical_bones_add_collision_exception"> - <return type="void"> - </return> - <argument index="0" name="exception" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="exception" type="RID" /> <description> Adds a collision exception to the physical bone. Works just like the [RigidBody3D] node. </description> </method> <method name="physical_bones_remove_collision_exception"> - <return type="void"> - </return> - <argument index="0" name="exception" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="exception" type="RID" /> <description> Removes a collision exception to the physical bone. Works just like the [RigidBody3D] node. </description> </method> <method name="physical_bones_start_simulation"> - <return type="void"> - </return> - <argument index="0" name="bones" type="StringName[]" default="[]"> - </argument> + <return type="void" /> + <argument index="0" name="bones" type="StringName[]" default="[]" /> <description> Tells the [PhysicalBone3D] nodes in the Skeleton to start simulating and reacting to the physics world. Optionally, a list of bone names can be passed-in, allowing only the passed-in bones to be simulated. </description> </method> <method name="physical_bones_stop_simulation"> - <return type="void"> - </return> + <return type="void" /> <description> Tells the [PhysicalBone3D] nodes in the Skeleton to stop simulating. </description> </method> <method name="register_skin"> - <return type="SkinReference"> - </return> - <argument index="0" name="skin" type="Skin"> - </argument> + <return type="SkinReference" /> + <argument index="0" name="skin" type="Skin" /> <description> Binds the given Skin to the Skeleton. </description> </method> + <method name="remove_bone_child"> + <return type="void" /> + <argument index="0" name="bone_idx" type="int" /> + <argument index="1" name="child_bone_idx" type="int" /> + <description> + Removes the passed in child bone index, [code]child_bone_idx[/code], from the passed-in bone, [code]bone_idx[/code], if it exists. + [b]Note:[/b] This does not remove the child bone, but instead it removes the connection it has to the parent bone. + </description> + </method> + <method name="set_bone_children"> + <return type="void" /> + <argument index="0" name="bone_idx" type="int" /> + <argument index="1" name="bone_children" type="PackedInt32Array" /> + <description> + Sets the children for the passed in bone, [code]bone_idx[/code], to the passed-in array of bone indexes, [code]bone_children[/code]. + </description> + </method> <method name="set_bone_custom_pose"> - <return type="void"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> - <argument index="1" name="custom_pose" type="Transform3D"> - </argument> + <return type="void" /> + <argument index="0" name="bone_idx" type="int" /> + <argument index="1" name="custom_pose" type="Transform3D" /> <description> Sets the custom pose transform, [code]custom_pose[/code], for the bone at [code]bone_idx[/code]. This pose is an addition to the bone rest pose. - [b]Note[/b]: The pose transform needs to be in bone space. Use [method world_transform_to_bone_transform] to convert a world transform, like one you can get from a [Node3D], to bone space. + [b]Note:[/b] The pose transform needs to be in bone space. Use [method world_transform_to_global_pose] to convert a world transform, like one you can get from a [Node3D], to bone space. </description> </method> <method name="set_bone_disable_rest"> - <return type="void"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> - <argument index="1" name="disable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="bone_idx" type="int" /> + <argument index="1" name="disable" type="bool" /> <description> Disables the rest pose for the bone at [code]bone_idx[/code] if [code]true[/code], enables the bone rest if [code]false[/code]. </description> </method> <method name="set_bone_global_pose_override"> - <return type="void"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> - <argument index="1" name="pose" type="Transform3D"> - </argument> - <argument index="2" name="amount" type="float"> - </argument> - <argument index="3" name="persistent" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="bone_idx" type="int" /> + <argument index="1" name="pose" type="Transform3D" /> + <argument index="2" name="amount" type="float" /> + <argument index="3" name="persistent" type="bool" default="false" /> <description> Sets the global pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code]. - [code]amount[/code] is the interpolation strength that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain. - [b]Note[/b]: The pose transform needs to be in bone space. Use [method world_transform_to_bone_transform] to convert a world transform, like one you can get from a [Node3D], to bone space. + [code]amount[/code] is the interpolation strengh that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain. + [b]Note:[/b] The pose transform needs to be a global pose! Use [method world_transform_to_global_pose] to convert a world transform, like one you can get from a [Node3D], to a global pose. + </description> + </method> + <method name="set_bone_local_pose_override"> + <return type="void" /> + <argument index="0" name="bone_idx" type="int" /> + <argument index="1" name="pose" type="Transform3D" /> + <argument index="2" name="amount" type="float" /> + <argument index="3" name="persistent" type="bool" default="false" /> + <description> + Sets the local pose transform, [code]pose[/code], for the bone at [code]bone_idx[/code]. + [code]amount[/code] is the interpolation strengh that will be used when applying the pose, and [code]persistent[/code] determines if the applied pose will remain. + [b]Note:[/b] The pose transform needs to be a local pose! Use [method global_pose_to_local_pose] to convert a global pose to a local pose. </description> </method> <method name="set_bone_name"> - <return type="void"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> - <argument index="1" name="name" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="bone_idx" type="int" /> + <argument index="1" name="name" type="String" /> <description> </description> </method> <method name="set_bone_parent"> - <return type="void"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> - <argument index="1" name="parent_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="bone_idx" type="int" /> + <argument index="1" name="parent_idx" type="int" /> <description> Sets the bone index [code]parent_idx[/code] as the parent of the bone at [code]bone_idx[/code]. If -1, then bone has no parent. [b]Note:[/b] [code]parent_idx[/code] must be less than [code]bone_idx[/code]. </description> </method> <method name="set_bone_pose"> - <return type="void"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> - <argument index="1" name="pose" type="Transform3D"> - </argument> + <return type="void" /> + <argument index="0" name="bone_idx" type="int" /> + <argument index="1" name="pose" type="Transform3D" /> <description> Sets the pose transform for bone [code]bone_idx[/code]. - [b]Note[/b]: The pose transform needs to be in bone space. Use [method world_transform_to_bone_transform] to convert a world transform, like one you can get from a [Node3D], to bone space. + [b]Note:[/b] The pose transform needs to be in bone space. Use [method world_transform_to_global_pose] to convert a world transform, like one you can get from a [Node3D], to bone space. </description> </method> <method name="set_bone_rest"> - <return type="void"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> - <argument index="1" name="rest" type="Transform3D"> - </argument> + <return type="void" /> + <argument index="0" name="bone_idx" type="int" /> + <argument index="1" name="rest" type="Transform3D" /> <description> Sets the rest transform for bone [code]bone_idx[/code]. </description> </method> + <method name="set_modification_stack"> + <return type="void" /> + <argument index="0" name="modification_stack" type="SkeletonModificationStack3D" /> + <description> + Sets the modification stack for this skeleton to the passed-in modification stack, [code]modification_stack[/code]. + </description> + </method> <method name="unparent_bone_and_rest"> - <return type="void"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="bone_idx" type="int" /> <description> Unparents the bone at [code]bone_idx[/code] and sets its rest position to that of its parent prior to being reset. </description> </method> - <method name="world_transform_to_bone_transform"> - <return type="Transform3D"> - </return> - <argument index="0" name="world_transform" type="Transform3D"> - </argument> + <method name="world_transform_to_global_pose"> + <return type="Transform3D" /> + <argument index="0" name="world_transform" type="Transform3D" /> <description> - Takes the given world transform, relative to the [Skeleton3D], and converts it to a bone pose/transform. - This is useful for using setting bone poses using transforms from [Node3D]-based nodes. + Takes the passed-in global transform and converts it to a global pose. + This can be used to easily convert a global transform from [member Node3D.global_transform] to a global pose usable with [method set_bone_global_pose_override], for example. </description> </method> </methods> @@ -304,6 +367,12 @@ </member> </members> <signals> + <signal name="bone_pose_changed"> + <argument index="0" name="bone_idx" type="int" /> + <description> + This signal is emitted when one of the bones in the Skeleton3D node have changed their pose. This is used to inform nodes that rely on bone positions that one of the bones in the Skeleton3D have changed their transform/pose. + </description> + </signal> <signal name="pose_updated"> <description> </description> diff --git a/doc/classes/SkeletonIK3D.xml b/doc/classes/SkeletonIK3D.xml index 138ebe4411..93cdd770cc 100644 --- a/doc/classes/SkeletonIK3D.xml +++ b/doc/classes/SkeletonIK3D.xml @@ -9,28 +9,23 @@ </tutorials> <methods> <method name="get_parent_skeleton" qualifiers="const"> - <return type="Skeleton3D"> - </return> + <return type="Skeleton3D" /> <description> </description> </method> <method name="is_running"> - <return type="bool"> - </return> + <return type="bool" /> <description> </description> </method> <method name="start"> - <return type="void"> - </return> - <argument index="0" name="one_time" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="one_time" type="bool" default="false" /> <description> </description> </method> <method name="stop"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> diff --git a/doc/classes/SkeletonModification2D.xml b/doc/classes/SkeletonModification2D.xml index 8596dac76e..cff55b6a17 100644 --- a/doc/classes/SkeletonModification2D.xml +++ b/doc/classes/SkeletonModification2D.xml @@ -11,81 +11,64 @@ </tutorials> <methods> <method name="_draw_editor_gizmo" qualifiers="virtual"> - <return type="void"> - </return> + <return type="void" /> <description> - Used for drawing [b]editor-only[/b] modification gizmos. This function will only be called in the Godot editor and can be overriden to draw custom gizmos. + Used for drawing [b]editor-only[/b] modification gizmos. This function will only be called in the Godot editor and can be overridden to draw custom gizmos. [b]Note:[/b] You will need to use the Skeleton2D from [method SkeletonModificationStack2D.get_skeleton] and it's draw functions, as the [SkeletonModification2D] resource cannot draw on its own. </description> </method> <method name="_execute" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="delta" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="delta" type="float" /> <description> Executes the given modification. This is where the modification performs whatever function it is designed to do. </description> </method> <method name="_setup_modification" qualifiers="virtual"> - <return type="void"> - </return> - <argument index="0" name="modification_stack" type="SkeletonModificationStack2D"> - </argument> + <return type="void" /> + <argument index="0" name="modification_stack" type="SkeletonModificationStack2D" /> <description> Called when the modification is setup. This is where the modification performs initialization. </description> </method> <method name="clamp_angle"> - <return type="float"> - </return> - <argument index="0" name="angle" type="float"> - </argument> - <argument index="1" name="min" type="float"> - </argument> - <argument index="2" name="max" type="float"> - </argument> - <argument index="3" name="invert" type="bool"> - </argument> + <return type="float" /> + <argument index="0" name="angle" type="float" /> + <argument index="1" name="min" type="float" /> + <argument index="2" name="max" type="float" /> + <argument index="3" name="invert" type="bool" /> <description> Takes a angle and clamps it so it is within the passed-in [code]min[/code] and [code]max[/code] range. [code]invert[/code] will inversely clamp the angle, clamping it to the range outside of the given bounds. </description> </method> <method name="get_editor_draw_gizmo" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns whether this modification will call [method _draw_editor_gizmo] in the Godot editor to draw modification-specific gizmos. </description> </method> <method name="get_is_setup" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns whether this modification has been successfully setup or not. </description> </method> <method name="get_modification_stack"> - <return type="SkeletonModificationStack2D"> - </return> + <return type="SkeletonModificationStack2D" /> <description> Returns the [SkeletonModificationStack2D] that this modification is bound to. Through the modification stack, you can access the Skeleton3D the modification is operating on. </description> </method> <method name="set_editor_draw_gizmo"> - <return type="void"> - </return> - <argument index="0" name="draw_gizmo" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="draw_gizmo" type="bool" /> <description> Sets whether this modification will call [method _draw_editor_gizmo] in the Godot editor to draw modification-specific gizmos. </description> </method> <method name="set_is_setup"> - <return type="void"> - </return> - <argument index="0" name="is_setup" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="is_setup" type="bool" /> <description> Manually allows you to set the setup state of the modification. This function should only rarely be used, as the [SkeletonModificationStack2D] the modification is bound to should handle setting the modification up. </description> @@ -96,7 +79,7 @@ If [code]true[/code], the modification's [method _execute] function will be called by the [SkeletonModificationStack2D]. </member> <member name="execution_mode" type="int" setter="set_execution_mode" getter="get_execution_mode" default="0"> - The execution mode for the modification. This tells the modification stack when to execute the modification. Some modifications have settings that are only availible in certain execution modes. + The execution mode for the modification. This tells the modification stack when to execute the modification. Some modifications have settings that are only available in certain execution modes. </member> </members> <constants> diff --git a/doc/classes/SkeletonModification2DCCDIK.xml b/doc/classes/SkeletonModification2DCCDIK.xml index 014d366a42..f876615de7 100644 --- a/doc/classes/SkeletonModification2DCCDIK.xml +++ b/doc/classes/SkeletonModification2DCCDIK.xml @@ -4,7 +4,7 @@ A modification that uses CCDIK to manipulate a series of bones to reach a target in 2D. </brief_description> <description> - This [SkeletonModification2D] uses an algorithm called [b]C[/b]yclic [b]C[/b]oordinate [b]D[/b]escent [b]I[/b]nverse [b]K[/b]inematics, or CCDIK, to maniuplate a chain of bones in a [Skeleton2D] so it reaches a defined target. + This [SkeletonModification2D] uses an algorithm called [b]C[/b]yclic [b]C[/b]oordinate [b]D[/b]escent [b]I[/b]nverse [b]K[/b]inematics, or CCDIK, to manipulate a chain of bones in a [Skeleton2D] so it reaches a defined target. CCDIK works by rotating a set of bones, typically called a "bone chain", on a single axis. Each bone is rotated to face the target from the tip (by default), which over a chain of bones allow it to rotate properly to reach the target. Because the bones only rotate on a single axis, CCDIK [i]can[/i] look more robotic than other IK solvers. [b]Note:[/b] The CCDIK modifier has [code]ccdik_joints[/code], which are the data objects that hold the data for each joint in the CCDIK chain. This is different from a bone! CCDIK joints hold the data needed for each bone in the bone chain used by CCDIK. CCDIK also fully supports angle constraints, allowing for more control over how a solution is met. @@ -13,142 +13,107 @@ </tutorials> <methods> <method name="get_ccdik_joint_bone2d_node" qualifiers="const"> - <return type="NodePath"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> + <return type="NodePath" /> + <argument index="0" name="joint_idx" type="int" /> <description> Returns the [Bone2D] node assigned to the CCDIK joint at [code]joint_idx[/code]. </description> </method> <method name="get_ccdik_joint_bone_index" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="joint_idx" type="int" /> <description> Returns the index of the [Bone2D] node assigned to the CCDIK joint at [code]joint_idx[/code]. </description> </method> <method name="get_ccdik_joint_constraint_angle_invert" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="joint_idx" type="int" /> <description> Returns whether the CCDIK joint at [code]joint_idx[/code] uses an inverted joint constraint. See [method set_ccdik_joint_constraint_angle_invert] for details. </description> </method> <method name="get_ccdik_joint_constraint_angle_max" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="joint_idx" type="int" /> <description> Returns the maximum angle constraint for the joint at [code]joint_idx[/code]. </description> </method> <method name="get_ccdik_joint_constraint_angle_min" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="joint_idx" type="int" /> <description> Returns the minimum angle constraint for the joint at [code]joint_idx[/code]. </description> </method> <method name="get_ccdik_joint_enable_constraint" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="joint_idx" type="int" /> <description> Returns whether angle constraints on the CCDIK joint at [code]joint_idx[/code] are enabled. </description> </method> <method name="get_ccdik_joint_rotate_from_joint" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="joint_idx" type="int" /> <description> Returns whether the joint at [code]joint_idx[/code] is set to rotate from the joint, [code]true[/code], or to rotate from the tip, [code]false[/code]. The default is to rotate from the tip. </description> </method> <method name="set_ccdik_joint_bone2d_node"> - <return type="void"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> - <argument index="1" name="bone2d_nodepath" type="NodePath"> - </argument> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="bone2d_nodepath" type="NodePath" /> <description> Sets the [Bone2D] node assigned to the CCDIK joint at [code]joint_idx[/code]. </description> </method> <method name="set_ccdik_joint_bone_index"> - <return type="void"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> - <argument index="1" name="bone_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="bone_idx" type="int" /> <description> Sets the bone index, [code]bone_index[/code], of the CCDIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone2d_node[/code] of the CCDIK joint based on data provided by the linked skeleton. </description> </method> <method name="set_ccdik_joint_constraint_angle_invert"> - <return type="void"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> - <argument index="1" name="invert" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="invert" type="bool" /> <description> Sets whether the CCDIK joint at [code]joint_idx[/code] uses an inverted joint constraint. An inverted joint constraint only constraints the CCDIK joint to the angles [i]outside of[/i] the inputted minimum and maximum angles. For this reason, it is referred to as an inverted joint constraint, as it constraints the joint to the outside of the inputted values. </description> </method> <method name="set_ccdik_joint_constraint_angle_max"> - <return type="void"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> - <argument index="1" name="angle_max" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="angle_max" type="float" /> <description> Sets the maximum angle constraint for the joint at [code]joint_idx[/code]. </description> </method> <method name="set_ccdik_joint_constraint_angle_min"> - <return type="void"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> - <argument index="1" name="angle_min" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="angle_min" type="float" /> <description> Sets the minimum angle constraint for the joint at [code]joint_idx[/code]. </description> </method> <method name="set_ccdik_joint_enable_constraint"> - <return type="void"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> - <argument index="1" name="enable_constraint" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="enable_constraint" type="bool" /> <description> Determines whether angle constraints on the CCDIK joint at [code]joint_idx[/code] are enabled. When [code]true[/code], constraints will be enabled and taken into account when solving. </description> </method> <method name="set_ccdik_joint_rotate_from_joint"> - <return type="void"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> - <argument index="1" name="rotate_from_joint" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="rotate_from_joint" type="bool" /> <description> Sets whether the joint at [code]joint_idx[/code] is set to rotate from the joint, [code]true[/code], or to rotate from the tip, [code]false[/code]. </description> diff --git a/doc/classes/SkeletonModification2DFABRIK.xml b/doc/classes/SkeletonModification2DFABRIK.xml index 62ab34b06f..314405498a 100644 --- a/doc/classes/SkeletonModification2DFABRIK.xml +++ b/doc/classes/SkeletonModification2DFABRIK.xml @@ -14,81 +14,61 @@ </tutorials> <methods> <method name="get_fabrik_joint_bone2d_node" qualifiers="const"> - <return type="NodePath"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> + <return type="NodePath" /> + <argument index="0" name="joint_idx" type="int" /> <description> Returns the [Bone2D] node assigned to the FABRIK joint at [code]joint_idx[/code]. </description> </method> <method name="get_fabrik_joint_bone_index" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="joint_idx" type="int" /> <description> Returns the index of the [Bone2D] node assigned to the FABRIK joint at [code]joint_idx[/code]. </description> </method> <method name="get_fabrik_joint_magnet_position" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="joint_idx" type="int" /> <description> Returns the magnet position vector for the joint at [code]joint_idx[/code]. </description> </method> <method name="get_fabrik_joint_use_target_rotation" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="joint_idx" type="int" /> <description> Returns whether the joint is using the target's rotation rather than allowing FABRIK to rotate the joint. This option only applies to the tip/final joint in the chain. </description> </method> <method name="set_fabrik_joint_bone2d_node"> - <return type="void"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> - <argument index="1" name="bone2d_nodepath" type="NodePath"> - </argument> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="bone2d_nodepath" type="NodePath" /> <description> Sets the [Bone2D] node assigned to the FABRIK joint at [code]joint_idx[/code]. </description> </method> <method name="set_fabrik_joint_bone_index"> - <return type="void"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> - <argument index="1" name="bone_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="bone_idx" type="int" /> <description> Sets the bone index, [code]bone_index[/code], of the FABRIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone2d_node[/code] of the FABRIK joint based on data provided by the linked skeleton. </description> </method> <method name="set_fabrik_joint_magnet_position"> - <return type="void"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> - <argument index="1" name="magnet_position" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="magnet_position" type="Vector2" /> <description> Sets the magnet position vector for the joint at [code]joint_idx[/code]. </description> </method> <method name="set_fabrik_joint_use_target_rotation"> - <return type="void"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> - <argument index="1" name="use_target_rotation" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="use_target_rotation" type="bool" /> <description> Sets whether the joint at [code]joint_idx[/code] will use the target node's rotation rather than letting FABRIK rotate the node. [b]Note:[/b] This option only works for the tip/final joint in the chain. For all other nodes, this option will be ignored. diff --git a/doc/classes/SkeletonModification2DJiggle.xml b/doc/classes/SkeletonModification2DJiggle.xml index ae46acd0d0..8d3732e225 100644 --- a/doc/classes/SkeletonModification2DJiggle.xml +++ b/doc/classes/SkeletonModification2DJiggle.xml @@ -12,193 +12,147 @@ </tutorials> <methods> <method name="get_collision_mask" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the collision mask used by the Jiggle modifier when collisions are enabled. </description> </method> <method name="get_jiggle_joint_bone2d_node" qualifiers="const"> - <return type="NodePath"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> + <return type="NodePath" /> + <argument index="0" name="joint_idx" type="int" /> <description> Returns the [Bone2D] node assigned to the Jiggle joint at [code]joint_idx[/code]. </description> </method> <method name="get_jiggle_joint_bone_index" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="joint_idx" type="int" /> <description> Returns the index of the [Bone2D] node assigned to the Jiggle joint at [code]joint_idx[/code]. </description> </method> <method name="get_jiggle_joint_damping" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="joint_idx" type="int" /> <description> Returns the amount of damping of the Jiggle joint at [code]joint_idx[/code]. </description> </method> <method name="get_jiggle_joint_gravity" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="joint_idx" type="int" /> <description> Returns a [Vector2] representing the amount of gravity the Jiggle joint at [code]joint_idx[/code] is influenced by. </description> </method> <method name="get_jiggle_joint_mass" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="joint_idx" type="int" /> <description> Returns the amount of mass of the jiggle joint at [code]joint_idx[/code]. </description> </method> <method name="get_jiggle_joint_override" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="joint_idx" type="int" /> <description> - Returns a boolean that indiciates whether the joint at [code]joint_idx[/code] is overriding the default Jiggle joint data defined in the modification. + Returns a boolean that indicates whether the joint at [code]joint_idx[/code] is overriding the default Jiggle joint data defined in the modification. </description> </method> <method name="get_jiggle_joint_stiffness" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="joint_idx" type="int" /> <description> Returns the stiffness of the Jiggle joint at [code]joint_idx[/code]. </description> </method> <method name="get_jiggle_joint_use_gravity" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="joint_idx" type="int" /> <description> - Returns a boolean that indiciates whether the joint at [code]joint_idx[/code] is using gravity or not. + Returns a boolean that indicates whether the joint at [code]joint_idx[/code] is using gravity or not. </description> </method> <method name="get_use_colliders" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns whether the jiggle modifier is taking physics colliders into account when solving. </description> </method> <method name="set_collision_mask"> - <return type="void"> - </return> - <argument index="0" name="collision_mask" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="collision_mask" type="int" /> <description> Sets the collision mask that the Jiggle modifier will use when reacting to colliders, if the Jiggle modifier is set to take colliders into account. </description> </method> <method name="set_jiggle_joint_bone2d_node"> - <return type="void"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> - <argument index="1" name="bone2d_node" type="NodePath"> - </argument> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="bone2d_node" type="NodePath" /> <description> Sets the [Bone2D] node assigned to the Jiggle joint at [code]joint_idx[/code]. </description> </method> <method name="set_jiggle_joint_bone_index"> - <return type="void"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> - <argument index="1" name="bone_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="bone_idx" type="int" /> <description> Sets the bone index, [code]bone_index[/code], of the Jiggle joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone2d_node[/code] of the Jiggle joint based on data provided by the linked skeleton. </description> </method> <method name="set_jiggle_joint_damping"> - <return type="void"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> - <argument index="1" name="damping" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="damping" type="float" /> <description> Sets the amount of dampening of the Jiggle joint at [code]joint_idx[/code]. </description> </method> <method name="set_jiggle_joint_gravity"> - <return type="void"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> - <argument index="1" name="gravity" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="gravity" type="Vector2" /> <description> Sets the gravity vector of the Jiggle joint at [code]joint_idx[/code]. </description> </method> <method name="set_jiggle_joint_mass"> - <return type="void"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> - <argument index="1" name="mass" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="mass" type="float" /> <description> Sets the of mass of the Jiggle joint at [code]joint_idx[/code]. </description> </method> <method name="set_jiggle_joint_override"> - <return type="void"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> - <argument index="1" name="override" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="override" type="bool" /> <description> Sets whether the Jiggle joint at [code]joint_idx[/code] should override the default Jiggle joint settings. Setting this to [code]true[/code] will make the joint use its own settings rather than the default ones attached to the modification. </description> </method> <method name="set_jiggle_joint_stiffness"> - <return type="void"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> - <argument index="1" name="stiffness" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="stiffness" type="float" /> <description> Sets the of stiffness of the Jiggle joint at [code]joint_idx[/code]. </description> </method> <method name="set_jiggle_joint_use_gravity"> - <return type="void"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> - <argument index="1" name="use_gravity" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="use_gravity" type="bool" /> <description> Sets whether the Jiggle joint at [code]joint_idx[/code] should use gravity. </description> </method> <method name="set_use_colliders"> - <return type="void"> - </return> - <argument index="0" name="use_colliders" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="use_colliders" type="bool" /> <description> If [code]true[/code], the Jiggle modifier will take colliders into account, keeping them from entering into these collision objects. </description> @@ -206,19 +160,19 @@ </methods> <members> <member name="damping" type="float" setter="set_damping" getter="get_damping" default="0.75"> - The default amount of dampening applied to the Jiggle joints, if they are not overriden. Higher values lead to more of the calculated velocity being applied. + The default amount of dampening applied to the Jiggle joints, if they are not overridden. Higher values lead to more of the calculated velocity being applied. </member> <member name="gravity" type="Vector2" setter="set_gravity" getter="get_gravity" default="Vector2(0, 6)"> - The default amount of gravity applied to the Jiggle joints, if they are not overriden. + The default amount of gravity applied to the Jiggle joints, if they are not overridden. </member> <member name="jiggle_data_chain_length" type="int" setter="set_jiggle_data_chain_length" getter="get_jiggle_data_chain_length" default="0"> The amount of Jiggle joints in the Jiggle modification. </member> <member name="mass" type="float" setter="set_mass" getter="get_mass" default="0.75"> - The default amount of mass assigned to the Jiggle joints, if they are not overriden. Higher values lead to faster movements and more overshooting. + The default amount of mass assigned to the Jiggle joints, if they are not overridden. Higher values lead to faster movements and more overshooting. </member> <member name="stiffness" type="float" setter="set_stiffness" getter="get_stiffness" default="3.0"> - The default amount of stiffness assigned to the Jiggle joints, if they are not overriden. Higher values act more like springs, quickly moving into the correct position. + The default amount of stiffness assigned to the Jiggle joints, if they are not overridden. Higher values act more like springs, quickly moving into the correct position. </member> <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> The NodePath to the node that is the target for the Jiggle modification. This node is what the Jiggle chain will attempt to rotate the bone chain to. diff --git a/doc/classes/SkeletonModification2DLookAt.xml b/doc/classes/SkeletonModification2DLookAt.xml index b0fa0e5a01..998a897d20 100644 --- a/doc/classes/SkeletonModification2DLookAt.xml +++ b/doc/classes/SkeletonModification2DLookAt.xml @@ -10,82 +10,67 @@ </tutorials> <methods> <method name="get_additional_rotation" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the amount of additional rotation that is applied after the LookAt modification executes. </description> </method> <method name="get_constraint_angle_invert" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns whether the constraints to this modification are inverted or not. </description> </method> <method name="get_constraint_angle_max" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the constraint's maximum allowed angle. </description> </method> <method name="get_constraint_angle_min" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the constraint's minimum allowed angle. </description> </method> <method name="get_enable_constraint" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the LookAt modification is using constraints. </description> </method> <method name="set_additional_rotation"> - <return type="void"> - </return> - <argument index="0" name="rotation" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="rotation" type="float" /> <description> Sets the amount of additional rotation that is to be applied after executing the modification. This allows for offsetting the results by the inputted rotation amount. </description> </method> <method name="set_constraint_angle_invert"> - <return type="void"> - </return> - <argument index="0" name="invert" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="invert" type="bool" /> <description> When [code]true[/code], the modification will use an inverted joint constraint. An inverted joint constraint only constraints the [Bone2D] to the angles [i]outside of[/i] the inputted minimum and maximum angles. For this reason, it is referred to as an inverted joint constraint, as it constraints the joint to the outside of the inputted values. </description> </method> <method name="set_constraint_angle_max"> - <return type="void"> - </return> - <argument index="0" name="angle_max" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="angle_max" type="float" /> <description> Sets the constraint's maximum allowed angle. </description> </method> <method name="set_constraint_angle_min"> - <return type="void"> - </return> - <argument index="0" name="angle_min" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="angle_min" type="float" /> <description> Sets the constraint's minimum allowed angle. </description> </method> <method name="set_enable_constraint"> - <return type="void"> - </return> - <argument index="0" name="enable_constraint" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enable_constraint" type="bool" /> <description> Sets whether this modification will use constraints or not. When [code]true[/code], constraints will be applied when solving the LookAt modification. </description> diff --git a/doc/classes/SkeletonModification2DPhysicalBones.xml b/doc/classes/SkeletonModification2DPhysicalBones.xml index 2547727097..e6bcb3c9d7 100644 --- a/doc/classes/SkeletonModification2DPhysicalBones.xml +++ b/doc/classes/SkeletonModification2DPhysicalBones.xml @@ -10,48 +10,38 @@ </tutorials> <methods> <method name="fetch_physical_bones"> - <return type="void"> - </return> + <return type="void" /> <description> Empties the list of [PhysicalBone2D] nodes and populates it will all [PhysicalBone2D] nodes that are children of the [Skeleton2D]. </description> </method> <method name="get_physical_bone_node" qualifiers="const"> - <return type="NodePath"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> + <return type="NodePath" /> + <argument index="0" name="joint_idx" type="int" /> <description> Returns the [PhysicalBone2D] node at [code]joint_idx[/code]. </description> </method> <method name="set_physical_bone_node"> - <return type="void"> - </return> - <argument index="0" name="joint_idx" type="int"> - </argument> - <argument index="1" name="physicalbone2d_node" type="NodePath"> - </argument> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="physicalbone2d_node" type="NodePath" /> <description> Sets the [PhysicalBone2D] node at [code]joint_idx[/code]. [b]Note:[/b] This is just the index used for this modification, not the bone index used in the [Skeleton2D]. </description> </method> <method name="start_simulation"> - <return type="void"> - </return> - <argument index="0" name="bones" type="StringName[]" default="[]"> - </argument> + <return type="void" /> + <argument index="0" name="bones" type="StringName[]" default="[]" /> <description> Tell the [PhysicalBone2D] nodes to start simulating and interacting with the physics world. Optionally, an array of bone names can be passed to this function, and that will cause only [PhysicalBone2D] nodes with those names to start simulating. </description> </method> <method name="stop_simulation"> - <return type="void"> - </return> - <argument index="0" name="bones" type="StringName[]" default="[]"> - </argument> + <return type="void" /> + <argument index="0" name="bones" type="StringName[]" default="[]" /> <description> Tell the [PhysicalBone2D] nodes to stop simulating and interacting with the physics world. Optionally, an array of bone names can be passed to this function, and that will cause only [PhysicalBone2D] nodes with those names to stop simulating. diff --git a/doc/classes/SkeletonModification2DStackHolder.xml b/doc/classes/SkeletonModification2DStackHolder.xml index 313cf81482..e5d9f2194a 100644 --- a/doc/classes/SkeletonModification2DStackHolder.xml +++ b/doc/classes/SkeletonModification2DStackHolder.xml @@ -11,17 +11,14 @@ </tutorials> <methods> <method name="get_held_modification_stack" qualifiers="const"> - <return type="SkeletonModificationStack2D"> - </return> + <return type="SkeletonModificationStack2D" /> <description> Returns the [SkeletonModificationStack2D] that this modification is holding. </description> </method> <method name="set_held_modification_stack"> - <return type="void"> - </return> - <argument index="0" name="held_modification_stack" type="SkeletonModificationStack2D"> - </argument> + <return type="void" /> + <argument index="0" name="held_modification_stack" type="SkeletonModificationStack2D" /> <description> Sets the [SkeletonModificationStack2D] that this modification is holding. This modification stack will then be executed when this modification is executed. </description> diff --git a/doc/classes/SkeletonModification2DTwoBoneIK.xml b/doc/classes/SkeletonModification2DTwoBoneIK.xml index 554515556b..25ee981d5d 100644 --- a/doc/classes/SkeletonModification2DTwoBoneIK.xml +++ b/doc/classes/SkeletonModification2DTwoBoneIK.xml @@ -4,72 +4,60 @@ A modification that rotates two bones using the law of cosigns to reach the target. </brief_description> <description> - This [SkeletonModification2D] uses an algorithm typically called TwoBoneIK. This algorithm works by leveraging the law of cosigns and the lengths of the bones to figure out what rotation the bones currently have, and what rotation they need to make a complete triangle, where the first bone, the second bone, and the target form the three verticies of the triangle. Because the algorithm works by making a triangle, it can only opperate on two bones. + This [SkeletonModification2D] uses an algorithm typically called TwoBoneIK. This algorithm works by leveraging the law of cosigns and the lengths of the bones to figure out what rotation the bones currently have, and what rotation they need to make a complete triangle, where the first bone, the second bone, and the target form the three vertices of the triangle. Because the algorithm works by making a triangle, it can only operate on two bones. TwoBoneIK is great for arms, legs, and really any joints that can be represented by just two bones that bend to reach a target. This solver is more lightweight than [SkeletonModification2DFABRIK], but gives similar, natural looking results. </description> <tutorials> </tutorials> <methods> <method name="get_joint_one_bone2d_node" qualifiers="const"> - <return type="NodePath"> - </return> + <return type="NodePath" /> <description> Returns the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification. </description> </method> <method name="get_joint_one_bone_idx" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the index of the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification. </description> </method> <method name="get_joint_two_bone2d_node" qualifiers="const"> - <return type="NodePath"> - </return> + <return type="NodePath" /> <description> Returns the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification. </description> </method> <method name="get_joint_two_bone_idx" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the index of the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification. </description> </method> <method name="set_joint_one_bone2d_node"> - <return type="void"> - </return> - <argument index="0" name="bone2d_node" type="NodePath"> - </argument> + <return type="void" /> + <argument index="0" name="bone2d_node" type="NodePath" /> <description> Sets the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification. </description> </method> <method name="set_joint_one_bone_idx"> - <return type="void"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="bone_idx" type="int" /> <description> Sets the index of the [Bone2D] node that is being used as the first bone in the TwoBoneIK modification. </description> </method> <method name="set_joint_two_bone2d_node"> - <return type="void"> - </return> - <argument index="0" name="bone2d_node" type="NodePath"> - </argument> + <return type="void" /> + <argument index="0" name="bone2d_node" type="NodePath" /> <description> Sets the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification. </description> </method> <method name="set_joint_two_bone_idx"> - <return type="void"> - </return> - <argument index="0" name="bone_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="bone_idx" type="int" /> <description> Sets the index of the [Bone2D] node that is being used as the second bone in the TwoBoneIK modification. </description> diff --git a/doc/classes/SkeletonModification3D.xml b/doc/classes/SkeletonModification3D.xml new file mode 100644 index 0000000000..48b8a905b9 --- /dev/null +++ b/doc/classes/SkeletonModification3D.xml @@ -0,0 +1,68 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SkeletonModification3D" inherits="Resource" version="4.0"> + <brief_description> + A resource that operates on bones in a [Skeleton3D]. + </brief_description> + <description> + This resource provides an interface that can be expanded so code that operates on bones in a [Skeleton3D] can be mixed and matched together to create complex interactions. + This is used to provide Godot with a flexible and powerful Inverse Kinematics solution that can be adapted for many different uses. + </description> + <tutorials> + </tutorials> + <methods> + <method name="_execute" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="delta" type="float" /> + <description> + Executes the given modification. This is where the modification performs whatever function it is designed to do. + </description> + </method> + <method name="_setup_modification" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="modification_stack" type="SkeletonModificationStack3D" /> + <description> + Sets up the modification so it can be executed. This function should be called automatically by the [SkeletonModificationStack3D] containing this modification. + If you need to initialize a modification before use, this is the place to do it! + </description> + </method> + <method name="clamp_angle"> + <return type="float" /> + <argument index="0" name="angle" type="float" /> + <argument index="1" name="min" type="float" /> + <argument index="2" name="max" type="float" /> + <argument index="3" name="invert" type="bool" /> + <description> + Takes a angle and clamps it so it is within the passed-in [code]min[/code] and [code]max[/code] range. [code]invert[/code] will inversely clamp the angle, clamping it to the range outside of the given bounds. + </description> + </method> + <method name="get_is_setup" qualifiers="const"> + <return type="bool" /> + <description> + Returns whether this modification has been successfully setup or not. + </description> + </method> + <method name="get_modification_stack"> + <return type="SkeletonModificationStack3D" /> + <description> + Returns the [SkeletonModificationStack3D] that this modification is bound to. Through the modification stack, you can access the Skeleton3D the modification is operating on. + </description> + </method> + <method name="set_is_setup"> + <return type="void" /> + <argument index="0" name="is_setup" type="bool" /> + <description> + Manually allows you to set the setup state of the modification. This function should only rarely be used, as the [SkeletonModificationStack3D] the modification is bound to should handle setting the modification up. + </description> + </method> + </methods> + <members> + <member name="enabled" type="bool" setter="set_enabled" getter="get_enabled" default="true"> + When true, the modification's [method _execute] function will be called by the [SkeletonModificationStack3D]. + </member> + <member name="execution_mode" type="int" setter="set_execution_mode" getter="get_execution_mode" default="0"> + The execution mode for the modification. This tells the modification stack when to execute the modification. Some modifications have settings that are only availible in certain execution modes. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/SkeletonModification3DCCDIK.xml b/doc/classes/SkeletonModification3DCCDIK.xml new file mode 100644 index 0000000000..aa7ddad56e --- /dev/null +++ b/doc/classes/SkeletonModification3DCCDIK.xml @@ -0,0 +1,138 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SkeletonModification3DCCDIK" inherits="SkeletonModification3D" version="4.0"> + <brief_description> + A modification that uses CCDIK to manipulate a series of bones to reach a target. + </brief_description> + <description> + This [SkeletonModification3D] uses an algorithm called [b]C[/b]yclic [b]C[/b]oordinate [b]D[/b]escent [b]I[/b]nverse [b]K[/b]inematics, or CCDIK, to maniuplate a chain of bones in a Skeleton so it reaches a defined target. + CCDIK works by rotating a set of bones, typically called a "bone chain", on a single axis. Each bone is rotated to face the target from the tip (by default), which over a chain of bones allow it to rotate properly to reach the target. Because the bones only rotate on a single axis, CCDIK [i]can[/i] look more robotic than other IK solvers. + [b]Note:[/b] The CCDIK modifier has [code]ccdik_joints[/code], which are the data objects that hold the data for each joint in the CCDIK chain. This is different from a bone! CCDIK joints hold the data needed for each bone in the bone chain used by CCDIK. + CCDIK also fully supports angle constraints, allowing for more control over how a solution is met. + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_ccdik_joint_bone_index" qualifiers="const"> + <return type="int" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Returns the bone index of the bone assigned to the CCDIK joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_ccdik_joint_bone_name" qualifiers="const"> + <return type="String" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Returns the name of the bone that is assigned to the CCDIK joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_ccdik_joint_ccdik_axis" qualifiers="const"> + <return type="int" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Returns the integer representing the joint axis of the CCDIK joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_ccdik_joint_constraint_angle_max" qualifiers="const"> + <return type="float" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Returns the maximum angle constraint for the joint at [code]joint_idx[/code]. [b]Note:[/b] This angle is in degrees! + </description> + </method> + <method name="get_ccdik_joint_constraint_angle_min" qualifiers="const"> + <return type="float" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Returns the minimum angle constraint for the joint at [code]joint_idx[/code]. [b]Note:[/b] This angle is in degrees! + </description> + </method> + <method name="get_ccdik_joint_constraint_invert" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Returns whether the CCDIK joint at [code]joint_idx[/code] uses an inverted joint constraint. See [method set_ccdik_joint_constraint_invert] for details. + </description> + </method> + <method name="get_ccdik_joint_enable_joint_constraint" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Enables angle constraints to the CCDIK joint at [code]joint_idx[/code]. + </description> + </method> + <method name="set_ccdik_joint_bone_index"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="bone_index" type="int" /> + <description> + Sets the bone index, [code]bone_index[/code], of the CCDIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone_name[/code] of the CCDIK joint based on data provided by the linked skeleton. + </description> + </method> + <method name="set_ccdik_joint_bone_name"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="bone_name" type="String" /> + <description> + Sets the bone name, [code]bone_name[/code], of the CCDIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone_index[/code] of the CCDIK joint based on data provided by the linked skeleton. + </description> + </method> + <method name="set_ccdik_joint_ccdik_axis"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="axis" type="int" /> + <description> + Sets the joint axis of the CCDIK joint at [code]joint_idx[/code] to the passed-in joint axis, [code]axis[/code]. + </description> + </method> + <method name="set_ccdik_joint_constraint_angle_max"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="max_angle" type="float" /> + <description> + Sets the maximum angle constraint for the joint at [code]joint_idx[/code]. [b]Note:[/b] This angle must be in radians! + </description> + </method> + <method name="set_ccdik_joint_constraint_angle_min"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="min_angle" type="float" /> + <description> + Sets the minimum angle constraint for the joint at [code]joint_idx[/code]. [b]Note:[/b] This angle must be in radians! + </description> + </method> + <method name="set_ccdik_joint_constraint_invert"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="invert" type="bool" /> + <description> + Sets whether the CCDIK joint at [code]joint_idx[/code] uses an inverted joint constraint. + An inverted joint constraint only constraints the CCDIK joint to the angles [i]outside of[/i] the inputted minimum and maximum angles. For this reason, it is referred to as an inverted joint constraint, as it constraints the joint to the outside of the inputted values. + </description> + </method> + <method name="set_ccdik_joint_enable_joint_constraint"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="enable" type="bool" /> + <description> + Sets whether joint constraints are enabled for the CCDIK joint at [code]joint_idx[/code]. + </description> + </method> + </methods> + <members> + <member name="ccdik_data_chain_length" type="int" setter="set_ccdik_data_chain_length" getter="get_ccdik_data_chain_length" default="0"> + The amount of CCDIK joints in the CCDIK modification. + </member> + <member name="high_quality_solve" type="bool" setter="set_use_high_quality_solve" getter="get_use_high_quality_solve" default="true"> + When true, the CCDIK algorithm will perform a higher quality solve that returns more natural results. A high quality solve requires more computation power to solve though, and therefore can be disabled to save performance. + </member> + <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> + The NodePath to the node that is the target for the CCDIK modification. This node is what the CCDIK chain will attempt to rotate the bone chain to. + </member> + <member name="tip_nodepath" type="NodePath" setter="set_tip_node" getter="get_tip_node" default="NodePath("")"> + The end position of the CCDIK chain. Typically, this should be a child of a [BoneAttachment3D] node attached to the final bone in the CCDIK chain, where the child node is offset so it is at the end of the final bone. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/SkeletonModification3DFABRIK.xml b/doc/classes/SkeletonModification3DFABRIK.xml new file mode 100644 index 0000000000..7058e37e94 --- /dev/null +++ b/doc/classes/SkeletonModification3DFABRIK.xml @@ -0,0 +1,163 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SkeletonModification3DFABRIK" inherits="SkeletonModification3D" version="4.0"> + <brief_description> + A modification that uses FABRIK to manipulate a series of bones to reach a target. + </brief_description> + <description> + This [SkeletonModification3D] uses an algorithm called [b]F[/b]orward [b]A[/b]nd [b]B[/b]ackward [b]R[/b]eaching [b]I[/b]nverse [b]K[/b]inematics, or FABRIK, to rotate a bone chain so that it reaches a target. + FABRIK works by knowing the positions and lengths of a series of bones, typically called a "bone chain". It first starts by running a forward pass, which places the final bone at the target's position. Then all other bones are moved towards the tip bone, so they stay at the defined bone length away. Then a backwards pass is performed, where the root/first bone in the FABRIK chain is placed back at the origin. then all other bones are moved so they stay at the defined bone length away. This positions the bone chain so that it reaches the target when possible, but all of the bones stay the correct length away from each other. + Because of how FABRIK works, it often gives more natural results than those seen in [SkeletonModification3DCCDIK], though FABRIK currently does not support joint constraints. + [b]Note:[/b] The FABRIK modifier has [code]fabrik_joints[/code], which are the data objects that hold the data for each joint in the FABRIK chain. This is different from a bone! FABRIK joints hold the data needed for each bone in the bone chain used by FABRIK. + To help control how the FABRIK joints move, a magnet vector can be passed, which can nudge the bones in a certain direction prior to solving, giving a level of control over the final result. + </description> + <tutorials> + </tutorials> + <methods> + <method name="fabrik_joint_auto_calculate_length"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Will attempt to automatically calculate the length of the bone assigned to the FABRIK joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_fabrik_joint_auto_calculate_length" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Returns a boolean that indiciates whether this modification will attempt to autocalculate the length of the bone assigned to the FABRIK joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_fabrik_joint_bone_index" qualifiers="const"> + <return type="int" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Returns the bone index of the bone assigned to the FABRIK joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_fabrik_joint_bone_name" qualifiers="const"> + <return type="String" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Returns the name of the bone that is assigned to the FABRIK joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_fabrik_joint_length" qualifiers="const"> + <return type="float" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Returns the length of the FABRIK joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_fabrik_joint_magnet" qualifiers="const"> + <return type="Vector3" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Returns the magnet vector of the FABRIK joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_fabrik_joint_tip_node" qualifiers="const"> + <return type="NodePath" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Returns the [Node3D]-based node placed at the tip of the FABRIK joint at [code]joint_idx[/code], if one has been set. + </description> + </method> + <method name="get_fabrik_joint_use_target_basis" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Returns a boolean indiciating whether the FABRIK joint uses the target's [Basis] for its rotation. + [b]Note:[/b] this option is only available for the final bone in the FABRIK chain, with this setting being ignored for all other bones. + </description> + </method> + <method name="get_fabrik_joint_use_tip_node" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Sets the [Node3D]-based node that will be used as the tip of the FABRIK joint at [code]joint_idx[/code]. + </description> + </method> + <method name="set_fabrik_joint_auto_calculate_length"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="auto_calculate_length" type="bool" /> + <description> + When [code]true[/code], this modification will attempt to automatically calculate the length of the bone for the FABRIK joint at [code]joint_idx[/code]. It does this by either using the tip node assigned, if there is one assigned, or the distance the of the bone's children, if the bone has any. If the bone has no children and no tip node is assigned, then the modification [b]cannot[/b] autocalculate the joint's length. In this case, the joint length should be entered manually or a tip node assigned. + </description> + </method> + <method name="set_fabrik_joint_bone_index"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="bone_index" type="int" /> + <description> + Sets the bone index, [code]bone_index[/code], of the FABRIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone_name[/code] of the FABRIK joint based on data provided by the [Skeleton3D]. + </description> + </method> + <method name="set_fabrik_joint_bone_name"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="bone_name" type="String" /> + <description> + Sets the bone name, [code]bone_name[/code], of the FABRIK joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone_index[/code] of the FABRIK joint based on data provided by the [Skeleton3D]. + </description> + </method> + <method name="set_fabrik_joint_length"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="length" type="float" /> + <description> + Sets the joint length, [code]length[/code], of the FABRIK joint at [code]joint_idx[/code]. + </description> + </method> + <method name="set_fabrik_joint_magnet"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="magnet_position" type="Vector3" /> + <description> + Sets the magenet position to [code]magnet_position[/code] for the joint at [code]joint_idx[/code]. The magnet position is used to nudge the joint in that direction when solving, which gives some control over how that joint will bend when being solved. + </description> + </method> + <method name="set_fabrik_joint_tip_node"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="tip_node" type="NodePath" /> + <description> + Sets the nodepath of the FARIK joint at [code]joint_idx[/code] to [code]tip_node[/code]. The tip node is used to calculate the length of the FABRIK joint when set to automatically calculate joint length. + [b]Note:[/b] The tip node should generally be a child node of a [BoneAttachment3D] node attached to the bone that this FABRIK joint operates on, with the child node being offset so it is at the end of the bone. + </description> + </method> + <method name="set_fabrik_joint_use_target_basis"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="use_target_basis" type="bool" /> + <description> + Sets whether the FABRIK joint at [code]joint_idx[/code] uses the target's [Basis] for its rotation. + [b]Note:[/b] this option is only available for the final bone in the FABRIK chain, with this setting being ignored for all other bones. + </description> + </method> + <method name="set_fabrik_joint_use_tip_node"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="use_tip_node" type="bool" /> + <description> + Sets whether the tip node should be used when autocalculating the joint length for the FABRIK joint at [code]joint_idx[/code]. This will only work if there is a node assigned to the tip nodepath for this joint. + </description> + </method> + </methods> + <members> + <member name="chain_max_iterations" type="int" setter="set_chain_max_iterations" getter="get_chain_max_iterations" default="10"> + The number of times FABRIK will try to solve each time the [code]execute[/code] function is called. Setting this value to a lower number will be result in better performance, but this can also result in harsher movements and slower solves. + </member> + <member name="chain_tolerance" type="float" setter="set_chain_tolerance" getter="get_chain_tolerance" default="0.01"> + The minimum distance the target has to be from the tip of the final bone in the bone chain. Setting this value to a higher number allows for greater performance, but less accurate solves. + </member> + <member name="fabrik_data_chain_length" type="int" setter="set_fabrik_data_chain_length" getter="get_fabrik_data_chain_length" default="0"> + The amount of FABRIK joints in the FABRIK modification. + </member> + <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> + The NodePath to the node that is the target for the FABRIK modification. This node is what the FABRIK chain will attempt to rotate the bone chain to. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/SkeletonModification3DJiggle.xml b/doc/classes/SkeletonModification3DJiggle.xml new file mode 100644 index 0000000000..6cc1c0b266 --- /dev/null +++ b/doc/classes/SkeletonModification3DJiggle.xml @@ -0,0 +1,201 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SkeletonModification3DJiggle" inherits="SkeletonModification3D" version="4.0"> + <brief_description> + A modification that jiggles bones as they move towards a target. + </brief_description> + <description> + This modification moves a series of bones, typically called a bone chain, towards a target. What makes this modification special is that it calculates the velocity and acceleration for each bone in the bone chain, and runs a very light physics-like calculation using the inputted values. This allows the bones to overshoot the target and "jiggle" around. It can be configured to act more like a spring, or sway around like cloth might. + This modification is useful for adding additional motion to things like hair, the edges of clothing, and more. It has several settings to that allow control over how the joint moves when the target moves. + [b]Note:[/b] The Jiggle modifier has [code]jiggle_joints[/code], which are the data objects that hold the data for each joint in the Jiggle chain. This is different from a bone! Jiggle joints hold the data needed for each bone in the bone chain used by the Jiggle modification. + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_collision_mask" qualifiers="const"> + <return type="int" /> + <description> + Returns the collision mask that the Jiggle modifier will take into account when performing physics calculations. + </description> + </method> + <method name="get_jiggle_joint_bone_index" qualifiers="const"> + <return type="int" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Returns the bone index of the bone assigned to the Jiggle joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_jiggle_joint_bone_name" qualifiers="const"> + <return type="String" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Returns the name of the bone that is assigned to the Jiggle joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_jiggle_joint_damping" qualifiers="const"> + <return type="float" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Returns the amount of dampening of the Jiggle joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_jiggle_joint_gravity" qualifiers="const"> + <return type="Vector3" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Returns a [Vector3] representign the amount of gravity the Jiggle joint at [code]joint_idx[/code] is influenced by. + </description> + </method> + <method name="get_jiggle_joint_mass" qualifiers="const"> + <return type="float" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Returns the amount of mass of the Jiggle joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_jiggle_joint_override" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Returns a boolean that indiciates whether the joint at [code]joint_idx[/code] is overriding the default jiggle joint data defined in the modification. + </description> + </method> + <method name="get_jiggle_joint_roll" qualifiers="const"> + <return type="float" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Returns the amount of roll/twist applied to the bone that the Jiggle joint is applied to. + </description> + </method> + <method name="get_jiggle_joint_stiffness" qualifiers="const"> + <return type="float" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Returns the stiffness of the Jiggle joint at [code]joint_idx[/code]. + </description> + </method> + <method name="get_jiggle_joint_use_gravity" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="joint_idx" type="int" /> + <description> + Returns a boolean that indiciates whether the joint at [code]joint_idx[/code] is using gravity or not. + </description> + </method> + <method name="get_use_colliders" qualifiers="const"> + <return type="bool" /> + <description> + Returns whether the Jiggle modifier is taking physics colliders into account when solving. + </description> + </method> + <method name="set_collision_mask"> + <return type="void" /> + <argument index="0" name="mask" type="int" /> + <description> + Sets the collision mask that the Jiggle modifier takes into account when performing physics calculations. + </description> + </method> + <method name="set_jiggle_joint_bone_index"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="bone_idx" type="int" /> + <description> + Sets the bone index, [code]bone_index[/code], of the Jiggle joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone_name[/code] of the Jiggle joint based on data provided by the [Skeleton3D]. + </description> + </method> + <method name="set_jiggle_joint_bone_name"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="name" type="String" /> + <description> + Sets the bone name, [code]bone_name[/code], of the Jiggle joint at [code]joint_idx[/code]. When possible, this will also update the [code]bone_index[/code] of the Jiggle joint based on data provided by the [Skeleton3D]. + </description> + </method> + <method name="set_jiggle_joint_damping"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="damping" type="float" /> + <description> + Sets the amount of dampening of the Jiggle joint at [code]joint_idx[/code]. + </description> + </method> + <method name="set_jiggle_joint_gravity"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="gravity" type="Vector3" /> + <description> + Sets the gravity vector of the Jiggle joint at [code]joint_idx[/code]. + </description> + </method> + <method name="set_jiggle_joint_mass"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="mass" type="float" /> + <description> + Sets the of mass of the Jiggle joint at [code]joint_idx[/code]. + </description> + </method> + <method name="set_jiggle_joint_override"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="override" type="bool" /> + <description> + Sets whether the Jiggle joint at [code]joint_idx[/code] should override the default Jiggle joint settings. Setting this to true will make the joint use its own settings rather than the default ones attached to the modification. + </description> + </method> + <method name="set_jiggle_joint_roll"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="roll" type="float" /> + <description> + Sets the amount of roll/twist on the bone the Jiggle joint is attached to. + </description> + </method> + <method name="set_jiggle_joint_stiffness"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="stiffness" type="float" /> + <description> + Sets the of stiffness of the Jiggle joint at [code]joint_idx[/code]. + </description> + </method> + <method name="set_jiggle_joint_use_gravity"> + <return type="void" /> + <argument index="0" name="joint_idx" type="int" /> + <argument index="1" name="use_gravity" type="bool" /> + <description> + Sets whether the Jiggle joint at [code]joint_idx[/code] should use gravity. + </description> + </method> + <method name="set_use_colliders"> + <return type="void" /> + <argument index="0" name="use_colliders" type="bool" /> + <description> + When [code]true[/code], the Jiggle modifier will use raycasting to prevent the Jiggle joints from rotating themselves into collision objects when solving. + </description> + </method> + </methods> + <members> + <member name="damping" type="float" setter="set_damping" getter="get_damping" default="0.75"> + The default amount of dampening applied to the Jiggle joints, if they are not overridden. Higher values lead to more of the calculated velocity being applied. + </member> + <member name="gravity" type="Vector3" setter="set_gravity" getter="get_gravity" default="Vector3(0, -6, 0)"> + The default amount of gravity applied to the Jiggle joints, if they are not overridden. + </member> + <member name="jiggle_data_chain_length" type="int" setter="set_jiggle_data_chain_length" getter="get_jiggle_data_chain_length" default="0"> + The amount of Jiggle joints in the Jiggle modification. + </member> + <member name="mass" type="float" setter="set_mass" getter="get_mass" default="0.75"> + The default amount of mass assigned to the Jiggle joints, if they are not overridden. Higher values lead to faster movements and more overshooting. + </member> + <member name="stiffness" type="float" setter="set_stiffness" getter="get_stiffness" default="3.0"> + The default amount of stiffness assigned to the Jiggle joints, if they are not overridden. Higher values act more like springs, quickly moving into the correct position. + </member> + <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> + The NodePath to the node that is the target for the Jiggle modification. This node is what the Jiggle chain will attempt to rotate the bone chain to. + </member> + <member name="use_gravity" type="bool" setter="set_use_gravity" getter="get_use_gravity" default="false"> + Whether the gravity vector, [member gravity], should be applied to the Jiggle joints, assuming they are not overriding the default settings. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/SkeletonModification3DLookAt.xml b/doc/classes/SkeletonModification3DLookAt.xml new file mode 100644 index 0000000000..c01d764cff --- /dev/null +++ b/doc/classes/SkeletonModification3DLookAt.xml @@ -0,0 +1,66 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SkeletonModification3DLookAt" inherits="SkeletonModification3D" version="4.0"> + <brief_description> + A modification that rotates a bone to look at a target. + </brief_description> + <description> + This [SkeletonModification3D] rotates a bone to look a target. This is extremely helpful for moving character's heads to look at the player, rotating a turret to look at a target, or any other case where you want to make a bone rotate towards something quickly and easily. + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_additional_rotation" qualifiers="const"> + <return type="Vector3" /> + <description> + Returns the amount of extra rotation that is applied to the bone after the LookAt modification executes. + </description> + </method> + <method name="get_lock_rotation_plane" qualifiers="const"> + <return type="int" /> + <description> + Returns the plane that the LookAt modification is limiting rotation to. + </description> + </method> + <method name="get_lock_rotation_to_plane" qualifiers="const"> + <return type="bool" /> + <description> + Returns whether the LookAt modification is limiting rotation to a single plane in 3D space. + </description> + </method> + <method name="set_additional_rotation"> + <return type="void" /> + <argument index="0" name="additional_rotation" type="Vector3" /> + <description> + Sets the amount of extra rotation to be applied after the LookAt modification executes. This allows you to adjust the finished result. + </description> + </method> + <method name="set_lock_rotation_plane"> + <return type="void" /> + <argument index="0" name="plane" type="int" /> + <description> + </description> + </method> + <method name="set_lock_rotation_to_plane"> + <return type="void" /> + <argument index="0" name="lock_to_plane" type="bool" /> + <description> + When [code]true[/code], the LookAt modification will limit its rotation to a single plane in 3D space. The plane used can be configured using the [code]set_lock_rotation_plane[/code] function. + </description> + </method> + </methods> + <members> + <member name="bone_index" type="int" setter="set_bone_index" getter="get_bone_index" default="-2"> + The bone index of the bone that should be operated on by this modification. + When possible, this will also update the [member bone_name] based on data provided by the [Skeleton3D]. + </member> + <member name="bone_name" type="String" setter="set_bone_name" getter="get_bone_name" default=""""> + The name of the bone that should be operated on by this modification. + When possible, this will also update the [member bone_index] based on data provided by the [Skeleton3D]. + </member> + <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> + The NodePath to the node that is the target for the modification. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/SkeletonModification3DStackHolder.xml b/doc/classes/SkeletonModification3DStackHolder.xml new file mode 100644 index 0000000000..bb923b680d --- /dev/null +++ b/doc/classes/SkeletonModification3DStackHolder.xml @@ -0,0 +1,29 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SkeletonModification3DStackHolder" inherits="SkeletonModification3D" version="4.0"> + <brief_description> + A modification that holds and executes a [SkeletonModificationStack3D]. + </brief_description> + <description> + This [SkeletonModification3D] holds a reference to a [SkeletonModificationStack3D], allowing you to use multiple modification stacks on a single [Skeleton3D]. + [b]Note[/b]: The modifications in the held [SkeletonModificationStack3D] will only be executed if their execution mode matches the execution mode of the SkeletonModification3DStackHolder. + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_held_modification_stack" qualifiers="const"> + <return type="SkeletonModificationStack3D" /> + <description> + Returns the [SkeletonModificationStack3D] that this modification is holding. + </description> + </method> + <method name="set_held_modification_stack"> + <return type="void" /> + <argument index="0" name="held_modification_stack" type="SkeletonModificationStack3D" /> + <description> + Sets the [SkeletonModificationStack3D] that this modification is holding. This modification stack will then be executed when this modification is executed. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/SkeletonModification3DTwoBoneIK.xml b/doc/classes/SkeletonModification3DTwoBoneIK.xml new file mode 100644 index 0000000000..5c863367df --- /dev/null +++ b/doc/classes/SkeletonModification3DTwoBoneIK.xml @@ -0,0 +1,193 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SkeletonModification3DTwoBoneIK" inherits="SkeletonModification3D" version="4.0"> + <brief_description> + A modification that moves two bones to reach the target. + </brief_description> + <description> + This [SkeletonModification3D] uses an algorithm typically called TwoBoneIK. This algorithm works by leveraging the law of cosigns and the lengths of the bones to figure out what rotation the bones currently have, and what rotation they need to make a complete triangle, where the first bone, the second bone, and the target form the three verticies of the triangle. Because the algorithm works by making a triangle, it can only opperate on two bones. + TwoBoneIK is great for arms, legs, and really any joints that can be represented by just two bones that bend to reach a target. This solver is more lightweight than [SkeletonModification3DFABRIK], but gives similar, natural looking results. + A [Node3D]-based node can be used to define the pole, or bend direction, allowing control over which direction the joint takes when bending to reach the target when the target is within reach. + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_auto_calculate_joint_length" qualifiers="const"> + <return type="bool" /> + <description> + Returns whether the TwoBoneIK modification will attempt to autocalculate the lengths of the two bones. + </description> + </method> + <method name="get_joint_one_bone_idx" qualifiers="const"> + <return type="int" /> + <description> + Returns the bone index of the first bone in the TwoBoneIK modification. + </description> + </method> + <method name="get_joint_one_bone_name" qualifiers="const"> + <return type="String" /> + <description> + Returns the name of the first bone in the TwoBoneIK modification. + </description> + </method> + <method name="get_joint_one_length" qualifiers="const"> + <return type="float" /> + <description> + Returns the length of the first bone in the TwoBoneIK modification. + </description> + </method> + <method name="get_joint_one_roll" qualifiers="const"> + <return type="float" /> + <description> + Returns the amount of roll/twist applied to the first bone in the TwoBoneIK modification. + </description> + </method> + <method name="get_joint_two_bone_idx" qualifiers="const"> + <return type="int" /> + <description> + Returns the bone index of the second bone in the TwoBoneIK modification. + </description> + </method> + <method name="get_joint_two_bone_name" qualifiers="const"> + <return type="String" /> + <description> + Returns the name of the second bone in the TwoBoneIK modification. + </description> + </method> + <method name="get_joint_two_length" qualifiers="const"> + <return type="float" /> + <description> + Returns the length of the second bone in the TwoBoneIK modification. + </description> + </method> + <method name="get_joint_two_roll" qualifiers="const"> + <return type="float" /> + <description> + Returns the amount of roll/twist applied to the second bone in the TwoBoneIK modification. + </description> + </method> + <method name="get_pole_node" qualifiers="const"> + <return type="NodePath" /> + <description> + Returns the node that is being used as the pole node for the TwoBoneIK modification, if a pole node has been set. + </description> + </method> + <method name="get_tip_node" qualifiers="const"> + <return type="NodePath" /> + <description> + Returns the node that is being used to calculate the tip position of the second bone in the TwoBoneIK modification, if a tip node has been set. + </description> + </method> + <method name="get_use_pole_node" qualifiers="const"> + <return type="bool" /> + <description> + Returns whether the TwoBoneIK modification will attempt to use the pole node to figure out which direction to bend, if a pole node has been set. + </description> + </method> + <method name="get_use_tip_node" qualifiers="const"> + <return type="bool" /> + <description> + Returns whether the TwoBoneIK modification will attempt to use the tip node to figure out the length and position of the tip of the second bone. + </description> + </method> + <method name="set_auto_calculate_joint_length"> + <return type="void" /> + <argument index="0" name="auto_calculate_joint_length" type="bool" /> + <description> + If true, the TwoBoneIK modification will attempt to autocalculate the lengths of the bones being used. The first bone will be calculated by using the distance from the origin of the first bone to the origin of the second bone. + The second bone will be calculated either using the tip node if that setting is enabled, or by using the distances of the second bone's children. If the tip node is not enabled and the bone has no children, then the length cannot be autocalculated. In this case, the length will either have to be manually inputted or a tip node used to calculate the length. + </description> + </method> + <method name="set_joint_one_bone_idx"> + <return type="void" /> + <argument index="0" name="bone_idx" type="int" /> + <description> + Sets the bone index, [code]bone_index[/code], of the first bone. When possible, this will also update the [code]bone_name[/code] of the first bone based on data provided by the [Skeleton3D]. + </description> + </method> + <method name="set_joint_one_bone_name"> + <return type="void" /> + <argument index="0" name="bone_name" type="String" /> + <description> + Sets the bone name, [code]bone_name[/code], of the first bone. When possible, this will also update the [code]bone_index[/code] of the first bone based on data provided by the [Skeleton3D]. + </description> + </method> + <method name="set_joint_one_length"> + <return type="void" /> + <argument index="0" name="bone_length" type="float" /> + <description> + Sets the length of the first bone in the TwoBoneIK modification. + </description> + </method> + <method name="set_joint_one_roll"> + <return type="void" /> + <argument index="0" name="roll" type="float" /> + <description> + Sets the amount of roll/twist applied to the first bone in the TwoBoneIK modification. + </description> + </method> + <method name="set_joint_two_bone_idx"> + <return type="void" /> + <argument index="0" name="bone_idx" type="int" /> + <description> + Sets the bone index, [code]bone_index[/code], of the second bone. When possible, this will also update the [code]bone_name[/code] of the second bone based on data provided by the [Skeleton3D]. + </description> + </method> + <method name="set_joint_two_bone_name"> + <return type="void" /> + <argument index="0" name="bone_name" type="String" /> + <description> + Sets the bone name, [code]bone_name[/code], of the second bone. When possible, this will also update the [code]bone_index[/code] of the second bone based on data provided by the [Skeleton3D]. + </description> + </method> + <method name="set_joint_two_length"> + <return type="void" /> + <argument index="0" name="bone_length" type="float" /> + <description> + Sets the length of the second bone in the TwoBoneIK modification. + </description> + </method> + <method name="set_joint_two_roll"> + <return type="void" /> + <argument index="0" name="roll" type="float" /> + <description> + Sets the amount of roll/twist applied to the second bone in the TwoBoneIK modification. + </description> + </method> + <method name="set_pole_node"> + <return type="void" /> + <argument index="0" name="pole_nodepath" type="NodePath" /> + <description> + Sets the node to be used as the for the pole of the TwoBoneIK. When a node is set and the modification is set to use the pole node, the TwoBoneIK modification will bend the nodes in the direction towards this node when the bones need to bend. + </description> + </method> + <method name="set_tip_node"> + <return type="void" /> + <argument index="0" name="tip_nodepath" type="NodePath" /> + <description> + Sets the node to be used as the tip for the second bone. This is used to calculate the length and position of the end of the second bone in the TwoBoneIK modification. + [b]Note:[/b] The tip node should generally be a child node of a [BoneAttachment3D] node attached to the second bone, with the child node being offset so it is at the end of the bone. + </description> + </method> + <method name="set_use_pole_node"> + <return type="void" /> + <argument index="0" name="use_pole_node" type="bool" /> + <description> + When [code]true[/code], the TwoBoneIK modification will bend the bones towards the pole node, if one has been set. This gives control over the direction the TwoBoneIK solver will bend, which is helpful for joints like elbows that only bend in certain directions. + </description> + </method> + <method name="set_use_tip_node"> + <return type="void" /> + <argument index="0" name="use_tip_node" type="bool" /> + <description> + When [code]true[/code], the TwoBoneIK modification will use the tip node to calculate the distance and position of the end/tip of the second bone. This is the most stable solution for knowing the tip position and length of the second bone. + </description> + </method> + </methods> + <members> + <member name="target_nodepath" type="NodePath" setter="set_target_node" getter="get_target_node" default="NodePath("")"> + The NodePath to the node that is the target for the TwoBoneIK modification. This node is what the modification will attempt to rotate the bones to reach. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/SkeletonModificationStack2D.xml b/doc/classes/SkeletonModificationStack2D.xml index 35b899fe08..97b8e3b945 100644 --- a/doc/classes/SkeletonModificationStack2D.xml +++ b/doc/classes/SkeletonModificationStack2D.xml @@ -12,81 +12,64 @@ </tutorials> <methods> <method name="add_modification"> - <return type="void"> - </return> - <argument index="0" name="modification" type="SkeletonModification2D"> - </argument> + <return type="void" /> + <argument index="0" name="modification" type="SkeletonModification2D" /> <description> Adds the passed-in [SkeletonModification2D] to the stack. </description> </method> <method name="delete_modification"> - <return type="void"> - </return> - <argument index="0" name="mod_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="mod_idx" type="int" /> <description> Deletes the [SkeletonModification2D] at the index position [code]mod_idx[/code], if it exists. </description> </method> <method name="enable_all_modifications"> - <return type="void"> - </return> - <argument index="0" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enabled" type="bool" /> <description> Enables all [SkeletonModification2D]s in the stack. </description> </method> <method name="execute"> - <return type="void"> - </return> - <argument index="0" name="delta" type="float"> - </argument> - <argument index="1" name="execution_mode" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="delta" type="float" /> + <argument index="1" name="execution_mode" type="int" /> <description> Executes all of the [SkeletonModification2D]s in the stack that use the same execution mode as the passed-in [code]execution_mode[/code], starting from index [code]0[/code] to [member modification_count]. [b]Note:[/b] The order of the modifications can matter depending on the modifications. For example, modifications on a spine should operate before modifications on the arms in order to get proper results. </description> </method> <method name="get_is_setup" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> - Returns a boolean that indiciates whether the modification stack is setup and can execute. + Returns a boolean that indicates whether the modification stack is setup and can execute. </description> </method> <method name="get_modification" qualifiers="const"> - <return type="SkeletonModification2D"> - </return> - <argument index="0" name="mod_idx" type="int"> - </argument> + <return type="SkeletonModification2D" /> + <argument index="0" name="mod_idx" type="int" /> <description> Returns the [SkeletonModification2D] at the passed-in index, [code]mod_idx[/code]. </description> </method> <method name="get_skeleton" qualifiers="const"> - <return type="Skeleton2D"> - </return> + <return type="Skeleton2D" /> <description> Returns the [Skeleton2D] node that the SkeletonModificationStack2D is bound to. </description> </method> <method name="set_modification"> - <return type="void"> - </return> - <argument index="0" name="mod_idx" type="int"> - </argument> - <argument index="1" name="modification" type="SkeletonModification2D"> - </argument> + <return type="void" /> + <argument index="0" name="mod_idx" type="int" /> + <argument index="1" name="modification" type="SkeletonModification2D" /> <description> Sets the modification at [code]mod_idx[/code] to the passed-in modification, [code]modification[/code]. </description> </method> <method name="setup"> - <return type="void"> - </return> + <return type="void" /> <description> Sets up the modification stack so it can execute. This function should be called by [Skeleton2D] and shouldn't be manually called unless you know what you are doing. </description> diff --git a/doc/classes/SkeletonModificationStack3D.xml b/doc/classes/SkeletonModificationStack3D.xml new file mode 100644 index 0000000000..4e5e9d72d8 --- /dev/null +++ b/doc/classes/SkeletonModificationStack3D.xml @@ -0,0 +1,90 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="SkeletonModificationStack3D" inherits="Resource" version="4.0"> + <brief_description> + A resource that holds a stack of [SkeletonModification3D]s. + </brief_description> + <description> + This resource is used by the Skeleton and holds a stack of [SkeletonModification3D]s. The SkeletonModificationStack3D controls the order of the modifications, which controls how they are applied. Modification order is especially important for full-body IK setups, as you need to execute the modifications in the correct order to get the desired results. For example, you want to execute a modification on the spine [i]before[/i] the arms on a humanoid skeleton. + Additionally, the SkeletonModificationStack3D also controls how strongly the modifications are applied to the [Skeleton3D] node. + </description> + <tutorials> + </tutorials> + <methods> + <method name="add_modification"> + <return type="void" /> + <argument index="0" name="modification" type="SkeletonModification3D" /> + <description> + Adds the passed-in [SkeletonModification3D] to the stack. + </description> + </method> + <method name="delete_modification"> + <return type="void" /> + <argument index="0" name="mod_idx" type="int" /> + <description> + Deletes the [SkeletonModification3D] at the index position [code]mod_idx[/code], if it exists. + </description> + </method> + <method name="enable_all_modifications"> + <return type="void" /> + <argument index="0" name="enabled" type="bool" /> + <description> + Enables all [SkeletonModification3D]s in the stack. + </description> + </method> + <method name="execute"> + <return type="void" /> + <argument index="0" name="delta" type="float" /> + <argument index="1" name="execution_mode" type="int" /> + <description> + Executes all of the [SkeletonModification3D]s in the stack that use the same execution mode as the passed-in [code]execution_mode[/code], starting from index [code]0[/code] to [member modification_count]. + [b]Note:[/b] The order of the modifications can matter depending on the modifications. For example, modifications on a spine should operate before modifications on the arms in order to get proper results. + </description> + </method> + <method name="get_is_setup" qualifiers="const"> + <return type="bool" /> + <description> + Returns a boolean that indiciates whether the modification stack is setup and can execute. + </description> + </method> + <method name="get_modification" qualifiers="const"> + <return type="SkeletonModification3D" /> + <argument index="0" name="mod_idx" type="int" /> + <description> + Returns the [SkeletonModification3D] at the passed-in index, [code]mod_idx[/code]. + </description> + </method> + <method name="get_skeleton" qualifiers="const"> + <return type="Skeleton3D" /> + <description> + Returns the [Skeleton3D] node that the SkeletonModificationStack3D is bound to. + </description> + </method> + <method name="set_modification"> + <return type="void" /> + <argument index="0" name="mod_idx" type="int" /> + <argument index="1" name="modification" type="SkeletonModification3D" /> + <description> + Sets the modification at [code]mod_idx[/code] to the passed-in modification, [code]modification[/code]. + </description> + </method> + <method name="setup"> + <return type="void" /> + <description> + Sets up the modification stack so it can execute. This function should be called by [Skeleton3D] and shouldn't be called unless you know what you are doing. + </description> + </method> + </methods> + <members> + <member name="enabled" type="bool" setter="set_enabled" getter="get_enabled" default="false"> + When true, the modification's in the stack will be called. This is handled automatically through the [Skeleton3D] node. + </member> + <member name="modification_count" type="int" setter="set_modification_count" getter="get_modification_count" default="0"> + The amount of modifications in the stack. + </member> + <member name="strength" type="float" setter="set_strength" getter="get_strength" default="1.0"> + The interpolation strength of the modifications in stack. A value of [code]0[/code] will make it where the modifications are not applied, a strength of [code]0.5[/code] will be half applied, and a strength of [code]1[/code] will allow the modifications to be fully applied and override the skeleton bone poses. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/Skin.xml b/doc/classes/Skin.xml index f409b6c80c..67ca36f4d6 100644 --- a/doc/classes/Skin.xml +++ b/doc/classes/Skin.xml @@ -8,86 +8,64 @@ </tutorials> <methods> <method name="add_bind"> - <return type="void"> - </return> - <argument index="0" name="bone" type="int"> - </argument> - <argument index="1" name="pose" type="Transform3D"> - </argument> + <return type="void" /> + <argument index="0" name="bone" type="int" /> + <argument index="1" name="pose" type="Transform3D" /> <description> </description> </method> <method name="clear_binds"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> <method name="get_bind_bone" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="bind_index" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="bind_index" type="int" /> <description> </description> </method> <method name="get_bind_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> <method name="get_bind_name" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="bind_index" type="int"> - </argument> + <return type="StringName" /> + <argument index="0" name="bind_index" type="int" /> <description> </description> </method> <method name="get_bind_pose" qualifiers="const"> - <return type="Transform3D"> - </return> - <argument index="0" name="bind_index" type="int"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="bind_index" type="int" /> <description> </description> </method> <method name="set_bind_bone"> - <return type="void"> - </return> - <argument index="0" name="bind_index" type="int"> - </argument> - <argument index="1" name="bone" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="bind_index" type="int" /> + <argument index="1" name="bone" type="int" /> <description> </description> </method> <method name="set_bind_count"> - <return type="void"> - </return> - <argument index="0" name="bind_count" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="bind_count" type="int" /> <description> </description> </method> <method name="set_bind_name"> - <return type="void"> - </return> - <argument index="0" name="bind_index" type="int"> - </argument> - <argument index="1" name="name" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="bind_index" type="int" /> + <argument index="1" name="name" type="StringName" /> <description> </description> </method> <method name="set_bind_pose"> - <return type="void"> - </return> - <argument index="0" name="bind_index" type="int"> - </argument> - <argument index="1" name="pose" type="Transform3D"> - </argument> + <return type="void" /> + <argument index="0" name="bind_index" type="int" /> + <argument index="1" name="pose" type="Transform3D" /> <description> </description> </method> diff --git a/doc/classes/SkinReference.xml b/doc/classes/SkinReference.xml index 3f8bc3be82..d0634c543c 100644 --- a/doc/classes/SkinReference.xml +++ b/doc/classes/SkinReference.xml @@ -8,14 +8,12 @@ </tutorials> <methods> <method name="get_skeleton" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> <method name="get_skin" qualifiers="const"> - <return type="Skin"> - </return> + <return type="Skin" /> <description> </description> </method> diff --git a/doc/classes/SliderJoint3D.xml b/doc/classes/SliderJoint3D.xml index ef9c9a48b6..dc9760b667 100644 --- a/doc/classes/SliderJoint3D.xml +++ b/doc/classes/SliderJoint3D.xml @@ -10,20 +10,15 @@ </tutorials> <methods> <method name="get_param" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="param" type="int" enum="SliderJoint3D.Param"> - </argument> + <return type="float" /> + <argument index="0" name="param" type="int" enum="SliderJoint3D.Param" /> <description> </description> </method> <method name="set_param"> - <return type="void"> - </return> - <argument index="0" name="param" type="int" enum="SliderJoint3D.Param"> - </argument> - <argument index="1" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="param" type="int" enum="SliderJoint3D.Param" /> + <argument index="1" name="value" type="float" /> <description> </description> </method> diff --git a/doc/classes/SoftBody3D.xml b/doc/classes/SoftBody3D.xml index b143c60d9d..d5f0e3c95c 100644 --- a/doc/classes/SoftBody3D.xml +++ b/doc/classes/SoftBody3D.xml @@ -11,85 +11,92 @@ </tutorials> <methods> <method name="add_collision_exception_with"> - <return type="void"> - </return> - <argument index="0" name="body" type="Node"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="Node" /> <description> Adds a body to the list of bodies that this body can't collide with. </description> </method> <method name="get_collision_exceptions"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns an array of nodes that were added as collision exceptions for this body. </description> </method> - <method name="get_collision_layer_bit" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="bit" type="int"> - </argument> + <method name="get_collision_layer_value" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns an individual bit on the collision mask. + Returns whether or not the specified layer of the [member collision_layer] is enabled, given a [code]layer_number[/code] between 1 and 32. </description> </method> - <method name="get_collision_mask_bit" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="bit" type="int"> - </argument> + <method name="get_collision_mask_value" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns an individual bit on the collision mask. + Returns whether or not the specified layer of the [member collision_mask] is enabled, given a [code]layer_number[/code] between 1 and 32. </description> </method> <method name="get_physics_rid" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> </description> </method> + <method name="get_point_transform"> + <return type="Vector3" /> + <argument index="0" name="point_index" type="int" /> + <description> + Returns local translation of a vertex in the surface array. + </description> + </method> + <method name="is_point_pinned" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="point_index" type="int" /> + <description> + Returns [code]true[/code] if vertex is set to pinned. + </description> + </method> <method name="remove_collision_exception_with"> - <return type="void"> - </return> - <argument index="0" name="body" type="Node"> - </argument> + <return type="void" /> + <argument index="0" name="body" type="Node" /> <description> Removes a body from the list of bodies that this body can't collide with. </description> </method> - <method name="set_collision_layer_bit"> - <return type="void"> - </return> - <argument index="0" name="bit" type="int"> - </argument> - <argument index="1" name="value" type="bool"> - </argument> + <method name="set_collision_layer_value"> + <return type="void" /> + <argument index="0" name="layer_number" type="int" /> + <argument index="1" name="value" type="bool" /> + <description> + Based on [code]value[/code], enables or disables the specified layer in the [member collision_layer], given a [code]layer_number[/code] between 1 and 32. + </description> + </method> + <method name="set_collision_mask_value"> + <return type="void" /> + <argument index="0" name="layer_number" type="int" /> + <argument index="1" name="value" type="bool" /> <description> - Sets individual bits on the layer mask. Use this if you only need to change one layer's value. + Based on [code]value[/code], enables or disables the specified layer in the [member collision_mask], given a [code]layer_number[/code] between 1 and 32. </description> </method> - <method name="set_collision_mask_bit"> - <return type="void"> - </return> - <argument index="0" name="bit" type="int"> - </argument> - <argument index="1" name="value" type="bool"> - </argument> + <method name="set_point_pinned"> + <return type="void" /> + <argument index="0" name="point_index" type="int" /> + <argument index="1" name="pinned" type="bool" /> + <argument index="2" name="attachment_path" type="NodePath" default="NodePath("")" /> <description> - Sets individual bits on the collision mask. Use this if you only need to change one layer's value. + Sets the pinned state of a surface vertex. When set to [code]true[/code], the optional [code]attachment_path[/code] can define a [Node3D] the pinned vertex will be attached to. </description> </method> </methods> <members> <member name="collision_layer" type="int" setter="set_collision_layer" getter="get_collision_layer" default="1"> - The physics layers this SoftBody3D is in. - Collidable objects can exist in any of 32 different layers. These layers work like a tagging system, and are not visual. A collidable can use these layers to select with which objects it can collide, using the collision_mask property. - A contact is detected if object A is in any of the layers that object B scans, or object B is in any layer scanned by object A. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + The physics layers this SoftBody3D [b]is in[/b]. Collision objects can exist in one or more of 32 different layers. See also [member collision_mask]. + [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="collision_mask" type="int" setter="set_collision_mask" getter="get_collision_mask" default="1"> - The physics layers this SoftBody3D scans for collisions. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. + The physics layers this SoftBody3D [b]scans[/b]. Collision objects can scan one or more of 32 different layers. See also [member collision_layer]. + [b]Note:[/b] Object A can detect a contact with object B only if object B is in any of the layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> <member name="damping_coefficient" type="float" setter="set_damping_coefficient" getter="get_damping_coefficient" default="0.01"> </member> diff --git a/doc/classes/SpinBox.xml b/doc/classes/SpinBox.xml index 7e2481f458..4303fa52f1 100644 --- a/doc/classes/SpinBox.xml +++ b/doc/classes/SpinBox.xml @@ -30,15 +30,13 @@ </tutorials> <methods> <method name="apply"> - <return type="void"> - </return> + <return type="void" /> <description> Applies the current value of this [SpinBox]. </description> </method> <method name="get_line_edit"> - <return type="LineEdit"> - </return> + <return type="LineEdit" /> <description> Returns the [LineEdit] instance from this [SpinBox]. You can use it to access properties and methods of [LineEdit]. </description> @@ -61,7 +59,7 @@ <constants> </constants> <theme_items> - <theme_item name="updown" type="Texture2D"> + <theme_item name="updown" data_type="icon" type="Texture2D"> Sets a custom [Texture2D] for up and down arrows of the [SpinBox]. </theme_item> </theme_items> diff --git a/doc/classes/SplitContainer.xml b/doc/classes/SplitContainer.xml index b3f85ce7e1..be49a99988 100644 --- a/doc/classes/SplitContainer.xml +++ b/doc/classes/SplitContainer.xml @@ -10,8 +10,7 @@ </tutorials> <methods> <method name="clamp_split_offset"> - <return type="void"> - </return> + <return type="void" /> <description> Clamps the [member split_offset] value to not go outside the currently possible minimal and maximum values. </description> @@ -30,8 +29,7 @@ </members> <signals> <signal name="dragged"> - <argument index="0" name="offset" type="int"> - </argument> + <argument index="0" name="offset" type="int" /> <description> Emitted when the dragger is dragged by user. </description> diff --git a/doc/classes/SpotLight3D.xml b/doc/classes/SpotLight3D.xml index f868503bbd..fde40ba6de 100644 --- a/doc/classes/SpotLight3D.xml +++ b/doc/classes/SpotLight3D.xml @@ -13,8 +13,7 @@ <methods> </methods> <members> - <member name="shadow_bias" type="float" setter="set_param" getter="get_param" override="true" default="0.02" /> - <member name="shadow_normal_bias" type="float" setter="set_param" getter="get_param" override="true" default="1.0" /> + <member name="shadow_bias" type="float" setter="set_param" getter="get_param" override="true" default="0.03" /> <member name="spot_angle" type="float" setter="set_param" getter="get_param" default="45.0"> The spotlight's angle in degrees. </member> diff --git a/doc/classes/SpringArm3D.xml b/doc/classes/SpringArm3D.xml index 3ffdbebae8..50aa3d39b8 100644 --- a/doc/classes/SpringArm3D.xml +++ b/doc/classes/SpringArm3D.xml @@ -13,33 +13,27 @@ </tutorials> <methods> <method name="add_excluded_object"> - <return type="void"> - </return> - <argument index="0" name="RID" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="RID" type="RID" /> <description> Adds the [PhysicsBody3D] object with the given [RID] to the list of [PhysicsBody3D] objects excluded from the collision check. </description> </method> <method name="clear_excluded_objects"> - <return type="void"> - </return> + <return type="void" /> <description> Clears the list of [PhysicsBody3D] objects excluded from the collision check. </description> </method> <method name="get_hit_length"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the spring arm's current length. </description> </method> <method name="remove_excluded_object"> - <return type="bool"> - </return> - <argument index="0" name="RID" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="RID" type="RID" /> <description> Removes the given [RID] from the list of [PhysicsBody3D] objects excluded from the collision check. </description> diff --git a/doc/classes/Sprite2D.xml b/doc/classes/Sprite2D.xml index b419b003bf..0b26fdc055 100644 --- a/doc/classes/Sprite2D.xml +++ b/doc/classes/Sprite2D.xml @@ -11,8 +11,7 @@ </tutorials> <methods> <method name="get_rect" qualifiers="const"> - <return type="Rect2"> - </return> + <return type="Rect2" /> <description> Returns a [Rect2] representing the Sprite2D's boundary in local coordinates. Can be used to detect if the Sprite2D was clicked. Example: [codeblocks] @@ -41,10 +40,8 @@ </description> </method> <method name="is_pixel_opaque" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="pos" type="Vector2"> - </argument> + <return type="bool" /> + <argument index="0" name="pos" type="Vector2" /> <description> Returns [code]true[/code], if the pixel at the given position is opaque and [code]false[/code] in other case. [b]Note:[/b] It also returns [code]false[/code], if the sprite's texture is [code]null[/code] or if the given position is invalid. diff --git a/doc/classes/SpriteBase3D.xml b/doc/classes/SpriteBase3D.xml index 3168e2d848..b723c9f4d4 100644 --- a/doc/classes/SpriteBase3D.xml +++ b/doc/classes/SpriteBase3D.xml @@ -10,35 +10,28 @@ </tutorials> <methods> <method name="generate_triangle_mesh" qualifiers="const"> - <return type="TriangleMesh"> - </return> + <return type="TriangleMesh" /> <description> Returns a [TriangleMesh] with the sprite's vertices following its current configuration (such as its [member axis] and [member pixel_size]). </description> </method> <method name="get_draw_flag" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="flag" type="int" enum="SpriteBase3D.DrawFlags"> - </argument> + <return type="bool" /> + <argument index="0" name="flag" type="int" enum="SpriteBase3D.DrawFlags" /> <description> Returns the value of the specified flag. </description> </method> <method name="get_item_rect" qualifiers="const"> - <return type="Rect2"> - </return> + <return type="Rect2" /> <description> Returns the rectangle representing this sprite. </description> </method> <method name="set_draw_flag"> - <return type="void"> - </return> - <argument index="0" name="flag" type="int" enum="SpriteBase3D.DrawFlags"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="flag" type="int" enum="SpriteBase3D.DrawFlags" /> + <argument index="1" name="enabled" type="bool" /> <description> If [code]true[/code], the specified flag will be enabled. See [enum SpriteBase3D.DrawFlags] for a list of flags. </description> diff --git a/doc/classes/SpriteFrames.xml b/doc/classes/SpriteFrames.xml index 1c7d84c5a2..3bd40ff6f4 100644 --- a/doc/classes/SpriteFrames.xml +++ b/doc/classes/SpriteFrames.xml @@ -11,159 +11,120 @@ </tutorials> <methods> <method name="add_animation"> - <return type="void"> - </return> - <argument index="0" name="anim" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="anim" type="StringName" /> <description> Adds a new animation to the library. </description> </method> <method name="add_frame"> - <return type="void"> - </return> - <argument index="0" name="anim" type="StringName"> - </argument> - <argument index="1" name="frame" type="Texture2D"> - </argument> - <argument index="2" name="at_position" type="int" default="-1"> - </argument> + <return type="void" /> + <argument index="0" name="anim" type="StringName" /> + <argument index="1" name="frame" type="Texture2D" /> + <argument index="2" name="at_position" type="int" default="-1" /> <description> Adds a frame to the given animation. </description> </method> <method name="clear"> - <return type="void"> - </return> - <argument index="0" name="anim" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="anim" type="StringName" /> <description> Removes all frames from the given animation. </description> </method> <method name="clear_all"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all animations. A "default" animation will be created. </description> </method> <method name="get_animation_loop" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="anim" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="anim" type="StringName" /> <description> Returns [code]true[/code] if the given animation is configured to loop when it finishes playing. Otherwise, returns [code]false[/code]. </description> </method> <method name="get_animation_names" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns an array containing the names associated to each animation. Values are placed in alphabetical order. </description> </method> <method name="get_animation_speed" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="anim" type="StringName"> - </argument> + <return type="float" /> + <argument index="0" name="anim" type="StringName" /> <description> The animation's speed in frames per second. </description> </method> <method name="get_frame" qualifiers="const"> - <return type="Texture2D"> - </return> - <argument index="0" name="anim" type="StringName"> - </argument> - <argument index="1" name="idx" type="int"> - </argument> + <return type="Texture2D" /> + <argument index="0" name="anim" type="StringName" /> + <argument index="1" name="idx" type="int" /> <description> Returns the animation's selected frame. </description> </method> <method name="get_frame_count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="anim" type="StringName"> - </argument> + <return type="int" /> + <argument index="0" name="anim" type="StringName" /> <description> Returns the number of frames in the animation. </description> </method> <method name="has_animation" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="anim" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="anim" type="StringName" /> <description> If [code]true[/code], the named animation exists. </description> </method> <method name="remove_animation"> - <return type="void"> - </return> - <argument index="0" name="anim" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="anim" type="StringName" /> <description> Removes the given animation. </description> </method> <method name="remove_frame"> - <return type="void"> - </return> - <argument index="0" name="anim" type="StringName"> - </argument> - <argument index="1" name="idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="anim" type="StringName" /> + <argument index="1" name="idx" type="int" /> <description> Removes the animation's selected frame. </description> </method> <method name="rename_animation"> - <return type="void"> - </return> - <argument index="0" name="anim" type="StringName"> - </argument> - <argument index="1" name="newname" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="anim" type="StringName" /> + <argument index="1" name="newname" type="StringName" /> <description> Changes the animation's name to [code]newname[/code]. </description> </method> <method name="set_animation_loop"> - <return type="void"> - </return> - <argument index="0" name="anim" type="StringName"> - </argument> - <argument index="1" name="loop" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="anim" type="StringName" /> + <argument index="1" name="loop" type="bool" /> <description> If [code]true[/code], the animation will loop. </description> </method> <method name="set_animation_speed"> - <return type="void"> - </return> - <argument index="0" name="anim" type="StringName"> - </argument> - <argument index="1" name="speed" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="anim" type="StringName" /> + <argument index="1" name="speed" type="float" /> <description> The animation's speed in frames per second. </description> </method> <method name="set_frame"> - <return type="void"> - </return> - <argument index="0" name="anim" type="StringName"> - </argument> - <argument index="1" name="idx" type="int"> - </argument> - <argument index="2" name="txt" type="Texture2D"> - </argument> + <return type="void" /> + <argument index="0" name="anim" type="StringName" /> + <argument index="1" name="idx" type="int" /> + <argument index="2" name="txt" type="Texture2D" /> <description> Sets the texture of the given frame. </description> diff --git a/doc/classes/StaticBody2D.xml b/doc/classes/StaticBody2D.xml index 85915a53fe..0344c3e0d1 100644 --- a/doc/classes/StaticBody2D.xml +++ b/doc/classes/StaticBody2D.xml @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="StaticBody2D" inherits="PhysicsBody2D" version="4.0"> <brief_description> - Static body for 2D physics. + Physics body for 2D physics which is static or moves only by script. Useful for floor and walls. </brief_description> <description> - Static body for 2D physics. A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidBody2D], they don't consume any CPU resources as long as they don't move. - They however have extra functionalities to move and affect other bodies: - [b]Constant velocity:[/b] [member constant_linear_velocity] and [member constant_angular_velocity] can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels). - [b]Transform change:[/b] Static bodies can be also moved by code. Unless [member kinematic_motion] is enabled, they are just teleported in this case and don't affect other bodies on their path. - [b]Kinematic motion:[/b] Static bodies can have [member kinematic_motion] enabled to make them kinematic bodies that can be moved by code and push other bodies on their path. + Static body for 2D physics. + A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidBody2D], it doesn't consume any CPU resources as long as they don't move. + They have extra functionalities to move and affect other bodies: + [b]Static transform change:[/b] Static bodies can be moved by animation or script. In this case, they are just teleported and don't affect other bodies on their path. + [b]Constant velocity:[/b] When [member constant_linear_velocity] or [member constant_angular_velocity] is set, static bodies don't move themselves but affect touching bodies as if they were moving. This is useful for simulating conveyor belts or conveyor wheels. </description> <tutorials> </tutorials> @@ -16,14 +16,10 @@ </methods> <members> <member name="constant_angular_velocity" type="float" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="0.0"> - The body's constant angular velocity. This does not rotate the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were rotating. + The body's constant angular velocity. This does not rotate the body, but affects touching bodies, as if it were rotating. </member> <member name="constant_linear_velocity" type="Vector2" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector2(0, 0)"> - The body's constant linear velocity. This does not move the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were moving. - </member> - <member name="kinematic_motion" type="bool" setter="set_kinematic_motion_enabled" getter="is_kinematic_motion_enabled" default="false"> - If [code]true[/code], the body will act the same as a [RigidBody2D] in [constant RigidBody2D.MODE_KINEMATIC] mode. - When the body is moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to [code]physics[/code]), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). + The body's constant linear velocity. This does not move the body, but affects touching bodies, as if it were moving. </member> <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> The physics material override for the body. diff --git a/doc/classes/StaticBody3D.xml b/doc/classes/StaticBody3D.xml index f83d440f10..4cb51b60ec 100644 --- a/doc/classes/StaticBody3D.xml +++ b/doc/classes/StaticBody3D.xml @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="StaticBody3D" inherits="PhysicsBody3D" version="4.0"> <brief_description> - Static body for 3D physics. + Physics body for 3D physics which is static or moves only by script. Useful for floor and walls. </brief_description> <description> - Static body for 3D physics. A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidBody3D], they don't consume any CPU resources as long as they don't move. - They however have extra functionalities to move and affect other bodies: - [b]Constant velocity:[/b] [member constant_linear_velocity] and [member constant_angular_velocity] can be set for the static body, so even if it doesn't move, it affects other bodies as if it was moving (this is useful for simulating conveyor belts or conveyor wheels). - [b]Transform change:[/b] Static bodies can be also moved by code. Unless [member kinematic_motion] is enabled, they are just teleported in this case and don't affect other bodies on their path. - [b]Kinematic motion:[/b] Static bodies can have [member kinematic_motion] enabled to make them kinematic bodies that can be moved by code and push other bodies on their path. + Static body for 3D physics. + A static body is a simple body that can't be moved by external forces or contacts. It is ideal for implementing objects in the environment, such as walls or platforms. In contrast to [RigidBody3D], it doesn't consume any CPU resources as long as they don't move. + They have extra functionalities to move and affect other bodies: + [b]Static transform change:[/b] Static bodies can be moved by animation or script. In this case, they are just teleported and don't affect other bodies on their path. + [b]Constant velocity:[/b] When [member constant_linear_velocity] or [member constant_angular_velocity] is set, static bodies don't move themselves but affect touching bodies as if they were moving. This is useful for simulating conveyor belts or conveyor wheels. </description> <tutorials> <link title="3D Physics Tests Demo">https://godotengine.org/asset-library/asset/675</link> @@ -19,14 +19,10 @@ </methods> <members> <member name="constant_angular_velocity" type="Vector3" setter="set_constant_angular_velocity" getter="get_constant_angular_velocity" default="Vector3(0, 0, 0)"> - The body's constant angular velocity. This does not rotate the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were rotating. + The body's constant angular velocity. This does not rotate the body, but affects touching bodies, as if it were rotating. </member> <member name="constant_linear_velocity" type="Vector3" setter="set_constant_linear_velocity" getter="get_constant_linear_velocity" default="Vector3(0, 0, 0)"> - The body's constant linear velocity. This does not move the body (unless [member kinematic_motion] is enabled), but affects other bodies that touch it, as if it were moving. - </member> - <member name="kinematic_motion" type="bool" setter="set_kinematic_motion_enabled" getter="is_kinematic_motion_enabled" default="false"> - If [code]true[/code], the body will act the same as a [RigidBody3D] in [constant RigidBody3D.MODE_KINEMATIC] mode. - When the body is moved manually, either from code or from an [AnimationPlayer] (with [member AnimationPlayer.playback_process_mode] set to [code]physics[/code]), the physics will automatically compute an estimate of their linear and angular velocity. This makes them very useful for moving platforms or other AnimationPlayer-controlled objects (like a door, a bridge that opens, etc). + The body's constant linear velocity. This does not move the body, but affects touching bodies, as if it were moving. </member> <member name="physics_material_override" type="PhysicsMaterial" setter="set_physics_material_override" getter="get_physics_material_override"> The physics material override for the body. diff --git a/doc/classes/StreamPeer.xml b/doc/classes/StreamPeer.xml index 5367a572f1..e3d77d22c5 100644 --- a/doc/classes/StreamPeer.xml +++ b/doc/classes/StreamPeer.xml @@ -10,205 +10,166 @@ </tutorials> <methods> <method name="get_16"> - <return type="int"> - </return> + <return type="int" /> <description> Gets a signed 16-bit value from the stream. </description> </method> <method name="get_32"> - <return type="int"> - </return> + <return type="int" /> <description> Gets a signed 32-bit value from the stream. </description> </method> <method name="get_64"> - <return type="int"> - </return> + <return type="int" /> <description> Gets a signed 64-bit value from the stream. </description> </method> <method name="get_8"> - <return type="int"> - </return> + <return type="int" /> <description> Gets a signed byte from the stream. </description> </method> <method name="get_available_bytes" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the amount of bytes this [StreamPeer] has available. </description> </method> <method name="get_data"> - <return type="Array"> - </return> - <argument index="0" name="bytes" type="int"> - </argument> + <return type="Array" /> + <argument index="0" name="bytes" type="int" /> <description> Returns a chunk data with the received bytes. The amount of bytes to be received can be requested in the [code]bytes[/code] argument. If not enough bytes are available, the function will block until the desired amount is received. This function returns two values, an [enum @GlobalScope.Error] code and a data array. </description> </method> <method name="get_double"> - <return type="float"> - </return> + <return type="float" /> <description> Gets a double-precision float from the stream. </description> </method> <method name="get_float"> - <return type="float"> - </return> + <return type="float" /> <description> Gets a single-precision float from the stream. </description> </method> <method name="get_partial_data"> - <return type="Array"> - </return> - <argument index="0" name="bytes" type="int"> - </argument> + <return type="Array" /> + <argument index="0" name="bytes" type="int" /> <description> Returns a chunk data with the received bytes. The amount of bytes to be received can be requested in the "bytes" argument. If not enough bytes are available, the function will return how many were actually received. This function returns two values, an [enum @GlobalScope.Error] code, and a data array. </description> </method> <method name="get_string"> - <return type="String"> - </return> - <argument index="0" name="bytes" type="int" default="-1"> - </argument> + <return type="String" /> + <argument index="0" name="bytes" type="int" default="-1" /> <description> Gets a string with byte-length [code]bytes[/code] from the stream. If [code]bytes[/code] is negative (default) the length will be read from the stream using the reverse process of [method put_string]. </description> </method> <method name="get_u16"> - <return type="int"> - </return> + <return type="int" /> <description> Gets an unsigned 16-bit value from the stream. </description> </method> <method name="get_u32"> - <return type="int"> - </return> + <return type="int" /> <description> Gets an unsigned 32-bit value from the stream. </description> </method> <method name="get_u64"> - <return type="int"> - </return> + <return type="int" /> <description> Gets an unsigned 64-bit value from the stream. </description> </method> <method name="get_u8"> - <return type="int"> - </return> + <return type="int" /> <description> Gets an unsigned byte from the stream. </description> </method> <method name="get_utf8_string"> - <return type="String"> - </return> - <argument index="0" name="bytes" type="int" default="-1"> - </argument> + <return type="String" /> + <argument index="0" name="bytes" type="int" default="-1" /> <description> Gets an UTF-8 string with byte-length [code]bytes[/code] from the stream (this decodes the string sent as UTF-8). If [code]bytes[/code] is negative (default) the length will be read from the stream using the reverse process of [method put_utf8_string]. </description> </method> <method name="get_var"> - <return type="Variant"> - </return> - <argument index="0" name="allow_objects" type="bool" default="false"> - </argument> + <return type="Variant" /> + <argument index="0" name="allow_objects" type="bool" default="false" /> <description> Gets a Variant from the stream. If [code]allow_objects[/code] is [code]true[/code], decoding objects is allowed. [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. </description> </method> <method name="put_16"> - <return type="void"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="int" /> <description> Puts a signed 16-bit value into the stream. </description> </method> <method name="put_32"> - <return type="void"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="int" /> <description> Puts a signed 32-bit value into the stream. </description> </method> <method name="put_64"> - <return type="void"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="int" /> <description> Puts a signed 64-bit value into the stream. </description> </method> <method name="put_8"> - <return type="void"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="int" /> <description> Puts a signed byte into the stream. </description> </method> <method name="put_data"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="data" type="PackedByteArray"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="data" type="PackedByteArray" /> <description> Sends a chunk of data through the connection, blocking if necessary until the data is done sending. This function returns an [enum @GlobalScope.Error] code. </description> </method> <method name="put_double"> - <return type="void"> - </return> - <argument index="0" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="float" /> <description> Puts a double-precision float into the stream. </description> </method> <method name="put_float"> - <return type="void"> - </return> - <argument index="0" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="float" /> <description> Puts a single-precision float into the stream. </description> </method> <method name="put_partial_data"> - <return type="Array"> - </return> - <argument index="0" name="data" type="PackedByteArray"> - </argument> + <return type="Array" /> + <argument index="0" name="data" type="PackedByteArray" /> <description> Sends a chunk of data through the connection. If all the data could not be sent at once, only part of it will. This function returns two values, an [enum @GlobalScope.Error] code and an integer, describing how much data was actually sent. </description> </method> <method name="put_string"> - <return type="void"> - </return> - <argument index="0" name="value" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="String" /> <description> Puts a zero-terminated ASCII string into the stream prepended by a 32-bit unsigned integer representing its size. Note: To put an ASCII string without prepending its size, you can use [method put_data]: @@ -223,46 +184,36 @@ </description> </method> <method name="put_u16"> - <return type="void"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="int" /> <description> Puts an unsigned 16-bit value into the stream. </description> </method> <method name="put_u32"> - <return type="void"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="int" /> <description> Puts an unsigned 32-bit value into the stream. </description> </method> <method name="put_u64"> - <return type="void"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="int" /> <description> Puts an unsigned 64-bit value into the stream. </description> </method> <method name="put_u8"> - <return type="void"> - </return> - <argument index="0" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="int" /> <description> Puts an unsigned byte into the stream. </description> </method> <method name="put_utf8_string"> - <return type="void"> - </return> - <argument index="0" name="value" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="String" /> <description> Puts a zero-terminated UTF-8 string into the stream prepended by a 32 bits unsigned integer representing its size. Note: To put an UTF-8 string without prepending its size, you can use [method put_data]: @@ -277,12 +228,9 @@ </description> </method> <method name="put_var"> - <return type="void"> - </return> - <argument index="0" name="value" type="Variant"> - </argument> - <argument index="1" name="full_objects" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="value" type="Variant" /> + <argument index="1" name="full_objects" type="bool" default="false" /> <description> Puts a Variant into the stream. If [code]full_objects[/code] is [code]true[/code] encoding objects is allowed (and can potentially include code). </description> diff --git a/doc/classes/StreamPeerBuffer.xml b/doc/classes/StreamPeerBuffer.xml index 03a150b90f..62476ca166 100644 --- a/doc/classes/StreamPeerBuffer.xml +++ b/doc/classes/StreamPeerBuffer.xml @@ -8,42 +8,34 @@ </tutorials> <methods> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> <method name="duplicate" qualifiers="const"> - <return type="StreamPeerBuffer"> - </return> + <return type="StreamPeerBuffer" /> <description> </description> </method> <method name="get_position" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> <method name="get_size" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> <method name="resize"> - <return type="void"> - </return> - <argument index="0" name="size" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="size" type="int" /> <description> </description> </method> <method name="seek"> - <return type="void"> - </return> - <argument index="0" name="position" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="position" type="int" /> <description> </description> </method> diff --git a/doc/classes/StreamPeerSSL.xml b/doc/classes/StreamPeerSSL.xml index 6a06c0b3f4..034168c2a0 100644 --- a/doc/classes/StreamPeerSSL.xml +++ b/doc/classes/StreamPeerSSL.xml @@ -11,53 +11,40 @@ </tutorials> <methods> <method name="accept_stream"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="stream" type="StreamPeer"> - </argument> - <argument index="1" name="private_key" type="CryptoKey"> - </argument> - <argument index="2" name="certificate" type="X509Certificate"> - </argument> - <argument index="3" name="chain" type="X509Certificate" default="null"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="stream" type="StreamPeer" /> + <argument index="1" name="private_key" type="CryptoKey" /> + <argument index="2" name="certificate" type="X509Certificate" /> + <argument index="3" name="chain" type="X509Certificate" default="null" /> <description> Accepts a peer connection as a server using the given [code]private_key[/code] and providing the given [code]certificate[/code] to the client. You can pass the optional [code]chain[/code] parameter to provide additional CA chain information along with the certificate. </description> </method> <method name="connect_to_stream"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="stream" type="StreamPeer"> - </argument> - <argument index="1" name="validate_certs" type="bool" default="false"> - </argument> - <argument index="2" name="for_hostname" type="String" default=""""> - </argument> - <argument index="3" name="valid_certificate" type="X509Certificate" default="null"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="stream" type="StreamPeer" /> + <argument index="1" name="validate_certs" type="bool" default="false" /> + <argument index="2" name="for_hostname" type="String" default="""" /> + <argument index="3" name="valid_certificate" type="X509Certificate" default="null" /> <description> Connects to a peer using an underlying [StreamPeer] [code]stream[/code]. If [code]validate_certs[/code] is [code]true[/code], [StreamPeerSSL] will validate that the certificate presented by the peer matches the [code]for_hostname[/code]. [b]Note:[/b] Specifying a custom [code]valid_certificate[/code] is not supported in HTML5 exports due to browsers restrictions. </description> </method> <method name="disconnect_from_stream"> - <return type="void"> - </return> + <return type="void" /> <description> Disconnects from host. </description> </method> <method name="get_status" qualifiers="const"> - <return type="int" enum="StreamPeerSSL.Status"> - </return> + <return type="int" enum="StreamPeerSSL.Status" /> <description> Returns the status of the connection. See [enum Status] for values. </description> </method> <method name="poll"> - <return type="void"> - </return> + <return type="void" /> <description> Poll the connection to check for incoming bytes. Call this right before [method StreamPeer.get_available_bytes] for it to work properly. </description> diff --git a/doc/classes/StreamPeerTCP.xml b/doc/classes/StreamPeerTCP.xml index 7b7c1d7426..bba48e7275 100644 --- a/doc/classes/StreamPeerTCP.xml +++ b/doc/classes/StreamPeerTCP.xml @@ -10,75 +10,61 @@ </tutorials> <methods> <method name="bind"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="port" type="int"> - </argument> - <argument index="1" name="host" type="String" default=""*""> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="port" type="int" /> + <argument index="1" name="host" type="String" default=""*"" /> <description> Opens the TCP socket, and binds it to the specified local address. This method is generally not needed, and only used to force the subsequent call to [method connect_to_host] to use the specified [code]host[/code] and [code]port[/code] as source address. This can be desired in some NAT punchthrough techniques, or when forcing the source network interface. </description> </method> <method name="connect_to_host"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="host" type="String"> - </argument> - <argument index="1" name="port" type="int"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="host" type="String" /> + <argument index="1" name="port" type="int" /> <description> Connects to the specified [code]host:port[/code] pair. A hostname will be resolved if valid. Returns [constant OK] on success. </description> </method> <method name="disconnect_from_host"> - <return type="void"> - </return> + <return type="void" /> <description> Disconnects from host. </description> </method> <method name="get_connected_host" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the IP of this peer. </description> </method> <method name="get_connected_port" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the port of this peer. </description> </method> <method name="get_local_port" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the local port to which this peer is bound. </description> </method> <method name="get_status"> - <return type="int" enum="StreamPeerTCP.Status"> - </return> + <return type="int" enum="StreamPeerTCP.Status" /> <description> Returns the status of the connection, see [enum Status]. </description> </method> <method name="is_connected_to_host" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if this peer is currently connected or is connecting to a host, [code]false[/code] otherwise. </description> </method> <method name="set_no_delay"> - <return type="void"> - </return> - <argument index="0" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enabled" type="bool" /> <description> If [code]enabled[/code] is [code]true[/code], packets will be sent immediately. If [code]enabled[/code] is [code]false[/code] (the default), packet transfers will be delayed and combined using [url=https://en.wikipedia.org/wiki/Nagle%27s_algorithm]Nagle's algorithm[/url]. [b]Note:[/b] It's recommended to leave this disabled for applications that send large packets or need to transfer a lot of data, as enabling this can decrease the total available bandwidth. diff --git a/doc/classes/StreamTexture2D.xml b/doc/classes/StreamTexture2D.xml index 214298475c..7b6c594786 100644 --- a/doc/classes/StreamTexture2D.xml +++ b/doc/classes/StreamTexture2D.xml @@ -10,10 +10,8 @@ </tutorials> <methods> <method name="load"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> <description> Loads the texture from the given path. </description> diff --git a/doc/classes/StreamTexture3D.xml b/doc/classes/StreamTexture3D.xml index 7054a4ee99..4b2eb16ba3 100644 --- a/doc/classes/StreamTexture3D.xml +++ b/doc/classes/StreamTexture3D.xml @@ -8,10 +8,8 @@ </tutorials> <methods> <method name="load"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> <description> </description> </method> diff --git a/doc/classes/StreamTextureLayered.xml b/doc/classes/StreamTextureLayered.xml index 10a7aae976..888fb339db 100644 --- a/doc/classes/StreamTextureLayered.xml +++ b/doc/classes/StreamTextureLayered.xml @@ -8,10 +8,8 @@ </tutorials> <methods> <method name="load"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> <description> </description> </method> diff --git a/doc/classes/String.xml b/doc/classes/String.xml index 3bf05e7c92..eb6c52d662 100644 --- a/doc/classes/String.xml +++ b/doc/classes/String.xml @@ -11,58 +11,47 @@ </tutorials> <methods> <method name="String" qualifiers="constructor"> - <return type="String"> - </return> + <return type="String" /> <description> Constructs an empty [String] ([code]""[/code]). </description> </method> <method name="String" qualifiers="constructor"> - <return type="String"> - </return> - <argument index="0" name="from" type="String"> - </argument> + <return type="String" /> + <argument index="0" name="from" type="String" /> <description> Constructs a [String] as a copy of the given [String]. </description> </method> <method name="String" qualifiers="constructor"> - <return type="String"> - </return> - <argument index="0" name="from" type="NodePath"> - </argument> + <return type="String" /> + <argument index="0" name="from" type="NodePath" /> <description> Constructs a new String from the given [NodePath]. </description> </method> <method name="String" qualifiers="constructor"> - <return type="String"> - </return> - <argument index="0" name="from" type="StringName"> - </argument> + <return type="String" /> + <argument index="0" name="from" type="StringName" /> <description> Constructs a new String from the given [StringName]. </description> </method> <method name="begins_with" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="text" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="text" type="String" /> <description> Returns [code]true[/code] if the string begins with the given string. </description> </method> <method name="bigrams" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns the bigrams (pairs of consecutive letters) of this string. </description> </method> <method name="bin_to_int" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Converts a string containing a binary number into an integer. Binary strings can either be prefixed with [code]0b[/code] or not, and they can also start with a [code]-[/code] before the optional prefix. [codeblocks] @@ -78,96 +67,75 @@ </description> </method> <method name="c_escape" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns a copy of the string with special characters escaped using the C language standard. </description> </method> <method name="c_unescape" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns a copy of the string with escaped characters replaced by their meanings. Supported escape sequences are [code]\'[/code], [code]\"[/code], [code]\?[/code], [code]\\[/code], [code]\a[/code], [code]\b[/code], [code]\f[/code], [code]\n[/code], [code]\r[/code], [code]\t[/code], [code]\v[/code]. [b]Note:[/b] Unlike the GDScript parser, this method doesn't support the [code]\uXXXX[/code] escape sequence. </description> </method> <method name="capitalize" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Changes the case of some letters. Replaces underscores with spaces, adds spaces before in-word uppercase characters, converts all letters to lowercase, then capitalizes the first letter and every letter following a space character. For [code]capitalize camelCase mixed_with_underscores[/code], it will return [code]Capitalize Camel Case Mixed With Underscores[/code]. </description> </method> <method name="casecmp_to" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="to" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="to" type="String" /> <description> - Performs a case-sensitive comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/code] of each string, which roughly matches the alphabetical order. + Performs a case-sensitive comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [code]to[/code] string or [code]-1[/code] if the "base" string is shorter than the [code]to[/code] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters. [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [code]to[/code] string is empty or [code]0[/code] if both strings are empty. To get a boolean result from a string comparison, use the [code]==[/code] operator instead. See also [method nocasecmp_to] and [method naturalnocasecmp_to]. </description> </method> <method name="chr" qualifiers="static"> - <return type="String"> - </return> - <argument index="0" name="char" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="char" type="int" /> <description> </description> </method> <method name="count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="what" type="String"> - </argument> - <argument index="1" name="from" type="int" default="0"> - </argument> - <argument index="2" name="to" type="int" default="0"> - </argument> + <return type="int" /> + <argument index="0" name="what" type="String" /> + <argument index="1" name="from" type="int" default="0" /> + <argument index="2" name="to" type="int" default="0" /> <description> Returns the number of occurrences of substring [code]what[/code] between [code]from[/code] and [code]to[/code] positions. If [code]from[/code] and [code]to[/code] equals 0 the whole string will be used. If only [code]to[/code] equals 0 the remained substring will be used. </description> </method> <method name="countn" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="what" type="String"> - </argument> - <argument index="1" name="from" type="int" default="0"> - </argument> - <argument index="2" name="to" type="int" default="0"> - </argument> + <return type="int" /> + <argument index="0" name="what" type="String" /> + <argument index="1" name="from" type="int" default="0" /> + <argument index="2" name="to" type="int" default="0" /> <description> Returns the number of occurrences of substring [code]what[/code] (ignoring case) between [code]from[/code] and [code]to[/code] positions. If [code]from[/code] and [code]to[/code] equals 0 the whole string will be used. If only [code]to[/code] equals 0 the remained substring will be used. </description> </method> <method name="dedent" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns a copy of the string with indentation (leading tabs and spaces) removed. </description> </method> <method name="ends_with" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="text" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="text" type="String" /> <description> Returns [code]true[/code] if the string ends with the given string. </description> </method> <method name="find" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="what" type="String"> - </argument> - <argument index="1" name="from" type="int" default="0"> - </argument> + <return type="int" /> + <argument index="0" name="what" type="String" /> + <argument index="1" name="from" type="int" default="0" /> <description> Returns the index of the [b]first[/b] case-sensitive occurrence of the specified string in this instance, or [code]-1[/code]. Optionally, the starting search index can be specified, continuing to the end of the string. [b]Note:[/b] If you just want to know whether a string contains a substring, use the [code]in[/code] operator as follows: @@ -183,65 +151,63 @@ </description> </method> <method name="findn" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="what" type="String"> - </argument> - <argument index="1" name="from" type="int" default="0"> - </argument> + <return type="int" /> + <argument index="0" name="what" type="String" /> + <argument index="1" name="from" type="int" default="0" /> <description> Returns the index of the [b]first[/b] case-insensitive occurrence of the specified string in this instance, or [code]-1[/code]. Optionally, the starting search index can be specified, continuing to the end of the string. </description> </method> <method name="format" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="values" type="Variant"> - </argument> - <argument index="1" name="placeholder" type="String" default=""{_}""> - </argument> + <return type="String" /> + <argument index="0" name="values" type="Variant" /> + <argument index="1" name="placeholder" type="String" default=""{_}"" /> <description> Formats the string by replacing all occurrences of [code]placeholder[/code] with [code]values[/code]. </description> </method> <method name="get_base_dir" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> If the string is a valid file path, returns the base directory name. </description> </method> <method name="get_basename" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> If the string is a valid file path, returns the full file path without the extension. </description> </method> <method name="get_extension" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> - If the string is a valid file path, returns the extension. + Returns the extension without the leading period character ([code].[/code]) if the string is a valid file name or path. If the string does not contain an extension, returns an empty string instead. + [codeblock] + print("/path/to/file.txt".get_extension()) # "txt" + print("file.txt".get_extension()) # "txt" + print("file.sample.txt".get_extension()) # "txt" + print(".txt".get_extension()) # "txt" + print("file.txt.".get_extension()) # "" (empty string) + print("file.txt..".get_extension()) # "" (empty string) + print("txt".get_extension()) # "" (empty string) + print("".get_extension()) # "" (empty string) + [/codeblock] </description> </method> <method name="get_file" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> If the string is a valid file path, returns the filename. </description> </method> <method name="hash" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Hashes the string and returns a 32-bit integer. </description> </method> <method name="hex_to_int" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Converts a string containing a hexadecimal number into an integer. Hexadecimal strings can either be prefixed with [code]0x[/code] or not, and they can also start with a [code]-[/code] before the optional prefix. [codeblocks] @@ -257,120 +223,98 @@ </description> </method> <method name="humanize_size" qualifiers="static"> - <return type="String"> - </return> - <argument index="0" name="size" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="size" type="int" /> <description> </description> </method> <method name="insert" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="position" type="int"> - </argument> - <argument index="1" name="what" type="String"> - </argument> + <return type="String" /> + <argument index="0" name="position" type="int" /> + <argument index="1" name="what" type="String" /> <description> Returns a copy of the string with the substring [code]what[/code] inserted at the given position. </description> </method> <method name="is_absolute_path" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> - If the string is a path to a file or directory, returns [code]true[/code] if the path is absolute. + Returns [code]true[/code] if the string is a path to a file or directory and its starting point is explicitly defined. This includes [code]res://[/code], [code]user://[/code], [code]C:\[/code], [code]/[/code], etc. </description> </method> <method name="is_empty" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the length of the string equals [code]0[/code]. </description> </method> - <method name="is_rel_path" qualifiers="const"> - <return type="bool"> - </return> + <method name="is_relative_path" qualifiers="const"> + <return type="bool" /> <description> - If the string is a path to a file or directory, returns [code]true[/code] if the path is relative. + Returns [code]true[/code] if the string is a path to a file or directory and its starting point is implicitly defined within the context it is being used. The starting point may refer to the current directory ([code]./[/code]), or the current [Node]. </description> </method> <method name="is_subsequence_of" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="text" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="text" type="String" /> <description> Returns [code]true[/code] if this string is a subsequence of the given string. </description> </method> <method name="is_subsequence_ofi" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="text" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="text" type="String" /> <description> Returns [code]true[/code] if this string is a subsequence of the given string, without considering case. </description> </method> <method name="is_valid_filename" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if this string is free from characters that aren't allowed in file names, those being: [code]: / \ ? * " | % < >[/code] </description> </method> <method name="is_valid_float" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if this string contains a valid float. </description> </method> <method name="is_valid_hex_number" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="with_prefix" type="bool" default="false"> - </argument> + <return type="bool" /> + <argument index="0" name="with_prefix" type="bool" default="false" /> <description> Returns [code]true[/code] if this string contains a valid hexadecimal number. If [code]with_prefix[/code] is [code]true[/code], then a validity of the hexadecimal number is determined by [code]0x[/code] prefix, for instance: [code]0xDEADC0DE[/code]. </description> </method> <method name="is_valid_html_color" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if this string contains a valid color in hexadecimal HTML notation. Other HTML notations such as named colors or [code]hsl()[/code] colors aren't considered valid by this method and will return [code]false[/code]. </description> </method> <method name="is_valid_identifier" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if this string is a valid identifier. A valid identifier may contain only letters, digits and underscores ([code]_[/code]) and the first character may not be a digit. </description> </method> <method name="is_valid_int" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if this string contains a valid integer. </description> </method> <method name="is_valid_ip_address" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if this string contains only a well-formatted IPv4 or IPv6 address. This method considers [url=https://en.wikipedia.org/wiki/Reserved_IP_addresses]reserved IP addresses[/url] such as [code]0.0.0.0[/code] as valid. </description> </method> <method name="join" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="parts" type="PackedStringArray"> - </argument> + <return type="String" /> + <argument index="0" name="parts" type="PackedStringArray" /> <description> Return a [String] which is the concatenation of the [code]parts[/code]. The separator between elements is the string providing this method. Example: @@ -385,17 +329,14 @@ </description> </method> <method name="json_escape" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns a copy of the string with special characters escaped using the JSON standard. </description> </method> <method name="left" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="position" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="position" type="int" /> <description> Returns a number of characters from the left of the string. If negative [code]position[/code] is used, the characters are counted downwards from [String]'s length. Examples: @@ -406,72 +347,58 @@ </description> </method> <method name="length" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the string's amount of characters. </description> </method> <method name="lpad" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="min_length" type="int"> - </argument> - <argument index="1" name="character" type="String" default="" ""> - </argument> + <return type="String" /> + <argument index="0" name="min_length" type="int" /> + <argument index="1" name="character" type="String" default="" "" /> <description> Formats a string to be at least [code]min_length[/code] long by adding [code]character[/code]s to the left of the string. </description> </method> <method name="lstrip" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="chars" type="String"> - </argument> + <return type="String" /> + <argument index="0" name="chars" type="String" /> <description> Returns a copy of the string with characters removed from the left. The [code]chars[/code] argument is a string specifying the set of characters to be removed. [b]Note:[/b] The [code]chars[/code] is not a prefix. See [method trim_prefix] method that will remove a single prefix string rather than a set of characters. </description> </method> <method name="match" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="expr" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="expr" type="String" /> <description> Does a simple case-sensitive expression match, where [code]"*"[/code] matches zero or more arbitrary characters and [code]"?"[/code] matches any single character except a period ([code]"."[/code]). </description> </method> <method name="matchn" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="expr" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="expr" type="String" /> <description> Does a simple case-insensitive expression match, where [code]"*"[/code] matches zero or more arbitrary characters and [code]"?"[/code] matches any single character except a period ([code]"."[/code]). </description> </method> <method name="md5_buffer" qualifiers="const"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> Returns the MD5 hash of the string as an array of bytes. </description> </method> <method name="md5_text" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the MD5 hash of the string as a string. </description> </method> <method name="naturalnocasecmp_to" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="to" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="to" type="String" /> <description> - Performs a case-insensitive [i]natural order[/i] comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/code] of each string, which roughly matches the alphabetical order. Internally, lowercase characters will be converted to uppercase during the comparison. + Performs a case-insensitive [i]natural order[/i] comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. Internally, lowercase characters will be converted to uppercase during the comparison. When used for sorting, natural order comparison will order suites of numbers as expected by most people. If you sort the numbers from 1 to 10 using natural order, you will get [code][1, 2, 3, ...][/code] instead of [code][1, 10, 2, 3, ...][/code]. [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [code]to[/code] string or [code]-1[/code] if the "base" string is shorter than the [code]to[/code] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters. [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [code]to[/code] string is empty or [code]0[/code] if both strings are empty. @@ -479,200 +406,166 @@ </description> </method> <method name="nocasecmp_to" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="to" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="to" type="String" /> <description> - Performs a case-insensitive comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/code] of each string, which roughly matches the alphabetical order. Internally, lowercase characters will be converted to uppercase during the comparison. + Performs a case-insensitive comparison to another string. Returns [code]-1[/code] if less than, [code]1[/code] if greater than, or [code]0[/code] if equal. "less than" or "greater than" are determined by the [url=https://en.wikipedia.org/wiki/List_of_Unicode_characters]Unicode code points[/url] of each string, which roughly matches the alphabetical order. Internally, lowercase characters will be converted to uppercase during the comparison. [b]Behavior with different string lengths:[/b] Returns [code]1[/code] if the "base" string is longer than the [code]to[/code] string or [code]-1[/code] if the "base" string is shorter than the [code]to[/code] string. Keep in mind this length is determined by the number of Unicode codepoints, [i]not[/i] the actual visible characters. [b]Behavior with empty strings:[/b] Returns [code]-1[/code] if the "base" string is empty, [code]1[/code] if the [code]to[/code] string is empty or [code]0[/code] if both strings are empty. To get a boolean result from a string comparison, use the [code]==[/code] operator instead. See also [method casecmp_to] and [method naturalnocasecmp_to]. </description> </method> <method name="num" qualifiers="static"> - <return type="String"> - </return> - <argument index="0" name="number" type="float"> - </argument> - <argument index="1" name="decimals" type="int" default="-1"> - </argument> - <description> + <return type="String" /> + <argument index="0" name="number" type="float" /> + <argument index="1" name="decimals" type="int" default="-1" /> + <description> + Converts a [float] to a string representation of a decimal number. + The number of decimal places can be specified with [code]decimals[/code]. If [code]decimals[/code] is [code]-1[/code] (default), decimal places will be automatically adjusted so that the string representation has 14 significant digits (counting both digits to the left and the right of the decimal point). + Trailing zeros are not included in the string. The last digit will be rounded and not truncated. + Some examples: + [codeblock] + String.num(3.141593) # "3.141593" + String.num(3.141593, 3) # "3.142" + String.num(3.14159300) # "3.141593", no trailing zeros. + # Last digit will be rounded up here, which reduces total digit count since + # trailing zeros are removed: + String.num(42.129999, 5) # "42.13" + # If `decimals` is not specified, the total amount of significant digits is 14: + String.num(-0.0000012345432123454321) # "-0.00000123454321" + String.num(-10000.0000012345432123454321) # "-10000.0000012345" + [/codeblock] </description> </method> <method name="num_scientific" qualifiers="static"> - <return type="String"> - </return> - <argument index="0" name="number" type="float"> - </argument> + <return type="String" /> + <argument index="0" name="number" type="float" /> <description> </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="String" /> <description> </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="StringName" /> <description> </description> </method> <method name="operator %" qualifiers="operator"> - <return type="String"> - </return> - <argument index="0" name="right" type="Variant"> - </argument> + <return type="String" /> + <argument index="0" name="right" type="Variant" /> <description> </description> </method> <method name="operator +" qualifiers="operator"> - <return type="String"> - </return> - <argument index="0" name="right" type="String"> - </argument> + <return type="String" /> + <argument index="0" name="right" type="String" /> <description> </description> </method> <method name="operator <" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="String" /> <description> </description> </method> <method name="operator <=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="String" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="String" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="StringName" /> <description> </description> </method> <method name="operator >" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="String" /> <description> </description> </method> <method name="operator >=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="String" /> <description> </description> </method> <method name="pad_decimals" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="digits" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="digits" type="int" /> <description> Formats a number to have an exact number of [code]digits[/code] after the decimal point. </description> </method> <method name="pad_zeros" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="digits" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="digits" type="int" /> <description> Formats a number to have an exact number of [code]digits[/code] before the decimal point. </description> </method> <method name="plus_file" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="file" type="String"> - </argument> + <return type="String" /> + <argument index="0" name="file" type="String" /> <description> If the string is a path, this concatenates [code]file[/code] at the end of the string as a subpath. E.g. [code]"this/is".plus_file("path") == "this/is/path"[/code]. </description> </method> <method name="repeat" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="count" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="count" type="int" /> <description> Returns original string repeated a number of times. The number of repetitions is given by the argument. </description> </method> <method name="replace" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="what" type="String"> - </argument> - <argument index="1" name="forwhat" type="String"> - </argument> + <return type="String" /> + <argument index="0" name="what" type="String" /> + <argument index="1" name="forwhat" type="String" /> <description> Replaces occurrences of a case-sensitive substring with the given one inside the string. </description> </method> <method name="replacen" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="what" type="String"> - </argument> - <argument index="1" name="forwhat" type="String"> - </argument> + <return type="String" /> + <argument index="0" name="what" type="String" /> + <argument index="1" name="forwhat" type="String" /> <description> Replaces occurrences of a case-insensitive substring with the given one inside the string. </description> </method> <method name="rfind" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="what" type="String"> - </argument> - <argument index="1" name="from" type="int" default="-1"> - </argument> + <return type="int" /> + <argument index="0" name="what" type="String" /> + <argument index="1" name="from" type="int" default="-1" /> <description> Returns the index of the [b]last[/b] case-sensitive occurrence of the specified string in this instance, or [code]-1[/code]. Optionally, the starting search index can be specified, continuing to the beginning of the string. </description> </method> <method name="rfindn" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="what" type="String"> - </argument> - <argument index="1" name="from" type="int" default="-1"> - </argument> + <return type="int" /> + <argument index="0" name="what" type="String" /> + <argument index="1" name="from" type="int" default="-1" /> <description> Returns the index of the [b]last[/b] case-insensitive occurrence of the specified string in this instance, or [code]-1[/code]. Optionally, the starting search index can be specified, continuing to the beginning of the string. </description> </method> <method name="right" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="position" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="position" type="int" /> <description> Returns a number of characters from the right of the string. If negative [code]position[/code] is used, the characters are counted downwards from [String]'s length. Examples: @@ -683,25 +576,18 @@ </description> </method> <method name="rpad" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="min_length" type="int"> - </argument> - <argument index="1" name="character" type="String" default="" ""> - </argument> + <return type="String" /> + <argument index="0" name="min_length" type="int" /> + <argument index="1" name="character" type="String" default="" "" /> <description> Formats a string to be at least [code]min_length[/code] long by adding [code]character[/code]s to the right of the string. </description> </method> <method name="rsplit" qualifiers="const"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="delimiter" type="String"> - </argument> - <argument index="1" name="allow_empty" type="bool" default="true"> - </argument> - <argument index="2" name="maxsplit" type="int" default="0"> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="delimiter" type="String" /> + <argument index="1" name="allow_empty" type="bool" default="true" /> + <argument index="2" name="maxsplit" type="int" default="0" /> <description> Splits the string by a [code]delimiter[/code] string and returns an array of the substrings, starting from right. The splits in the returned array are sorted in the same order as the original string, from left to right. @@ -722,61 +608,55 @@ </description> </method> <method name="rstrip" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="chars" type="String"> - </argument> + <return type="String" /> + <argument index="0" name="chars" type="String" /> <description> Returns a copy of the string with characters removed from the right. The [code]chars[/code] argument is a string specifying the set of characters to be removed. [b]Note:[/b] The [code]chars[/code] is not a suffix. See [method trim_suffix] method that will remove a single suffix string rather than a set of characters. </description> </method> <method name="sha1_buffer" qualifiers="const"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> Returns the SHA-1 hash of the string as an array of bytes. </description> </method> <method name="sha1_text" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the SHA-1 hash of the string as a string. </description> </method> <method name="sha256_buffer" qualifiers="const"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> Returns the SHA-256 hash of the string as an array of bytes. </description> </method> <method name="sha256_text" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the SHA-256 hash of the string as a string. </description> </method> <method name="similarity" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="text" type="String"> - </argument> + <return type="float" /> + <argument index="0" name="text" type="String" /> <description> Returns the similarity index of the text compared to this string. 1 means totally similar and 0 means totally dissimilar. </description> </method> + <method name="simplify_path" qualifiers="const"> + <return type="String" /> + <description> + Returns a simplified canonical path. + </description> + </method> <method name="split" qualifiers="const"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="delimiter" type="String"> - </argument> - <argument index="1" name="allow_empty" type="bool" default="true"> - </argument> - <argument index="2" name="maxsplit" type="int" default="0"> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="delimiter" type="String" /> + <argument index="1" name="allow_empty" type="bool" default="true" /> + <argument index="2" name="maxsplit" type="int" default="0" /> <description> Splits the string by a [code]delimiter[/code] string and returns an array of the substrings. The [code]delimiter[/code] can be of any length. If [code]maxsplit[/code] is specified, it defines the number of splits to do from the left up to [code]maxsplit[/code]. The default value of [code]0[/code] means that all items are split. @@ -800,132 +680,107 @@ </description> </method> <method name="split_floats" qualifiers="const"> - <return type="PackedFloat32Array"> - </return> - <argument index="0" name="delimiter" type="String"> - </argument> - <argument index="1" name="allow_empty" type="bool" default="true"> - </argument> + <return type="PackedFloat32Array" /> + <argument index="0" name="delimiter" type="String" /> + <argument index="1" name="allow_empty" type="bool" default="true" /> <description> Splits the string in floats by using a delimiter string and returns an array of the substrings. For example, [code]"1,2.5,3"[/code] will return [code][1,2.5,3][/code] if split by [code]","[/code]. </description> </method> <method name="strip_edges" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="left" type="bool" default="true"> - </argument> - <argument index="1" name="right" type="bool" default="true"> - </argument> + <return type="String" /> + <argument index="0" name="left" type="bool" default="true" /> + <argument index="1" name="right" type="bool" default="true" /> <description> Returns a copy of the string stripped of any non-printable character (including tabulations, spaces and line breaks) at the beginning and the end. The optional arguments are used to toggle stripping on the left and right edges respectively. </description> </method> <method name="strip_escapes" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns a copy of the string stripped of any escape character. These include all non-printable control characters of the first page of the ASCII table (< 32), such as tabulation ([code]\t[/code] in C) and newline ([code]\n[/code] and [code]\r[/code]) characters, but not spaces. </description> </method> <method name="substr" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="from" type="int"> - </argument> - <argument index="1" name="len" type="int" default="-1"> - </argument> + <return type="String" /> + <argument index="0" name="from" type="int" /> + <argument index="1" name="len" type="int" default="-1" /> <description> Returns part of the string from the position [code]from[/code] with length [code]len[/code]. Argument [code]len[/code] is optional and using [code]-1[/code] will return remaining characters from given position. </description> </method> <method name="to_ascii_buffer" qualifiers="const"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> Converts the String (which is a character array) to ASCII/Latin-1 encoded [PackedByteArray] (which is an array of bytes). The conversion is faster compared to [method to_utf8_buffer], as this method assumes that all the characters in the String are ASCII/Latin-1 characters, unsupported characters are replaced with spaces. </description> </method> <method name="to_float" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Converts a string containing a decimal number into a [code]float[/code]. </description> </method> <method name="to_int" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Converts a string containing an integer number into an [code]int[/code]. </description> </method> <method name="to_lower" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the string converted to lowercase. </description> </method> <method name="to_upper" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the string converted to uppercase. </description> </method> <method name="to_utf16_buffer" qualifiers="const"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> Converts the String (which is an array of characters) to UTF-16 encoded [PackedByteArray] (which is an array of bytes). </description> </method> <method name="to_utf32_buffer" qualifiers="const"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> Converts the String (which is an array of characters) to UTF-32 encoded [PackedByteArray] (which is an array of bytes). </description> </method> <method name="to_utf8_buffer" qualifiers="const"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> Converts the String (which is an array of characters) to UTF-8 encode [PackedByteArray] (which is an array of bytes). The conversion is a bit slower than [method to_ascii_buffer], but supports all UTF-8 characters. Therefore, you should prefer this function over [method to_ascii_buffer]. </description> </method> <method name="trim_prefix" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="prefix" type="String"> - </argument> + <return type="String" /> + <argument index="0" name="prefix" type="String" /> <description> Removes a given string from the start if it starts with it or leaves the string unchanged. </description> </method> <method name="trim_suffix" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="suffix" type="String"> - </argument> + <return type="String" /> + <argument index="0" name="suffix" type="String" /> <description> Removes a given string from the end if it ends with it or leaves the string unchanged. </description> </method> <method name="unicode_at" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="at" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="at" type="int" /> <description> Returns the character code at position [code]at[/code]. </description> </method> <method name="uri_decode" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Decodes a string in URL encoded format. This is meant to decode parameters in a URL when receiving an HTTP request. [codeblocks] @@ -939,8 +794,7 @@ </description> </method> <method name="uri_encode" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Encodes a string to URL friendly format. This is meant to encode parameters in a URL when sending an HTTP request. [codeblocks] @@ -954,24 +808,20 @@ </description> </method> <method name="validate_node_name" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Removes any characters from the string that are prohibited in [Node] names ([code].[/code] [code]:[/code] [code]@[/code] [code]/[/code] [code]"[/code]). </description> </method> <method name="xml_escape" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="escape_quotes" type="bool" default="false"> - </argument> + <return type="String" /> + <argument index="0" name="escape_quotes" type="bool" default="false" /> <description> Returns a copy of the string with special characters escaped using the XML standard. If [code]escape_quotes[/code] is [code]true[/code], the single quote ([code]'[/code]) and double quote ([code]"[/code]) characters are also escaped. </description> </method> <method name="xml_unescape" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns a copy of the string with escaped characters replaced by their meanings according to the XML standard. </description> diff --git a/doc/classes/StringName.xml b/doc/classes/StringName.xml index be32f6a234..4c2619e782 100644 --- a/doc/classes/StringName.xml +++ b/doc/classes/StringName.xml @@ -10,59 +10,46 @@ </tutorials> <methods> <method name="StringName" qualifiers="constructor"> - <return type="StringName"> - </return> + <return type="StringName" /> <description> Constructs an empty [StringName]. </description> </method> <method name="StringName" qualifiers="constructor"> - <return type="StringName"> - </return> - <argument index="0" name="from" type="StringName"> - </argument> + <return type="StringName" /> + <argument index="0" name="from" type="StringName" /> <description> Constructs a [StringName] as a copy of the given [StringName]. </description> </method> <method name="StringName" qualifiers="constructor"> - <return type="StringName"> - </return> - <argument index="0" name="from" type="String"> - </argument> + <return type="StringName" /> + <argument index="0" name="from" type="String" /> <description> Creates a new [StringName] from the given [String]. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="String" /> <description> </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="StringName" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="String" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="StringName" /> <description> </description> </method> diff --git a/doc/classes/StyleBox.xml b/doc/classes/StyleBox.xml index a01dfbd4b8..024524251d 100644 --- a/doc/classes/StyleBox.xml +++ b/doc/classes/StyleBox.xml @@ -11,82 +11,65 @@ </tutorials> <methods> <method name="draw" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="canvas_item" type="RID"> - </argument> - <argument index="1" name="rect" type="Rect2"> - </argument> + <return type="void" /> + <argument index="0" name="canvas_item" type="RID" /> + <argument index="1" name="rect" type="Rect2" /> <description> Draws this stylebox using a [CanvasItem] with given [RID]. You can get a [RID] value using [method Object.get_instance_id] on a [CanvasItem]-derived node. </description> </method> <method name="get_center_size" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the size of this [StyleBox] without the margins. </description> </method> <method name="get_current_item_drawn" qualifiers="const"> - <return type="CanvasItem"> - </return> + <return type="CanvasItem" /> <description> Returns the [CanvasItem] that handles its [constant CanvasItem.NOTIFICATION_DRAW] or [method CanvasItem._draw] callback at this moment. </description> </method> <method name="get_default_margin" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="margin" type="int" enum="Side"> - </argument> + <return type="float" /> + <argument index="0" name="margin" type="int" enum="Side" /> <description> Returns the default margin of the specified [enum Side]. </description> </method> <method name="get_margin" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="margin" type="int" enum="Side"> - </argument> + <return type="float" /> + <argument index="0" name="margin" type="int" enum="Side" /> <description> Returns the content margin offset for the specified [enum Side]. Positive values reduce size inwards, unlike [Control]'s margin values. </description> </method> <method name="get_minimum_size" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the minimum size that this stylebox can be shrunk to. </description> </method> <method name="get_offset" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the "offset" of a stylebox. This helper function returns a value equivalent to [code]Vector2(style.get_margin(MARGIN_LEFT), style.get_margin(MARGIN_TOP))[/code]. </description> </method> <method name="set_default_margin"> - <return type="void"> - </return> - <argument index="0" name="margin" type="int" enum="Side"> - </argument> - <argument index="1" name="offset" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="margin" type="int" enum="Side" /> + <argument index="1" name="offset" type="float" /> <description> Sets the default value of the specified [enum Side] to [code]offset[/code] pixels. </description> </method> <method name="test_mask" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="point" type="Vector2"> - </argument> - <argument index="1" name="rect" type="Rect2"> - </argument> + <return type="bool" /> + <argument index="0" name="point" type="Vector2" /> + <argument index="1" name="rect" type="Rect2" /> <description> Test a position in a rectangle, return whether it passes the mask test. </description> diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml index 9e02fb57c3..59ab724f48 100644 --- a/doc/classes/StyleBoxFlat.xml +++ b/doc/classes/StyleBoxFlat.xml @@ -25,125 +25,93 @@ </tutorials> <methods> <method name="get_border_width" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="margin" type="int" enum="Side"> - </argument> + <return type="int" /> + <argument index="0" name="margin" type="int" enum="Side" /> <description> Returns the specified [enum Side]'s border width. </description> </method> <method name="get_border_width_min" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the smallest border width out of all four borders. </description> </method> <method name="get_corner_radius" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="corner" type="int" enum="Corner"> - </argument> + <return type="int" /> + <argument index="0" name="corner" type="int" enum="Corner" /> <description> Returns the given [code]corner[/code]'s radius. See [enum Corner] for possible values. </description> </method> <method name="get_expand_margin" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="margin" type="int" enum="Side"> - </argument> + <return type="float" /> + <argument index="0" name="margin" type="int" enum="Side" /> <description> Returns the size of the specified [enum Side]'s expand margin. </description> </method> <method name="set_border_width"> - <return type="void"> - </return> - <argument index="0" name="margin" type="int" enum="Side"> - </argument> - <argument index="1" name="width" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="margin" type="int" enum="Side" /> + <argument index="1" name="width" type="int" /> <description> Sets the specified [enum Side]'s border width to [code]width[/code] pixels. </description> </method> <method name="set_border_width_all"> - <return type="void"> - </return> - <argument index="0" name="width" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="width" type="int" /> <description> Sets the border width to [code]width[/code] pixels for all sides. </description> </method> <method name="set_corner_radius"> - <return type="void"> - </return> - <argument index="0" name="corner" type="int" enum="Corner"> - </argument> - <argument index="1" name="radius" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="corner" type="int" enum="Corner" /> + <argument index="1" name="radius" type="int" /> <description> Sets the corner radius to [code]radius[/code] pixels for the given [code]corner[/code]. See [enum Corner] for possible values. </description> </method> <method name="set_corner_radius_all"> - <return type="void"> - </return> - <argument index="0" name="radius" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="radius" type="int" /> <description> Sets the corner radius to [code]radius[/code] pixels for all corners. </description> </method> <method name="set_corner_radius_individual"> - <return type="void"> - </return> - <argument index="0" name="radius_top_left" type="int"> - </argument> - <argument index="1" name="radius_top_right" type="int"> - </argument> - <argument index="2" name="radius_bottom_right" type="int"> - </argument> - <argument index="3" name="radius_bottom_left" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="radius_top_left" type="int" /> + <argument index="1" name="radius_top_right" type="int" /> + <argument index="2" name="radius_bottom_right" type="int" /> + <argument index="3" name="radius_bottom_left" type="int" /> <description> Sets the corner radius for each corner to [code]radius_top_left[/code], [code]radius_top_right[/code], [code]radius_bottom_right[/code], and [code]radius_bottom_left[/code] pixels. </description> </method> <method name="set_expand_margin"> - <return type="void"> - </return> - <argument index="0" name="margin" type="int" enum="Side"> - </argument> - <argument index="1" name="size" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="margin" type="int" enum="Side" /> + <argument index="1" name="size" type="float" /> <description> Sets the expand margin to [code]size[/code] pixels for the specified [enum Side]. </description> </method> <method name="set_expand_margin_all"> - <return type="void"> - </return> - <argument index="0" name="size" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="size" type="float" /> <description> Sets the expand margin to [code]size[/code] pixels for all margins. </description> </method> <method name="set_expand_margin_individual"> - <return type="void"> - </return> - <argument index="0" name="size_left" type="float"> - </argument> - <argument index="1" name="size_top" type="float"> - </argument> - <argument index="2" name="size_right" type="float"> - </argument> - <argument index="3" name="size_bottom" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="size_left" type="float" /> + <argument index="1" name="size_top" type="float" /> + <argument index="2" name="size_right" type="float" /> + <argument index="3" name="size_bottom" type="float" /> <description> Sets the expand margin for each margin to [code]size_left[/code], [code]size_top[/code], [code]size_right[/code], and [code]size_bottom[/code] pixels. </description> @@ -153,7 +121,7 @@ <member name="anti_aliasing" type="bool" setter="set_anti_aliased" getter="is_anti_aliased" default="true"> Antialiasing draws a small ring around the edges, which fades to transparency. As a result, edges look much smoother. This is only noticeable when using rounded corners. </member> - <member name="anti_aliasing_size" type="int" setter="set_aa_size" getter="get_aa_size" default="1"> + <member name="anti_aliasing_size" type="float" setter="set_aa_size" getter="get_aa_size" default="0.625"> This changes the size of the faded ring. Higher values can be used to achieve a "blurry" effect. </member> <member name="bg_color" type="Color" setter="set_bg_color" getter="get_bg_color" default="Color(0.6, 0.6, 0.6, 1)"> diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml index be14048126..92939dfbf5 100644 --- a/doc/classes/StyleBoxTexture.xml +++ b/doc/classes/StyleBoxTexture.xml @@ -10,65 +10,48 @@ </tutorials> <methods> <method name="get_expand_margin_size" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="margin" type="int" enum="Side"> - </argument> + <return type="float" /> + <argument index="0" name="margin" type="int" enum="Side" /> <description> Returns the expand margin size of the specified [enum Side]. </description> </method> <method name="get_margin_size" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="margin" type="int" enum="Side"> - </argument> + <return type="float" /> + <argument index="0" name="margin" type="int" enum="Side" /> <description> Returns the margin size of the specified [enum Side]. </description> </method> <method name="set_expand_margin_all"> - <return type="void"> - </return> - <argument index="0" name="size" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="size" type="float" /> <description> Sets the expand margin to [code]size[/code] pixels for all margins. </description> </method> <method name="set_expand_margin_individual"> - <return type="void"> - </return> - <argument index="0" name="size_left" type="float"> - </argument> - <argument index="1" name="size_top" type="float"> - </argument> - <argument index="2" name="size_right" type="float"> - </argument> - <argument index="3" name="size_bottom" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="size_left" type="float" /> + <argument index="1" name="size_top" type="float" /> + <argument index="2" name="size_right" type="float" /> + <argument index="3" name="size_bottom" type="float" /> <description> Sets the expand margin for each margin to [code]size_left[/code], [code]size_top[/code], [code]size_right[/code], and [code]size_bottom[/code] pixels. </description> </method> <method name="set_expand_margin_size"> - <return type="void"> - </return> - <argument index="0" name="margin" type="int" enum="Side"> - </argument> - <argument index="1" name="size" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="margin" type="int" enum="Side" /> + <argument index="1" name="size" type="float" /> <description> Sets the expand margin to [code]size[/code] pixels for the specified [enum Side]. </description> </method> <method name="set_margin_size"> - <return type="void"> - </return> - <argument index="0" name="margin" type="int" enum="Side"> - </argument> - <argument index="1" name="size" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="margin" type="int" enum="Side" /> + <argument index="1" name="size" type="float" /> <description> Sets the margin to [code]size[/code] pixels for the specified [enum Side]. </description> diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index a8b836ff0c..e5b03eb4d4 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -32,294 +32,225 @@ </tutorials> <methods> <method name="add_index"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> <description> Adds an index to index array if you are using indexed vertices. Does not need to be called before adding vertices. </description> </method> <method name="add_triangle_fan"> - <return type="void"> - </return> - <argument index="0" name="vertices" type="PackedVector3Array"> - </argument> - <argument index="1" name="uvs" type="PackedVector2Array" default="PackedVector2Array()"> - </argument> - <argument index="2" name="colors" type="PackedColorArray" default="PackedColorArray()"> - </argument> - <argument index="3" name="uv2s" type="PackedVector2Array" default="PackedVector2Array()"> - </argument> - <argument index="4" name="normals" type="PackedVector3Array" default="PackedVector3Array()"> - </argument> - <argument index="5" name="tangents" type="Array" default="[]"> - </argument> + <return type="void" /> + <argument index="0" name="vertices" type="PackedVector3Array" /> + <argument index="1" name="uvs" type="PackedVector2Array" default="PackedVector2Array()" /> + <argument index="2" name="colors" type="PackedColorArray" default="PackedColorArray()" /> + <argument index="3" name="uv2s" type="PackedVector2Array" default="PackedVector2Array()" /> + <argument index="4" name="normals" type="PackedVector3Array" default="PackedVector3Array()" /> + <argument index="5" name="tangents" type="Array" default="[]" /> <description> Inserts a triangle fan made of array data into [Mesh] being constructed. Requires the primitive type be set to [constant Mesh.PRIMITIVE_TRIANGLES]. </description> </method> <method name="add_vertex"> - <return type="void"> - </return> - <argument index="0" name="vertex" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="vertex" type="Vector3" /> <description> Specifies the position of current vertex. Should be called after specifying other vertex properties (e.g. Color, UV). </description> </method> <method name="append_from"> - <return type="void"> - </return> - <argument index="0" name="existing" type="Mesh"> - </argument> - <argument index="1" name="surface" type="int"> - </argument> - <argument index="2" name="transform" type="Transform3D"> - </argument> + <return type="void" /> + <argument index="0" name="existing" type="Mesh" /> + <argument index="1" name="surface" type="int" /> + <argument index="2" name="transform" type="Transform3D" /> <description> Append vertices from a given [Mesh] surface onto the current vertex array with specified [Transform3D]. </description> </method> <method name="begin"> - <return type="void"> - </return> - <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType"> - </argument> + <return type="void" /> + <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType" /> <description> Called before adding any vertices. Takes the primitive type as an argument (e.g. [constant Mesh.PRIMITIVE_TRIANGLES]). </description> </method> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> Clear all information passed into the surface tool so far. </description> </method> <method name="commit"> - <return type="ArrayMesh"> - </return> - <argument index="0" name="existing" type="ArrayMesh" default="null"> - </argument> - <argument index="1" name="flags" type="int" default="0"> - </argument> + <return type="ArrayMesh" /> + <argument index="0" name="existing" type="ArrayMesh" default="null" /> + <argument index="1" name="flags" type="int" default="0" /> <description> Returns a constructed [ArrayMesh] from current information passed in. If an existing [ArrayMesh] is passed in as an argument, will add an extra surface to the existing [ArrayMesh]. [b]FIXME:[/b] Document possible values for [code]flags[/code], it changed in 4.0. Likely some combinations of [enum Mesh.ArrayFormat]. </description> </method> <method name="commit_to_arrays"> - <return type="Array"> - </return> + <return type="Array" /> <description> Commits the data to the same format used by [method ArrayMesh.add_surface_from_arrays]. This way you can further process the mesh data using the [ArrayMesh] API. </description> </method> <method name="create_from"> - <return type="void"> - </return> - <argument index="0" name="existing" type="Mesh"> - </argument> - <argument index="1" name="surface" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="existing" type="Mesh" /> + <argument index="1" name="surface" type="int" /> <description> Creates a vertex array from an existing [Mesh]. </description> </method> <method name="create_from_blend_shape"> - <return type="void"> - </return> - <argument index="0" name="existing" type="Mesh"> - </argument> - <argument index="1" name="surface" type="int"> - </argument> - <argument index="2" name="blend_shape" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="existing" type="Mesh" /> + <argument index="1" name="surface" type="int" /> + <argument index="2" name="blend_shape" type="String" /> <description> Creates a vertex array from the specified blend shape of an existing [Mesh]. This can be used to extract a specific pose from a blend shape. </description> </method> <method name="deindex"> - <return type="void"> - </return> + <return type="void" /> <description> Removes the index array by expanding the vertex array. </description> </method> <method name="generate_lod"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="nd_threshold" type="float"> - </argument> - <argument index="1" name="target_index_count" type="int" default="3"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="nd_threshold" type="float" /> + <argument index="1" name="target_index_count" type="int" default="3" /> <description> </description> </method> <method name="generate_normals"> - <return type="void"> - </return> - <argument index="0" name="flip" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="flip" type="bool" default="false" /> <description> Generates normals from vertices so you do not have to do it manually. If [code]flip[/code] is [code]true[/code], the resulting normals will be inverted. [method generate_normals] should be called [i]after[/i] generating geometry and [i]before[/i] committing the mesh using [method commit] or [method commit_to_arrays]. [b]Note:[/b] [method generate_normals] only works if the primitive type to be set to [constant Mesh.PRIMITIVE_TRIANGLES]. </description> </method> <method name="generate_tangents"> - <return type="void"> - </return> + <return type="void" /> <description> Generates a tangent vector for each vertex. Requires that each vertex have UVs and normals set already. </description> </method> <method name="get_custom_format" qualifiers="const"> - <return type="int" enum="SurfaceTool.CustomFormat"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="int" enum="SurfaceTool.CustomFormat" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="get_max_axis_length" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> </description> </method> <method name="get_primitive" qualifiers="const"> - <return type="int" enum="Mesh.PrimitiveType"> - </return> + <return type="int" enum="Mesh.PrimitiveType" /> <description> </description> </method> <method name="get_skin_weight_count" qualifiers="const"> - <return type="int" enum="SurfaceTool.SkinWeightCount"> - </return> + <return type="int" enum="SurfaceTool.SkinWeightCount" /> <description> </description> </method> <method name="index"> - <return type="void"> - </return> + <return type="void" /> <description> Shrinks the vertex array by creating an index array. This can improve performance by avoiding vertex reuse. </description> </method> <method name="optimize_indices_for_cache"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> <method name="set_bones"> - <return type="void"> - </return> - <argument index="0" name="bones" type="PackedInt32Array"> - </argument> + <return type="void" /> + <argument index="0" name="bones" type="PackedInt32Array" /> <description> Specifies an array of bones to use for the [i]next[/i] vertex. [code]bones[/code] must contain 4 integers. </description> </method> <method name="set_color"> - <return type="void"> - </return> - <argument index="0" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="color" type="Color" /> <description> Specifies a [Color] to use for the [i]next[/i] vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all. [b]Note:[/b] The material must have [member BaseMaterial3D.vertex_color_use_as_albedo] enabled for the vertex color to be visible. </description> </method> <method name="set_custom"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="custom" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> + <argument index="1" name="custom" type="Color" /> <description> </description> </method> <method name="set_custom_format"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> - <argument index="1" name="format" type="int" enum="SurfaceTool.CustomFormat"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> + <argument index="1" name="format" type="int" enum="SurfaceTool.CustomFormat" /> <description> </description> </method> <method name="set_material"> - <return type="void"> - </return> - <argument index="0" name="material" type="Material"> - </argument> + <return type="void" /> + <argument index="0" name="material" type="Material" /> <description> Sets [Material] to be used by the [Mesh] you are constructing. </description> </method> <method name="set_normal"> - <return type="void"> - </return> - <argument index="0" name="normal" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="normal" type="Vector3" /> <description> Specifies a normal to use for the [i]next[/i] vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all. </description> </method> <method name="set_skin_weight_count"> - <return type="void"> - </return> - <argument index="0" name="count" type="int" enum="SurfaceTool.SkinWeightCount"> - </argument> + <return type="void" /> + <argument index="0" name="count" type="int" enum="SurfaceTool.SkinWeightCount" /> <description> </description> </method> <method name="set_smooth_group"> - <return type="void"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="index" type="int" /> <description> Specifies whether the current vertex (if using only vertex arrays) or current index (if also using index arrays) should use smooth normals for normal calculation. </description> </method> <method name="set_tangent"> - <return type="void"> - </return> - <argument index="0" name="tangent" type="Plane"> - </argument> + <return type="void" /> + <argument index="0" name="tangent" type="Plane" /> <description> Specifies a tangent to use for the [i]next[/i] vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all. </description> </method> <method name="set_uv"> - <return type="void"> - </return> - <argument index="0" name="uv" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="uv" type="Vector2" /> <description> Specifies a set of UV coordinates to use for the [i]next[/i] vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all. </description> </method> <method name="set_uv2"> - <return type="void"> - </return> - <argument index="0" name="uv2" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="uv2" type="Vector2" /> <description> Specifies an optional second set of UV coordinates to use for the [i]next[/i] vertex. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all. </description> </method> <method name="set_weights"> - <return type="void"> - </return> - <argument index="0" name="weights" type="PackedFloat32Array"> - </argument> + <return type="void" /> + <argument index="0" name="weights" type="PackedFloat32Array" /> <description> Specifies weight values to use for the [i]next[/i] vertex. [code]weights[/code] must contain 4 values. If every vertex needs to have this information set and you fail to submit it for the first vertex, this information may not be used at all. </description> diff --git a/doc/classes/SyntaxHighlighter.xml b/doc/classes/SyntaxHighlighter.xml index 642d75fa9b..c478cb0eb6 100644 --- a/doc/classes/SyntaxHighlighter.xml +++ b/doc/classes/SyntaxHighlighter.xml @@ -12,42 +12,35 @@ </tutorials> <methods> <method name="_clear_highlighting_cache" qualifiers="virtual"> - <return type="void"> - </return> + <return type="void" /> <description> Virtual method which can be overridden to clear any local caches. </description> </method> - <method name="_get_line_syntax_highlighting" qualifiers="virtual"> - <return type="Dictionary"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <method name="_get_line_syntax_highlighting" qualifiers="virtual const"> + <return type="Dictionary" /> + <argument index="0" name="line" type="int" /> <description> Virtual method which can be overridden to return syntax highlighting data. See [method get_line_syntax_highlighting] for more details. </description> </method> <method name="_update_cache" qualifiers="virtual"> - <return type="void"> - </return> + <return type="void" /> <description> Virtual method which can be overridden to update any local caches. </description> </method> <method name="clear_highlighting_cache"> - <return type="void"> - </return> + <return type="void" /> <description> Clears all cached syntax highlighting data. Then calls overridable method [method _clear_highlighting_cache]. </description> </method> <method name="get_line_syntax_highlighting"> - <return type="Dictionary"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="line" type="int" /> <description> Returns syntax highlighting data for a single line. If the line is not cached, calls [method _get_line_syntax_highlighting] to calculate the data. The return [Dictionary] is column number to [Dictionary]. The column number notes the start of a region, the region will end if another region is found, or at the end of the line. The nested [Dictionary] contains the data for that region, currently only the key "color" is supported. @@ -66,15 +59,13 @@ </description> </method> <method name="get_text_edit"> - <return type="TextEdit"> - </return> + <return type="TextEdit" /> <description> Returns the associated [TextEdit] node. </description> </method> <method name="update_cache"> - <return type="void"> - </return> + <return type="void" /> <description> Clears then updates the [SyntaxHighlighter] caches. Override [method _update_cache] for a callback. [b]Note:[/b] This is called automatically when the associated [TextEdit] node, updates its own cache. diff --git a/doc/classes/TCPServer.xml b/doc/classes/TCPServer.xml index 7160055c6d..9692693eff 100644 --- a/doc/classes/TCPServer.xml +++ b/doc/classes/TCPServer.xml @@ -10,33 +10,27 @@ </tutorials> <methods> <method name="get_local_port" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the local port this server is listening to. </description> </method> <method name="is_connection_available" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if a connection is available for taking. </description> </method> <method name="is_listening" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the server is currently listening for connections. </description> </method> <method name="listen"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="port" type="int"> - </argument> - <argument index="1" name="bind_address" type="String" default=""*""> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="port" type="int" /> + <argument index="1" name="bind_address" type="String" default=""*"" /> <description> Listen on the [code]port[/code] binding to [code]bind_address[/code]. If [code]bind_address[/code] is set as [code]"*"[/code] (default), the server will listen on all available addresses (both IPv4 and IPv6). @@ -45,15 +39,13 @@ </description> </method> <method name="stop"> - <return type="void"> - </return> + <return type="void" /> <description> Stops listening. </description> </method> <method name="take_connection"> - <return type="StreamPeerTCP"> - </return> + <return type="StreamPeerTCP" /> <description> If a connection is available, returns a StreamPeerTCP with the connection. </description> diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index 3f24509ec7..77bd7b1a0a 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -13,124 +13,105 @@ </tutorials> <methods> <method name="get_current_tab_control" qualifiers="const"> - <return type="Control"> - </return> + <return type="Control" /> <description> Returns the child [Control] node located at the active tab index. </description> </method> <method name="get_popup" qualifiers="const"> - <return type="Popup"> - </return> + <return type="Popup" /> <description> Returns the [Popup] node instance if one has been set already with [method set_popup]. </description> </method> <method name="get_previous_tab" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the previously active tab index. </description> </method> <method name="get_tab_control" qualifiers="const"> - <return type="Control"> - </return> - <argument index="0" name="tab_idx" type="int"> - </argument> + <return type="Control" /> + <argument index="0" name="tab_idx" type="int" /> <description> Returns the [Control] node from the tab at index [code]tab_idx[/code]. </description> </method> <method name="get_tab_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of tabs. </description> </method> <method name="get_tab_disabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="tab_idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="tab_idx" type="int" /> <description> Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is disabled. </description> </method> <method name="get_tab_icon" qualifiers="const"> - <return type="Texture2D"> - </return> - <argument index="0" name="tab_idx" type="int"> - </argument> + <return type="Texture2D" /> + <argument index="0" name="tab_idx" type="int" /> <description> Returns the [Texture2D] for the tab at index [code]tab_idx[/code] or [code]null[/code] if the tab has no [Texture2D]. </description> </method> + <method name="get_tab_idx_at_point" qualifiers="const"> + <return type="int" /> + <argument index="0" name="point" type="Vector2" /> + <description> + Returns the index of the tab at local coordinates [code]point[/code]. Returns [code]-1[/code] if the point is outside the control boundaries or if there's no tab at the queried position. + </description> + </method> <method name="get_tab_title" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="tab_idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="tab_idx" type="int" /> <description> Returns the title of the tab at index [code]tab_idx[/code]. Tab titles default to the name of the indexed child node, but this can be overridden with [method set_tab_title]. </description> </method> <method name="get_tabs_rearrange_group" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the [TabContainer] rearrange group id. </description> </method> <method name="set_popup"> - <return type="void"> - </return> - <argument index="0" name="popup" type="Node"> - </argument> + <return type="void" /> + <argument index="0" name="popup" type="Node" /> <description> If set on a [Popup] node instance, a popup menu icon appears in the top-right corner of the [TabContainer]. Clicking it will expand the [Popup] node. </description> </method> <method name="set_tab_disabled"> - <return type="void"> - </return> - <argument index="0" name="tab_idx" type="int"> - </argument> - <argument index="1" name="disabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="tab_idx" type="int" /> + <argument index="1" name="disabled" type="bool" /> <description> If [code]disabled[/code] is [code]false[/code], hides the tab at index [code]tab_idx[/code]. [b]Note:[/b] Its title text will remain, unless also removed with [method set_tab_title]. </description> </method> <method name="set_tab_icon"> - <return type="void"> - </return> - <argument index="0" name="tab_idx" type="int"> - </argument> - <argument index="1" name="icon" type="Texture2D"> - </argument> + <return type="void" /> + <argument index="0" name="tab_idx" type="int" /> + <argument index="1" name="icon" type="Texture2D" /> <description> Sets an icon for the tab at index [code]tab_idx[/code]. </description> </method> <method name="set_tab_title"> - <return type="void"> - </return> - <argument index="0" name="tab_idx" type="int"> - </argument> - <argument index="1" name="title" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="tab_idx" type="int" /> + <argument index="1" name="title" type="String" /> <description> Sets a title for the tab at index [code]tab_idx[/code]. Tab titles default to the name of the indexed child node, but this can be overridden with [method set_tab_title]. </description> </method> <method name="set_tabs_rearrange_group"> - <return type="void"> - </return> - <argument index="0" name="group_id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="group_id" type="int" /> <description> Defines rearrange group id, choose for each [TabContainer] the same value to enable tab drag between [TabContainer]. Enable drag with [code]set_drag_to_rearrange_enabled(true)[/code]. </description> @@ -163,15 +144,13 @@ </description> </signal> <signal name="tab_changed"> - <argument index="0" name="tab" type="int"> - </argument> + <argument index="0" name="tab" type="int" /> <description> Emitted when switching to another tab. </description> </signal> <signal name="tab_selected"> - <argument index="0" name="tab" type="int"> - </argument> + <argument index="0" name="tab" type="int" /> <description> Emitted when a tab is selected, even if it is the current tab. </description> @@ -189,61 +168,61 @@ </constant> </constants> <theme_items> - <theme_item name="decrement" type="Texture2D"> + <theme_item name="decrement" data_type="icon" type="Texture2D"> Icon for the left arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the first tab is visible), it appears semi-transparent. </theme_item> - <theme_item name="decrement_highlight" type="Texture2D"> + <theme_item name="decrement_highlight" data_type="icon" type="Texture2D"> Icon for the left arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> The font used to draw tab names. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> + <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> Font color of disabled tabs. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the tab name. </theme_item> - <theme_item name="font_selected_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> + <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> Font color of the currently selected tab. </theme_item> - <theme_item name="font_size" type="int"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the tab names. </theme_item> - <theme_item name="font_unselected_color" type="Color" default="Color(0.69, 0.69, 0.69, 1)"> + <theme_item name="font_unselected_color" data_type="color" type="Color" default="Color(0.69, 0.69, 0.69, 1)"> Font color of the other, unselected tabs. </theme_item> - <theme_item name="icon_separation" type="int" default="4"> + <theme_item name="icon_separation" data_type="constant" type="int" default="4"> Space between tab's name and its icon. </theme_item> - <theme_item name="increment" type="Texture2D"> + <theme_item name="increment" data_type="icon" type="Texture2D"> Icon for the right arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the last tab is visible) it appears semi-transparent. </theme_item> - <theme_item name="increment_highlight" type="Texture2D"> + <theme_item name="increment_highlight" data_type="icon" type="Texture2D"> Icon for the right arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor. </theme_item> - <theme_item name="menu" type="Texture2D"> + <theme_item name="menu" data_type="icon" type="Texture2D"> The icon for the menu button (see [method set_popup]). </theme_item> - <theme_item name="menu_highlight" type="Texture2D"> + <theme_item name="menu_highlight" data_type="icon" type="Texture2D"> The icon for the menu button (see [method set_popup]) when it's being hovered with the cursor. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the tab text outline. </theme_item> - <theme_item name="panel" type="StyleBox"> + <theme_item name="panel" data_type="style" type="StyleBox"> The style for the background fill. </theme_item> - <theme_item name="side_margin" type="int" default="8"> + <theme_item name="side_margin" data_type="constant" type="int" default="8"> The space at the left and right edges of the tab bar. </theme_item> - <theme_item name="tab_disabled" type="StyleBox"> + <theme_item name="tab_disabled" data_type="style" type="StyleBox"> The style of disabled tabs. </theme_item> - <theme_item name="tab_selected" type="StyleBox"> + <theme_item name="tab_selected" data_type="style" type="StyleBox"> The style of the currently selected tab. </theme_item> - <theme_item name="tab_unselected" type="StyleBox"> + <theme_item name="tab_unselected" data_type="style" type="StyleBox"> The style of the other, unselected tabs. </theme_item> </theme_items> diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml index aff104c922..f4c89a8b16 100644 --- a/doc/classes/Tabs.xml +++ b/doc/classes/Tabs.xml @@ -10,244 +10,188 @@ </tutorials> <methods> <method name="add_tab"> - <return type="void"> - </return> - <argument index="0" name="title" type="String" default=""""> - </argument> - <argument index="1" name="icon" type="Texture2D" default="null"> - </argument> + <return type="void" /> + <argument index="0" name="title" type="String" default="""" /> + <argument index="1" name="icon" type="Texture2D" default="null" /> <description> Adds a new tab. </description> </method> <method name="clear_tab_opentype_features"> - <return type="void"> - </return> - <argument index="0" name="tab_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="tab_idx" type="int" /> <description> Removes all OpenType features from the tab title. </description> </method> <method name="ensure_tab_visible"> - <return type="void"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="idx" type="int" /> <description> Moves the scroll view to make the tab visible. </description> </method> <method name="get_offset_buttons_visible" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the offset buttons (the ones that appear when there's not enough space for all tabs) are visible. </description> </method> <method name="get_previous_tab" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the previously active tab index. </description> </method> <method name="get_select_with_rmb" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if select with right mouse button is enabled. </description> </method> <method name="get_tab_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of tabs. </description> </method> <method name="get_tab_disabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="tab_idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="tab_idx" type="int" /> <description> Returns [code]true[/code] if the tab at index [code]tab_idx[/code] is disabled. </description> </method> <method name="get_tab_icon" qualifiers="const"> - <return type="Texture2D"> - </return> - <argument index="0" name="tab_idx" type="int"> - </argument> + <return type="Texture2D" /> + <argument index="0" name="tab_idx" type="int" /> <description> Returns the [Texture2D] for the tab at index [code]tab_idx[/code] or [code]null[/code] if the tab has no [Texture2D]. </description> </method> <method name="get_tab_language" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="tab_idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="tab_idx" type="int" /> <description> Returns tab title language code. </description> </method> <method name="get_tab_offset" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of hidden tabs offsetted to the left. </description> </method> <method name="get_tab_opentype_feature" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="tab_idx" type="int"> - </argument> - <argument index="1" name="tag" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="tab_idx" type="int" /> + <argument index="1" name="tag" type="String" /> <description> Returns OpenType feature [code]tag[/code] of the tab title. </description> </method> <method name="get_tab_rect" qualifiers="const"> - <return type="Rect2"> - </return> - <argument index="0" name="tab_idx" type="int"> - </argument> + <return type="Rect2" /> + <argument index="0" name="tab_idx" type="int" /> <description> Returns tab [Rect2] with local position and size. </description> </method> <method name="get_tab_text_direction" qualifiers="const"> - <return type="int" enum="Control.TextDirection"> - </return> - <argument index="0" name="tab_idx" type="int"> - </argument> + <return type="int" enum="Control.TextDirection" /> + <argument index="0" name="tab_idx" type="int" /> <description> Returns tab title text base writing direction. </description> </method> <method name="get_tab_title" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="tab_idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="tab_idx" type="int" /> <description> Returns the title of the tab at index [code]tab_idx[/code]. Tab titles default to the name of the indexed child node, but this can be overridden with [method set_tab_title]. </description> </method> <method name="get_tabs_rearrange_group" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the [Tabs]' rearrange group ID. </description> </method> <method name="move_tab"> - <return type="void"> - </return> - <argument index="0" name="from" type="int"> - </argument> - <argument index="1" name="to" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="from" type="int" /> + <argument index="1" name="to" type="int" /> <description> Moves a tab from [code]from[/code] to [code]to[/code]. </description> </method> <method name="remove_tab"> - <return type="void"> - </return> - <argument index="0" name="tab_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="tab_idx" type="int" /> <description> Removes the tab at index [code]tab_idx[/code]. </description> </method> <method name="set_select_with_rmb"> - <return type="void"> - </return> - <argument index="0" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enabled" type="bool" /> <description> If [code]true[/code], enables selecting a tab with the right mouse button. </description> </method> <method name="set_tab_disabled"> - <return type="void"> - </return> - <argument index="0" name="tab_idx" type="int"> - </argument> - <argument index="1" name="disabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="tab_idx" type="int" /> + <argument index="1" name="disabled" type="bool" /> <description> If [code]disabled[/code] is [code]false[/code], hides the tab at index [code]tab_idx[/code]. [b]Note:[/b] Its title text will remain unless it is also removed with [method set_tab_title]. </description> </method> <method name="set_tab_icon"> - <return type="void"> - </return> - <argument index="0" name="tab_idx" type="int"> - </argument> - <argument index="1" name="icon" type="Texture2D"> - </argument> + <return type="void" /> + <argument index="0" name="tab_idx" type="int" /> + <argument index="1" name="icon" type="Texture2D" /> <description> Sets an [code]icon[/code] for the tab at index [code]tab_idx[/code]. </description> </method> <method name="set_tab_language"> - <return type="void"> - </return> - <argument index="0" name="tab_idx" type="int"> - </argument> - <argument index="1" name="language" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="tab_idx" type="int" /> + <argument index="1" name="language" type="String" /> <description> Sets language code of tab title used for line-breaking and text shaping algorithms, if left empty current locale is used instead. </description> </method> <method name="set_tab_opentype_feature"> - <return type="void"> - </return> - <argument index="0" name="tab_idx" type="int"> - </argument> - <argument index="1" name="tag" type="String"> - </argument> - <argument index="2" name="values" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="tab_idx" type="int" /> + <argument index="1" name="tag" type="String" /> + <argument index="2" name="values" type="int" /> <description> Sets OpenType feature [code]tag[/code] for the tab title. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. </description> </method> <method name="set_tab_text_direction"> - <return type="void"> - </return> - <argument index="0" name="tab_idx" type="int"> - </argument> - <argument index="1" name="direction" type="int" enum="Control.TextDirection"> - </argument> + <return type="void" /> + <argument index="0" name="tab_idx" type="int" /> + <argument index="1" name="direction" type="int" enum="Control.TextDirection" /> <description> Sets tab title base writing direction. </description> </method> <method name="set_tab_title"> - <return type="void"> - </return> - <argument index="0" name="tab_idx" type="int"> - </argument> - <argument index="1" name="title" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="tab_idx" type="int" /> + <argument index="1" name="title" type="String" /> <description> Sets a [code]title[/code] for the tab at index [code]tab_idx[/code]. </description> </method> <method name="set_tabs_rearrange_group"> - <return type="void"> - </return> - <argument index="0" name="group_id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="group_id" type="int" /> <description> Defines the rearrange group ID. Choose for each [Tabs] the same value to dragging tabs between [Tabs]. Enable drag with [code]set_drag_to_rearrange_enabled(true)[/code]. </description> @@ -275,43 +219,37 @@ </members> <signals> <signal name="reposition_active_tab_request"> - <argument index="0" name="idx_to" type="int"> - </argument> + <argument index="0" name="idx_to" type="int" /> <description> Emitted when the active tab is rearranged via mouse drag. See [member drag_to_rearrange_enabled]. </description> </signal> <signal name="right_button_pressed"> - <argument index="0" name="tab" type="int"> - </argument> + <argument index="0" name="tab" type="int" /> <description> Emitted when a tab is right-clicked. </description> </signal> <signal name="tab_changed"> - <argument index="0" name="tab" type="int"> - </argument> + <argument index="0" name="tab" type="int" /> <description> Emitted when switching to another tab. </description> </signal> <signal name="tab_clicked"> - <argument index="0" name="tab" type="int"> - </argument> + <argument index="0" name="tab" type="int" /> <description> Emitted when a tab is clicked, even if it is the current tab. </description> </signal> <signal name="tab_closed"> - <argument index="0" name="tab" type="int"> - </argument> + <argument index="0" name="tab" type="int" /> <description> Emitted when a tab is closed. </description> </signal> <signal name="tab_hovered"> - <argument index="0" name="tab" type="int"> - </argument> + <argument index="0" name="tab" type="int" /> <description> Emitted when a tab is hovered by the mouse. </description> @@ -344,58 +282,58 @@ </constant> </constants> <theme_items> - <theme_item name="button" type="StyleBox"> + <theme_item name="button" data_type="style" type="StyleBox"> Background of the close button when it's being hovered with the cursor. </theme_item> - <theme_item name="button_pressed" type="StyleBox"> + <theme_item name="button_pressed" data_type="style" type="StyleBox"> Background of the close button when it's being pressed. </theme_item> - <theme_item name="close" type="Texture2D"> + <theme_item name="close" data_type="icon" type="Texture2D"> The icon for the close button (see [member tab_close_display_policy]). </theme_item> - <theme_item name="decrement" type="Texture2D"> + <theme_item name="decrement" data_type="icon" type="Texture2D"> Icon for the left arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the first tab is visible), it appears semi-transparent. </theme_item> - <theme_item name="decrement_highlight" type="Texture2D"> + <theme_item name="decrement_highlight" data_type="icon" type="Texture2D"> Icon for the left arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> The font used to draw tab names. </theme_item> - <theme_item name="font_disabled_color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> + <theme_item name="font_disabled_color" data_type="color" type="Color" default="Color(0.9, 0.9, 0.9, 0.2)"> Font color of disabled tabs. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the tab name. </theme_item> - <theme_item name="font_selected_color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> + <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> Font color of the currently selected tab. </theme_item> - <theme_item name="font_size" type="int"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the tab names. </theme_item> - <theme_item name="font_unselected_color" type="Color" default="Color(0.69, 0.69, 0.69, 1)"> + <theme_item name="font_unselected_color" data_type="color" type="Color" default="Color(0.69, 0.69, 0.69, 1)"> Font color of the other, unselected tabs. </theme_item> - <theme_item name="hseparation" type="int" default="4"> + <theme_item name="hseparation" data_type="constant" type="int" default="4"> The horizontal separation between the tabs. </theme_item> - <theme_item name="increment" type="Texture2D"> + <theme_item name="increment" data_type="icon" type="Texture2D"> Icon for the right arrow button that appears when there are too many tabs to fit in the container width. When the button is disabled (i.e. the last tab is visible) it appears semi-transparent. </theme_item> - <theme_item name="increment_highlight" type="Texture2D"> + <theme_item name="increment_highlight" data_type="icon" type="Texture2D"> Icon for the right arrow button that appears when there are too many tabs to fit in the container width. Used when the button is being hovered with the cursor. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the tab text outline. </theme_item> - <theme_item name="tab_disabled" type="StyleBox"> + <theme_item name="tab_disabled" data_type="style" type="StyleBox"> The style of disabled tabs. </theme_item> - <theme_item name="tab_selected" type="StyleBox"> + <theme_item name="tab_selected" data_type="style" type="StyleBox"> The style of the currently selected tab. </theme_item> - <theme_item name="tab_unselected" type="StyleBox"> + <theme_item name="tab_unselected" data_type="style" type="StyleBox"> The style of the other, unselected tabs. </theme_item> </theme_items> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 5de6c059c3..abb4119584 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -11,696 +11,906 @@ </tutorials> <methods> <method name="_backspace" qualifiers="virtual"> - <return type="void"> - </return> + <return type="void" /> <description> - A virtual method that is called whenever backspace is triggered. + Override this method to define what happens when the user presses the backspace key. + </description> + </method> + <method name="_copy" qualifiers="virtual"> + <return type="void" /> + <description> + Override this method to define what happens when the user performs a copy operation. + </description> + </method> + <method name="_cut" qualifiers="virtual"> + <return type="void" /> + <description> + Override this method to define what happens when the user performs a cut operation. + </description> + </method> + <method name="_handle_unicode_input" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="unicode_char" type="int" /> + <description> + Override this method to define what happens when the types in the provided key [code]unicode[/code]. + </description> + </method> + <method name="_paste" qualifiers="virtual"> + <return type="void" /> + <description> + Override this method to define what happens when the user performs a paste operation. </description> </method> <method name="add_gutter"> - <return type="void"> - </return> - <argument index="0" name="at" type="int" default="-1"> - </argument> + <return type="void" /> + <argument index="0" name="at" type="int" default="-1" /> + <description> + Register a new gutter to this [TextEdit]. Use [code]at[/code] to have a specific gutter order. A value of [code]-1[/code] appends the gutter to the right. + </description> + </method> + <method name="adjust_viewport_to_caret"> + <return type="void" /> <description> + Adjust the viewport so the caret is visible. </description> </method> <method name="backspace"> - <return type="void"> - </return> + <return type="void" /> <description> - Causes the [TextEdit] to perform a backspace. + Called when the user presses the backspace key. Can be overridden with [method _backspace]. </description> </method> - <method name="center_viewport_to_cursor"> - <return type="void"> - </return> + <method name="begin_complex_operation"> + <return type="void" /> <description> - Centers the viewport on the line the editing cursor is at. This also resets the [member scroll_horizontal] value to [code]0[/code]. + Starts a multipart edit. All edits will be treated as one action until [method end_complex_operation] is called. + </description> + </method> + <method name="center_viewport_to_caret"> + <return type="void" /> + <description> + Centers the viewport on the line the editing caret is at. This also resets the [member scroll_horizontal] value to [code]0[/code]. + </description> + </method> + <method name="clear"> + <return type="void" /> + <description> + Performs a full reset of [TextEdit], including undo history. </description> </method> <method name="clear_opentype_features"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all OpenType features. </description> </method> <method name="clear_undo_history"> - <return type="void"> - </return> + <return type="void" /> <description> Clears the undo history. </description> </method> <method name="copy"> - <return type="void"> - </return> + <return type="void" /> <description> - Copy's the current text selection. + Copies the current text selection. Can be overridden with [method _copy]. </description> </method> - <method name="cursor_get_column" qualifiers="const"> - <return type="int"> - </return> + <method name="cut"> + <return type="void" /> <description> - Returns the column the editing cursor is at. + Cut's the current selection. Can be overridden with [method _cut]. </description> </method> - <method name="cursor_get_line" qualifiers="const"> - <return type="int"> - </return> + <method name="delete_selection"> + <return type="void" /> <description> - Returns the line the editing cursor is at. + Deletes the selected text. </description> </method> - <method name="cursor_set_column"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="adjust_viewport" type="bool" default="true"> - </argument> + <method name="deselect"> + <return type="void" /> <description> - Moves the cursor at the specified [code]column[/code] index. - If [code]adjust_viewport[/code] is set to [code]true[/code], the viewport will center at the cursor position after the move occurs. + Deselects the current selection. </description> </method> - <method name="cursor_set_line"> - <return type="void"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <argument index="1" name="adjust_viewport" type="bool" default="true"> - </argument> - <argument index="2" name="can_be_hidden" type="bool" default="true"> - </argument> - <argument index="3" name="wrap_index" type="int" default="0"> - </argument> + <method name="end_complex_operation"> + <return type="void" /> <description> - Moves the cursor at the specified [code]line[/code] index. - If [code]adjust_viewport[/code] is set to [code]true[/code], the viewport will center at the cursor position after the move occurs. - If [code]can_be_hidden[/code] is set to [code]true[/code], the specified [code]line[/code] can be hidden. + Ends a multipart edit, started with [method begin_complex_operation]. If called outside a complex operation, the current operation is pushed onto the undo/redo stack. </description> </method> - <method name="cut"> - <return type="void"> - </return> + <method name="get_caret_column" qualifiers="const"> + <return type="int" /> <description> - Cut's the current selection. + Returns the column the editing caret is at. </description> </method> - <method name="delete_selection"> - <return type="void"> - </return> + <method name="get_caret_draw_pos" qualifiers="const"> + <return type="Vector2" /> <description> + Returns the caret pixel draw position. </description> </method> - <method name="deselect"> - <return type="void"> - </return> + <method name="get_caret_line" qualifiers="const"> + <return type="int" /> <description> - Deselects the current selection. + Returns the line the editing caret is on. </description> </method> - <method name="get_caret_draw_pos" qualifiers="const"> - <return type="Vector2"> - </return> + <method name="get_caret_wrap_index" qualifiers="const"> + <return type="int" /> <description> - Gets the caret pixel draw poistion. + Returns the wrap index the editing caret is on. </description> </method> <method name="get_first_non_whitespace_column" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="line" type="int" /> + <description> + Returns the first column containing a non-whitespace character. + </description> + </method> + <method name="get_first_visible_line" qualifiers="const"> + <return type="int" /> <description> + Returns the first visible line. </description> </method> <method name="get_gutter_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> + Returns the total amount of gutters registered. </description> </method> <method name="get_gutter_name" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="gutter" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="gutter" type="int" /> <description> + Returns the name of the gutter at the given index. </description> </method> <method name="get_gutter_type" qualifiers="const"> - <return type="int" enum="TextEdit.GutterType"> - </return> - <argument index="0" name="gutter" type="int"> - </argument> + <return type="int" enum="TextEdit.GutterType" /> + <argument index="0" name="gutter" type="int" /> <description> + Returns the type of the gutter at the given index. </description> </method> <method name="get_gutter_width" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="gutter" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="gutter" type="int" /> <description> + Returns the width of the gutter at the given index. </description> </method> <method name="get_indent_level" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="line" type="int" /> + <description> + Returns the amount of spaces and [code]tab * tab_size[/code] before the first char. + </description> + </method> + <method name="get_last_full_visible_line" qualifiers="const"> + <return type="int" /> <description> - Returns the indent level of a specific line. + Return the last visible line. Use [method get_last_full_visible_line_wrap_index] for the wrap index. + </description> + </method> + <method name="get_last_full_visible_line_wrap_index" qualifiers="const"> + <return type="int" /> + <description> + Returns the last visible wrap index of the last visible line. + </description> + </method> + <method name="get_last_unhidden_line" qualifiers="const"> + <return type="int" /> + <description> + Returns the last unhidden line in the entire [TextEdit]. </description> </method> <method name="get_line" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="line" type="int" /> <description> Returns the text of a specific line. </description> </method> - <method name="get_line_background_color"> - <return type="Color"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <method name="get_line_background_color" qualifiers="const"> + <return type="Color" /> + <argument index="0" name="line" type="int" /> <description> Returns the current background color of the line. [code]Color(0, 0, 0, 0)[/code] is returned if no color is set. </description> </method> + <method name="get_line_column_at_pos" qualifiers="const"> + <return type="Vector2i" /> + <argument index="0" name="position" type="Vector2i" /> + <description> + Returns the line and column at the given position. In the returned vector, [code]x[/code] is the column, [code]y[/code] is the line. + </description> + </method> <method name="get_line_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the amount of total lines in the text. </description> </method> <method name="get_line_gutter_icon" qualifiers="const"> - <return type="Texture2D"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <argument index="1" name="gutter" type="int"> - </argument> + <return type="Texture2D" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="gutter" type="int" /> <description> + Returns the icon currently in [code]gutter[/code] at [code]line[/code]. </description> </method> - <method name="get_line_gutter_item_color"> - <return type="Color"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <argument index="1" name="gutter" type="int"> - </argument> + <method name="get_line_gutter_item_color" qualifiers="const"> + <return type="Color" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="gutter" type="int" /> <description> + Returns the color currently in [code]gutter[/code] at [code]line[/code]. </description> </method> <method name="get_line_gutter_metadata" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <argument index="1" name="gutter" type="int"> - </argument> + <return type="Variant" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="gutter" type="int" /> <description> + Returns the metadata currently in [code]gutter[/code] at [code]line[/code]. </description> </method> <method name="get_line_gutter_text" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <argument index="1" name="gutter" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="gutter" type="int" /> + <description> + Returns the text currently in [code]gutter[/code] at [code]line[/code]. + </description> + </method> + <method name="get_line_height" qualifiers="const"> + <return type="int" /> + <description> + Returns the height of a largest line. + </description> + </method> + <method name="get_line_width" qualifiers="const"> + <return type="int" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="wrap_index" type="int" default="-1" /> + <description> + Returns the width in pixels of the [code]wrap_index[/code] on [code]line[/code]. + </description> + </method> + <method name="get_line_wrap_count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="line" type="int" /> + <description> + Returns the number of times the given line is wrapped. + </description> + </method> + <method name="get_line_wrap_index_at_column" qualifiers="const"> + <return type="int" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="column" type="int" /> <description> + Returns the wrap index of the given line column. + </description> + </method> + <method name="get_line_wrapped_text" qualifiers="const"> + <return type="PackedStringArray" /> + <argument index="0" name="line" type="int" /> + <description> + Returns an array of [String]s representing each wrapped index. + </description> + </method> + <method name="get_local_mouse_pos" qualifiers="const"> + <return type="Vector2" /> + <description> + Returns the local mouse position adjusted for the text direction. </description> </method> <method name="get_menu" qualifiers="const"> - <return type="PopupMenu"> - </return> + <return type="PopupMenu" /> <description> Returns the [PopupMenu] of this [TextEdit]. By default, this menu is displayed when right-clicking on the [TextEdit]. </description> </method> + <method name="get_minimap_line_at_pos" qualifiers="const"> + <return type="int" /> + <argument index="0" name="position" type="Vector2i" /> + <description> + Returns the equivalent minimap line at [code]position[/code] + </description> + </method> + <method name="get_minimap_visible_lines" qualifiers="const"> + <return type="int" /> + <description> + Returns the total amount of lines that can be draw on the minimap. + </description> + </method> + <method name="get_next_visible_line_index_offset_from" qualifiers="const"> + <return type="Vector2i" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="wrap_index" type="int" /> + <argument index="2" name="visible_amount" type="int" /> + <description> + Similar to [method get_next_visible_line_offset_from], but takes into account the line wrap indexes. In the returned vector, [code]x[/code] is the line, [code]y[/code] is the wrap index. + </description> + </method> + <method name="get_next_visible_line_offset_from" qualifiers="const"> + <return type="int" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="visible_amount" type="int" /> + <description> + Returns the count to the next visible line from [code]line[/code] to [code]line + visible_amount[/code]. Can also count backwards. For example if a [TextEdit] has 5 lines with lines 2 and 3 hidden, calling this with [code]line = 1, visible_amount = 1[/code] would return 3. + </description> + </method> <method name="get_opentype_feature" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="tag" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="tag" type="String" /> <description> Returns OpenType feature [code]tag[/code]. </description> </method> + <method name="get_saved_version" qualifiers="const"> + <return type="int" /> + <description> + Returns the last tagged saved version from [method tag_saved_version] + </description> + </method> + <method name="get_scroll_pos_for_line" qualifiers="const"> + <return type="float" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="wrap_index" type="int" default="0" /> + <description> + Returns the scroll position for [code]wrap_index[/code] of [code]line[/code]. + </description> + </method> + <method name="get_selected_text" qualifiers="const"> + <return type="String" /> + <description> + Returns the text inside the selection. + </description> + </method> <method name="get_selection_column" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> + Returns the original start column of the selection. </description> </method> <method name="get_selection_from_column" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the selection begin column. </description> </method> <method name="get_selection_from_line" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the selection begin line. </description> </method> <method name="get_selection_line" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> + Returns the original start line of the selection. </description> </method> <method name="get_selection_mode" qualifiers="const"> - <return type="int" enum="TextEdit.SelectionMode"> - </return> - <description> - </description> - </method> - <method name="get_selection_text" qualifiers="const"> - <return type="String"> - </return> + <return type="int" enum="TextEdit.SelectionMode" /> <description> - Returns the text inside the selection. + Returns the current selection mode. </description> </method> <method name="get_selection_to_column" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the selection end column. </description> </method> <method name="get_selection_to_line" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the selection end line. </description> </method> <method name="get_tab_size" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the [TextEdit]'s' tab size. </description> </method> + <method name="get_total_gutter_width" qualifiers="const"> + <return type="int" /> + <description> + Returns the total width of all gutters and internal padding. + </description> + </method> + <method name="get_total_visible_line_count" qualifiers="const"> + <return type="int" /> + <description> + Returns the total amount of lines that could be draw. + </description> + </method> + <method name="get_version" qualifiers="const"> + <return type="int" /> + <description> + Returns the current version of the [TextEdit]. The version is a count of recorded operations by the undo/redo history. + </description> + </method> <method name="get_visible_line_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of visible lines, including wrapped text. </description> </method> - <method name="get_word_under_cursor" qualifiers="const"> - <return type="String"> - </return> + <method name="get_word_at_pos" qualifiers="const"> + <return type="String" /> + <argument index="0" name="position" type="Vector2" /> + <description> + Returns the word at [code]position[/code]. + </description> + </method> + <method name="get_word_under_caret" qualifiers="const"> + <return type="String" /> + <description> + Returns a [String] text with the word under the caret's location. + </description> + </method> + <method name="has_ime_text" qualifiers="const"> + <return type="bool" /> + <description> + Returns if the user has IME text. + </description> + </method> + <method name="has_redo" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if a "redo" action is available. + </description> + </method> + <method name="has_selection" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the user has selected text. + </description> + </method> + <method name="has_undo" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if an "undo" action is available. + </description> + </method> + <method name="insert_line_at"> + <return type="void" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="text" type="String" /> <description> - Returns a [String] text with the word under the caret (text cursor) location. + Inserts a new line with [code]text[/code] at [code]line[/code]. </description> </method> - <method name="insert_text_at_cursor"> - <return type="void"> - </return> - <argument index="0" name="text" type="String"> - </argument> + <method name="insert_text_at_caret"> + <return type="void" /> + <argument index="0" name="text" type="String" /> <description> - Insert the specified text at the cursor position. + Insert the specified text at the caret position. </description> </method> <method name="is_caret_visible" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the caret is visible on the screen. </description> </method> + <method name="is_dragging_cursor" qualifiers="const"> + <return type="bool" /> + <description> + Returns [code]true[/code] if the user is dragging their mouse for scrolling or selecting. + </description> + </method> <method name="is_gutter_clickable" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="gutter" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="gutter" type="int" /> <description> + Returns whether the gutter is clickable. </description> </method> <method name="is_gutter_drawn" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="gutter" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="gutter" type="int" /> <description> + Returns whether the gutter is currently drawn. </description> </method> <method name="is_gutter_overwritable" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="gutter" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="gutter" type="int" /> <description> + Returns whether the gutter is overwritable. </description> </method> <method name="is_line_gutter_clickable" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <argument index="1" name="gutter" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="gutter" type="int" /> <description> + Returns whether the gutter on the given line is clickable. </description> </method> - <method name="is_selection_active" qualifiers="const"> - <return type="bool"> - </return> + <method name="is_line_wrapped" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="line" type="int" /> <description> - Returns [code]true[/code] if the selection is active. + Returns if the given line is wrapped. + </description> + </method> + <method name="is_menu_visible" qualifiers="const"> + <return type="bool" /> + <description> + Returns whether the menu is visible. Use this instead of [code]get_menu().visible[/code] to improve performance (so the creation of the menu is avoided). + </description> + </method> + <method name="is_overtype_mode_enabled" qualifiers="const"> + <return type="bool" /> + <description> + Returns whether the user is in overtype mode. </description> </method> <method name="menu_option"> - <return type="void"> - </return> - <argument index="0" name="option" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="option" type="int" /> <description> Triggers a right-click menu action by the specified index. See [enum MenuItems] for a list of available indexes. </description> </method> <method name="merge_gutters"> - <return type="void"> - </return> - <argument index="0" name="from_line" type="int"> - </argument> - <argument index="1" name="to_line" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="from_line" type="int" /> + <argument index="1" name="to_line" type="int" /> <description> + Merge the gutters from [code]from_line[/code] into [code]to_line[/code]. Only overwritable gutters will be copied. </description> </method> <method name="paste"> - <return type="void"> - </return> + <return type="void" /> <description> - Paste the current selection. + Paste at the current location. Can be overridden with [method _paste]. </description> </method> <method name="redo"> - <return type="void"> - </return> + <return type="void" /> <description> Perform redo operation. </description> </method> <method name="remove_gutter"> - <return type="void"> - </return> - <argument index="0" name="gutter" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="gutter" type="int" /> <description> + Removes the gutter from this [TextEdit]. + </description> + </method> + <method name="remove_text"> + <return type="void" /> + <argument index="0" name="from_line" type="int" /> + <argument index="1" name="from_column" type="int" /> + <argument index="2" name="to_line" type="int" /> + <argument index="3" name="to_column" type="int" /> + <description> + Removes text between the given positions. + [b]Note:[/b]This does not adjust the caret or selection, which as a result it can end up in an invalid position. </description> </method> <method name="search" qualifiers="const"> - <return type="Dictionary"> - </return> - <argument index="0" name="key" type="String"> - </argument> - <argument index="1" name="flags" type="int"> - </argument> - <argument index="2" name="from_line" type="int"> - </argument> - <argument index="3" name="from_column" type="int"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="text" type="String" /> + <argument index="1" name="flags" type="int" /> + <argument index="2" name="from_line" type="int" /> + <argument index="3" name="from_colum" type="int" /> <description> Perform a search inside the text. Search flags can be specified in the [enum SearchFlags] enum. - Returns an empty [code]Dictionary[/code] if no result was found. Otherwise, returns a [code]Dictionary[/code] containing [code]line[/code] and [code]column[/code] entries, e.g: + In the returned vector, [code]x[/code] is the column, [code]y[/code] is the line. If no results are found, both are equal to [code]-1[/code]. [codeblocks] [gdscript] var result = search("print", SEARCH_WHOLE_WORDS, 0, 0) - if !result.empty(): + if result.x != -1: # Result found. - var line_number = result.line - var column_number = result.column + var line_number = result.y + var column_number = result.x [/gdscript] [csharp] - int[] result = Search("print", (uint)TextEdit.SearchFlags.WholeWords, 0, 0); + Vector2i result = Search("print", (uint)TextEdit.SearchFlags.WholeWords, 0, 0); if (result.Length > 0) { // Result found. - int lineNumber = result[(int)TextEdit.SearchResult.Line]; - int columnNumber = result[(int)TextEdit.SearchResult.Column]; + int lineNumber = result.y; + int columnNumber = result.x; } [/csharp] [/codeblocks] </description> </method> <method name="select"> - <return type="void"> - </return> - <argument index="0" name="from_line" type="int"> - </argument> - <argument index="1" name="from_column" type="int"> - </argument> - <argument index="2" name="to_line" type="int"> - </argument> - <argument index="3" name="to_column" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="from_line" type="int" /> + <argument index="1" name="from_column" type="int" /> + <argument index="2" name="to_line" type="int" /> + <argument index="3" name="to_column" type="int" /> <description> Perform selection, from line/column to line/column. If [member selecting_enabled] is [code]false[/code], no selection will occur. </description> </method> <method name="select_all"> - <return type="void"> - </return> + <return type="void" /> <description> Select all the text. If [member selecting_enabled] is [code]false[/code], no selection will occur. </description> </method> + <method name="select_word_under_caret"> + <return type="void" /> + <description> + Selects the word under the caret. + </description> + </method> + <method name="set_caret_column"> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="adjust_viewport" type="bool" default="true" /> + <description> + Moves the caret to the specified [code]column[/code] index. + If [code]adjust_viewport[/code] is [code]true[/code], the viewport will center at the caret position after the move occurs. + </description> + </method> + <method name="set_caret_line"> + <return type="void" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="adjust_viewport" type="bool" default="true" /> + <argument index="2" name="can_be_hidden" type="bool" default="true" /> + <argument index="3" name="wrap_index" type="int" default="0" /> + <description> + Moves the caret to the specified [code]line[/code] index. + If [code]adjust_viewport[/code] is [code]true[/code], the viewport will center at the caret position after the move occurs. + If [code]can_be_hidden[/code] is [code]true[/code], the specified [code]line[/code] can be hidden. + </description> + </method> <method name="set_gutter_clickable"> - <return type="void"> - </return> - <argument index="0" name="gutter" type="int"> - </argument> - <argument index="1" name="clickable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="gutter" type="int" /> + <argument index="1" name="clickable" type="bool" /> <description> + Sets the gutter as clickable. This will change the mouse cursor to a pointing hand when hovering over the gutter. </description> </method> <method name="set_gutter_custom_draw"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="object" type="Object"> - </argument> - <argument index="2" name="callback" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="object" type="Object" /> + <argument index="2" name="callback" type="StringName" /> <description> + Set a custom draw method for the gutter. The callback method must take the following args: [code]line: int, gutter: int, Area: Rect2[/code]. </description> </method> <method name="set_gutter_draw"> - <return type="void"> - </return> - <argument index="0" name="gutter" type="int"> - </argument> - <argument index="1" name="draw" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="gutter" type="int" /> + <argument index="1" name="draw" type="bool" /> <description> + Sets whether the gutter should be drawn. </description> </method> <method name="set_gutter_name"> - <return type="void"> - </return> - <argument index="0" name="gutter" type="int"> - </argument> - <argument index="1" name="name" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="gutter" type="int" /> + <argument index="1" name="name" type="String" /> <description> + Sets the name of the gutter. </description> </method> <method name="set_gutter_overwritable"> - <return type="void"> - </return> - <argument index="0" name="gutter" type="int"> - </argument> - <argument index="1" name="overwritable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="gutter" type="int" /> + <argument index="1" name="overwritable" type="bool" /> <description> + Sets the gutter to overwritable. See [method merge_gutters]. </description> </method> <method name="set_gutter_type"> - <return type="void"> - </return> - <argument index="0" name="gutter" type="int"> - </argument> - <argument index="1" name="type" type="int" enum="TextEdit.GutterType"> - </argument> + <return type="void" /> + <argument index="0" name="gutter" type="int" /> + <argument index="1" name="type" type="int" enum="TextEdit.GutterType" /> <description> + Sets the type of gutter. </description> </method> <method name="set_gutter_width"> - <return type="void"> - </return> - <argument index="0" name="gutter" type="int"> - </argument> - <argument index="1" name="width" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="gutter" type="int" /> + <argument index="1" name="width" type="int" /> <description> + Set the width of the gutter. </description> </method> <method name="set_line"> - <return type="void"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <argument index="1" name="new_text" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="new_text" type="String" /> <description> Sets the text for a specific line. </description> </method> + <method name="set_line_as_center_visible"> + <return type="void" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="wrap_index" type="int" default="0" /> + <description> + Positions the [code]wrap_index[/code] of [code]line[/code] at the center of the viewport. + </description> + </method> + <method name="set_line_as_first_visible"> + <return type="void" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="wrap_index" type="int" default="0" /> + <description> + Positions the [code]wrap_index[/code] of [code]line[/code] at the top of the viewport. + </description> + </method> + <method name="set_line_as_last_visible"> + <return type="void" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="wrap_index" type="int" default="0" /> + <description> + Positions the [code]wrap_index[/code] of [code]line[/code] at the bottom of the viewport. + </description> + </method> <method name="set_line_background_color"> - <return type="void"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="color" type="Color" /> <description> Sets the current background color of the line. Set to [code]Color(0, 0, 0, 0)[/code] for no color. </description> </method> <method name="set_line_gutter_clickable"> - <return type="void"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <argument index="1" name="gutter" type="int"> - </argument> - <argument index="2" name="clickable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="gutter" type="int" /> + <argument index="2" name="clickable" type="bool" /> <description> + Sets the [code]gutter[/code] on [code]line[/code] as clickable. </description> </method> <method name="set_line_gutter_icon"> - <return type="void"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <argument index="1" name="gutter" type="int"> - </argument> - <argument index="2" name="icon" type="Texture2D"> - </argument> + <return type="void" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="gutter" type="int" /> + <argument index="2" name="icon" type="Texture2D" /> <description> + Sets the icon for [code]gutter[/code] on [code]line[/code]. </description> </method> <method name="set_line_gutter_item_color"> - <return type="void"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <argument index="1" name="gutter" type="int"> - </argument> - <argument index="2" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="gutter" type="int" /> + <argument index="2" name="color" type="Color" /> <description> + Sets the color for [code]gutter[/code] on [code]line[/code]. </description> </method> <method name="set_line_gutter_metadata"> - <return type="void"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <argument index="1" name="gutter" type="int"> - </argument> - <argument index="2" name="metadata" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="gutter" type="int" /> + <argument index="2" name="metadata" type="Variant" /> <description> + Sets the metadata for [code]gutter[/code] on [code]line[/code]. </description> </method> <method name="set_line_gutter_text"> - <return type="void"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <argument index="1" name="gutter" type="int"> - </argument> - <argument index="2" name="text" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="gutter" type="int" /> + <argument index="2" name="text" type="String" /> <description> + Sets the text for [code]gutter[/code] on [code]line[/code]. </description> </method> <method name="set_opentype_feature"> - <return type="void"> - </return> - <argument index="0" name="tag" type="String"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="tag" type="String" /> + <argument index="1" name="value" type="int" /> <description> Sets OpenType feature [code]tag[/code]. More info: [url=https://docs.microsoft.com/en-us/typography/opentype/spec/featuretags]OpenType feature tags[/url]. </description> </method> + <method name="set_overtype_mode_enabled"> + <return type="void" /> + <argument index="0" name="enabled" type="bool" /> + <description> + If [code]true[/code], sets the user into overtype mode. When the user types in this mode, it will override existing text. + </description> + </method> + <method name="set_search_flags"> + <return type="void" /> + <argument index="0" name="flags" type="int" /> + <description> + Sets the search flags. This is used with [method set_search_text] to highlight occurrences of the searched text. Search flags can be specified from the [enum SearchFlags] enum. + </description> + </method> + <method name="set_search_text"> + <return type="void" /> + <argument index="0" name="search_text" type="String" /> + <description> + Sets the search text. See [method set_search_flags]. + </description> + </method> <method name="set_selection_mode"> - <return type="void"> - </return> - <argument index="0" name="mode" type="int" enum="TextEdit.SelectionMode"> - </argument> - <argument index="1" name="line" type="int" default="-1"> - </argument> - <argument index="2" name="column" type="int" default="-1"> - </argument> + <return type="void" /> + <argument index="0" name="mode" type="int" enum="TextEdit.SelectionMode" /> + <argument index="1" name="line" type="int" default="-1" /> + <argument index="2" name="column" type="int" default="-1" /> <description> + Sets the current selection mode. </description> </method> <method name="set_tab_size"> - <return type="void"> - </return> - <argument index="0" name="size" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="size" type="int" /> <description> Sets the tab size for the [TextEdit] to use. </description> </method> + <method name="set_tooltip_request_func"> + <return type="void" /> + <argument index="0" name="object" type="Object" /> + <argument index="1" name="callback" type="StringName" /> + <argument index="2" name="data" type="Variant" /> + <description> + Provide custom tooltip text. The callback method must take the following args: [code]hovered_word: String, data: Variant[/code] + </description> + </method> + <method name="swap_lines"> + <return type="void" /> + <argument index="0" name="from_line" type="int" /> + <argument index="1" name="to_line" type="int" /> + <description> + Swaps the two lines. + </description> + </method> + <method name="tag_saved_version"> + <return type="void" /> + <description> + Tag the current version as saved. + </description> + </method> <method name="undo"> - <return type="void"> - </return> + <return type="void" /> <description> Perform undo operation. </description> </method> </methods> <members> - <member name="caret_blink" type="bool" setter="cursor_set_blink_enabled" getter="cursor_get_blink_enabled" default="false"> - If [code]true[/code], the caret (visual cursor) blinks. + <member name="caret_blink" type="bool" setter="set_caret_blink_enabled" getter="is_caret_blink_enabled" default="false"> + Sets if the caret should blink. </member> - <member name="caret_blink_speed" type="float" setter="cursor_set_blink_speed" getter="cursor_get_blink_speed" default="0.65"> + <member name="caret_blink_speed" type="float" setter="set_caret_blink_speed" getter="get_caret_blink_speed" default="0.65"> Duration (in seconds) of a caret's blinking cycle. </member> - <member name="caret_block_mode" type="bool" setter="cursor_set_block_mode" getter="cursor_is_block_mode" default="false"> - If [code]true[/code], the caret displays as a rectangle. - If [code]false[/code], the caret displays as a bar. - </member> - <member name="caret_mid_grapheme" type="bool" setter="set_mid_grapheme_caret_enabled" getter="get_mid_grapheme_caret_enabled" default="false"> + <member name="caret_mid_grapheme" type="bool" setter="set_caret_mid_grapheme_enabled" getter="is_caret_mid_grapheme_enabled" default="false"> Allow moving caret, selecting and removing the individual composite character components. Note: [kbd]Backspace[/kbd] is always removing individual composite character components. </member> - <member name="caret_moving_by_right_click" type="bool" setter="set_right_click_moves_caret" getter="is_right_click_moving_caret" default="true"> - If [code]true[/code], a right-click moves the cursor at the mouse position before displaying the context menu. + <member name="caret_move_on_right_click" type="bool" setter="set_move_caret_on_right_click_enabled" getter="is_move_caret_on_right_click_enabled" default="true"> + If [code]true[/code], a right-click moves the caret at the mouse position before displaying the context menu. If [code]false[/code], the context menu disregards mouse location. </member> + <member name="caret_type" type="int" setter="set_caret_type" getter="get_caret_type" enum="TextEdit.CaretType" default="0"> + Set the type of caret to draw. + </member> <member name="context_menu_enabled" type="bool" setter="set_context_menu_enabled" getter="is_context_menu_enabled" default="true"> If [code]true[/code], a right-click displays the context menu. </member> @@ -713,6 +923,9 @@ <member name="draw_tabs" type="bool" setter="set_draw_tabs" getter="is_drawing_tabs" default="false"> If [code]true[/code], the "tab" character will have a visible representation. </member> + <member name="editable" type="bool" setter="set_editable" getter="is_editable" default="true"> + If [code]false[/code], existing text cannot be modified and new text cannot be added. + </member> <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" /> <member name="highlight_all_occurrences" type="bool" setter="set_highlight_all_occurrences" getter="is_highlight_all_occurrences_enabled" default="false"> If [code]true[/code], all occurrences of the selected text will be highlighted. @@ -733,12 +946,18 @@ <member name="override_selected_font_color" type="bool" setter="set_override_selected_font_color" getter="is_overriding_selected_font_color" default="false"> If [code]true[/code], custom [code]font_selected_color[/code] will be used for selected text. </member> - <member name="readonly" type="bool" setter="set_readonly" getter="is_readonly" default="false"> - If [code]true[/code], read-only mode is enabled. Existing text cannot be modified and new text cannot be added. - </member> <member name="scroll_horizontal" type="int" setter="set_h_scroll" getter="get_h_scroll" default="0"> If there is a horizontal scrollbar, this determines the current horizontal scroll value in pixels. </member> + <member name="scroll_past_end_of_file" type="bool" setter="set_scroll_past_end_of_file_enabled" getter="is_scroll_past_end_of_file_enabled" default="false"> + Allow scrolling past the last line into "virtual" space. + </member> + <member name="scroll_smooth" type="bool" setter="set_smooth_scroll_enable" getter="is_smooth_scroll_enabled" default="false"> + Scroll smoothly over the text rather then jumping to the next location. + </member> + <member name="scroll_v_scroll_speed" type="float" setter="set_v_scroll_speed" getter="get_v_scroll_speed" default="80.0"> + Sets the scroll speed with the minimap or when [member scroll_smooth] is enabled. + </member> <member name="scroll_vertical" type="float" setter="set_v_scroll" getter="get_v_scroll" default="0.0"> If there is a vertical scrollbar, this determines the current vertical scroll value in line numbers, starting at 0 for the top line. </member> @@ -749,9 +968,6 @@ <member name="shortcut_keys_enabled" type="bool" setter="set_shortcut_keys_enabled" getter="is_shortcut_keys_enabled" default="true"> If [code]true[/code], shortcut keys for context menu items are enabled, even if the context menu is disabled. </member> - <member name="smooth_scrolling" type="bool" setter="set_smooth_scroll_enable" getter="is_smooth_scroll_enabled" default="false"> - If [code]true[/code], sets the [code]step[/code] of the scrollbars to [code]0.25[/code] which results in smoother scrolling. - </member> <member name="structured_text_bidi_override" type="int" setter="set_structured_text_bidi_override" getter="get_structured_text_bidi_override" enum="Control.StructuredTextParser" default="0"> Set BiDi algorithm override for the structured text. </member> @@ -767,94 +983,56 @@ <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0"> Base text writing direction. </member> - <member name="v_scroll_speed" type="float" setter="set_v_scroll_speed" getter="get_v_scroll_speed" default="80.0"> - Vertical scroll sensitivity. - </member> <member name="virtual_keyboard_enabled" type="bool" setter="set_virtual_keyboard_enabled" getter="is_virtual_keyboard_enabled" default="true"> If [code]true[/code], the native virtual keyboard is shown when focused on platforms that support it. </member> - <member name="wrap_enabled" type="bool" setter="set_wrap_enabled" getter="is_wrap_enabled" default="false"> - If [code]true[/code], enables text wrapping when it goes beyond the edge of what is visible. + <member name="wrap_mode" type="int" setter="set_line_wrapping_mode" getter="get_line_wrapping_mode" enum="TextEdit.LineWrappingMode" default="0"> + Sets the line wrapping mode to use. </member> </members> <signals> - <signal name="cursor_changed"> + <signal name="caret_changed"> <description> - Emitted when the cursor changes. + Emitted when the caret changes position. </description> </signal> <signal name="gutter_added"> <description> + Emitted when a gutter is added. </description> </signal> <signal name="gutter_clicked"> - <argument index="0" name="line" type="int"> - </argument> - <argument index="1" name="gutter" type="int"> - </argument> + <argument index="0" name="line" type="int" /> + <argument index="1" name="gutter" type="int" /> <description> + Emitted when a gutter is clicked. </description> </signal> <signal name="gutter_removed"> <description> + Emitted when a gutter is removed. </description> </signal> <signal name="lines_edited_from"> - <argument index="0" name="from_line" type="int"> - </argument> - <argument index="1" name="to_line" type="int"> - </argument> + <argument index="0" name="from_line" type="int" /> + <argument index="1" name="to_line" type="int" /> <description> + Emitted immediately when the text changes. + When text is added [code]from_line[/code] will be less then [code]to_line[/code]. On a remove [code]to_line[/code] will be less then [code]from_line[/code]. </description> </signal> - <signal name="symbol_lookup"> - <argument index="0" name="symbol" type="String"> - </argument> - <argument index="1" name="row" type="int"> - </argument> - <argument index="2" name="column" type="int"> - </argument> - <description> - </description> - </signal> - <signal name="symbol_validate"> - <argument index="0" name="symbol" type="String"> - </argument> + <signal name="text_changed"> <description> + Emitted when the text changes. </description> </signal> - <signal name="text_changed"> + <signal name="text_set"> <description> - Emitted when the text changes. + Emitted when [method clear] is called or [member text] is set. </description> </signal> </signals> <constants> - <constant name="SEARCH_MATCH_CASE" value="1" enum="SearchFlags"> - Match case when searching. - </constant> - <constant name="SEARCH_WHOLE_WORDS" value="2" enum="SearchFlags"> - Match whole words when searching. - </constant> - <constant name="SEARCH_BACKWARDS" value="4" enum="SearchFlags"> - Search from end to beginning. - </constant> - <constant name="SELECTION_MODE_NONE" value="0" enum="SelectionMode"> - </constant> - <constant name="SELECTION_MODE_SHIFT" value="1" enum="SelectionMode"> - </constant> - <constant name="SELECTION_MODE_POINTER" value="2" enum="SelectionMode"> - </constant> - <constant name="SELECTION_MODE_WORD" value="3" enum="SelectionMode"> - </constant> - <constant name="SELECTION_MODE_LINE" value="4" enum="SelectionMode"> - </constant> - <constant name="GUTTER_TYPE_STRING" value="0" enum="GutterType"> - </constant> - <constant name="GUTTER_TPYE_ICON" value="1" enum="GutterType"> - </constant> - <constant name="GUTTER_TPYE_CUSTOM" value="2" enum="GutterType"> - </constant> <constant name="MENU_CUT" value="0" enum="MenuItems"> Cuts (copies and clears) the selected text. </constant> @@ -942,61 +1120,108 @@ <constant name="MENU_MAX" value="28" enum="MenuItems"> Represents the size of the [enum MenuItems] enum. </constant> + <constant name="SEARCH_MATCH_CASE" value="1" enum="SearchFlags"> + Match case when searching. + </constant> + <constant name="SEARCH_WHOLE_WORDS" value="2" enum="SearchFlags"> + Match whole words when searching. + </constant> + <constant name="SEARCH_BACKWARDS" value="4" enum="SearchFlags"> + Search from end to beginning. + </constant> + <constant name="CARET_TYPE_LINE" value="0" enum="CaretType"> + Vertical line caret. + </constant> + <constant name="CARET_TYPE_BLOCK" value="1" enum="CaretType"> + Block caret. + </constant> + <constant name="SELECTION_MODE_NONE" value="0" enum="SelectionMode"> + Not selecting. + </constant> + <constant name="SELECTION_MODE_SHIFT" value="1" enum="SelectionMode"> + Select as if [code]shift[/code] is pressed. + </constant> + <constant name="SELECTION_MODE_POINTER" value="2" enum="SelectionMode"> + Select single characters as if the user single clicked. + </constant> + <constant name="SELECTION_MODE_WORD" value="3" enum="SelectionMode"> + Select whole words as if the user double clicked. + </constant> + <constant name="SELECTION_MODE_LINE" value="4" enum="SelectionMode"> + Select whole lines as if the user tripped clicked. + </constant> + <constant name="LINE_WRAPPING_NONE" value="0" enum="LineWrappingMode"> + Line wrapping is disabled. + </constant> + <constant name="LINE_WRAPPING_BOUNDARY" value="1" enum="LineWrappingMode"> + Line wrapping occurs at the control boundary, beyond what would normally be visible. + </constant> + <constant name="GUTTER_TYPE_STRING" value="0" enum="GutterType"> + Draw a string. + </constant> + <constant name="GUTTER_TYPE_ICON" value="1" enum="GutterType"> + Draw an icon. + </constant> + <constant name="GUTTER_TYPE_CUSTOM" value="2" enum="GutterType"> + Custom draw. + </constant> </constants> <theme_items> - <theme_item name="background_color" type="Color" default="Color(0, 0, 0, 0)"> + <theme_item name="background_color" data_type="color" type="Color" default="Color(0, 0, 0, 0)"> Sets the background [Color] of this [TextEdit]. </theme_item> - <theme_item name="brace_mismatch_color" type="Color" default="Color(1, 0.2, 0.2, 1)"> - </theme_item> - <theme_item name="caret_background_color" type="Color" default="Color(0, 0, 0, 1)"> + <theme_item name="caret_background_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> + [Color] of the text behind the caret when using a block caret. </theme_item> - <theme_item name="caret_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="caret_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + [Color] of the caret. </theme_item> - <theme_item name="current_line_color" type="Color" default="Color(0.25, 0.25, 0.26, 0.8)"> - Sets the [Color] of the breakpoints. [member breakpoint_gutter] has to be enabled. + <theme_item name="current_line_color" data_type="color" type="Color" default="Color(0.25, 0.25, 0.26, 0.8)"> + Background [Color] of the line containing the caret. </theme_item> - <theme_item name="focus" type="StyleBox"> + <theme_item name="focus" data_type="style" type="StyleBox"> + Sets the [StyleBox] when in focus. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> Sets the default [Font]. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> Sets the font [Color]. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the [TextEdit]. </theme_item> - <theme_item name="font_readonly_color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)"> + <theme_item name="font_readonly_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 0.5)"> + Sets the font [Color] when [member editable] is disabled. </theme_item> - <theme_item name="font_selected_color" type="Color" default="Color(0, 0, 0, 1)"> + <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> Sets the [Color] of the selected text. [member override_selected_font_color] has to be enabled. </theme_item> - <theme_item name="font_size" type="int"> + <theme_item name="font_size" data_type="font_size" type="int"> Sets default font size. </theme_item> - <theme_item name="line_spacing" type="int" default="4"> + <theme_item name="line_spacing" data_type="constant" type="int" default="4"> Sets the spacing between the lines. </theme_item> - <theme_item name="normal" type="StyleBox"> + <theme_item name="normal" data_type="style" type="StyleBox"> Sets the [StyleBox] of this [TextEdit]. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. </theme_item> - <theme_item name="read_only" type="StyleBox"> - Sets the [StyleBox] of this [TextEdit] when [member readonly] is enabled. + <theme_item name="read_only" data_type="style" type="StyleBox"> + Sets the [StyleBox] of this [TextEdit] when [member editable] is disabled. </theme_item> - <theme_item name="selection_color" type="Color" default="Color(0.49, 0.49, 0.49, 1)"> + <theme_item name="selection_color" data_type="color" type="Color" default="Color(0.49, 0.49, 0.49, 1)"> Sets the highlight [Color] of text selections. </theme_item> - <theme_item name="space" type="Texture2D"> + <theme_item name="space" data_type="icon" type="Texture2D"> Sets a custom [Texture2D] for space text characters. </theme_item> - <theme_item name="tab" type="Texture2D"> + <theme_item name="tab" data_type="icon" type="Texture2D"> Sets a custom [Texture2D] for tab text characters. </theme_item> - <theme_item name="word_highlighted_color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)"> + <theme_item name="word_highlighted_color" data_type="color" type="Color" default="Color(0.8, 0.9, 0.9, 0.15)"> Sets the highlight [Color] of multiple occurrences. [member highlight_all_occurrences] has to be enabled. </theme_item> </theme_items> diff --git a/doc/classes/TextLine.xml b/doc/classes/TextLine.xml index 318c3be794..598d0fb859 100644 --- a/doc/classes/TextLine.xml +++ b/doc/classes/TextLine.xml @@ -10,175 +10,134 @@ </tutorials> <methods> <method name="add_object"> - <return type="bool"> - </return> - <argument index="0" name="key" type="Variant"> - </argument> - <argument index="1" name="size" type="Vector2"> - </argument> - <argument index="2" name="inline_align" type="int" enum="VAlign" default="1"> - </argument> - <argument index="3" name="length" type="int" default="1"> - </argument> + <return type="bool" /> + <argument index="0" name="key" type="Variant" /> + <argument index="1" name="size" type="Vector2" /> + <argument index="2" name="inline_align" type="int" enum="InlineAlign" default="5" /> + <argument index="3" name="length" type="int" default="1" /> <description> Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters. </description> </method> <method name="add_string"> - <return type="bool"> - </return> - <argument index="0" name="text" type="String"> - </argument> - <argument index="1" name="fonts" type="Font"> - </argument> - <argument index="2" name="size" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="text" type="String" /> + <argument index="1" name="fonts" type="Font" /> + <argument index="2" name="size" type="int" /> <argument index="3" name="opentype_features" type="Dictionary" default="{ -}"> - </argument> - <argument index="4" name="language" type="String" default=""""> - </argument> +}" /> + <argument index="4" name="language" type="String" default="""" /> <description> Adds text span and font to draw it. </description> </method> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> Clears text line (removes text and inline objects). </description> </method> <method name="draw" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="canvas" type="RID"> - </argument> - <argument index="1" name="pos" type="Vector2"> - </argument> - <argument index="2" name="color" type="Color" default="Color(1, 1, 1, 1)"> - </argument> + <return type="void" /> + <argument index="0" name="canvas" type="RID" /> + <argument index="1" name="pos" type="Vector2" /> + <argument index="2" name="color" type="Color" default="Color(1, 1, 1, 1)" /> <description> Draw text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box. </description> </method> <method name="draw_outline" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="canvas" type="RID"> - </argument> - <argument index="1" name="pos" type="Vector2"> - </argument> - <argument index="2" name="outline_size" type="int" default="1"> - </argument> - <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)"> - </argument> + <return type="void" /> + <argument index="0" name="canvas" type="RID" /> + <argument index="1" name="pos" type="Vector2" /> + <argument index="2" name="outline_size" type="int" default="1" /> + <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" /> <description> Draw text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box. </description> </method> <method name="get_line_ascent" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical). </description> </method> <method name="get_line_descent" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical). </description> </method> <method name="get_line_underline_position" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns pixel offset of the underline below the baseline. </description> </method> <method name="get_line_underline_thickness" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns thickness of the underline. </description> </method> <method name="get_line_width" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns width (for horizontal layout) or height (for vertical) of the text. </description> </method> <method name="get_object_rect" qualifiers="const"> - <return type="Rect2"> - </return> - <argument index="0" name="key" type="Variant"> - </argument> + <return type="Rect2" /> + <argument index="0" name="key" type="Variant" /> <description> Returns bounding rectangle of the inline object. </description> </method> <method name="get_objects" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns array of inline objects. </description> </method> <method name="get_rid" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> Returns TextServer buffer RID. </description> </method> <method name="get_size" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns size of the bounding box of the text. </description> </method> <method name="hit_test" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="coords" type="float"> - </argument> + <return type="int" /> + <argument index="0" name="coords" type="float" /> <description> Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position. </description> </method> <method name="resize_object"> - <return type="bool"> - </return> - <argument index="0" name="key" type="Variant"> - </argument> - <argument index="1" name="size" type="Vector2"> - </argument> - <argument index="2" name="inline_align" type="int" enum="VAlign" default="1"> - </argument> + <return type="bool" /> + <argument index="0" name="key" type="Variant" /> + <argument index="1" name="size" type="Vector2" /> + <argument index="2" name="inline_align" type="int" enum="InlineAlign" default="5" /> <description> Sets new size and alignment of embedded object. </description> </method> <method name="set_bidi_override"> - <return type="void"> - </return> - <argument index="0" name="override" type="Array"> - </argument> + <return type="void" /> + <argument index="0" name="override" type="Array" /> <description> Overrides BiDi for the structured text. Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately. </description> </method> <method name="tab_align"> - <return type="void"> - </return> - <argument index="0" name="tab_stops" type="PackedFloat32Array"> - </argument> + <return type="void" /> + <argument index="0" name="tab_stops" type="PackedFloat32Array" /> <description> Aligns text to the given tab-stops. </description> @@ -203,10 +162,28 @@ <member name="preserve_invalid" type="bool" setter="set_preserve_invalid" getter="get_preserve_invalid" default="true"> If set to [code]true[/code] text will display invalid characters. </member> + <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextLine.OverrunBehavior" default="3"> + Sets the clipping behavior when the text exceeds the text line's set width. See [enum OverrunBehavior] for a description of all modes. + </member> <member name="width" type="float" setter="set_width" getter="get_width" default="-1.0"> Text line width. </member> </members> <constants> + <constant name="OVERRUN_NO_TRIMMING" value="0" enum="OverrunBehavior"> + No text trimming is performed. + </constant> + <constant name="OVERRUN_TRIM_CHAR" value="1" enum="OverrunBehavior"> + Trims the text per character. + </constant> + <constant name="OVERRUN_TRIM_WORD" value="2" enum="OverrunBehavior"> + Trims the text per word. + </constant> + <constant name="OVERRUN_TRIM_ELLIPSIS" value="3" enum="OverrunBehavior"> + Trims the text per character and adds an ellipsis to indicate that parts are hidden. + </constant> + <constant name="OVERRUN_TRIM_WORD_ELLIPSIS" value="4" enum="OverrunBehavior"> + Trims the text per word and adds an ellipsis to indicate that parts are hidden. + </constant> </constants> </class> diff --git a/doc/classes/TextParagraph.xml b/doc/classes/TextParagraph.xml index d67a9bcb85..aa35acdbd2 100644 --- a/doc/classes/TextParagraph.xml +++ b/doc/classes/TextParagraph.xml @@ -10,356 +10,265 @@ </tutorials> <methods> <method name="add_object"> - <return type="bool"> - </return> - <argument index="0" name="key" type="Variant"> - </argument> - <argument index="1" name="size" type="Vector2"> - </argument> - <argument index="2" name="inline_align" type="int" enum="VAlign" default="1"> - </argument> - <argument index="3" name="length" type="int" default="1"> - </argument> + <return type="bool" /> + <argument index="0" name="key" type="Variant" /> + <argument index="1" name="size" type="Vector2" /> + <argument index="2" name="inline_align" type="int" enum="InlineAlign" default="5" /> + <argument index="3" name="length" type="int" default="1" /> <description> Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters. </description> </method> <method name="add_string"> - <return type="bool"> - </return> - <argument index="0" name="text" type="String"> - </argument> - <argument index="1" name="fonts" type="Font"> - </argument> - <argument index="2" name="size" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="text" type="String" /> + <argument index="1" name="fonts" type="Font" /> + <argument index="2" name="size" type="int" /> <argument index="3" name="opentype_features" type="Dictionary" default="{ -}"> - </argument> - <argument index="4" name="language" type="String" default=""""> - </argument> +}" /> + <argument index="4" name="language" type="String" default="""" /> <description> Adds text span and font to draw it. </description> </method> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> Clears text paragraph (removes text and inline objects). </description> </method> <method name="clear_dropcap"> - <return type="void"> - </return> + <return type="void" /> <description> Removes dropcap. </description> </method> <method name="draw" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="canvas" type="RID"> - </argument> - <argument index="1" name="pos" type="Vector2"> - </argument> - <argument index="2" name="color" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <argument index="3" name="dc_color" type="Color" default="Color(1, 1, 1, 1)"> - </argument> + <return type="void" /> + <argument index="0" name="canvas" type="RID" /> + <argument index="1" name="pos" type="Vector2" /> + <argument index="2" name="color" type="Color" default="Color(1, 1, 1, 1)" /> + <argument index="3" name="dc_color" type="Color" default="Color(1, 1, 1, 1)" /> <description> Draw all lines of the text and drop cap into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box. </description> </method> <method name="draw_dropcap" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="canvas" type="RID"> - </argument> - <argument index="1" name="pos" type="Vector2"> - </argument> - <argument index="2" name="color" type="Color" default="Color(1, 1, 1, 1)"> - </argument> + <return type="void" /> + <argument index="0" name="canvas" type="RID" /> + <argument index="1" name="pos" type="Vector2" /> + <argument index="2" name="color" type="Color" default="Color(1, 1, 1, 1)" /> <description> Draw drop cap into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box. </description> </method> <method name="draw_dropcap_outline" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="canvas" type="RID"> - </argument> - <argument index="1" name="pos" type="Vector2"> - </argument> - <argument index="2" name="outline_size" type="int" default="1"> - </argument> - <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)"> - </argument> + <return type="void" /> + <argument index="0" name="canvas" type="RID" /> + <argument index="1" name="pos" type="Vector2" /> + <argument index="2" name="outline_size" type="int" default="1" /> + <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" /> <description> Draw drop cap outline into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box. </description> </method> <method name="draw_line" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="canvas" type="RID"> - </argument> - <argument index="1" name="pos" type="Vector2"> - </argument> - <argument index="2" name="line" type="int"> - </argument> - <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)"> - </argument> + <return type="void" /> + <argument index="0" name="canvas" type="RID" /> + <argument index="1" name="pos" type="Vector2" /> + <argument index="2" name="line" type="int" /> + <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" /> <description> Draw single line of text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box. </description> </method> <method name="draw_line_outline" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="canvas" type="RID"> - </argument> - <argument index="1" name="pos" type="Vector2"> - </argument> - <argument index="2" name="line" type="int"> - </argument> - <argument index="3" name="outline_size" type="int" default="1"> - </argument> - <argument index="4" name="color" type="Color" default="Color(1, 1, 1, 1)"> - </argument> + <return type="void" /> + <argument index="0" name="canvas" type="RID" /> + <argument index="1" name="pos" type="Vector2" /> + <argument index="2" name="line" type="int" /> + <argument index="3" name="outline_size" type="int" default="1" /> + <argument index="4" name="color" type="Color" default="Color(1, 1, 1, 1)" /> <description> Draw outline of the single line of text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box. </description> </method> <method name="draw_outline" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="canvas" type="RID"> - </argument> - <argument index="1" name="pos" type="Vector2"> - </argument> - <argument index="2" name="outline_size" type="int" default="1"> - </argument> - <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <argument index="4" name="dc_color" type="Color" default="Color(1, 1, 1, 1)"> - </argument> + <return type="void" /> + <argument index="0" name="canvas" type="RID" /> + <argument index="1" name="pos" type="Vector2" /> + <argument index="2" name="outline_size" type="int" default="1" /> + <argument index="3" name="color" type="Color" default="Color(1, 1, 1, 1)" /> + <argument index="4" name="dc_color" type="Color" default="Color(1, 1, 1, 1)" /> <description> Draw outlines of all lines of the text and drop cap into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the top left corner of the bounding box. </description> </method> <method name="get_dropcap_lines" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns number of lines used by dropcap. </description> </method> <method name="get_dropcap_rid" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> Return drop cap text buffer RID. </description> </method> <method name="get_dropcap_size" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns drop cap bounding box size. </description> </method> <method name="get_line_ascent" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="line" type="int" /> <description> Returns the text line ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical). </description> </method> <method name="get_line_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns number of lines in the paragraph. </description> </method> <method name="get_line_descent" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="line" type="int" /> <description> Returns the text line descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical). </description> </method> <method name="get_line_object_rect" qualifiers="const"> - <return type="Rect2"> - </return> - <argument index="0" name="line" type="int"> - </argument> - <argument index="1" name="key" type="Variant"> - </argument> + <return type="Rect2" /> + <argument index="0" name="line" type="int" /> + <argument index="1" name="key" type="Variant" /> <description> Returns bounding rectangle of the inline object. </description> </method> <method name="get_line_objects" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="Array" /> + <argument index="0" name="line" type="int" /> <description> Returns array of inline objects in the line. </description> </method> <method name="get_line_range" qualifiers="const"> - <return type="Vector2i"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="line" type="int" /> <description> Returns character range of the line. </description> </method> <method name="get_line_rid" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="RID" /> + <argument index="0" name="line" type="int" /> <description> Returns TextServer line buffer RID. </description> </method> <method name="get_line_size" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="line" type="int" /> <description> Returns size of the bounding box of the line of text. </description> </method> <method name="get_line_underline_position" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="line" type="int" /> <description> Returns pixel offset of the underline below the baseline. </description> </method> <method name="get_line_underline_thickness" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="line" type="int" /> <description> Returns thickness of the underline. </description> </method> <method name="get_line_width" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="line" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="line" type="int" /> <description> Returns width (for horizontal layout) or height (for vertical) of the line of text. </description> </method> <method name="get_non_wraped_size" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the size of the bounding box of the paragraph, without line breaks. </description> </method> <method name="get_rid" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> Returns TextServer full string buffer RID. </description> </method> <method name="get_size" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the size of the bounding box of the paragraph. </description> </method> <method name="get_spacing_bottom" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> - Returns extra spacing at the bottom of the line. See [member Font.extra_spacing_bottom]. + Returns extra spacing at the bottom of the line. See [member Font.spacing_bottom]. </description> </method> <method name="get_spacing_top" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> - Returns extra spacing at the top of the line. See [member Font.extra_spacing_top]. + Returns extra spacing at the top of the line. See [member Font.spacing_top]. </description> </method> <method name="hit_test" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="coords" type="Vector2"> - </argument> + <return type="int" /> + <argument index="0" name="coords" type="Vector2" /> <description> Returns caret character offset at the specified coordinates. This function always returns a valid position. </description> </method> <method name="resize_object"> - <return type="bool"> - </return> - <argument index="0" name="key" type="Variant"> - </argument> - <argument index="1" name="size" type="Vector2"> - </argument> - <argument index="2" name="inline_align" type="int" enum="VAlign" default="1"> - </argument> + <return type="bool" /> + <argument index="0" name="key" type="Variant" /> + <argument index="1" name="size" type="Vector2" /> + <argument index="2" name="inline_align" type="int" enum="InlineAlign" default="5" /> <description> Sets new size and alignment of embedded object. </description> </method> <method name="set_bidi_override"> - <return type="void"> - </return> - <argument index="0" name="override" type="Array"> - </argument> + <return type="void" /> + <argument index="0" name="override" type="Array" /> <description> Overrides BiDi for the structured text. Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately. </description> </method> <method name="set_dropcap"> - <return type="bool"> - </return> - <argument index="0" name="text" type="String"> - </argument> - <argument index="1" name="fonts" type="Font"> - </argument> - <argument index="2" name="size" type="int"> - </argument> - <argument index="3" name="dropcap_margins" type="Rect2" default="Rect2(0, 0, 0, 0)"> - </argument> + <return type="bool" /> + <argument index="0" name="text" type="String" /> + <argument index="1" name="fonts" type="Font" /> + <argument index="2" name="size" type="int" /> + <argument index="3" name="dropcap_margins" type="Rect2" default="Rect2(0, 0, 0, 0)" /> <argument index="4" name="opentype_features" type="Dictionary" default="{ -}"> - </argument> - <argument index="5" name="language" type="String" default=""""> - </argument> +}" /> + <argument index="5" name="language" type="String" default="""" /> <description> Sets drop cap, overrides previously set drop cap. Drop cap (dropped capital) is a decorative element at the beginning of a paragraph that is larger than the rest of the text. </description> </method> <method name="tab_align"> - <return type="void"> - </return> - <argument index="0" name="tab_stops" type="PackedFloat32Array"> - </argument> + <return type="void" /> + <argument index="0" name="tab_stops" type="PackedFloat32Array" /> <description> Aligns paragraph to the given tab-stops. </description> @@ -375,6 +284,9 @@ <member name="flags" type="int" setter="set_flags" getter="get_flags" default="51"> Line breaking and alignment rules. For more info see [TextServer]. </member> + <member name="max_lines_visible" type="int" setter="set_max_lines_visible" getter="get_max_lines_visible" default="-1"> + Limits the lines of text shown. + </member> <member name="orientation" type="int" setter="set_orientation" getter="get_orientation" enum="TextServer.Orientation" default="0"> Text orientation. </member> @@ -384,10 +296,28 @@ <member name="preserve_invalid" type="bool" setter="set_preserve_invalid" getter="get_preserve_invalid" default="true"> If set to [code]true[/code] text will display invalid characters. </member> + <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="TextParagraph.OverrunBehavior" default="0"> + Sets the clipping behavior when the text exceeds the paragraph's set width. See [enum OverrunBehavior] for a description of all modes. + </member> <member name="width" type="float" setter="set_width" getter="get_width" default="-1.0"> Paragraph width. </member> </members> <constants> + <constant name="OVERRUN_NO_TRIMMING" value="0" enum="OverrunBehavior"> + No text trimming is performed. + </constant> + <constant name="OVERRUN_TRIM_CHAR" value="1" enum="OverrunBehavior"> + Trims the text per character. + </constant> + <constant name="OVERRUN_TRIM_WORD" value="2" enum="OverrunBehavior"> + Trims the text per word. + </constant> + <constant name="OVERRUN_TRIM_ELLIPSIS" value="3" enum="OverrunBehavior"> + Trims the text per character and adds an ellipsis to indicate that parts are hidden. + </constant> + <constant name="OVERRUN_TRIM_WORD_ELLIPSIS" value="4" enum="OverrunBehavior"> + Trims the text per word and adds an ellipsis to indicate that parts are hidden. + </constant> </constants> </class> diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index c943946ab3..d7af2204cf 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -9,65 +9,16 @@ <tutorials> </tutorials> <methods> - <method name="create_font_bitmap"> - <return type="RID"> - </return> - <argument index="0" name="height" type="float"> - </argument> - <argument index="1" name="ascent" type="float"> - </argument> - <argument index="2" name="base_size" type="int"> - </argument> - <description> - Creates new, empty bitmap font. To free the resulting font, use [method free_rid] method. - </description> - </method> - <method name="create_font_memory"> - <return type="RID"> - </return> - <argument index="0" name="data" type="PackedByteArray"> - </argument> - <argument index="1" name="type" type="String"> - </argument> - <argument index="2" name="base_size" type="int" default="16"> - </argument> - <description> - Creates new font from the data in memory. To free the resulting font, use [method free_rid] method. - Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method font_get_base_size] to check actual font size. - </description> - </method> - <method name="create_font_resource"> - <return type="RID"> - </return> - <argument index="0" name="filename" type="String"> - </argument> - <argument index="1" name="base_size" type="int" default="16"> - </argument> - <description> - Creates new font from the file. To free the resulting font, use [method free_rid] method. - Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method font_get_base_size] to check actual font size. - </description> - </method> - <method name="create_font_system"> - <return type="RID"> - </return> - <argument index="0" name="name" type="String"> - </argument> - <argument index="1" name="base_size" type="int" default="16"> - </argument> - <description> - Creates new font from the system font. To free the resulting font, use [method free_rid] method. - Note: This method is supported by servers with the [code]FEATURE_FONT_SYSTEM[/code] feature. - Note: For non-scalable fonts [code]base_size[/code] is ignored, use [method font_get_base_size] to check actual font size. + <method name="create_font"> + <return type="RID" /> + <description> + Creates new, empty font cache entry resource. To free the resulting resourec, use [method free_rid] method. </description> </method> <method name="create_shaped_text"> - <return type="RID"> - </return> - <argument index="0" name="direction" type="int" enum="TextServer.Direction" default="0"> - </argument> - <argument index="1" name="orientation" type="int" enum="TextServer.Orientation" default="0"> - </argument> + <return type="RID" /> + <argument index="0" name="direction" type="int" enum="TextServer.Direction" default="0" /> + <argument index="1" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> <description> Creates new buffer for complex text layout, with the given [code]direction[/code] and [code]orientation[/code]. To free the resulting buffer, use [method free_rid] method. Note: Direction is ignored if server does not support [code]FEATURE_BIDI_LAYOUT[/code] feature. @@ -75,1142 +26,1138 @@ </description> </method> <method name="draw_hex_code_box" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="canvas" type="RID"> - </argument> - <argument index="1" name="size" type="int"> - </argument> - <argument index="2" name="pos" type="Vector2"> - </argument> - <argument index="3" name="index" type="int"> - </argument> - <argument index="4" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="canvas" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="pos" type="Vector2" /> + <argument index="3" name="index" type="int" /> + <argument index="4" name="color" type="Color" /> <description> Draws box displaying character hexadecimal code. Used for replacing missing characters. </description> </method> - <method name="font_bitmap_add_char"> - <return type="void"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="char" type="int"> - </argument> - <argument index="2" name="texture_idx" type="int"> - </argument> - <argument index="3" name="rect" type="Rect2"> - </argument> - <argument index="4" name="align" type="Vector2"> - </argument> - <argument index="5" name="advance" type="float"> - </argument> + <method name="font_clear_glyphs"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> <description> - Adds a character to the font, where [code]character[/code] is the Unicode value, [code]texture[/code] is the texture index, [code]rect[/code] is the region in the texture (in pixels!), [code]align[/code] is the (optional) alignment for the character and [code]advance[/code] is the (optional) advance. + Removes all rendered glyphs information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method font_remove_texture] to remove them manually. </description> </method> - <method name="font_bitmap_add_kerning_pair"> - <return type="void"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="A" type="int"> - </argument> - <argument index="2" name="B" type="int"> - </argument> - <argument index="3" name="kerning" type="int"> - </argument> + <method name="font_clear_kerning_map"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> <description> - Adds a kerning pair to the bitmap font as a difference. Kerning pairs are special cases where a typeface advance is determined by the next character. + Removes all kerning overrides. </description> </method> - <method name="font_bitmap_add_texture"> - <return type="void"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="texture" type="Texture"> - </argument> + <method name="font_clear_size_cache"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> <description> - Adds a texture to the bitmap font. + Removes all font sizes from the cache entry + </description> + </method> + <method name="font_clear_textures"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <description> + Removes all textures from font cache entry. Note: This function will not remove glyphs associated with the texture, use [method font_remove_glyph] to remove them manually. </description> </method> <method name="font_draw_glyph" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="canvas" type="RID"> - </argument> - <argument index="2" name="size" type="int"> - </argument> - <argument index="3" name="pos" type="Vector2"> - </argument> - <argument index="4" name="index" type="int"> - </argument> - <argument index="5" name="color" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <description> - Draws single glyph into a canvas item at the position, using [code]font[/code] at the size [code]size[/code]. + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="canvas" type="RID" /> + <argument index="2" name="size" type="int" /> + <argument index="3" name="pos" type="Vector2" /> + <argument index="4" name="index" type="int" /> + <argument index="5" name="color" type="Color" default="Color(1, 1, 1, 1)" /> + <description> + Draws single glyph into a canvas item at the position, using [code]font_rid[/code] at the size [code]size[/code]. Note: Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index]. </description> </method> <method name="font_draw_glyph_outline" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="canvas" type="RID"> - </argument> - <argument index="2" name="size" type="int"> - </argument> - <argument index="3" name="outline_size" type="int"> - </argument> - <argument index="4" name="pos" type="Vector2"> - </argument> - <argument index="5" name="index" type="int"> - </argument> - <argument index="6" name="color" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <description> - Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font[/code] at the size [code]size[/code]. + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="canvas" type="RID" /> + <argument index="2" name="size" type="int" /> + <argument index="3" name="outline_size" type="int" /> + <argument index="4" name="pos" type="Vector2" /> + <argument index="5" name="index" type="int" /> + <argument index="6" name="color" type="Color" default="Color(1, 1, 1, 1)" /> + <description> + Draws single glyph outline of size [code]outline_size[/code] into a canvas item at the position, using [code]font_rid[/code] at the size [code]size[/code]. Note: Glyph index is specific to the font, use glyphs indices returned by [method shaped_text_get_glyphs] or [method font_get_glyph_index]. </description> </method> - <method name="font_get_antialiased" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <description> - Returns [code]true[/code], if font anti-aliasing is supported and enabled. - </description> - </method> <method name="font_get_ascent" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="size" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> <description> Returns the font ascent (number of pixels above the baseline). </description> </method> - <method name="font_get_base_size" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <description> - Returns the default size of the font. - </description> - </method> <method name="font_get_descent" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="size" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> <description> Returns the font descent (number of pixels below the baseline). </description> </method> - <method name="font_get_distance_field_hint" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="font" type="RID"> - </argument> + <method name="font_get_fixed_size" qualifiers="const"> + <return type="int" /> + <argument index="0" name="font_rid" type="RID" /> <description> - Returns [code]true[/code], if distance field hint is enabled. + Returns bitmap font fixed size. </description> </method> - <method name="font_get_feature_list" qualifiers="const"> - <return type="Dictionary"> - </return> - <argument index="0" name="font" type="RID"> - </argument> + <method name="font_get_global_oversampling" qualifiers="const"> + <return type="float" /> <description> - Returns list of OpenType features supported by font. - </description> - </method> - <method name="font_get_force_autohinter" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <description> - Returns [code]true[/code], if autohinter is supported and enabled. + Returns the font oversampling factor, shared by all fonts in the TextServer. </description> </method> <method name="font_get_glyph_advance" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="index" type="int"> - </argument> - <argument index="2" name="size" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="glyph" type="int" /> <description> - Returns advance of the glyph. + Returns glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved. </description> </method> <method name="font_get_glyph_contours" qualifiers="const"> - <return type="Dictionary"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="size" type="int"> - </argument> - <argument index="2" name="index" type="int"> - </argument> - <description> - Returns outline contours of the glyph in a Dictionary. + <return type="Dictionary" /> + <argument index="0" name="font" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="index" type="int" /> + <description> + Returns outline contours of the glyph as a [code]Dictionary[/code] with the following contents: [code]points[/code] - [PackedVector3Array], containing outline points. [code]x[/code] and [code]y[/code] are point coordinates. [code]z[/code] is the type of the point, using the [enum ContourPointTag] values. [code]contours[/code] - [PackedInt32Array], containing indices the end points of each contour. [code]orientation[/code] - [bool], contour orientation. If [code]true[/code], clockwise contours must be filled. </description> </method> <method name="font_get_glyph_index" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="char" type="int"> - </argument> - <argument index="2" name="variation_selector" type="int" default="0"> - </argument> + <return type="int" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="char" type="int" /> + <argument index="3" name="variation_selector" type="int" /> <description> Returns the glyph index of a [code]char[/code], optionally modified by the [code]variation_selector[/code]. </description> </method> - <method name="font_get_glyph_kerning" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="index_a" type="int"> - </argument> - <argument index="2" name="index_b" type="int"> - </argument> - <argument index="3" name="size" type="int"> - </argument> + <method name="font_get_glyph_list" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> <description> - Returns a kerning of the pair of glyphs. + Returns list of rendered glyphs in the cache entry. </description> </method> - <method name="font_get_height" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="size" type="int"> - </argument> + <method name="font_get_glyph_offset" qualifiers="const"> + <return type="Vector2" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> <description> - Returns the total font height (ascent plus descent) in pixels. + Returns glyph offset from the baseline. + </description> + </method> + <method name="font_get_glyph_size" qualifiers="const"> + <return type="Vector2" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <description> + Returns size of the glyph. + </description> + </method> + <method name="font_get_glyph_texture_idx" qualifiers="const"> + <return type="int" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <description> + Returns index of the cache texture containing the glyph. + </description> + </method> + <method name="font_get_glyph_uv_rect" qualifiers="const"> + <return type="Rect2" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <description> + Returns rectangle in the cache texture containing the glyph. </description> </method> <method name="font_get_hinting" qualifiers="const"> - <return type="int" enum="TextServer.Hinting"> - </return> - <argument index="0" name="font" type="RID"> - </argument> + <return type="int" enum="TextServer.Hinting" /> + <argument index="0" name="font_rid" type="RID" /> + <description> + Returns the font hinting mode. Used by dynamic fonts only. + </description> + </method> + <method name="font_get_kerning" qualifiers="const"> + <return type="Vector2" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="glyph_pair" type="Vector2i" /> + <description> + Returns kerning for the pair of glyphs. + </description> + </method> + <method name="font_get_kerning_list" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> <description> - Returns the font hinting. + Returns list of the kerning overrides. </description> </method> <method name="font_get_language_support_override"> - <return type="bool"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="language" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="language" type="String" /> <description> Returns [code]true[/code] if support override is enabled for the [code]language[/code]. </description> </method> <method name="font_get_language_support_overrides"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="font" type="RID"> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="font_rid" type="RID" /> <description> Returns list of language support overrides. </description> </method> + <method name="font_get_msdf_pixel_range" qualifiers="const"> + <return type="int" /> + <argument index="0" name="font_rid" type="RID" /> + <description> + Return the width of the range around the shape between the minimum and maximum representable signed distance. + </description> + </method> + <method name="font_get_msdf_size" qualifiers="const"> + <return type="int" /> + <argument index="0" name="font_rid" type="RID" /> + <description> + Returns source font size used to generate MSDF textures. + </description> + </method> <method name="font_get_oversampling" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> + <argument index="0" name="font_rid" type="RID" /> <description> - Returns the font oversampling factor, shared by all fonts in the TextServer. + Returns font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only. + </description> + </method> + <method name="font_get_scale" qualifiers="const"> + <return type="float" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <description> + Returns scaling factor of the color bitmap font. </description> </method> <method name="font_get_script_support_override"> - <return type="bool"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="script" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="script" type="String" /> <description> Returns [code]true[/code] if support override is enabled for the [code]script[/code]. </description> </method> <method name="font_get_script_support_overrides"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="font" type="RID"> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="font_rid" type="RID" /> <description> Returns list of script support overrides. </description> </method> - <method name="font_get_spacing_glyph" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="font" type="RID"> - </argument> + <method name="font_get_size_cache_list" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="font_rid" type="RID" /> <description> - Returns extra spacing for each glyph in pixels. + Return list of the font sizes in the cache. Each size is [code]Vector2i[/code] with font size and outline size. </description> </method> - <method name="font_get_spacing_space" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="font" type="RID"> - </argument> + <method name="font_get_spacing" qualifiers="const"> + <return type="int" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" /> <description> - Sets extra spacing for each glyph in pixels. + Returns extra spacing added between glyphs in pixels. </description> </method> <method name="font_get_supported_chars" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="font" type="RID"> - </argument> + <return type="String" /> + <argument index="0" name="font_rid" type="RID" /> <description> Returns a string containing all the characters available in the font. </description> </method> + <method name="font_get_texture_count" qualifiers="const"> + <return type="int" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <description> + Returns number of textures used by font cache entry. + </description> + </method> + <method name="font_get_texture_image" qualifiers="const"> + <return type="Image" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="texture_index" type="int" /> + <description> + Returns font cache texture image data. + </description> + </method> + <method name="font_get_texture_offsets" qualifiers="const"> + <return type="PackedInt32Array" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="texture_index" type="int" /> + <description> + Returns array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty. + </description> + </method> <method name="font_get_underline_position" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="size" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> <description> - Returns underline offset (number of pixels below the baseline). + Returns pixel offset of the underline below the baseline. </description> </method> <method name="font_get_underline_thickness" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="size" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> <description> - Returns underline thickness in pixels. + Returns thickness of the underline in pixels. </description> </method> - <method name="font_get_variation" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="tag" type="String"> - </argument> + <method name="font_get_variation_coordinates" qualifiers="const"> + <return type="Dictionary" /> + <argument index="0" name="font_rid" type="RID" /> <description> - Returns variation coordinate [code]tag[/code]. + Returns variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info. </description> </method> - <method name="font_get_variation_list" qualifiers="const"> - <return type="Dictionary"> - </return> - <argument index="0" name="font" type="RID"> - </argument> + <method name="font_has_char" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="char" type="int" /> <description> - Returns list of supported [url=https://docs.microsoft.com/en-us/typography/opentype/spec/dvaraxisreg]variation coordinates[/url], each coordinate is returned as [code]tag: Vector3i(min_value,max_value,default_value)[/code]. - Font variations allow for continuous change of glyph characteristics along some given design axis, such as weight, width or slant. + Return [code]true[/code] if a Unicode [code]char[/code] is available in the font. </description> </method> - <method name="font_has_char" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="char" type="int"> - </argument> + <method name="font_is_antialiased" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="font_rid" type="RID" /> <description> - Returns [code]true[/code] if [code]char[/code] is available in the font. + Returns [code]true[/code] if font 8-bit anitialiased glyph rendering is supported and enabled. </description> </method> - <method name="font_has_outline" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="font" type="RID"> - </argument> + <method name="font_is_force_autohinter" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="font_rid" type="RID" /> <description> - Returns [code]true[/code], if font supports glyph outlines. + Returns [code]true[/code] if auto-hinting is supported and preffered over font built-in hinting. Used by dynamic fonts only. </description> </method> <method name="font_is_language_supported" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="language" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="language" type="String" /> <description> - Returns [code]true[/code], if font supports given language (ISO 639 code). + Returns [code]true[/code], if font supports given language ([url=https://en.wikipedia.org/wiki/ISO_639-1]ISO 639[/url] code). + </description> + </method> + <method name="font_is_multichannel_signed_distance_field" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="font_rid" type="RID" /> + <description> + Returns [code]true[/code] if glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. </description> </method> <method name="font_is_script_supported" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="script" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="script" type="String" /> <description> Returns [code]true[/code], if font supports given script (ISO 15924 code). </description> </method> + <method name="font_remove_glyph"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <description> + Removes specified rendered glyph information from the cache entry. Note: This function will not remove textures associated with the glyphs, use [method font_remove_texture] to remove them manually. + </description> + </method> + <method name="font_remove_kerning"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="glyph_pair" type="Vector2i" /> + <description> + Removes kerning override for the pair of glyphs. + </description> + </method> <method name="font_remove_language_support_override"> - <return type="void"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="language" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="language" type="String" /> <description> Remove language support override. </description> </method> <method name="font_remove_script_support_override"> - <return type="void"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="script" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="script" type="String" /> <description> Removes script support override. </description> </method> + <method name="font_remove_size_cache"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <description> + Removes specified font size from the cache entry. + </description> + </method> + <method name="font_remove_texture"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="texture_index" type="int" /> + <description> + Removes specified texture from font cache entry. Note: This function will not remove glyphs associated with the texture, remove them manually, using [method font_remove_glyph]. + </description> + </method> + <method name="font_render_glyph"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="index" type="int" /> + <description> + Renders specified glyph the the font cache texture. + </description> + </method> + <method name="font_render_range"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="start" type="int" /> + <argument index="3" name="end" type="int" /> + <description> + Renders the range of characters to the font cache texture. + </description> + </method> <method name="font_set_antialiased"> - <return type="void"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="antialiased" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="antialiased" type="bool" /> <description> - Sets font anti-aliasing. + If set to [code]true[/code], 8-bit antialiased glyph rendering is used, otherwise 1-bit rendering is used. Used by dynamic fonts only. </description> </method> - <method name="font_set_distance_field_hint"> - <return type="void"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="distance_field" type="bool"> - </argument> + <method name="font_set_ascent"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="ascent" type="float" /> <description> - Sets font distance field hint. + Sets the font ascent (number of pixels above the baseline). + </description> + </method> + <method name="font_set_data"> + <return type="void" /> + <argument index="0" name="data" type="RID" /> + <argument index="1" name="arg1" type="PackedByteArray" /> + <description> + Sets font source data, e.g contents of the dynamic font source file. + </description> + </method> + <method name="font_set_descent"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="descent" type="float" /> + <description> + Sets the font descent (number of pixels below the baseline). + </description> + </method> + <method name="font_set_fixed_size"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="fixed_size" type="int" /> + <description> + Sets bitmap font fixed size. If set to value greater than zero, same cache entry will be used for all font sizes. </description> </method> <method name="font_set_force_autohinter"> - <return type="void"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="enabeld" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="force_autohinter" type="bool" /> <description> - Enables/disables default autohinter. + If set to [code]true[/code] auto-hinting is preffered over font built-in hinting. + </description> + </method> + <method name="font_set_global_oversampling"> + <return type="void" /> + <argument index="0" name="oversampling" type="float" /> + <description> + Sets oversampling factor, shared by all font in the TextServer. + Note: This value can be automaticaly changed by display server. + </description> + </method> + <method name="font_set_glyph_advance"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="glyph" type="int" /> + <argument index="3" name="advance" type="Vector2" /> + <description> + Sets glyph advance (offset of the next glyph). Note: advance for glyphs outlines is the same as the base glyph advance and is not saved. + </description> + </method> + <method name="font_set_glyph_offset"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <argument index="3" name="offset" type="Vector2" /> + <description> + Sets glyph offset from the baseline. + </description> + </method> + <method name="font_set_glyph_size"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <argument index="3" name="gl_size" type="Vector2" /> + <description> + Sets size of the glyph. + </description> + </method> + <method name="font_set_glyph_texture_idx"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <argument index="3" name="texture_idx" type="int" /> + <description> + Sets index of the cache texture containing the glyph. + </description> + </method> + <method name="font_set_glyph_uv_rect"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="glyph" type="int" /> + <argument index="3" name="uv_rect" type="Rect2" /> + <description> + Sets rectangle in the cache texture containing the glyph. </description> </method> <method name="font_set_hinting"> - <return type="void"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="hinting" type="int" enum="TextServer.Hinting"> - </argument> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="_hinting" type="int" enum="TextServer.Hinting" /> + <description> + Sets font hinting mode. Used by dynamic fonts only. + </description> + </method> + <method name="font_set_kerning"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="glyph_pair" type="Vector2i" /> + <argument index="3" name="kerning" type="Vector2" /> <description> - Sets font hinting. + Sets kerning for the pair of glyphs. </description> </method> <method name="font_set_language_support_override"> - <return type="void"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="language" type="String"> - </argument> - <argument index="2" name="supported" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="language" type="String" /> + <argument index="2" name="supported" type="bool" /> <description> Adds override for [method font_is_language_supported]. </description> </method> + <method name="font_set_msdf_pixel_range"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="msdf_pixel_range" type="int" /> + <description> + Sets the width of the range around the shape between the minimum and maximum representable signed distance. + </description> + </method> + <method name="font_set_msdf_size"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="msdf_size" type="int" /> + <description> + Sets source font size used to generate MSDF textures. + </description> + </method> + <method name="font_set_multichannel_signed_distance_field"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="msdf" type="bool" /> + <description> + If set to [code]true[/code], glyphs of all sizes are rendered using single multichannel signed distance field generated from the dynamic font vector data. + </description> + </method> <method name="font_set_oversampling"> - <return type="void"> - </return> - <argument index="0" name="oversampling" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="oversampling" type="float" /> <description> - Sets oversampling factor, shared by all font in the TextServer. + Sets font oversampling factor, if set to [code]0.0[/code] global oversampling factor is used instead. Used by dynamic fonts only. + </description> + </method> + <method name="font_set_scale"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="scale" type="float" /> + <description> + Sets scaling factor of the color bitmap font. </description> </method> <method name="font_set_script_support_override"> - <return type="void"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="script" type="String"> - </argument> - <argument index="2" name="supported" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="script" type="String" /> + <argument index="2" name="supported" type="bool" /> <description> Adds override for [method font_is_script_supported]. </description> </method> - <method name="font_set_spacing_glyph"> - <return type="void"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <method name="font_set_spacing"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="spacing" type="int" enum="TextServer.SpacingType" /> + <argument index="3" name="value" type="int" /> + <description> + Sets extra spacing added between glyphs in pixels. + </description> + </method> + <method name="font_set_texture_image"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="texture_index" type="int" /> + <argument index="3" name="image" type="Image" /> + <description> + Sets font cache texture image data. + </description> + </method> + <method name="font_set_texture_offsets"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="Vector2i" /> + <argument index="2" name="texture_index" type="int" /> + <argument index="3" name="offset" type="PackedInt32Array" /> + <description> + Sets array containing the first free pixel in the each column of texture. Should be the same size as texture width or empty. + </description> + </method> + <method name="font_set_underline_position"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="underline_position" type="float" /> + <description> + Sets pixel offset of the underline below the baseline. + </description> + </method> + <method name="font_set_underline_thickness"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="size" type="int" /> + <argument index="2" name="underline_thickness" type="float" /> <description> - Returns extra spacing for the space character in pixels. + Sets thickness of the underline in pixels. </description> </method> - <method name="font_set_spacing_space"> - <return type="void"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <method name="font_set_variation_coordinates"> + <return type="void" /> + <argument index="0" name="font_rid" type="RID" /> + <argument index="1" name="variation_coordinates" type="Dictionary" /> <description> - Sets extra spacing for the space character in pixels. + Sets variation coordinates for the specified font cache entry. See [method font_supported_variation_list] for more info. </description> </method> - <method name="font_set_variation"> - <return type="void"> - </return> - <argument index="0" name="font" type="RID"> - </argument> - <argument index="1" name="tag" type="String"> - </argument> - <argument index="2" name="value" type="float"> - </argument> + <method name="font_supported_feature_list" qualifiers="const"> + <return type="Dictionary" /> + <argument index="0" name="font_rid" type="RID" /> + <description> + </description> + </method> + <method name="font_supported_variation_list" qualifiers="const"> + <return type="Dictionary" /> + <argument index="0" name="font_rid" type="RID" /> <description> - Sets variation coordinate [code]name[/code]. Unsupported coordinates will be silently ignored. </description> </method> <method name="format_number" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="number" type="String"> - </argument> - <argument index="1" name="language" type="String" default=""""> - </argument> + <return type="String" /> + <argument index="0" name="number" type="String" /> + <argument index="1" name="language" type="String" default="""" /> <description> Converts a number from the Western Arabic (0..9) to the numeral systems used in [code]language[/code]. </description> </method> <method name="free_rid"> - <return type="void"> - </return> - <argument index="0" name="rid" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="rid" type="RID" /> <description> Frees an object created by this [TextServer]. </description> </method> <method name="get_hex_code_box_size" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="size" type="int"> - </argument> - <argument index="1" name="index" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="size" type="int" /> + <argument index="1" name="index" type="int" /> <description> Returns size of the replacement character (box with character hexadecimal code that is drawn in place of invalid characters). </description> </method> <method name="get_name" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the name of the server interface. </description> </method> - <method name="get_system_fonts" qualifiers="const"> - <return type="PackedStringArray"> - </return> - <description> - Returns list of available system fonts. - Note: This method is supported by servers with the [code]FEATURE_FONT_SYSTEM[/code] feature. - </description> - </method> <method name="has"> - <return type="bool"> - </return> - <argument index="0" name="rid" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="rid" type="RID" /> <description> Returns [code]true[/code] if [code]rid[/code] is valid resource owned by this text server. </description> </method> <method name="has_feature"> - <return type="bool"> - </return> - <argument index="0" name="feature" type="int" enum="TextServer.Feature"> - </argument> + <return type="bool" /> + <argument index="0" name="feature" type="int" enum="TextServer.Feature" /> <description> Returns [code]true[/code] if the server supports a feature. </description> </method> <method name="is_locale_right_to_left"> - <return type="bool"> - </return> - <argument index="0" name="locale" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="locale" type="String" /> <description> Returns [code]true[/code] if locale is right-to-left. </description> </method> <method name="load_support_data"> - <return type="bool"> - </return> - <argument index="0" name="filename" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="filename" type="String" /> <description> Loads optional TextServer database (e.g. ICU break iterators and dictionaries). Note: This function should be called before any other TextServer functions used, otherwise it won't have any effect. </description> </method> - <method name="name_to_tag"> - <return type="int"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <method name="name_to_tag" qualifiers="const"> + <return type="int" /> + <argument index="0" name="name" type="String" /> <description> Converts readable feature, variation, script or language name to OpenType tag. </description> </method> <method name="parse_number" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="number" type="String"> - </argument> - <argument index="1" name="language" type="String" default=""""> - </argument> + <return type="String" /> + <argument index="0" name="number" type="String" /> + <argument index="1" name="language" type="String" default="""" /> <description> Converts a number from the numeral systems used in [code]language[/code] to Western Arabic (0..9). </description> </method> <method name="percent_sign" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="language" type="String" default=""""> - </argument> + <return type="String" /> + <argument index="0" name="language" type="String" default="""" /> <description> Returns percent sign used in the [code]language[/code]. </description> </method> <method name="shaped_text_add_object"> - <return type="bool"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> - <argument index="1" name="key" type="Variant"> - </argument> - <argument index="2" name="size" type="Vector2"> - </argument> - <argument index="3" name="inline_align" type="int" enum="VAlign" default="1"> - </argument> - <argument index="4" name="length" type="int" default="1"> - </argument> + <return type="bool" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="key" type="Variant" /> + <argument index="2" name="size" type="Vector2" /> + <argument index="3" name="inline_align" type="int" enum="InlineAlign" default="5" /> + <argument index="4" name="length" type="int" default="1" /> <description> Adds inline object to the text buffer, [code]key[/code] must be unique. In the text, object is represented as [code]length[/code] object replacement characters. </description> </method> <method name="shaped_text_add_string"> - <return type="bool"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> - <argument index="1" name="text" type="String"> - </argument> - <argument index="2" name="fonts" type="Array"> - </argument> - <argument index="3" name="size" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="text" type="String" /> + <argument index="2" name="fonts" type="Array" /> + <argument index="3" name="size" type="int" /> <argument index="4" name="opentype_features" type="Dictionary" default="{ -}"> - </argument> - <argument index="5" name="language" type="String" default=""""> - </argument> +}" /> + <argument index="5" name="language" type="String" default="""" /> <description> Adds text span and font to draw it to the text buffer. </description> </method> <method name="shaped_text_clear"> - <return type="void"> - </return> - <argument index="0" name="rid" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="rid" type="RID" /> <description> Clears text buffer (removes text and inline objects). </description> </method> <method name="shaped_text_draw" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> - <argument index="1" name="canvas" type="RID"> - </argument> - <argument index="2" name="pos" type="Vector2"> - </argument> - <argument index="3" name="clip_l" type="float" default="-1"> - </argument> - <argument index="4" name="clip_r" type="float" default="-1"> - </argument> - <argument index="5" name="color" type="Color" default="Color(1, 1, 1, 1)"> - </argument> + <return type="void" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="canvas" type="RID" /> + <argument index="2" name="pos" type="Vector2" /> + <argument index="3" name="clip_l" type="float" default="-1" /> + <argument index="4" name="clip_r" type="float" default="-1" /> + <argument index="5" name="color" type="Color" default="Color(1, 1, 1, 1)" /> <description> Draw shaped text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout). </description> </method> <method name="shaped_text_draw_outline" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> - <argument index="1" name="canvas" type="RID"> - </argument> - <argument index="2" name="pos" type="Vector2"> - </argument> - <argument index="3" name="clip_l" type="float" default="-1"> - </argument> - <argument index="4" name="clip_r" type="float" default="-1"> - </argument> - <argument index="5" name="outline_size" type="int" default="1"> - </argument> - <argument index="6" name="color" type="Color" default="Color(1, 1, 1, 1)"> - </argument> + <return type="void" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="canvas" type="RID" /> + <argument index="2" name="pos" type="Vector2" /> + <argument index="3" name="clip_l" type="float" default="-1" /> + <argument index="4" name="clip_r" type="float" default="-1" /> + <argument index="5" name="outline_size" type="int" default="1" /> + <argument index="6" name="color" type="Color" default="Color(1, 1, 1, 1)" /> <description> Draw the outline of the shaped text into a canvas item at a given position, with [code]color[/code]. [code]pos[/code] specifies the leftmost point of the baseline (for horizontal layout) or topmost point of the baseline (for vertical layout). </description> </method> <method name="shaped_text_fit_to_width"> - <return type="float"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> - <argument index="1" name="width" type="float"> - </argument> - <argument index="2" name="jst_flags" type="int" default="3"> - </argument> + <return type="float" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="width" type="float" /> + <argument index="2" name="jst_flags" type="int" default="3" /> <description> Adjusts text with to fit to specified width, returns new text width. </description> </method> <method name="shaped_text_get_ascent" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> + <return type="float" /> + <argument index="0" name="shaped" type="RID" /> <description> Returns the text ascent (number of pixels above the baseline for horizontal layout or to the left of baseline for vertical). Note: overall ascent can be higher than font ascent, if some glyphs are displaced from the baseline. </description> </method> <method name="shaped_text_get_carets" qualifiers="const"> - <return type="Dictionary"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> - <argument index="1" name="position" type="int"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="position" type="int" /> <description> Returns shapes of the carets corresponding to the character offset [code]position[/code] in the text. Returned caret shape is 1 pixel wide rectangle. </description> </method> <method name="shaped_text_get_descent" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> + <return type="float" /> + <argument index="0" name="shaped" type="RID" /> <description> Returns the text descent (number of pixels below the baseline for horizontal layout or to the right of baseline for vertical). Note: overall descent can be higher than font descent, if some glyphs are displaced from the baseline. </description> </method> <method name="shaped_text_get_direction" qualifiers="const"> - <return type="int" enum="TextServer.Direction"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> + <return type="int" enum="TextServer.Direction" /> + <argument index="0" name="shaped" type="RID" /> <description> Returns direction of the text. </description> </method> <method name="shaped_text_get_dominant_direciton_in_range" qualifiers="const"> - <return type="int" enum="TextServer.Direction"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> - <argument index="1" name="start" type="int"> - </argument> - <argument index="2" name="end" type="int"> - </argument> + <return type="int" enum="TextServer.Direction" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="start" type="int" /> + <argument index="2" name="end" type="int" /> <description> Returns dominant direction of in the range of text. </description> </method> <method name="shaped_text_get_glyphs" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> + <return type="Array" /> + <argument index="0" name="shaped" type="RID" /> <description> Returns text glyphs. </description> </method> <method name="shaped_text_get_line_breaks" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> - <argument index="1" name="width" type="float"> - </argument> - <argument index="2" name="start" type="int" default="0"> - </argument> - <argument index="3" name="break_flags" type="int" default="48"> - </argument> + <return type="Array" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="width" type="float" /> + <argument index="2" name="start" type="int" default="0" /> + <argument index="3" name="break_flags" type="int" default="48" /> <description> Breaks text to the lines and returns character ranges for each line. </description> </method> <method name="shaped_text_get_line_breaks_adv" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> - <argument index="1" name="width" type="PackedFloat32Array"> - </argument> - <argument index="2" name="start" type="int" default="0"> - </argument> - <argument index="3" name="once" type="bool" default="true"> - </argument> - <argument index="4" name="break_flags" type="int" default="48"> - </argument> + <return type="Array" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="width" type="PackedFloat32Array" /> + <argument index="2" name="start" type="int" default="0" /> + <argument index="3" name="once" type="bool" default="true" /> + <argument index="4" name="break_flags" type="int" default="48" /> <description> Breaks text to the lines and columns. Returns character ranges for each segment. </description> </method> <method name="shaped_text_get_object_rect" qualifiers="const"> - <return type="Rect2"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> - <argument index="1" name="key" type="Variant"> - </argument> + <return type="Rect2" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="key" type="Variant" /> <description> Returns bounding rectangle of the inline object. </description> </method> <method name="shaped_text_get_objects" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> + <return type="Array" /> + <argument index="0" name="shaped" type="RID" /> <description> Returns array of inline objects. </description> </method> <method name="shaped_text_get_orientation" qualifiers="const"> - <return type="int" enum="TextServer.Orientation"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> + <return type="int" enum="TextServer.Orientation" /> + <argument index="0" name="shaped" type="RID" /> <description> Returns text orientation. </description> </method> <method name="shaped_text_get_parent" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> + <return type="RID" /> + <argument index="0" name="shaped" type="RID" /> <description> Sets text orientation. </description> </method> <method name="shaped_text_get_preserve_control" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="shaped" type="RID" /> <description> Returns [code]true[/code] if text buffer is configured to display control characters. </description> </method> <method name="shaped_text_get_preserve_invalid" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="shaped" type="RID" /> <description> Returns [code]true[/code] if text buffer is configured to display hexadecimal codes in place of invalid characters. Note: If set to [code]false[/code], nothing is displayed in place of invalid characters. </description> </method> <method name="shaped_text_get_range" qualifiers="const"> - <return type="Vector2i"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="shaped" type="RID" /> <description> Returns substring buffer character range in the parent buffer. </description> </method> <method name="shaped_text_get_selection" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> - <argument index="1" name="start" type="int"> - </argument> - <argument index="2" name="end" type="int"> - </argument> + <return type="Array" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="start" type="int" /> + <argument index="2" name="end" type="int" /> <description> Returns selection rectangles for the specified character range. </description> </method> <method name="shaped_text_get_size" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> + <return type="Vector2" /> + <argument index="0" name="shaped" type="RID" /> <description> Returns size of the text. </description> </method> <method name="shaped_text_get_underline_position" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> + <return type="float" /> + <argument index="0" name="shaped" type="RID" /> <description> Returns pixel offset of the underline below the baseline. </description> </method> <method name="shaped_text_get_underline_thickness" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> + <return type="float" /> + <argument index="0" name="shaped" type="RID" /> <description> Returns thickness of the underline. </description> </method> <method name="shaped_text_get_width" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> + <return type="float" /> + <argument index="0" name="shaped" type="RID" /> <description> Returns width (for horizontal layout) or height (for vertical) of the text. </description> </method> <method name="shaped_text_get_word_breaks" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> + <return type="Array" /> + <argument index="0" name="shaped" type="RID" /> <description> Breaks text into words and returns array of character ranges. </description> </method> <method name="shaped_text_hit_test_grapheme" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> - <argument index="1" name="coords" type="float"> - </argument> + <return type="int" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="coords" type="float" /> <description> Returns grapheme index at the specified pixel offset at the baseline, or [code]-1[/code] if none is found. </description> </method> <method name="shaped_text_hit_test_position" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> - <argument index="1" name="coords" type="float"> - </argument> + <return type="int" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="coords" type="float" /> <description> Returns caret character offset at the specified pixel offset at the baseline. This function always returns a valid position. </description> </method> <method name="shaped_text_is_ready" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="shaped" type="RID" /> <description> Returns [code]true[/code] if buffer is successfully shaped. </description> </method> <method name="shaped_text_next_grapheme_pos"> - <return type="int"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> - <argument index="1" name="pos" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="pos" type="int" /> <description> Returns composite character end position closest to the [code]pos[/code]. </description> </method> + <method name="shaped_text_overrun_trim_to_width"> + <return type="void" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="width" type="float" default="0" /> + <argument index="2" name="overrun_trim_flags" type="int" default="0" /> + <description> + Trims text if it exceeds the given width. + </description> + </method> <method name="shaped_text_prev_grapheme_pos"> - <return type="int"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> - <argument index="1" name="pos" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="pos" type="int" /> <description> Returns composite character start position closest to the [code]pos[/code]. </description> </method> <method name="shaped_text_resize_object"> - <return type="bool"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> - <argument index="1" name="key" type="Variant"> - </argument> - <argument index="2" name="size" type="Vector2"> - </argument> - <argument index="3" name="inline_align" type="int" enum="VAlign" default="1"> - </argument> + <return type="bool" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="key" type="Variant" /> + <argument index="2" name="size" type="Vector2" /> + <argument index="3" name="inline_align" type="int" enum="InlineAlign" default="5" /> <description> Sets new size and alignment of embedded object. </description> </method> <method name="shaped_text_set_bidi_override"> - <return type="void"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> - <argument index="1" name="override" type="Array"> - </argument> + <return type="void" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="override" type="Array" /> <description> Overrides BiDi for the structured text. Override ranges should cover full source text without overlaps. BiDi algorithm will be used on each range separately. </description> </method> <method name="shaped_text_set_direction"> - <return type="void"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> - <argument index="1" name="direction" type="int" enum="TextServer.Direction" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="direction" type="int" enum="TextServer.Direction" default="0" /> <description> Sets desired text direction. If set to [code]TEXT_DIRECTION_AUTO[/code], direction will be detected based on the buffer contents and current locale. Note: Direction is ignored if server does not support [code]FEATURE_BIDI_LAYOUT[/code] feature. </description> </method> <method name="shaped_text_set_orientation"> - <return type="void"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> - <argument index="1" name="orientation" type="int" enum="TextServer.Orientation" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="orientation" type="int" enum="TextServer.Orientation" default="0" /> <description> Sets desired text orientation. Note: Orientation is ignored if server does not support [code]FEATURE_VERTICAL_LAYOUT[/code] feature. </description> </method> <method name="shaped_text_set_preserve_control"> - <return type="void"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="enabled" type="bool" /> <description> If set to [code]true[/code] text buffer will display control characters. </description> </method> <method name="shaped_text_set_preserve_invalid"> - <return type="void"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="enabled" type="bool" /> <description> If set to [code]true[/code] text buffer will display invalid characters as hexadecimal codes, otherwise nothing is displayed. </description> </method> <method name="shaped_text_shape"> - <return type="bool"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> + <return type="bool" /> + <argument index="0" name="shaped" type="RID" /> <description> Shapes buffer if it's not shaped. Returns [code]true[/code] if the string is shaped successfully. Note: It is not necessary to call this function manually, buffer will be shaped automatically as soon as any of its output data is requested. </description> </method> <method name="shaped_text_substr" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> - <argument index="1" name="start" type="int"> - </argument> - <argument index="2" name="length" type="int"> - </argument> + <return type="RID" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="start" type="int" /> + <argument index="2" name="length" type="int" /> <description> Returns text buffer for the substring of the text in the [code]shaped[/code] text buffer (including inline objects). </description> </method> <method name="shaped_text_tab_align"> - <return type="float"> - </return> - <argument index="0" name="shaped" type="RID"> - </argument> - <argument index="1" name="tab_stops" type="PackedFloat32Array"> - </argument> + <return type="float" /> + <argument index="0" name="shaped" type="RID" /> + <argument index="1" name="tab_stops" type="PackedFloat32Array" /> <description> Aligns shaped text to the given tab-stops. </description> </method> - <method name="tag_to_name"> - <return type="String"> - </return> - <argument index="0" name="tag" type="int"> - </argument> + <method name="tag_to_name" qualifiers="const"> + <return type="String" /> + <argument index="0" name="tag" type="int" /> <description> Converts OpenType tag to readable feature, variation, script or language name. </description> @@ -1260,6 +1207,21 @@ <constant name="BREAK_GRAPHEME_BOUND" value="64" enum="LineBreakFlag"> Break the line between any unconnected graphemes. </constant> + <constant name="OVERRUN_NO_TRIMMING" value="0" enum="TextOverrunFlag"> + No trimming is performed. + </constant> + <constant name="OVERRUN_TRIM" value="1" enum="TextOverrunFlag"> + Trims the text when it exceeds the given width. + </constant> + <constant name="OVERRUN_TRIM_WORD_ONLY" value="2" enum="TextOverrunFlag"> + Trims the text per word instead of per grapheme. + </constant> + <constant name="OVERRUN_ADD_ELLIPSIS" value="4" enum="TextOverrunFlag"> + Determines whether an ellipsis should be added at the end of the text. + </constant> + <constant name="OVERRUN_ENFORCE_ELLIPSIS" value="8" enum="TextOverrunFlag"> + Determines whether the ellipsis at the end of the text is enforced and may not be hidden. + </constant> <constant name="GRAPHEME_IS_RTL" value="2" enum="GraphemeFlag"> Grapheme is part of right-to-left or bottom-to-top run. </constant> @@ -1326,5 +1288,17 @@ <constant name="CONTOUR_CURVE_TAG_OFF_CUBIC" value="2" enum="ContourPointTag"> Contour point isn't on the curve, but serves as a control point for a cubic Bézier arc. </constant> + <constant name="SPACING_GLYPH" value="0" enum="SpacingType"> + Spacing for each glyph. + </constant> + <constant name="SPACING_SPACE" value="1" enum="SpacingType"> + Spacing for the space character. + </constant> + <constant name="SPACING_TOP" value="2" enum="SpacingType"> + Spacing at the top of the line. + </constant> + <constant name="SPACING_BOTTOM" value="3" enum="SpacingType"> + Spacing at the bottom of the line. + </constant> </constants> </class> diff --git a/doc/classes/TextServerManager.xml b/doc/classes/TextServerManager.xml index 29586f30b4..b1dd314544 100644 --- a/doc/classes/TextServerManager.xml +++ b/doc/classes/TextServerManager.xml @@ -11,67 +11,54 @@ </tutorials> <methods> <method name="find_interface" qualifiers="const"> - <return type="TextServer"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="TextServer" /> + <argument index="0" name="name" type="String" /> <description> Finds an interface by its name. </description> </method> <method name="get_interface" qualifiers="const"> - <return type="TextServer"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="TextServer" /> + <argument index="0" name="index" type="int" /> <description> Returns the interface registered at a given index. </description> </method> <method name="get_interface_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of interfaces currently registered. </description> </method> <method name="get_interface_features" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="index" type="int" /> <description> Returns text server supported features (binary OR). </description> </method> <method name="get_interface_name" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="index" type="int" /> <description> Returns the interface name registered at a given index. </description> </method> <method name="get_interfaces" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns a list of available interfaces the index and name of each interface. </description> </method> <method name="get_primary_interface" qualifiers="const"> - <return type="TextServer"> - </return> + <return type="TextServer" /> <description> Returns the primary [TextServer] interface. </description> </method> <method name="set_primary_interface"> - <return type="bool"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="index" type="int" /> <description> Sets (and initializes it if required) interface registered at a given index as the primary. Invalidates all references to the fonts and text buffers. </description> diff --git a/doc/classes/Texture2D.xml b/doc/classes/Texture2D.xml index 35b719ae48..bf5ddeb4ab 100644 --- a/doc/classes/Texture2D.xml +++ b/doc/classes/Texture2D.xml @@ -13,87 +13,64 @@ </tutorials> <methods> <method name="draw" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="canvas_item" type="RID"> - </argument> - <argument index="1" name="position" type="Vector2"> - </argument> - <argument index="2" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <argument index="3" name="transpose" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="canvas_item" type="RID" /> + <argument index="1" name="position" type="Vector2" /> + <argument index="2" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> + <argument index="3" name="transpose" type="bool" default="false" /> <description> Draws the texture using a [CanvasItem] with the [RenderingServer] API at the specified [code]position[/code]. </description> </method> <method name="draw_rect" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="canvas_item" type="RID"> - </argument> - <argument index="1" name="rect" type="Rect2"> - </argument> - <argument index="2" name="tile" type="bool"> - </argument> - <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <argument index="4" name="transpose" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="canvas_item" type="RID" /> + <argument index="1" name="rect" type="Rect2" /> + <argument index="2" name="tile" type="bool" /> + <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> + <argument index="4" name="transpose" type="bool" default="false" /> <description> Draws the texture using a [CanvasItem] with the [RenderingServer] API. </description> </method> <method name="draw_rect_region" qualifiers="const"> - <return type="void"> - </return> - <argument index="0" name="canvas_item" type="RID"> - </argument> - <argument index="1" name="rect" type="Rect2"> - </argument> - <argument index="2" name="src_rect" type="Rect2"> - </argument> - <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> - </argument> - <argument index="4" name="transpose" type="bool" default="false"> - </argument> - <argument index="5" name="clip_uv" type="bool" default="true"> - </argument> + <return type="void" /> + <argument index="0" name="canvas_item" type="RID" /> + <argument index="1" name="rect" type="Rect2" /> + <argument index="2" name="src_rect" type="Rect2" /> + <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)" /> + <argument index="4" name="transpose" type="bool" default="false" /> + <argument index="5" name="clip_uv" type="bool" default="true" /> <description> Draws a part of the texture using a [CanvasItem] with the [RenderingServer] API. </description> </method> <method name="get_height" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the texture height. </description> </method> <method name="get_image" qualifiers="const"> - <return type="Image"> - </return> + <return type="Image" /> <description> Returns an [Image] that is a copy of data from this [Texture2D]. [Image]s can be accessed and manipulated directly. </description> </method> <method name="get_size" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the texture size. </description> </method> <method name="get_width" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the texture width. </description> </method> <method name="has_alpha" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if this [Texture2D] has an alpha channel. </description> diff --git a/doc/classes/Texture3D.xml b/doc/classes/Texture3D.xml index 85e940716d..8ba0d7d4b9 100644 --- a/doc/classes/Texture3D.xml +++ b/doc/classes/Texture3D.xml @@ -8,38 +8,32 @@ </tutorials> <methods> <method name="get_data" qualifiers="const"> - <return type="Image[]"> - </return> + <return type="Image[]" /> <description> </description> </method> <method name="get_depth" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> <method name="get_format" qualifiers="const"> - <return type="int" enum="Image.Format"> - </return> + <return type="int" enum="Image.Format" /> <description> </description> </method> <method name="get_height" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> <method name="get_width" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> <method name="has_mipmaps" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> </description> </method> diff --git a/doc/classes/TextureLayered.xml b/doc/classes/TextureLayered.xml index d81c3c7c5a..dd8c709049 100644 --- a/doc/classes/TextureLayered.xml +++ b/doc/classes/TextureLayered.xml @@ -10,50 +10,42 @@ </tutorials> <methods> <method name="get_format" qualifiers="const"> - <return type="int" enum="Image.Format"> - </return> + <return type="int" enum="Image.Format" /> <description> Returns the current format being used by this texture. See [enum Image.Format] for details. </description> </method> <method name="get_height" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the height of the texture. Height is typically represented by the Y-axis. </description> </method> <method name="get_layer_data" qualifiers="const"> - <return type="Image"> - </return> - <argument index="0" name="layer" type="int"> - </argument> + <return type="Image" /> + <argument index="0" name="layer" type="int" /> <description> Returns an [Image] resource with the data from specified [code]layer[/code]. </description> </method> <method name="get_layered_type" qualifiers="const"> - <return type="int" enum="TextureLayered.LayeredType"> - </return> + <return type="int" enum="TextureLayered.LayeredType" /> <description> </description> </method> <method name="get_layers" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> <method name="get_width" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the width of the texture. Width is typically represented by the X-axis. </description> </method> <method name="has_mipmaps" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> </description> </method> diff --git a/doc/classes/TextureProgressBar.xml b/doc/classes/TextureProgressBar.xml index 59cde536ad..ee47557b39 100644 --- a/doc/classes/TextureProgressBar.xml +++ b/doc/classes/TextureProgressBar.xml @@ -10,20 +10,15 @@ </tutorials> <methods> <method name="get_stretch_margin" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="margin" type="int" enum="Side"> - </argument> + <return type="int" /> + <argument index="0" name="margin" type="int" enum="Side" /> <description> </description> </method> <method name="set_stretch_margin"> - <return type="void"> - </return> - <argument index="0" name="margin" type="int" enum="Side"> - </argument> - <argument index="1" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="margin" type="int" enum="Side" /> + <argument index="1" name="value" type="int" /> <description> </description> </method> @@ -65,6 +60,9 @@ [Texture2D] that clips based on the node's [code]value[/code] and [member fill_mode]. As [code]value[/code] increased, the texture fills up. It shows entirely when [code]value[/code] reaches [code]max_value[/code]. It doesn't show at all if [code]value[/code] is equal to [code]min_value[/code]. The [code]value[/code] property comes from [Range]. See [member Range.value], [member Range.min_value], [member Range.max_value]. </member> + <member name="texture_progress_offset" type="Vector2" setter="set_texture_progress_offset" getter="get_texture_progress_offset" default="Vector2(0, 0)"> + The offset of [member texture_progress]. Useful for [member texture_over] and [member texture_under] with fancy borders, to avoid transparent margins in your progress texture. + </member> <member name="texture_under" type="Texture2D" setter="set_under_texture" getter="get_under_texture"> [Texture2D] that draws under the progress bar. The bar's background. </member> diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml index 7448697df3..edf5874432 100644 --- a/doc/classes/Theme.xml +++ b/doc/classes/Theme.xml @@ -12,593 +12,476 @@ </tutorials> <methods> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> Clears all values on the theme. </description> </method> <method name="clear_color"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> <description> Clears the [Color] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="clear_constant"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> <description> Clears the constant at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="clear_font"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> <description> Clears the [Font] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="clear_font_size"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> <description> Clears the font size [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="clear_icon"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> <description> Clears the icon at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="clear_stylebox"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> <description> Clears [StyleBox] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="clear_theme_item"> - <return type="void"> - </return> - <argument index="0" name="data_type" type="int" enum="Theme.DataType"> - </argument> - <argument index="1" name="name" type="StringName"> - </argument> - <argument index="2" name="theme_type" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="data_type" type="int" enum="Theme.DataType" /> + <argument index="1" name="name" type="StringName" /> + <argument index="2" name="theme_type" type="StringName" /> <description> Clears the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> - <method name="copy_default_theme"> - <return type="void"> - </return> + <method name="clear_type_variation"> + <return type="void" /> + <argument index="0" name="theme_type" type="StringName" /> <description> - Sets the theme's values to a copy of the default theme values. - </description> - </method> - <method name="copy_theme"> - <return type="void"> - </return> - <argument index="0" name="other" type="Theme"> - </argument> - <description> - Sets the theme's values to a copy of a given theme. + Unmarks [code]theme_type[/code] as being a variation of any other type. </description> </method> <method name="get_color" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> + <return type="Color" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> <description> Returns the [Color] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_color_list" qualifiers="const"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="theme_type" type="String"> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="theme_type" type="String" /> <description> Returns all the [Color]s as a [PackedStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has [code]theme_type[/code]. </description> </method> <method name="get_color_type_list" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns all the [Color] types as a [PackedStringArray] filled with unique type names, for use in [method get_color] and/or [method get_color_list]. </description> </method> <method name="get_constant" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> + <return type="int" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> <description> Returns the constant at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_constant_list" qualifiers="const"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="theme_type" type="String"> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="theme_type" type="String" /> <description> Returns all the constants as a [PackedStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]theme_type[/code]. </description> </method> <method name="get_constant_type_list" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns all the constant types as a [PackedStringArray] filled with unique type names, for use in [method get_constant] and/or [method get_constant_list]. </description> </method> <method name="get_font" qualifiers="const"> - <return type="Font"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> + <return type="Font" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> <description> Returns the [Font] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_font_list" qualifiers="const"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="theme_type" type="String"> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="theme_type" type="String" /> <description> Returns all the [Font]s as a [PackedStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has [code]theme_type[/code]. </description> </method> <method name="get_font_size" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> + <return type="int" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> <description> Returns the font size at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_font_size_list" qualifiers="const"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="theme_type" type="String"> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="theme_type" type="String" /> <description> Returns all the font sizes as a [PackedStringArray] filled with each font size name, for use in [method get_font_size], if the theme has [code]theme_type[/code]. </description> </method> <method name="get_font_size_type_list" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns all the font size types as a [PackedStringArray] filled with unique type names, for use in [method get_font_size] and/or [method get_font_size_list]. </description> </method> <method name="get_font_type_list" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns all the [Font] types as a [PackedStringArray] filled with unique type names, for use in [method get_font] and/or [method get_font_list]. </description> </method> <method name="get_icon" qualifiers="const"> - <return type="Texture2D"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> + <return type="Texture2D" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> <description> Returns the icon [Texture2D] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_icon_list" qualifiers="const"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="theme_type" type="String"> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="theme_type" type="String" /> <description> Returns all the icons as a [PackedStringArray] filled with each [Texture2D]'s name, for use in [method get_icon], if the theme has [code]theme_type[/code]. </description> </method> <method name="get_icon_type_list" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns all the icon types as a [PackedStringArray] filled with unique type names, for use in [method get_icon] and/or [method get_icon_list]. </description> </method> <method name="get_stylebox" qualifiers="const"> - <return type="StyleBox"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> + <return type="StyleBox" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> <description> Returns the [StyleBox] at [code]name[/code] if the theme has [code]theme_type[/code]. Valid [code]name[/code]s may be found using [method get_stylebox_list]. Valid [code]theme_type[/code]s may be found using [method get_stylebox_type_list]. </description> </method> <method name="get_stylebox_list" qualifiers="const"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="theme_type" type="String"> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="theme_type" type="String" /> <description> Returns all the [StyleBox]s as a [PackedStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]theme_type[/code]. Valid [code]theme_type[/code]s may be found using [method get_stylebox_type_list]. </description> </method> <method name="get_stylebox_type_list" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns all the [StyleBox] types as a [PackedStringArray] filled with unique type names, for use in [method get_stylebox] and/or [method get_stylebox_list]. </description> </method> <method name="get_theme_item" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="data_type" type="int" enum="Theme.DataType"> - </argument> - <argument index="1" name="name" type="StringName"> - </argument> - <argument index="2" name="theme_type" type="StringName"> - </argument> + <return type="Variant" /> + <argument index="0" name="data_type" type="int" enum="Theme.DataType" /> + <argument index="1" name="name" type="StringName" /> + <argument index="2" name="theme_type" type="StringName" /> <description> Returns the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]theme_type[/code]. Valid [code]name[/code]s may be found using [method get_theme_item_list] or a data type specific method. Valid [code]theme_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method. </description> </method> <method name="get_theme_item_list" qualifiers="const"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="data_type" type="int" enum="Theme.DataType"> - </argument> - <argument index="1" name="theme_type" type="String"> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="data_type" type="int" enum="Theme.DataType" /> + <argument index="1" name="theme_type" type="String" /> <description> Returns all the theme items of [code]data_type[/code] as a [PackedStringArray] filled with each theme items's name, for use in [method get_theme_item] or a data type specific method, if the theme has [code]theme_type[/code]. Valid [code]theme_type[/code]s may be found using [method get_theme_item_type_list] or a data type specific method. </description> </method> <method name="get_theme_item_type_list" qualifiers="const"> - <return type="PackedStringArray"> - </return> - <argument index="0" name="data_type" type="int" enum="Theme.DataType"> - </argument> + <return type="PackedStringArray" /> + <argument index="0" name="data_type" type="int" enum="Theme.DataType" /> <description> Returns all the theme items of [code]data_type[/code] types as a [PackedStringArray] filled with unique type names, for use in [method get_theme_item], [method get_theme_item_list] or data type specific methods. </description> </method> <method name="get_type_list" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns all the theme types as a [PackedStringArray] filled with unique type names, for use in other [code]get_*[/code] functions of this theme. </description> </method> + <method name="get_type_variation_base" qualifiers="const"> + <return type="StringName" /> + <argument index="0" name="theme_type" type="StringName" /> + <description> + Returns the base theme type if [code]theme_type[/code] is a valid variation type. Returns an empty string otherwise. + </description> + </method> + <method name="get_type_variation_list" qualifiers="const"> + <return type="PackedStringArray" /> + <argument index="0" name="base_type" type="StringName" /> + <description> + Returns a list of all variation for the given [code]base_type[/code]. + </description> + </method> <method name="has_color" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> <description> Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]theme_type[/code]. Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_constant" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> <description> Returns [code]true[/code] if constant with [code]name[/code] is in [code]theme_type[/code]. Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_font" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> <description> Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]theme_type[/code]. Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_font_size" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> <description> Returns [code]true[/code] if font size with [code]name[/code] is in [code]theme_type[/code]. Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_icon" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> <description> Returns [code]true[/code] if icon [Texture2D] with [code]name[/code] is in [code]theme_type[/code]. Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_stylebox" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> <description> Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]theme_type[/code]. Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_theme_item" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="data_type" type="int" enum="Theme.DataType"> - </argument> - <argument index="1" name="name" type="StringName"> - </argument> - <argument index="2" name="theme_type" type="StringName"> - </argument> + <return type="bool" /> + <argument index="0" name="data_type" type="int" enum="Theme.DataType" /> + <argument index="1" name="name" type="StringName" /> + <argument index="2" name="theme_type" type="StringName" /> <description> Returns [code]true[/code] if a theme item of [code]data_type[/code] with [code]name[/code] is in [code]theme_type[/code]. Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> + <method name="is_type_variation" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="theme_type" type="StringName" /> + <argument index="1" name="base_type" type="StringName" /> + <description> + Returns [code]true[/code] if [code]theme_type[/code] is marked as a variation of [code]base_type[/code] in this theme. + </description> + </method> + <method name="merge_with"> + <return type="void" /> + <argument index="0" name="other" type="Theme" /> + <description> + Adds missing and overrides existing definitions with values from the [code]other[/code] [Theme]. + [b]Note:[/b] This modifies the current theme. If you want to merge two themes together without modifying either one, create a new empty theme and merge the other two into it one after another. + </description> + </method> <method name="rename_color"> - <return type="void"> - </return> - <argument index="0" name="old_name" type="StringName"> - </argument> - <argument index="1" name="name" type="StringName"> - </argument> - <argument index="2" name="theme_type" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="old_name" type="StringName" /> + <argument index="1" name="name" type="StringName" /> + <argument index="2" name="theme_type" type="StringName" /> <description> Renames the [Color] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. </description> </method> <method name="rename_constant"> - <return type="void"> - </return> - <argument index="0" name="old_name" type="StringName"> - </argument> - <argument index="1" name="name" type="StringName"> - </argument> - <argument index="2" name="theme_type" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="old_name" type="StringName" /> + <argument index="1" name="name" type="StringName" /> + <argument index="2" name="theme_type" type="StringName" /> <description> Renames the constant at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. </description> </method> <method name="rename_font"> - <return type="void"> - </return> - <argument index="0" name="old_name" type="StringName"> - </argument> - <argument index="1" name="name" type="StringName"> - </argument> - <argument index="2" name="theme_type" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="old_name" type="StringName" /> + <argument index="1" name="name" type="StringName" /> + <argument index="2" name="theme_type" type="StringName" /> <description> Renames the [Font] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. </description> </method> <method name="rename_font_size"> - <return type="void"> - </return> - <argument index="0" name="old_name" type="StringName"> - </argument> - <argument index="1" name="name" type="StringName"> - </argument> - <argument index="2" name="theme_type" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="old_name" type="StringName" /> + <argument index="1" name="name" type="StringName" /> + <argument index="2" name="theme_type" type="StringName" /> <description> Renames the font size [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. </description> </method> <method name="rename_icon"> - <return type="void"> - </return> - <argument index="0" name="old_name" type="StringName"> - </argument> - <argument index="1" name="name" type="StringName"> - </argument> - <argument index="2" name="theme_type" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="old_name" type="StringName" /> + <argument index="1" name="name" type="StringName" /> + <argument index="2" name="theme_type" type="StringName" /> <description> Renames the icon at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. </description> </method> <method name="rename_stylebox"> - <return type="void"> - </return> - <argument index="0" name="old_name" type="StringName"> - </argument> - <argument index="1" name="name" type="StringName"> - </argument> - <argument index="2" name="theme_type" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="old_name" type="StringName" /> + <argument index="1" name="name" type="StringName" /> + <argument index="2" name="theme_type" type="StringName" /> <description> Renames [StyleBox] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. </description> </method> <method name="rename_theme_item"> - <return type="void"> - </return> - <argument index="0" name="data_type" type="int" enum="Theme.DataType"> - </argument> - <argument index="1" name="old_name" type="StringName"> - </argument> - <argument index="2" name="name" type="StringName"> - </argument> - <argument index="3" name="theme_type" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="data_type" type="int" enum="Theme.DataType" /> + <argument index="1" name="old_name" type="StringName" /> + <argument index="2" name="name" type="StringName" /> + <argument index="3" name="theme_type" type="StringName" /> <description> Renames the theme item of [code]data_type[/code] at [code]old_name[/code] to [code]name[/code] if the theme has [code]theme_type[/code]. If [code]name[/code] is already taken, this method fails. </description> </method> <method name="set_color"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> - <argument index="2" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> + <argument index="2" name="color" type="Color" /> <description> Sets the theme's [Color] to [code]color[/code] at [code]name[/code] in [code]theme_type[/code]. Creates [code]theme_type[/code] if the theme does not have it. </description> </method> <method name="set_constant"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> - <argument index="2" name="constant" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> + <argument index="2" name="constant" type="int" /> <description> Sets the theme's constant to [code]constant[/code] at [code]name[/code] in [code]theme_type[/code]. Creates [code]theme_type[/code] if the theme does not have it. </description> </method> <method name="set_font"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> - <argument index="2" name="font" type="Font"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> + <argument index="2" name="font" type="Font" /> <description> Sets the theme's [Font] to [code]font[/code] at [code]name[/code] in [code]theme_type[/code]. Creates [code]theme_type[/code] if the theme does not have it. </description> </method> <method name="set_font_size"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> - <argument index="2" name="font_size" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> + <argument index="2" name="font_size" type="int" /> <description> Sets the theme's font size to [code]font_size[/code] at [code]name[/code] in [code]theme_type[/code]. Creates [code]theme_type[/code] if the theme does not have it. </description> </method> <method name="set_icon"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> - <argument index="2" name="texture" type="Texture2D"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> + <argument index="2" name="texture" type="Texture2D" /> <description> Sets the theme's icon [Texture2D] to [code]texture[/code] at [code]name[/code] in [code]theme_type[/code]. Creates [code]theme_type[/code] if the theme does not have it. </description> </method> <method name="set_stylebox"> - <return type="void"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName"> - </argument> - <argument index="2" name="texture" type="StyleBox"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" /> + <argument index="2" name="texture" type="StyleBox" /> <description> Sets theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]theme_type[/code]. Creates [code]theme_type[/code] if the theme does not have it. </description> </method> <method name="set_theme_item"> - <return type="void"> - </return> - <argument index="0" name="data_type" type="int" enum="Theme.DataType"> - </argument> - <argument index="1" name="name" type="StringName"> - </argument> - <argument index="2" name="theme_type" type="StringName"> - </argument> - <argument index="3" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="data_type" type="int" enum="Theme.DataType" /> + <argument index="1" name="name" type="StringName" /> + <argument index="2" name="theme_type" type="StringName" /> + <argument index="3" name="value" type="Variant" /> <description> Sets the theme item of [code]data_type[/code] to [code]value[/code] at [code]name[/code] in [code]theme_type[/code]. Does nothing if the [code]value[/code] type does not match [code]data_type[/code]. Creates [code]theme_type[/code] if the theme does not have it. </description> </method> + <method name="set_type_variation"> + <return type="void" /> + <argument index="0" name="theme_type" type="StringName" /> + <argument index="1" name="base_type" type="StringName" /> + <description> + Marks [code]theme_type[/code] as being a variation of [code]base_type[/code]. + This adds [code]theme_type[/code] as a suggested option for [member Control.theme_type_variation] on a [Control] that is of the [code]base_type[/code] class. + Variations can also be nested, i.e. [code]base_type[/code] can be another variation. If a chain of variations ends with a [code]base_type[/code] matching a class of a [Control], the whole chain is going to be suggested as options. + Note: Suggestions only show up if this [Theme] is set as the project default theme. See [member ProjectSettings.gui/theme/custom]. + </description> + </method> </methods> <members> <member name="default_font" type="Font" setter="set_default_font" getter="get_default_font"> diff --git a/doc/classes/Thread.xml b/doc/classes/Thread.xml index 5ac9416b72..b553aad518 100644 --- a/doc/classes/Thread.xml +++ b/doc/classes/Thread.xml @@ -14,38 +14,30 @@ </tutorials> <methods> <method name="get_id" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the current [Thread]'s ID, uniquely identifying it among all threads. If the [Thread] is not running this returns an empty string. </description> </method> <method name="is_active" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if this [Thread] is currently active. An active [Thread] cannot start work on a new method but can be joined with [method wait_to_finish]. </description> </method> <method name="start"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="instance" type="Object"> - </argument> - <argument index="1" name="method" type="StringName"> - </argument> - <argument index="2" name="userdata" type="Variant" default="null"> - </argument> - <argument index="3" name="priority" type="int" enum="Thread.Priority" default="1"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="instance" type="Object" /> + <argument index="1" name="method" type="StringName" /> + <argument index="2" name="userdata" type="Variant" default="null" /> + <argument index="3" name="priority" type="int" enum="Thread.Priority" default="1" /> <description> Starts a new [Thread] that runs [code]method[/code] on object [code]instance[/code] with [code]userdata[/code] passed as an argument. Even if no userdata is passed, [code]method[/code] must accept one argument and it will be null. The [code]priority[/code] of the [Thread] can be changed by passing a value from the [enum Priority] enum. Returns [constant OK] on success, or [constant ERR_CANT_CREATE] on failure. </description> </method> <method name="wait_to_finish"> - <return type="Variant"> - </return> + <return type="Variant" /> <description> Joins the [Thread] and waits for it to finish. Returns what the method called returned. </description> diff --git a/doc/classes/TileData.xml b/doc/classes/TileData.xml index bb793024eb..b5031cfc63 100644 --- a/doc/classes/TileData.xml +++ b/doc/classes/TileData.xml @@ -8,208 +8,149 @@ </tutorials> <methods> <method name="add_collision_polygon"> - <return type="void"> - </return> - <argument index="0" name="layer_id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="layer_id" type="int" /> <description> </description> </method> <method name="get_collision_polygon_one_way_margin" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="layer_id" type="int"> - </argument> - <argument index="1" name="polygon_index" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="layer_id" type="int" /> + <argument index="1" name="polygon_index" type="int" /> <description> </description> </method> <method name="get_collision_polygon_points" qualifiers="const"> - <return type="PackedVector2Array"> - </return> - <argument index="0" name="layer_id" type="int"> - </argument> - <argument index="1" name="polygon_index" type="int"> - </argument> + <return type="PackedVector2Array" /> + <argument index="0" name="layer_id" type="int" /> + <argument index="1" name="polygon_index" type="int" /> <description> </description> </method> <method name="get_collision_polygons_count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="layer_id" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="layer_id" type="int" /> <description> </description> </method> <method name="get_custom_data" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="layer_name" type="String"> - </argument> + <return type="Variant" /> + <argument index="0" name="layer_name" type="String" /> <description> </description> </method> <method name="get_custom_data_by_layer_id" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="layer_id" type="int"> - </argument> + <return type="Variant" /> + <argument index="0" name="layer_id" type="int" /> <description> </description> </method> <method name="get_navigation_polygon" qualifiers="const"> - <return type="NavigationPolygon"> - </return> - <argument index="0" name="layer_id" type="int"> - </argument> + <return type="NavigationPolygon" /> + <argument index="0" name="layer_id" type="int" /> <description> </description> </method> <method name="get_occluder" qualifiers="const"> - <return type="OccluderPolygon2D"> - </return> - <argument index="0" name="layer_id" type="int"> - </argument> + <return type="OccluderPolygon2D" /> + <argument index="0" name="layer_id" type="int" /> <description> </description> </method> <method name="get_peering_bit_terrain" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor"> - </argument> + <return type="int" /> + <argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor" /> <description> </description> </method> <method name="is_collision_polygon_one_way" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="layer_id" type="int"> - </argument> - <argument index="1" name="polygon_index" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="layer_id" type="int" /> + <argument index="1" name="polygon_index" type="int" /> <description> </description> </method> <method name="remove_collision_polygon"> - <return type="void"> - </return> - <argument index="0" name="layer_id" type="int"> - </argument> - <argument index="1" name="polygon_index" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="layer_id" type="int" /> + <argument index="1" name="polygon_index" type="int" /> <description> </description> </method> <method name="set_collision_polygon_one_way"> - <return type="void"> - </return> - <argument index="0" name="layer_id" type="int"> - </argument> - <argument index="1" name="polygon_index" type="int"> - </argument> - <argument index="2" name="one_way" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="layer_id" type="int" /> + <argument index="1" name="polygon_index" type="int" /> + <argument index="2" name="one_way" type="bool" /> <description> </description> </method> <method name="set_collision_polygon_one_way_margin"> - <return type="void"> - </return> - <argument index="0" name="layer_id" type="int"> - </argument> - <argument index="1" name="polygon_index" type="int"> - </argument> - <argument index="2" name="one_way_margin" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="layer_id" type="int" /> + <argument index="1" name="polygon_index" type="int" /> + <argument index="2" name="one_way_margin" type="float" /> <description> </description> </method> <method name="set_collision_polygon_points"> - <return type="void"> - </return> - <argument index="0" name="layer_id" type="int"> - </argument> - <argument index="1" name="polygon_index" type="int"> - </argument> - <argument index="2" name="polygon" type="PackedVector2Array"> - </argument> + <return type="void" /> + <argument index="0" name="layer_id" type="int" /> + <argument index="1" name="polygon_index" type="int" /> + <argument index="2" name="polygon" type="PackedVector2Array" /> <description> </description> </method> <method name="set_collision_polygons_count"> - <return type="void"> - </return> - <argument index="0" name="layer_id" type="int"> - </argument> - <argument index="1" name="polygons_count" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="layer_id" type="int" /> + <argument index="1" name="polygons_count" type="int" /> <description> </description> </method> <method name="set_custom_data"> - <return type="void"> - </return> - <argument index="0" name="layer_name" type="String"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="layer_name" type="String" /> + <argument index="1" name="value" type="Variant" /> <description> </description> </method> <method name="set_custom_data_by_layer_id"> - <return type="void"> - </return> - <argument index="0" name="layer_id" type="int"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="layer_id" type="int" /> + <argument index="1" name="value" type="Variant" /> <description> </description> </method> <method name="set_navigation_polygon"> - <return type="void"> - </return> - <argument index="0" name="layer_id" type="int"> - </argument> - <argument index="1" name="navigation_polygon" type="NavigationPolygon"> - </argument> + <return type="void" /> + <argument index="0" name="layer_id" type="int" /> + <argument index="1" name="navigation_polygon" type="NavigationPolygon" /> <description> </description> </method> <method name="set_occluder"> - <return type="void"> - </return> - <argument index="0" name="layer_id" type="int"> - </argument> - <argument index="1" name="occluder_polygon" type="OccluderPolygon2D"> - </argument> + <return type="void" /> + <argument index="0" name="layer_id" type="int" /> + <argument index="1" name="occluder_polygon" type="OccluderPolygon2D" /> <description> </description> </method> <method name="set_peering_bit_terrain"> - <return type="void"> - </return> - <argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor"> - </argument> - <argument index="1" name="terrain" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="peering_bit" type="int" enum="TileSet.CellNeighbor" /> + <argument index="1" name="terrain" type="int" /> <description> </description> </method> <method name="tile_get_material" qualifiers="const"> - <return type="ShaderMaterial"> - </return> + <return type="ShaderMaterial" /> <description> </description> </method> <method name="tile_set_material"> - <return type="void"> - </return> - <argument index="0" name="material" type="ShaderMaterial"> - </argument> + <return type="void" /> + <argument index="0" name="material" type="ShaderMaterial" /> <description> </description> </method> diff --git a/doc/classes/TileMap.xml b/doc/classes/TileMap.xml index 5a4068ec86..e92a7331e6 100644 --- a/doc/classes/TileMap.xml +++ b/doc/classes/TileMap.xml @@ -17,112 +17,178 @@ <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link> </tutorials> <methods> + <method name="add_layer"> + <return type="void" /> + <argument index="0" name="arg0" type="int" /> + <description> + </description> + </method> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> Clears all cells. </description> </method> <method name="fix_invalid_tiles"> - <return type="void"> - </return> + <return type="void" /> <description> Clears cells that do not exist in the tileset. </description> </method> <method name="get_cell_alternative_tile" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="coords" type="Vector2i"> - </argument> + <return type="int" /> + <argument index="0" name="layer" type="int" /> + <argument index="1" name="coords" type="Vector2i" /> + <argument index="2" name="use_proxies" type="bool" /> <description> </description> </method> <method name="get_cell_atlas_coords" qualifiers="const"> - <return type="Vector2i"> - </return> - <argument index="0" name="coords" type="Vector2i"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="layer" type="int" /> + <argument index="1" name="coords" type="Vector2i" /> + <argument index="2" name="use_proxies" type="bool" /> <description> </description> </method> <method name="get_cell_source_id" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="coords" type="Vector2i"> - </argument> + <return type="int" /> + <argument index="0" name="layer" type="int" /> + <argument index="1" name="coords" type="Vector2i" /> + <argument index="2" name="use_proxies" type="bool" /> + <description> + </description> + </method> + <method name="get_layer_name" qualifiers="const"> + <return type="String" /> + <argument index="0" name="layer" type="int" /> + <description> + </description> + </method> + <method name="get_layer_y_sort_origin" qualifiers="const"> + <return type="int" /> + <argument index="0" name="layer" type="int" /> + <description> + </description> + </method> + <method name="get_layer_z_indexd" qualifiers="const"> + <return type="int" /> + <argument index="0" name="layer" type="int" /> + <description> + </description> + </method> + <method name="get_layers_count" qualifiers="const"> + <return type="int" /> <description> </description> </method> <method name="get_neighbor_cell" qualifiers="const"> - <return type="Vector2i"> - </return> - <argument index="0" name="coords" type="Vector2i"> - </argument> - <argument index="1" name="neighbor" type="int" enum="TileSet.CellNeighbor"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="coords" type="Vector2i" /> + <argument index="1" name="neighbor" type="int" enum="TileSet.CellNeighbor" /> <description> </description> </method> <method name="get_surrounding_tiles"> - <return type="Vector2i[]"> - </return> - <argument index="0" name="coords" type="Vector2i"> - </argument> + <return type="Vector2i[]" /> + <argument index="0" name="coords" type="Vector2i" /> <description> </description> </method> <method name="get_used_cells" qualifiers="const"> - <return type="Vector2i[]"> - </return> + <return type="Vector2i[]" /> + <argument index="0" name="layer" type="int" /> <description> Returns a [Vector2] array with the positions of all cells containing a tile from the tileset (i.e. a tile index different from [code]-1[/code]). </description> </method> <method name="get_used_rect"> - <return type="Rect2"> - </return> + <return type="Rect2" /> <description> Returns a rectangle enclosing the used (non-empty) tiles of the map. </description> </method> + <method name="is_layer_enabled" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="layer" type="int" /> + <description> + </description> + </method> + <method name="is_layer_y_sort_enabled" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="layer" type="int" /> + <description> + </description> + </method> <method name="map_to_world" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="map_position" type="Vector2i"> - </argument> + <return type="Vector2" /> + <argument index="0" name="map_position" type="Vector2i" /> <description> Returns the local position corresponding to the given tilemap (grid-based) coordinates. </description> </method> + <method name="move_layer"> + <return type="void" /> + <argument index="0" name="arg0" type="int" /> + <argument index="1" name="arg1" type="int" /> + <description> + </description> + </method> + <method name="remove_layer"> + <return type="void" /> + <argument index="0" name="arg0" type="int" /> + <description> + </description> + </method> <method name="set_cell"> - <return type="void"> - </return> - <argument index="0" name="coords" type="Vector2i"> - </argument> - <argument index="1" name="source_id" type="int" default="-1"> - </argument> - <argument index="2" name="atlas_coords" type="Vector2i" default="Vector2i(-1, -1)"> - </argument> - <argument index="3" name="alternative_tile" type="int" default="-1"> - </argument> + <return type="void" /> + <argument index="0" name="layer" type="int" /> + <argument index="1" name="coords" type="Vector2i" /> + <argument index="2" name="source_id" type="int" default="-1" /> + <argument index="3" name="atlas_coords" type="Vector2i" default="Vector2i(-1, -1)" /> + <argument index="4" name="alternative_tile" type="int" default="-1" /> <description> Sets the tile index for the cell given by a Vector2i. </description> </method> - <method name="update_dirty_quadrants"> - <return type="void"> - </return> + <method name="set_layer_enabled"> + <return type="void" /> + <argument index="0" name="layer" type="int" /> + <argument index="1" name="enabled" type="bool" /> + <description> + </description> + </method> + <method name="set_layer_name"> + <return type="void" /> + <argument index="0" name="layer" type="int" /> + <argument index="1" name="name" type="String" /> + <description> + </description> + </method> + <method name="set_layer_y_sort_enabled"> + <return type="void" /> + <argument index="0" name="layer" type="int" /> + <argument index="1" name="y_sort_enabled" type="bool" /> + <description> + </description> + </method> + <method name="set_layer_y_sort_origin"> + <return type="void" /> + <argument index="0" name="layer" type="int" /> + <argument index="1" name="y_sort_origin" type="int" /> + <description> + </description> + </method> + <method name="set_layer_z_index"> + <return type="void" /> + <argument index="0" name="layer" type="int" /> + <argument index="1" name="z_index" type="int" /> <description> - Updates the tile map's quadrants, allowing things such as navigation and collision shapes to be immediately used if modified. </description> </method> <method name="world_to_map" qualifiers="const"> - <return type="Vector2i"> - </return> - <argument index="0" name="world_position" type="Vector2"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="world_position" type="Vector2" /> <description> Returns the tilemap (grid-based) coordinates corresponding to the given local position. </description> @@ -132,9 +198,9 @@ <member name="cell_quadrant_size" type="int" setter="set_quadrant_size" getter="get_quadrant_size" default="16"> The TileMap's quadrant size. Optimizes drawing by batching, using chunks of this size. </member> - <member name="show_collision" type="int" setter="set_collision_visibility_mode" getter="get_collision_visibility_mode" enum="TileMap.VisibilityMode" default="0"> + <member name="collision_visibility_mode" type="int" setter="set_collision_visibility_mode" getter="get_collision_visibility_mode" enum="TileMap.VisibilityMode" default="0"> </member> - <member name="show_navigation" type="int" setter="set_navigation_visibility_mode" getter="get_navigation_visibility_mode" enum="TileMap.VisibilityMode" default="0"> + <member name="navigation_visibility_mode" type="int" setter="set_navigation_visibility_mode" getter="get_navigation_visibility_mode" enum="TileMap.VisibilityMode" default="0"> </member> <member name="tile_set" type="TileSet" setter="set_tileset" getter="get_tileset"> The assigned [TileSet]. diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index 436e15387d..3e0ab87383 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -17,270 +17,433 @@ <link title="2D Kinematic Character Demo">https://godotengine.org/asset-library/asset/113</link> </tutorials> <methods> + <method name="add_custom_data_layer"> + <return type="void" /> + <argument index="0" name="to_position" type="int" default="-1" /> + <description> + </description> + </method> + <method name="add_navigation_layer"> + <return type="void" /> + <argument index="0" name="to_position" type="int" default="-1" /> + <description> + </description> + </method> + <method name="add_occlusion_layer"> + <return type="void" /> + <argument index="0" name="to_position" type="int" default="-1" /> + <description> + </description> + </method> + <method name="add_physics_layer"> + <return type="void" /> + <argument index="0" name="to_position" type="int" default="-1" /> + <description> + </description> + </method> <method name="add_source"> - <return type="int"> - </return> - <argument index="0" name="atlas_source_id_override" type="TileSetSource"> - </argument> - <argument index="1" name="arg1" type="int" default="-1"> - </argument> + <return type="int" /> + <argument index="0" name="atlas_source_id_override" type="TileSetSource" /> + <argument index="1" name="arg1" type="int" default="-1" /> + <description> + </description> + </method> + <method name="add_terrain"> + <return type="void" /> + <argument index="0" name="terrain_set" type="int" /> + <argument index="1" name="to_position" type="int" default="-1" /> + <description> + </description> + </method> + <method name="add_terrain_set"> + <return type="void" /> + <argument index="0" name="to_position" type="int" default="-1" /> + <description> + </description> + </method> + <method name="cleanup_invalid_tile_proxies"> + <return type="void" /> + <description> + </description> + </method> + <method name="clear_tile_proxies"> + <return type="void" /> + <description> + </description> + </method> + <method name="get_alternative_level_tile_proxy"> + <return type="Array" /> + <argument index="0" name="source_from" type="int" /> + <argument index="1" name="coords_from" type="Vector2i" /> + <argument index="2" name="alternative_from" type="int" /> + <description> + </description> + </method> + <method name="get_coords_level_tile_proxy"> + <return type="Array" /> + <argument index="0" name="source_from" type="int" /> + <argument index="1" name="coords_from" type="Vector2i" /> + <description> + </description> + </method> + <method name="get_custom_data_layers_count" qualifiers="const"> + <return type="int" /> <description> </description> </method> <method name="get_navigation_layer_layers" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="layer_index" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="layer_index" type="int" /> + <description> + </description> + </method> + <method name="get_navigation_layers_count" qualifiers="const"> + <return type="int" /> <description> </description> </method> <method name="get_next_source_id" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> <method name="get_occlusion_layer_light_mask" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="arg0" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="arg0" type="int" /> <description> </description> </method> <method name="get_occlusion_layer_sdf_collision" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="arg0" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="arg0" type="int" /> + <description> + </description> + </method> + <method name="get_occlusion_layers_count" qualifiers="const"> + <return type="int" /> <description> </description> </method> <method name="get_physics_layer_collision_layer" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="layer_index" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="layer_index" type="int" /> <description> </description> </method> <method name="get_physics_layer_collision_mask" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="layer_index" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="layer_index" type="int" /> <description> </description> </method> <method name="get_physics_layer_physics_material" qualifiers="const"> - <return type="PhysicsMaterial"> - </return> - <argument index="0" name="layer_index" type="int"> - </argument> + <return type="PhysicsMaterial" /> + <argument index="0" name="layer_index" type="int" /> + <description> + </description> + </method> + <method name="get_physics_layers_count" qualifiers="const"> + <return type="int" /> <description> </description> </method> <method name="get_source" qualifiers="const"> - <return type="TileSetSource"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="TileSetSource" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="get_source_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> <method name="get_source_id" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="index" type="int" /> + <description> + </description> + </method> + <method name="get_source_level_tile_proxy"> + <return type="int" /> + <argument index="0" name="source_from" type="int" /> <description> </description> </method> <method name="get_terrain_color" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="terrain_set" type="int"> - </argument> - <argument index="1" name="terrain_index" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="terrain_set" type="int" /> + <argument index="1" name="terrain_index" type="int" /> <description> </description> </method> <method name="get_terrain_name" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="terrain_set" type="int"> - </argument> - <argument index="1" name="terrain_index" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="terrain_set" type="int" /> + <argument index="1" name="terrain_index" type="int" /> <description> </description> </method> <method name="get_terrain_set_mode" qualifiers="const"> - <return type="int" enum="TileSet.TerrainMode"> - </return> - <argument index="0" name="terrain_set" type="int"> - </argument> + <return type="int" enum="TileSet.TerrainMode" /> + <argument index="0" name="terrain_set" type="int" /> + <description> + </description> + </method> + <method name="get_terrain_sets_count" qualifiers="const"> + <return type="int" /> <description> </description> </method> <method name="get_terrains_count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="terrain_set" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="terrain_set" type="int" /> + <description> + </description> + </method> + <method name="has_alternative_level_tile_proxy"> + <return type="bool" /> + <argument index="0" name="source_from" type="int" /> + <argument index="1" name="coords_from" type="Vector2i" /> + <argument index="2" name="alternative_from" type="int" /> + <description> + </description> + </method> + <method name="has_coords_level_tile_proxy"> + <return type="bool" /> + <argument index="0" name="source_from" type="int" /> + <argument index="1" name="coords_from" type="Vector2i" /> <description> </description> </method> <method name="has_source" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="index" type="int" /> + <description> + </description> + </method> + <method name="has_source_level_tile_proxy"> + <return type="bool" /> + <argument index="0" name="source_from" type="int" /> + <description> + </description> + </method> + <method name="map_tile_proxy" qualifiers="const"> + <return type="Array" /> + <argument index="0" name="source_from" type="int" /> + <argument index="1" name="coords_from" type="Vector2i" /> + <argument index="2" name="alternative_from" type="int" /> + <description> + </description> + </method> + <method name="move_custom_data_layer"> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> + <argument index="1" name="to_position" type="int" /> + <description> + </description> + </method> + <method name="move_navigation_layer"> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> + <argument index="1" name="to_position" type="int" /> + <description> + </description> + </method> + <method name="move_occlusion_layer"> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> + <argument index="1" name="to_position" type="int" /> + <description> + </description> + </method> + <method name="move_physics_layer"> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> + <argument index="1" name="to_position" type="int" /> + <description> + </description> + </method> + <method name="move_terrain"> + <return type="void" /> + <argument index="0" name="terrain_set" type="int" /> + <argument index="1" name="terrain_index" type="int" /> + <argument index="2" name="to_position" type="int" /> + <description> + </description> + </method> + <method name="move_terrain_set"> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> + <argument index="1" name="to_position" type="int" /> + <description> + </description> + </method> + <method name="remove_alternative_level_tile_proxy"> + <return type="void" /> + <argument index="0" name="source_from" type="int" /> + <argument index="1" name="coords_from" type="Vector2i" /> + <argument index="2" name="alternative_from" type="int" /> + <description> + </description> + </method> + <method name="remove_coords_level_tile_proxy"> + <return type="void" /> + <argument index="0" name="source_from" type="int" /> + <argument index="1" name="coords_from" type="Vector2i" /> + <description> + </description> + </method> + <method name="remove_custom_data_layer"> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> + <description> + </description> + </method> + <method name="remove_navigation_layer"> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> + <description> + </description> + </method> + <method name="remove_occlusion_layer"> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> + <description> + </description> + </method> + <method name="remove_physics_layer"> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> <description> </description> </method> <method name="remove_source"> - <return type="void"> - </return> - <argument index="0" name="source_id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="source_id" type="int" /> + <description> + </description> + </method> + <method name="remove_source_level_tile_proxy"> + <return type="void" /> + <argument index="0" name="source_from" type="int" /> + <description> + </description> + </method> + <method name="remove_terrain"> + <return type="void" /> + <argument index="0" name="terrain_set" type="int" /> + <argument index="1" name="terrain_index" type="int" /> + <description> + </description> + </method> + <method name="remove_terrain_set"> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> + <description> + </description> + </method> + <method name="set_alternative_level_tile_proxy"> + <return type="void" /> + <argument index="0" name="source_from" type="int" /> + <argument index="1" name="coords_from" type="Vector2i" /> + <argument index="2" name="alternative_from" type="int" /> + <argument index="3" name="source_to" type="int" /> + <argument index="4" name="coords_to" type="Vector2i" /> + <argument index="5" name="alternative_to" type="int" /> + <description> + </description> + </method> + <method name="set_coords_level_tile_proxy"> + <return type="void" /> + <argument index="0" name="p_source_from" type="int" /> + <argument index="1" name="coords_from" type="Vector2i" /> + <argument index="2" name="source_to" type="int" /> + <argument index="3" name="coords_to" type="Vector2i" /> <description> </description> </method> <method name="set_navigation_layer_layers"> - <return type="void"> - </return> - <argument index="0" name="layer_index" type="int"> - </argument> - <argument index="1" name="layers" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> + <argument index="1" name="layers" type="int" /> <description> </description> </method> <method name="set_occlusion_layer_light_mask"> - <return type="void"> - </return> - <argument index="0" name="layer_index" type="int"> - </argument> - <argument index="1" name="light_mask" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> + <argument index="1" name="light_mask" type="int" /> <description> </description> </method> <method name="set_occlusion_layer_sdf_collision"> - <return type="void"> - </return> - <argument index="0" name="layer_index" type="int"> - </argument> - <argument index="1" name="sdf_collision" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> + <argument index="1" name="sdf_collision" type="int" /> <description> </description> </method> <method name="set_physics_layer_collision_layer"> - <return type="void"> - </return> - <argument index="0" name="layer_index" type="int"> - </argument> - <argument index="1" name="layer" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> + <argument index="1" name="layer" type="int" /> <description> </description> </method> <method name="set_physics_layer_collision_mask"> - <return type="void"> - </return> - <argument index="0" name="layer_index" type="int"> - </argument> - <argument index="1" name="mask" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> + <argument index="1" name="mask" type="int" /> <description> </description> </method> <method name="set_physics_layer_physics_material"> - <return type="void"> - </return> - <argument index="0" name="layer_index" type="int"> - </argument> - <argument index="1" name="physics_material" type="PhysicsMaterial"> - </argument> + <return type="void" /> + <argument index="0" name="layer_index" type="int" /> + <argument index="1" name="physics_material" type="PhysicsMaterial" /> <description> </description> </method> <method name="set_source_id"> - <return type="void"> - </return> - <argument index="0" name="source_id" type="int"> - </argument> - <argument index="1" name="arg1" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="source_id" type="int" /> + <argument index="1" name="arg1" type="int" /> <description> </description> </method> - <method name="set_terrain_color"> - <return type="void"> - </return> - <argument index="0" name="terrain_set" type="int"> - </argument> - <argument index="1" name="terrain_index" type="int"> - </argument> - <argument index="2" name="color" type="Color"> - </argument> + <method name="set_source_level_tile_proxy"> + <return type="void" /> + <argument index="0" name="source_from" type="int" /> + <argument index="1" name="source_to" type="int" /> <description> </description> </method> - <method name="set_terrain_name"> - <return type="void"> - </return> - <argument index="0" name="terrain_set" type="int"> - </argument> - <argument index="1" name="terrain_index" type="int"> - </argument> - <argument index="2" name="name" type="String"> - </argument> + <method name="set_terrain_color"> + <return type="void" /> + <argument index="0" name="terrain_set" type="int" /> + <argument index="1" name="terrain_index" type="int" /> + <argument index="2" name="color" type="Color" /> <description> </description> </method> - <method name="set_terrain_set_mode"> - <return type="void"> - </return> - <argument index="0" name="terrain_set" type="int"> - </argument> - <argument index="1" name="mode" type="int" enum="TileSet.TerrainMode"> - </argument> + <method name="set_terrain_name"> + <return type="void" /> + <argument index="0" name="terrain_set" type="int" /> + <argument index="1" name="terrain_index" type="int" /> + <argument index="2" name="name" type="String" /> <description> </description> </method> - <method name="set_terrains_count"> - <return type="void"> - </return> - <argument index="0" name="terrain_set" type="int"> - </argument> - <argument index="1" name="terrains_count" type="int"> - </argument> + <method name="set_terrain_set_mode"> + <return type="void" /> + <argument index="0" name="terrain_set" type="int" /> + <argument index="1" name="mode" type="int" enum="TileSet.TerrainMode" /> <description> </description> </method> </methods> <members> - <member name="custom_data_layers_count" type="int" setter="set_custom_data_layers_count" getter="get_custom_data_layers_count" default="0"> - </member> - <member name="navigation_layers_count" type="int" setter="set_navigation_layers_count" getter="get_navigation_layers_count" default="0"> - </member> - <member name="occlusion_layers_count" type="int" setter="set_occlusion_layers_count" getter="get_occlusion_layers_count" default="0"> - </member> - <member name="physics_layers_count" type="int" setter="set_physics_layers_count" getter="get_physics_layers_count" default="0"> - </member> - <member name="terrains_sets_count" type="int" setter="set_terrain_sets_count" getter="get_terrain_sets_count" default="0"> - </member> <member name="tile_layout" type="int" setter="set_tile_layout" getter="get_tile_layout" enum="TileSet.TileLayout" default="0"> </member> <member name="tile_offset_axis" type="int" setter="set_tile_offset_axis" getter="get_tile_offset_axis" enum="TileSet.TileOffsetAxis" default="0"> @@ -291,8 +454,6 @@ </member> <member name="uv_clipping" type="bool" setter="set_uv_clipping" getter="is_uv_clipping" default="false"> </member> - <member name="y_sorting" type="bool" setter="set_y_sorting" getter="is_y_sorting" default="false"> - </member> </members> <constants> <constant name="TILE_SHAPE_SQUARE" value="0" enum="TileShape"> diff --git a/doc/classes/TileSetAtlasSource.xml b/doc/classes/TileSetAtlasSource.xml index 8482c356d7..8caa3a7c39 100644 --- a/doc/classes/TileSetAtlasSource.xml +++ b/doc/classes/TileSetAtlasSource.xml @@ -8,186 +8,136 @@ </tutorials> <methods> <method name="can_move_tile_in_atlas" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="atlas_coords" type="Vector2i"> - </argument> - <argument index="1" name="new_atlas_coords" type="Vector2i" default="Vector2i(-1, -1)"> - </argument> - <argument index="2" name="new_size" type="Vector2i" default="Vector2i(-1, -1)"> - </argument> + <return type="bool" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> + <argument index="1" name="new_atlas_coords" type="Vector2i" default="Vector2i(-1, -1)" /> + <argument index="2" name="new_size" type="Vector2i" default="Vector2i(-1, -1)" /> <description> </description> </method> <method name="clear_tiles_outside_texture"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> <method name="create_alternative_tile"> - <return type="int"> - </return> - <argument index="0" name="atlas_coords" type="Vector2i"> - </argument> - <argument index="1" name="alternative_id_override" type="int" default="-1"> - </argument> + <return type="int" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> + <argument index="1" name="alternative_id_override" type="int" default="-1" /> <description> </description> </method> <method name="create_tile"> - <return type="void"> - </return> - <argument index="0" name="atlas_coords" type="Vector2i"> - </argument> - <argument index="1" name="size" type="Vector2i" default="Vector2i(1, 1)"> - </argument> + <return type="void" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> + <argument index="1" name="size" type="Vector2i" default="Vector2i(1, 1)" /> <description> </description> </method> <method name="get_alternative_tile_id" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="atlas_coords" type="Vector2i"> - </argument> - <argument index="1" name="index" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> + <argument index="1" name="index" type="int" /> <description> </description> </method> <method name="get_alternative_tiles_count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="atlas_coords" type="Vector2i"> - </argument> + <return type="int" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> <description> </description> </method> <method name="get_atlas_grid_size" qualifiers="const"> - <return type="Vector2i"> - </return> + <return type="Vector2i" /> <description> </description> </method> <method name="get_next_alternative_tile_id" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="atlas_coords" type="Vector2i"> - </argument> + <return type="int" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> <description> </description> </method> <method name="get_tile_at_coords" qualifiers="const"> - <return type="Vector2i"> - </return> - <argument index="0" name="atlas_coords" type="Vector2i"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> <description> </description> </method> <method name="get_tile_data" qualifiers="const"> - <return type="Object"> - </return> - <argument index="0" name="atlas_coords" type="Vector2i"> - </argument> - <argument index="1" name="index" type="int"> - </argument> + <return type="Object" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> + <argument index="1" name="index" type="int" /> <description> </description> </method> <method name="get_tile_id" qualifiers="const"> - <return type="Vector2i"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="get_tile_size_in_atlas" qualifiers="const"> - <return type="Vector2i"> - </return> - <argument index="0" name="atlas_coords" type="Vector2i"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> <description> </description> </method> <method name="get_tile_texture_region" qualifiers="const"> - <return type="Rect2i"> - </return> - <argument index="0" name="atlas_coords" type="Vector2i"> - </argument> + <return type="Rect2i" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> <description> </description> </method> <method name="get_tiles_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> <method name="has_alternative_tile" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="atlas_coords" type="Vector2i"> - </argument> - <argument index="1" name="alternative_tile" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> + <argument index="1" name="alternative_tile" type="int" /> <description> </description> </method> <method name="has_tile" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="atlas_coords" type="Vector2i"> - </argument> + <return type="bool" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> <description> </description> </method> <method name="has_tiles_outside_texture"> - <return type="bool"> - </return> + <return type="bool" /> <description> </description> </method> <method name="move_tile_in_atlas"> - <return type="void"> - </return> - <argument index="0" name="atlas_coords" type="Vector2i"> - </argument> - <argument index="1" name="new_atlas_coords" type="Vector2i" default="Vector2i(-1, -1)"> - </argument> - <argument index="2" name="new_size" type="Vector2i" default="Vector2i(-1, -1)"> - </argument> + <return type="void" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> + <argument index="1" name="new_atlas_coords" type="Vector2i" default="Vector2i(-1, -1)" /> + <argument index="2" name="new_size" type="Vector2i" default="Vector2i(-1, -1)" /> <description> </description> </method> <method name="remove_alternative_tile"> - <return type="void"> - </return> - <argument index="0" name="atlas_coords" type="Vector2i"> - </argument> - <argument index="1" name="alternative_tile" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> + <argument index="1" name="alternative_tile" type="int" /> <description> </description> </method> <method name="remove_tile"> - <return type="void"> - </return> - <argument index="0" name="atlas_coords" type="Vector2i"> - </argument> + <return type="void" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> <description> </description> </method> <method name="set_alternative_tile_id"> - <return type="void"> - </return> - <argument index="0" name="atlas_coords" type="Vector2i"> - </argument> - <argument index="1" name="alternative_tile" type="int"> - </argument> - <argument index="2" name="new_id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> + <argument index="1" name="alternative_tile" type="int" /> + <argument index="2" name="new_id" type="int" /> <description> </description> </method> diff --git a/doc/classes/TileSetScenesCollectionSource.xml b/doc/classes/TileSetScenesCollectionSource.xml index 1a00eb51c0..a44f519a4c 100644 --- a/doc/classes/TileSetScenesCollectionSource.xml +++ b/doc/classes/TileSetScenesCollectionSource.xml @@ -8,144 +8,107 @@ </tutorials> <methods> <method name="create_scene_tile"> - <return type="int"> - </return> - <argument index="0" name="packed_scene" type="PackedScene"> - </argument> - <argument index="1" name="id_override" type="int" default="-1"> - </argument> + <return type="int" /> + <argument index="0" name="packed_scene" type="PackedScene" /> + <argument index="1" name="id_override" type="int" default="-1" /> <description> </description> </method> <method name="get_alternative_tile_id" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="atlas_coords" type="Vector2i"> - </argument> - <argument index="1" name="index" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> + <argument index="1" name="index" type="int" /> <description> </description> </method> <method name="get_alternative_tiles_count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="atlas_coords" type="Vector2i"> - </argument> + <return type="int" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> <description> </description> </method> <method name="get_next_scene_tile_id" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> <method name="get_scene_tile_display_placeholder" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="id" type="int" /> <description> </description> </method> <method name="get_scene_tile_id"> - <return type="int"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="get_scene_tile_scene" qualifiers="const"> - <return type="PackedScene"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="PackedScene" /> + <argument index="0" name="id" type="int" /> <description> </description> </method> <method name="get_scene_tiles_count"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> <method name="get_tile_id" qualifiers="const"> - <return type="Vector2i"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="get_tiles_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> </description> </method> <method name="has_alternative_tile" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="atlas_coords" type="Vector2i"> - </argument> - <argument index="1" name="alternative_tile" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> + <argument index="1" name="alternative_tile" type="int" /> <description> </description> </method> <method name="has_scene_tile_id"> - <return type="bool"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="id" type="int" /> <description> </description> </method> <method name="has_tile" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="atlas_coords" type="Vector2i"> - </argument> + <return type="bool" /> + <argument index="0" name="atlas_coords" type="Vector2i" /> <description> </description> </method> <method name="remove_scene_tile"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> <description> </description> </method> <method name="set_scene_tile_display_placeholder"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="display_placeholder" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="display_placeholder" type="bool" /> <description> </description> </method> <method name="set_scene_tile_id"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="new_id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="new_id" type="int" /> <description> </description> </method> <method name="set_scene_tile_scene"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="packed_scene" type="PackedScene"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="packed_scene" type="PackedScene" /> <description> </description> </method> diff --git a/doc/classes/Time.xml b/doc/classes/Time.xml index 0c7c090e97..24ce30154d 100644 --- a/doc/classes/Time.xml +++ b/doc/classes/Time.xml @@ -13,81 +13,63 @@ </tutorials> <methods> <method name="get_date_dict_from_system" qualifiers="const"> - <return type="Dictionary"> - </return> - <argument index="0" name="utc" type="bool" default="false"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="utc" type="bool" default="false" /> <description> Returns the current date as a dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]weekday[/code], and [code]dst[/code] (Daylight Savings Time). The returned values are in the system's local time when [code]utc[/code] is false, otherwise they are in UTC. </description> </method> <method name="get_date_dict_from_unix_time" qualifiers="const"> - <return type="Dictionary"> - </return> - <argument index="0" name="unix_time_val" type="int"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="unix_time_val" type="int" /> <description> Converts the given Unix timestamp to a dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], and [code]weekday[/code]. </description> </method> <method name="get_date_string_from_system" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="utc" type="bool" default="false"> - </argument> + <return type="String" /> + <argument index="0" name="utc" type="bool" default="false" /> <description> Returns the current date as an ISO 8601 date string (YYYY-MM-DD). The returned values are in the system's local time when [code]utc[/code] is false, otherwise they are in UTC. </description> </method> <method name="get_date_string_from_unix_time" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="unix_time_val" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="unix_time_val" type="int" /> <description> Converts the given Unix timestamp to an ISO 8601 date string (YYYY-MM-DD). </description> </method> <method name="get_datetime_dict_from_string" qualifiers="const"> - <return type="Dictionary"> - </return> - <argument index="0" name="datetime" type="String"> - </argument> - <argument index="1" name="weekday" type="bool"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="datetime" type="String" /> + <argument index="1" name="weekday" type="bool" /> <description> Converts the given ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS) to a dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]weekday[/code], [code]hour[/code], [code]minute[/code], and [code]second[/code]. If [code]weekday[/code] is false, then the [code]weekday[/code] entry is excluded (the calculation is relatively expensive). </description> </method> <method name="get_datetime_dict_from_system" qualifiers="const"> - <return type="Dictionary"> - </return> - <argument index="0" name="utc" type="bool" default="false"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="utc" type="bool" default="false" /> <description> Returns the current date as a dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]weekday[/code], [code]hour[/code], [code]minute[/code], and [code]second[/code]. </description> </method> <method name="get_datetime_dict_from_unix_time" qualifiers="const"> - <return type="Dictionary"> - </return> - <argument index="0" name="unix_time_val" type="int"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="unix_time_val" type="int" /> <description> Converts the given Unix timestamp to a dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], and [code]weekday[/code]. The returned Dictionary's values will be the same as the [method get_datetime_dict_from_system] if the Unix timestamp is the current time, with the exception of Daylight Savings Time as it cannot be determined from the epoch. </description> </method> <method name="get_datetime_string_from_dict" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="datetime" type="Dictionary"> - </argument> - <argument index="1" name="use_space" type="bool"> - </argument> + <return type="String" /> + <argument index="0" name="datetime" type="Dictionary" /> + <argument index="1" name="use_space" type="bool" /> <description> Converts the given dictionary of keys to an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS). The given dictionary can be populated with the following keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]hour[/code], [code]minute[/code], and [code]second[/code]. Any other entries (including [code]dst[/code]) are ignored. @@ -96,12 +78,9 @@ </description> </method> <method name="get_datetime_string_from_system" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="utc" type="bool" default="false"> - </argument> - <argument index="1" name="use_space" type="bool" default="false"> - </argument> + <return type="String" /> + <argument index="0" name="utc" type="bool" default="false" /> + <argument index="1" name="use_space" type="bool" default="false" /> <description> Returns the current date and time as a dictionary of keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]weekday[/code], [code]dst[/code] (Daylight Savings Time), [code]hour[/code], [code]minute[/code], and [code]second[/code]. The returned values are in the system's local time when [code]utc[/code] is false, otherwise they are in UTC. @@ -109,81 +88,65 @@ </description> </method> <method name="get_datetime_string_from_unix_time" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="unix_time_val" type="int"> - </argument> - <argument index="1" name="use_space" type="bool" default="false"> - </argument> + <return type="String" /> + <argument index="0" name="unix_time_val" type="int" /> + <argument index="1" name="use_space" type="bool" default="false" /> <description> Converts the given Unix timestamp to an ISO 8601 date and time string (YYYY-MM-DDTHH:MM:SS). If [code]use_space[/code] is true, use a space instead of the letter T in the middle. </description> </method> <method name="get_ticks_msec" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the amount of time passed in milliseconds since the engine started. </description> </method> <method name="get_ticks_usec" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the amount of time passed in microseconds since the engine started. </description> </method> <method name="get_time_dict_from_system" qualifiers="const"> - <return type="Dictionary"> - </return> - <argument index="0" name="utc" type="bool" default="false"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="utc" type="bool" default="false" /> <description> Returns the current time as a dictionary of keys: [code]hour[/code], [code]minute[/code], and [code]second[/code]. The returned values are in the system's local time when [code]utc[/code] is false, otherwise they are in UTC. </description> </method> <method name="get_time_dict_from_unix_time" qualifiers="const"> - <return type="Dictionary"> - </return> - <argument index="0" name="unix_time_val" type="int"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="unix_time_val" type="int" /> <description> Converts the given time to a dictionary of keys: [code]hour[/code], [code]minute[/code], and [code]second[/code]. </description> </method> <method name="get_time_string_from_system" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="utc" type="bool" default="false"> - </argument> + <return type="String" /> + <argument index="0" name="utc" type="bool" default="false" /> <description> Returns the current time as an ISO 8601 time string (HH:MM:SS). The returned values are in the system's local time when [code]utc[/code] is false, otherwise they are in UTC. </description> </method> <method name="get_time_string_from_unix_time" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="unix_time_val" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="unix_time_val" type="int" /> <description> Converts the given Unix timestamp to an ISO 8601 time string (HH:MM:SS). </description> </method> <method name="get_time_zone_from_system" qualifiers="const"> - <return type="Dictionary"> - </return> + <return type="Dictionary" /> <description> Returns the current time zone as a dictionary of keys: [code]bias[/code] and [code]name[/code]. The [code]bias[/code] value is the offset from UTC in minutes, since not all time zones are multiples of an hour from UTC. </description> </method> <method name="get_unix_time_from_datetime_dict" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="datetime" type="Dictionary"> - </argument> + <return type="int" /> + <argument index="0" name="datetime" type="Dictionary" /> <description> Converts a dictionary of time values to a Unix timestamp. The given dictionary can be populated with the following keys: [code]year[/code], [code]month[/code], [code]day[/code], [code]hour[/code], [code]minute[/code], and [code]second[/code]. Any other entries (including [code]dst[/code]) are ignored. @@ -192,17 +155,14 @@ </description> </method> <method name="get_unix_time_from_datetime_string" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="datetime" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="datetime" type="String" /> <description> Converts the given ISO 8601 date and/or time string to a Unix timestamp. The string can contain a date only, a time only, or both. </description> </method> <method name="get_unix_time_from_system" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the current Unix timestamp in seconds based on the system time. </description> diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml index 807d8033c1..b91f159160 100644 --- a/doc/classes/Timer.xml +++ b/doc/classes/Timer.xml @@ -12,25 +12,21 @@ </tutorials> <methods> <method name="is_stopped" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the timer is stopped. </description> </method> <method name="start"> - <return type="void"> - </return> - <argument index="0" name="time_sec" type="float" default="-1"> - </argument> + <return type="void" /> + <argument index="0" name="time_sec" type="float" default="-1" /> <description> Starts the timer. Sets [code]wait_time[/code] to [code]time_sec[/code] if [code]time_sec > 0[/code]. This also resets the remaining time to [code]wait_time[/code]. [b]Note:[/b] this method will not resume a paused timer. See [member paused]. </description> </method> <method name="stop"> - <return type="void"> - </return> + <return type="void" /> <description> Stops the timer. </description> diff --git a/doc/classes/TouchScreenButton.xml b/doc/classes/TouchScreenButton.xml index bb4c17c531..e75a41a936 100644 --- a/doc/classes/TouchScreenButton.xml +++ b/doc/classes/TouchScreenButton.xml @@ -12,8 +12,7 @@ </tutorials> <methods> <method name="is_pressed" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if this button is currently pressed. </description> diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index 4f9b59c188..948585aecb 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -4,7 +4,7 @@ 2D transformation (2×3 matrix). </brief_description> <description> - 2×3 matrix (2 rows, 3 columns) used for 2D linear transformations. It can represent transformations such as translation, rotation, or scaling. It consists of a three [Vector2] values: [member x], [member y], and the [member origin]. + 2×3 matrix (2 rows, 3 columns) used for 2D linear transformations. It can represent transformations such as translation, rotation, or scaling. It consists of three [Vector2] values: [member x], [member y], and the [member origin]. For more information, read the "Matrices and transforms" documentation article. </description> <tutorials> @@ -15,243 +15,190 @@ </tutorials> <methods> <method name="Transform2D" qualifiers="constructor"> - <return type="Transform2D"> - </return> + <return type="Transform2D" /> <description> Constructs a default-initialized [Transform2D] set to [constant IDENTITY]. </description> </method> <method name="Transform2D" qualifiers="constructor"> - <return type="Transform2D"> - </return> - <argument index="0" name="from" type="Transform2D"> - </argument> + <return type="Transform2D" /> + <argument index="0" name="from" type="Transform2D" /> <description> Constructs a [Transform2D] as a copy of the given [Transform2D]. </description> </method> <method name="Transform2D" qualifiers="constructor"> - <return type="Transform2D"> - </return> - <argument index="0" name="rotation" type="float"> - </argument> - <argument index="1" name="position" type="Vector2"> - </argument> + <return type="Transform2D" /> + <argument index="0" name="rotation" type="float" /> + <argument index="1" name="position" type="Vector2" /> <description> Constructs the transform from a given angle (in radians) and position. </description> </method> <method name="Transform2D" qualifiers="constructor"> - <return type="Transform2D"> - </return> - <argument index="0" name="x_axis" type="Vector2"> - </argument> - <argument index="1" name="y_axis" type="Vector2"> - </argument> - <argument index="2" name="origin" type="Vector2"> - </argument> + <return type="Transform2D" /> + <argument index="0" name="x_axis" type="Vector2" /> + <argument index="1" name="y_axis" type="Vector2" /> + <argument index="2" name="origin" type="Vector2" /> <description> Constructs the transform from 3 [Vector2] values representing [member x], [member y], and the [member origin] (the three column vectors). </description> </method> <method name="affine_inverse" qualifiers="const"> - <return type="Transform2D"> - </return> + <return type="Transform2D" /> <description> Returns the inverse of the transform, under the assumption that the transformation is composed of rotation, scaling and translation. </description> </method> <method name="basis_xform" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="v" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="v" type="Vector2" /> <description> Returns a vector transformed (multiplied) by the basis matrix. This method does not account for translation (the origin vector). </description> </method> <method name="basis_xform_inv" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="v" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="v" type="Vector2" /> <description> Returns a vector transformed (multiplied) by the inverse basis matrix. This method does not account for translation (the origin vector). </description> </method> <method name="get_origin" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the transform's origin (translation). </description> </method> <method name="get_rotation" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the transform's rotation (in radians). </description> </method> <method name="get_scale" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the scale. </description> </method> <method name="interpolate_with" qualifiers="const"> - <return type="Transform2D"> - </return> - <argument index="0" name="xform" type="Transform2D"> - </argument> - <argument index="1" name="weight" type="float"> - </argument> + <return type="Transform2D" /> + <argument index="0" name="xform" type="Transform2D" /> + <argument index="1" name="weight" type="float" /> <description> Returns a transform interpolated between this transform and another by a given [code]weight[/code] (on the range of 0.0 to 1.0). </description> </method> <method name="inverse" qualifiers="const"> - <return type="Transform2D"> - </return> + <return type="Transform2D" /> <description> Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use [method affine_inverse] for transforms with scaling). </description> </method> <method name="is_equal_approx" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="xform" type="Transform2D"> - </argument> + <return type="bool" /> + <argument index="0" name="xform" type="Transform2D" /> <description> Returns [code]true[/code] if this transform and [code]transform[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component. </description> </method> <method name="looking_at" qualifiers="const"> - <return type="Transform2D"> - </return> - <argument index="0" name="target" type="Vector2" default="Transform2D(1, 0, 0, 1, 0, 0)"> - </argument> + <return type="Transform2D" /> + <argument index="0" name="target" type="Vector2" default="Vector2(0, 0)" /> <description> Returns a copy of the transform rotated such that it's rotation on the X-axis points towards the [code]target[/code] position. Operations take place in global space. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Transform2D"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Transform2D" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector2"> - </return> - <argument index="0" name="right" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="right" type="Vector2" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Rect2"> - </return> - <argument index="0" name="right" type="Rect2"> - </argument> + <return type="Rect2" /> + <argument index="0" name="right" type="Rect2" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Transform2D"> - </return> - <argument index="0" name="right" type="Transform2D"> - </argument> + <return type="Transform2D" /> + <argument index="0" name="right" type="Transform2D" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="PackedVector2Array"> - </return> - <argument index="0" name="right" type="PackedVector2Array"> - </argument> + <return type="PackedVector2Array" /> + <argument index="0" name="right" type="PackedVector2Array" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Transform2D"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="Transform2D" /> + <argument index="0" name="right" type="float" /> <description> This operator multiplies all components of the [Transform2D], including the origin vector, which scales it uniformly. </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Transform2D"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="Transform2D" /> + <argument index="0" name="right" type="int" /> <description> This operator multiplies all components of the [Transform2D], including the origin vector, which scales it uniformly. </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Transform2D"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Transform2D" /> <description> </description> </method> <method name="operator []" qualifiers="operator"> - <return type="Vector2"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="orthonormalized" qualifiers="const"> - <return type="Transform2D"> - </return> + <return type="Transform2D" /> <description> Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors (scale of 1 or -1). </description> </method> <method name="rotated" qualifiers="const"> - <return type="Transform2D"> - </return> - <argument index="0" name="phi" type="float"> - </argument> + <return type="Transform2D" /> + <argument index="0" name="phi" type="float" /> <description> Rotates the transform by the given angle (in radians), using matrix multiplication. </description> </method> <method name="scaled" qualifiers="const"> - <return type="Transform2D"> - </return> - <argument index="0" name="scale" type="Vector2"> - </argument> + <return type="Transform2D" /> + <argument index="0" name="scale" type="Vector2" /> <description> Scales the transform by the given scale factor, using matrix multiplication. </description> </method> <method name="set_rotation"> - <return type="void"> - </return> - <argument index="0" name="rotation" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="rotation" type="float" /> <description> Sets the transform's rotation (in radians). </description> </method> <method name="translated" qualifiers="const"> - <return type="Transform2D"> - </return> - <argument index="0" name="offset" type="Vector2"> - </argument> + <return type="Transform2D" /> + <argument index="0" name="offset" type="Vector2" /> <description> Translates the transform by the given offset, relative to the transform's basis vectors. Unlike [method rotated] and [method scaled], this does not use matrix multiplication. diff --git a/doc/classes/Transform3D.xml b/doc/classes/Transform3D.xml index 5410cbced7..1c906f6a51 100644 --- a/doc/classes/Transform3D.xml +++ b/doc/classes/Transform3D.xml @@ -17,192 +17,146 @@ </tutorials> <methods> <method name="Transform3D" qualifiers="constructor"> - <return type="Transform3D"> - </return> + <return type="Transform3D" /> <description> Constructs a default-initialized [Transform3D] set to [constant IDENTITY]. </description> </method> <method name="Transform3D" qualifiers="constructor"> - <return type="Transform3D"> - </return> - <argument index="0" name="from" type="Transform3D"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="from" type="Transform3D" /> <description> Constructs a [Transform3D] as a copy of the given [Transform3D]. </description> </method> <method name="Transform3D" qualifiers="constructor"> - <return type="Transform3D"> - </return> - <argument index="0" name="basis" type="Basis"> - </argument> - <argument index="1" name="origin" type="Vector3"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="basis" type="Basis" /> + <argument index="1" name="origin" type="Vector3" /> <description> Constructs a Transform3D from a [Basis] and [Vector3]. </description> </method> <method name="Transform3D" qualifiers="constructor"> - <return type="Transform3D"> - </return> - <argument index="0" name="x_axis" type="Vector3"> - </argument> - <argument index="1" name="y_axis" type="Vector3"> - </argument> - <argument index="2" name="z_axis" type="Vector3"> - </argument> - <argument index="3" name="origin" type="Vector3"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="x_axis" type="Vector3" /> + <argument index="1" name="y_axis" type="Vector3" /> + <argument index="2" name="z_axis" type="Vector3" /> + <argument index="3" name="origin" type="Vector3" /> <description> Constructs a Transform3D from four [Vector3] values (matrix columns). Each axis corresponds to local basis vectors (some of which may be scaled). </description> </method> <method name="affine_inverse" qualifiers="const"> - <return type="Transform3D"> - </return> + <return type="Transform3D" /> <description> Returns the inverse of the transform, under the assumption that the transformation is composed of rotation, scaling and translation. </description> </method> <method name="interpolate_with" qualifiers="const"> - <return type="Transform3D"> - </return> - <argument index="0" name="xform" type="Transform3D"> - </argument> - <argument index="1" name="weight" type="float"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="xform" type="Transform3D" /> + <argument index="1" name="weight" type="float" /> <description> Interpolates the transform to other Transform3D by weight amount (on the range of 0.0 to 1.0). </description> </method> <method name="inverse" qualifiers="const"> - <return type="Transform3D"> - </return> + <return type="Transform3D" /> <description> Returns the inverse of the transform, under the assumption that the transformation is composed of rotation and translation (no scaling, use affine_inverse for transforms with scaling). </description> </method> <method name="is_equal_approx" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="xform" type="Transform3D"> - </argument> + <return type="bool" /> + <argument index="0" name="xform" type="Transform3D" /> <description> Returns [code]true[/code] if this transform and [code]transform[/code] are approximately equal, by calling [code]is_equal_approx[/code] on each component. </description> </method> <method name="looking_at" qualifiers="const"> - <return type="Transform3D"> - </return> - <argument index="0" name="target" type="Vector3"> - </argument> - <argument index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="target" type="Vector3" /> + <argument index="1" name="up" type="Vector3" default="Vector3(0, 1, 0)" /> <description> - Returns a copy of the transform rotated such that its -Z axis points towards the [code]target[/code] position. - The transform will first be rotated around the given [code]up[/code] vector, and then fully aligned to the target by a further rotation around an axis perpendicular to both the [code]target[/code] and [code]up[/code] vectors. - Operations take place in global space. + Returns a copy of the transform rotated such that the forward axis (-Z) points towards the [code]target[/code] position. + The up axis (+Y) points as close to the [code]up[/code] vector as possible while staying perpendicular to the forward axis. The resulting transform is orthonormalized. The existing rotation, scale, and skew information from the original transform is discarded. The [code]target[/code] and [code]up[/code] vectors cannot be zero, cannot be parallel to each other, and are defined in global/parent space. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Transform3D"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Transform3D" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="PackedVector3Array"> - </return> - <argument index="0" name="right" type="PackedVector3Array"> - </argument> + <return type="PackedVector3Array" /> + <argument index="0" name="right" type="PackedVector3Array" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Transform3D"> - </return> - <argument index="0" name="right" type="Transform3D"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="right" type="Transform3D" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="AABB"> - </return> - <argument index="0" name="right" type="AABB"> - </argument> + <return type="AABB" /> + <argument index="0" name="right" type="AABB" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector3"> - </return> - <argument index="0" name="right" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="right" type="Vector3" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Transform3D"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="right" type="float" /> <description> This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly. </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Transform3D"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="right" type="int" /> <description> This operator multiplies all components of the [Transform3D], including the origin vector, which scales it uniformly. </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Transform3D"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Transform3D" /> <description> </description> </method> <method name="orthonormalized" qualifiers="const"> - <return type="Transform3D"> - </return> + <return type="Transform3D" /> <description> Returns the transform with the basis orthogonal (90 degrees), and normalized axis vectors. </description> </method> <method name="rotated" qualifiers="const"> - <return type="Transform3D"> - </return> - <argument index="0" name="axis" type="Vector3"> - </argument> - <argument index="1" name="phi" type="float"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="axis" type="Vector3" /> + <argument index="1" name="phi" type="float" /> <description> Rotates the transform around the given axis by the given angle (in radians), using matrix multiplication. The axis must be a normalized vector. </description> </method> <method name="scaled" qualifiers="const"> - <return type="Transform3D"> - </return> - <argument index="0" name="scale" type="Vector3"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="scale" type="Vector3" /> <description> Scales basis and origin of the transform by the given scale factor, using matrix multiplication. </description> </method> <method name="translated" qualifiers="const"> - <return type="Transform3D"> - </return> - <argument index="0" name="offset" type="Vector3"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="offset" type="Vector3" /> <description> Translates the transform by the given offset, relative to the transform's basis vectors. Unlike [method rotated] and [method scaled], this does not use matrix multiplication. diff --git a/doc/classes/Translation.xml b/doc/classes/Translation.xml index d286c6cf0c..4b83a2abf5 100644 --- a/doc/classes/Translation.xml +++ b/doc/classes/Translation.xml @@ -12,80 +12,59 @@ </tutorials> <methods> <method name="add_message"> - <return type="void"> - </return> - <argument index="0" name="src_message" type="StringName"> - </argument> - <argument index="1" name="xlated_message" type="StringName"> - </argument> - <argument index="2" name="context" type="StringName" default=""""> - </argument> + <return type="void" /> + <argument index="0" name="src_message" type="StringName" /> + <argument index="1" name="xlated_message" type="StringName" /> + <argument index="2" name="context" type="StringName" default="""" /> <description> Adds a message if nonexistent, followed by its translation. An additional context could be used to specify the translation context or differentiate polysemic words. </description> </method> <method name="add_plural_message"> - <return type="void"> - </return> - <argument index="0" name="src_message" type="StringName"> - </argument> - <argument index="1" name="xlated_messages" type="PackedStringArray"> - </argument> - <argument index="2" name="context" type="StringName" default=""""> - </argument> + <return type="void" /> + <argument index="0" name="src_message" type="StringName" /> + <argument index="1" name="xlated_messages" type="PackedStringArray" /> + <argument index="2" name="context" type="StringName" default="""" /> <description> Adds a message involving plural translation if nonexistent, followed by its translation. An additional context could be used to specify the translation context or differentiate polysemic words. </description> </method> <method name="erase_message"> - <return type="void"> - </return> - <argument index="0" name="src_message" type="StringName"> - </argument> - <argument index="1" name="context" type="StringName" default=""""> - </argument> + <return type="void" /> + <argument index="0" name="src_message" type="StringName" /> + <argument index="1" name="context" type="StringName" default="""" /> <description> Erases a message. </description> </method> <method name="get_message" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="src_message" type="StringName"> - </argument> - <argument index="1" name="context" type="StringName" default=""""> - </argument> + <return type="StringName" /> + <argument index="0" name="src_message" type="StringName" /> + <argument index="1" name="context" type="StringName" default="""" /> <description> Returns a message's translation. </description> </method> <method name="get_message_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of existing messages. </description> </method> <method name="get_message_list" qualifiers="const"> - <return type="PackedStringArray"> - </return> + <return type="PackedStringArray" /> <description> Returns all the messages (keys). </description> </method> <method name="get_plural_message" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="src_message" type="StringName"> - </argument> - <argument index="1" name="src_plural_message" type="StringName"> - </argument> - <argument index="2" name="n" type="int"> - </argument> - <argument index="3" name="context" type="StringName" default=""""> - </argument> + <return type="StringName" /> + <argument index="0" name="src_message" type="StringName" /> + <argument index="1" name="src_plural_message" type="StringName" /> + <argument index="2" name="n" type="int" /> + <argument index="3" name="context" type="StringName" default="""" /> <description> Returns a message's translation involving plurals. The number [code]n[/code] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language. diff --git a/doc/classes/TranslationServer.xml b/doc/classes/TranslationServer.xml index 664cb3e2e3..029848be33 100644 --- a/doc/classes/TranslationServer.xml +++ b/doc/classes/TranslationServer.xml @@ -12,100 +12,97 @@ </tutorials> <methods> <method name="add_translation"> - <return type="void"> - </return> - <argument index="0" name="translation" type="Translation"> - </argument> + <return type="void" /> + <argument index="0" name="translation" type="Translation" /> <description> Adds a [Translation] resource. </description> </method> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> Clears the server from all translations. </description> </method> <method name="get_loaded_locales" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns an Array of all loaded locales of the game. </description> </method> <method name="get_locale" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the current locale of the game. </description> </method> <method name="get_locale_name" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="locale" type="String"> - </argument> + <return type="String" /> + <argument index="0" name="locale" type="String" /> <description> Returns a locale's language and its variant (e.g. [code]"en_US"[/code] would return [code]"English (United States)"[/code]). </description> </method> <method name="get_translation_object"> - <return type="Translation"> - </return> - <argument index="0" name="locale" type="String"> - </argument> + <return type="Translation" /> + <argument index="0" name="locale" type="String" /> <description> Returns the [Translation] instance based on the [code]locale[/code] passed in. It will return a [code]nullptr[/code] if there is no [Translation] instance that matches the [code]locale[/code]. </description> </method> + <method name="pseudolocalize" qualifiers="const"> + <return type="StringName" /> + <argument index="0" name="message" type="StringName" /> + <description> + Returns the pseudolocalized string based on the [code]p_message[/code] passed in. + </description> + </method> + <method name="reload_pseudolocalization"> + <return type="void" /> + <description> + Reparses the pseudolocalization options and reloads the translation. + </description> + </method> <method name="remove_translation"> - <return type="void"> - </return> - <argument index="0" name="translation" type="Translation"> - </argument> + <return type="void" /> + <argument index="0" name="translation" type="Translation" /> <description> Removes the given translation from the server. </description> </method> <method name="set_locale"> - <return type="void"> - </return> - <argument index="0" name="locale" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="locale" type="String" /> <description> Sets the locale of the game. </description> </method> <method name="translate" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="message" type="StringName"> - </argument> - <argument index="1" name="context" type="StringName" default=""""> - </argument> + <return type="StringName" /> + <argument index="0" name="message" type="StringName" /> + <argument index="1" name="context" type="StringName" default="""" /> <description> Returns the current locale's translation for the given message (key) and context. </description> </method> <method name="translate_plural" qualifiers="const"> - <return type="StringName"> - </return> - <argument index="0" name="message" type="StringName"> - </argument> - <argument index="1" name="plural_message" type="StringName"> - </argument> - <argument index="2" name="n" type="int"> - </argument> - <argument index="3" name="context" type="StringName" default=""""> - </argument> + <return type="StringName" /> + <argument index="0" name="message" type="StringName" /> + <argument index="1" name="plural_message" type="StringName" /> + <argument index="2" name="n" type="int" /> + <argument index="3" name="context" type="StringName" default="""" /> <description> Returns the current locale's translation for the given message (key), plural_message and context. The number [code]n[/code] is the number or quantity of the plural object. It will be used to guide the translation system to fetch the correct plural form for the selected language. </description> </method> </methods> + <members> + <member name="pseudolocalization_enabled" type="bool" setter="set_pseudolocalization_enabled" getter="is_pseudolocalization_enabled" default="false"> + If [code]true[/code], enables the use of pseudolocalization. See [member ProjectSettings.internationalization/pseudolocalization/use_pseudolocalization] for details. + </member> + </members> <constants> </constants> </class> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index b498b9bb90..ed24905254 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -36,35 +36,28 @@ </tutorials> <methods> <method name="are_column_titles_visible" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the column titles are being shown. </description> </method> <method name="clear"> - <return type="void"> - </return> + <return type="void" /> <description> Clears the tree. This removes all items. </description> </method> <method name="clear_column_title_opentype_features"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> <description> Removes all OpenType features from the item's text. </description> </method> <method name="create_item"> - <return type="TreeItem"> - </return> - <argument index="0" name="parent" type="Object" default="null"> - </argument> - <argument index="1" name="idx" type="int" default="-1"> - </argument> + <return type="TreeItem" /> + <argument index="0" name="parent" type="Object" default="null" /> + <argument index="1" name="idx" type="int" default="-1" /> <description> Creates an item in the tree and adds it as a child of [code]parent[/code]. If [code]parent[/code] is [code]null[/code], the root item will be the parent, or the new item will be the root itself if the tree is empty. @@ -72,15 +65,13 @@ </description> </method> <method name="edit_selected"> - <return type="bool"> - </return> + <return type="bool" /> <description> Edits the selected tree item as if it was clicked. The item must be set editable with [method TreeItem.set_editable]. Returns [code]true[/code] if the item could be edited. Fails if no item is selected. </description> </method> <method name="ensure_cursor_is_visible"> - <return type="void"> - </return> + <return type="void" /> <description> Makes the currently focused cell visible. This will scroll the tree if necessary. In [constant SELECT_ROW] mode, this will not do horizontal scrolling, as all the cells in the selected row is focused logically. @@ -88,81 +79,63 @@ </description> </method> <method name="get_column_at_position" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="position" type="Vector2"> - </argument> + <return type="int" /> + <argument index="0" name="position" type="Vector2" /> <description> Returns the column index at [code]position[/code], or -1 if no item is there. </description> </method> <method name="get_column_expand_ratio" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="column" type="int" /> <description> </description> </method> <method name="get_column_title" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="column" type="int" /> <description> Returns the column's title. </description> </method> <method name="get_column_title_direction" qualifiers="const"> - <return type="int" enum="Control.TextDirection"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="int" enum="Control.TextDirection" /> + <argument index="0" name="column" type="int" /> <description> Returns column title base writing direction. </description> </method> <method name="get_column_title_language" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="column" type="int" /> <description> Returns column title language code. </description> </method> <method name="get_column_title_opentype_feature" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="tag" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="tag" type="String" /> <description> Returns OpenType feature [code]tag[/code] of the column title. </description> </method> <method name="get_column_width" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="column" type="int" /> <description> Returns the column's width in pixels. </description> </method> <method name="get_custom_popup_rect" qualifiers="const"> - <return type="Rect2"> - </return> + <return type="Rect2" /> <description> Returns the rectangle for custom popups. Helper to create custom cell controls that display a popup. See [method TreeItem.set_cell_mode]. </description> </method> <method name="get_drop_section_at_position" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="position" type="Vector2"> - </argument> + <return type="int" /> + <argument index="0" name="position" type="Vector2" /> <description> Returns the drop section at [code]position[/code], or -100 if no item is there. Values -1, 0, or 1 will be returned for the "above item", "on item", and "below item" drop sections, respectively. See [enum DropModeFlags] for a description of each drop section. @@ -170,8 +143,7 @@ </description> </method> <method name="get_edited" qualifiers="const"> - <return type="TreeItem"> - </return> + <return type="TreeItem" /> <description> Returns the currently edited item. Can be used with [signal item_edited] to get the item that was modified. [codeblocks] @@ -197,66 +169,54 @@ </description> </method> <method name="get_edited_column" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the column for the currently edited item. </description> </method> <method name="get_item_area_rect" qualifiers="const"> - <return type="Rect2"> - </return> - <argument index="0" name="item" type="Object"> - </argument> - <argument index="1" name="column" type="int" default="-1"> - </argument> + <return type="Rect2" /> + <argument index="0" name="item" type="Object" /> + <argument index="1" name="column" type="int" default="-1" /> <description> Returns the rectangle area for the specified item. If [code]column[/code] is specified, only get the position and size of that column, otherwise get the rectangle containing all columns. </description> </method> <method name="get_item_at_position" qualifiers="const"> - <return type="TreeItem"> - </return> - <argument index="0" name="position" type="Vector2"> - </argument> + <return type="TreeItem" /> + <argument index="0" name="position" type="Vector2" /> <description> Returns the tree item at the specified position (relative to the tree origin position). </description> </method> <method name="get_next_selected"> - <return type="TreeItem"> - </return> - <argument index="0" name="from" type="Object"> - </argument> + <return type="TreeItem" /> + <argument index="0" name="from" type="Object" /> <description> Returns the next selected item after the given one, or [code]null[/code] if the end is reached. If [code]from[/code] is [code]null[/code], this returns the first selected item. </description> </method> <method name="get_pressed_button" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the last pressed button's index. </description> </method> <method name="get_root" qualifiers="const"> - <return type="TreeItem"> - </return> + <return type="TreeItem" /> <description> Returns the tree's root item, or [code]null[/code] if the tree is empty. </description> </method> <method name="get_scroll" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the current scrolling position. </description> </method> <method name="get_selected" qualifiers="const"> - <return type="TreeItem"> - </return> + <return type="TreeItem" /> <description> Returns the currently focused item, or [code]null[/code] if no item is focused. In [constant SELECT_ROW] and [constant SELECT_SINGLE] modes, the focused item is same as the selected item. In [constant SELECT_MULTI] mode, the focused item is the item under the focus cursor, not necessarily selected. @@ -264,8 +224,7 @@ </description> </method> <method name="get_selected_column" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the currently focused column, or -1 if no column is focused. In [constant SELECT_SINGLE] mode, the focused column is the selected column. In [constant SELECT_ROW] mode, the focused column is always 0 if any item is selected. In [constant SELECT_MULTI] mode, the focused column is the column under the focus cursor, and there are not necessarily any column selected. @@ -273,123 +232,90 @@ </description> </method> <method name="is_column_clipping_content" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="column" type="int" /> <description> </description> </method> <method name="is_column_expanding" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="column" type="int" /> <description> </description> </method> <method name="scroll_to_item"> - <return type="void"> - </return> - <argument index="0" name="item" type="Object"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="Object" /> <description> Causes the [Tree] to jump to the specified item. </description> </method> <method name="set_column_clip_content"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="enable" type="bool" /> <description> </description> </method> <method name="set_column_custom_minimum_width"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="min_width" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="min_width" type="int" /> <description> Overrides the calculated minimum width of a column. It can be set to `0` to restore the default behavior. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to [member Control.size_flags_stretch_ratio]. </description> </method> <method name="set_column_expand"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="expand" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="expand" type="bool" /> <description> If [code]true[/code], the column will have the "Expand" flag of [Control]. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to [member Control.size_flags_stretch_ratio]. </description> </method> <method name="set_column_expand_ratio"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="ratio" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="ratio" type="int" /> <description> </description> </method> <method name="set_column_title"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="title" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="title" type="String" /> <description> Sets the title of a column. </description> </method> <method name="set_column_title_direction"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="direction" type="int" enum="Control.TextDirection"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="direction" type="int" enum="Control.TextDirection" /> <description> Sets column title base writing direction. </description> </method> <method name="set_column_title_language"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="language" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="language" type="String" /> <description> Sets language code of column title used for line-breaking and text shaping algorithms, if left empty current locale is used instead. </description> </method> <method name="set_column_title_opentype_feature"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="tag" type="String"> - </argument> - <argument index="2" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="tag" type="String" /> + <argument index="2" name="value" type="int" /> <description> Sets OpenType feature [code]tag[/code] for the column title. </description> </method> <method name="set_column_titles_visible"> - <return type="void"> - </return> - <argument index="0" name="visible" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="visible" type="bool" /> <description> If [code]true[/code], column titles are visible. </description> @@ -429,12 +355,9 @@ </members> <signals> <signal name="button_pressed"> - <argument index="0" name="item" type="TreeItem"> - </argument> - <argument index="1" name="column" type="int"> - </argument> - <argument index="2" name="id" type="int"> - </argument> + <argument index="0" name="item" type="TreeItem" /> + <argument index="1" name="column" type="int" /> + <argument index="2" name="id" type="int" /> <description> Emitted when a button on the tree was pressed (see [method TreeItem.add_button]). </description> @@ -445,29 +368,25 @@ </description> </signal> <signal name="column_title_pressed"> - <argument index="0" name="column" type="int"> - </argument> + <argument index="0" name="column" type="int" /> <description> Emitted when a column's title is pressed. </description> </signal> <signal name="custom_popup_edited"> - <argument index="0" name="arrow_clicked" type="bool"> - </argument> + <argument index="0" name="arrow_clicked" type="bool" /> <description> Emitted when a cell with the [constant TreeItem.CELL_MODE_CUSTOM] is clicked to be edited. </description> </signal> <signal name="empty_rmb"> - <argument index="0" name="position" type="Vector2"> - </argument> + <argument index="0" name="position" type="Vector2" /> <description> Emitted when the right mouse button is pressed in the empty space of the tree. </description> </signal> <signal name="empty_tree_rmb_selected"> - <argument index="0" name="position" type="Vector2"> - </argument> + <argument index="0" name="position" type="Vector2" /> <description> Emitted when the right mouse button is pressed if right mouse button selection is active and the tree is empty. </description> @@ -478,8 +397,7 @@ </description> </signal> <signal name="item_collapsed"> - <argument index="0" name="item" type="TreeItem"> - </argument> + <argument index="0" name="item" type="TreeItem" /> <description> Emitted when an item is collapsed by a click on the folding arrow. </description> @@ -505,8 +423,7 @@ </description> </signal> <signal name="item_rmb_selected"> - <argument index="0" name="position" type="Vector2"> - </argument> + <argument index="0" name="position" type="Vector2" /> <description> Emitted when an item is selected with the right mouse button. </description> @@ -517,12 +434,9 @@ </description> </signal> <signal name="multi_selected"> - <argument index="0" name="item" type="TreeItem"> - </argument> - <argument index="1" name="column" type="int"> - </argument> - <argument index="2" name="selected" type="bool"> - </argument> + <argument index="0" name="item" type="TreeItem" /> + <argument index="1" name="column" type="int" /> + <argument index="2" name="selected" type="bool" /> <description> Emitted instead of [code]item_selected[/code] if [code]select_mode[/code] is [constant SELECT_MULTI]. </description> @@ -560,142 +474,145 @@ </constant> </constants> <theme_items> - <theme_item name="arrow" type="Texture2D"> + <theme_item name="arrow" data_type="icon" type="Texture2D"> The arrow icon used when a foldable item is not collapsed. </theme_item> - <theme_item name="arrow_collapsed" type="Texture2D"> + <theme_item name="arrow_collapsed" data_type="icon" type="Texture2D"> The arrow icon used when a foldable item is collapsed (for left-to-right layouts). </theme_item> - <theme_item name="arrow_collapsed_mirrored" type="Texture2D"> + <theme_item name="arrow_collapsed_mirrored" data_type="icon" type="Texture2D"> The arrow icon used when a foldable item is collapsed (for right-to-left layouts). </theme_item> - <theme_item name="bg" type="StyleBox"> + <theme_item name="bg" data_type="style" type="StyleBox"> Default [StyleBox] for the [Tree], i.e. used when the control is not being focused. </theme_item> - <theme_item name="bg_focus" type="StyleBox"> + <theme_item name="bg_focus" data_type="style" type="StyleBox"> [StyleBox] used when the [Tree] is being focused. </theme_item> - <theme_item name="button_margin" type="int" default="4"> + <theme_item name="button_margin" data_type="constant" type="int" default="4"> The horizontal space between each button in a cell. </theme_item> - <theme_item name="button_pressed" type="StyleBox"> + <theme_item name="button_pressed" data_type="style" type="StyleBox"> [StyleBox] used when a button in the tree is pressed. </theme_item> - <theme_item name="checked" type="Texture2D"> + <theme_item name="checked" data_type="icon" type="Texture2D"> The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is checked. </theme_item> - <theme_item name="children_hl_line_color" type="Color" default="Color(0.27, 0.27, 0.27, 1)"> + <theme_item name="children_hl_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)"> The [Color] of the relationship lines between the selected [TreeItem] and its children. </theme_item> - <theme_item name="children_hl_line_width" type="int" default="1"> + <theme_item name="children_hl_line_width" data_type="constant" type="int" default="1"> The width of the relationship lines between the selected [TreeItem] and its children. </theme_item> - <theme_item name="cursor" type="StyleBox"> + <theme_item name="cursor" data_type="style" type="StyleBox"> [StyleBox] used for the cursor, when the [Tree] is being focused. </theme_item> - <theme_item name="cursor_unfocused" type="StyleBox"> + <theme_item name="cursor_unfocused" data_type="style" type="StyleBox"> [StyleBox] used for the cursor, when the [Tree] is not being focused. </theme_item> - <theme_item name="custom_button" type="StyleBox"> + <theme_item name="custom_button" data_type="style" type="StyleBox"> Default [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell. </theme_item> - <theme_item name="custom_button_font_highlight" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> + <theme_item name="custom_button_font_highlight" data_type="color" type="Color" default="Color(0.94, 0.94, 0.94, 1)"> Text [Color] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered. </theme_item> - <theme_item name="custom_button_hover" type="StyleBox"> + <theme_item name="custom_button_hover" data_type="style" type="StyleBox"> [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's hovered. </theme_item> - <theme_item name="custom_button_pressed" type="StyleBox"> + <theme_item name="custom_button_pressed" data_type="style" type="StyleBox"> [StyleBox] for a [constant TreeItem.CELL_MODE_CUSTOM] mode cell when it's pressed. </theme_item> - <theme_item name="draw_guides" type="int" default="1"> + <theme_item name="draw_guides" data_type="constant" type="int" default="1"> Draws the guidelines if not zero, this acts as a boolean. The guideline is a horizontal line drawn at the bottom of each item. </theme_item> - <theme_item name="draw_relationship_lines" type="int" default="0"> + <theme_item name="draw_relationship_lines" data_type="constant" type="int" default="0"> Draws the relationship lines if not zero, this acts as a boolean. Relationship lines are drawn at the start of child items to show hierarchy. </theme_item> - <theme_item name="drop_position_color" type="Color" default="Color(1, 0.3, 0.2, 1)"> + <theme_item name="drop_position_color" data_type="color" type="Color" default="Color(1, 0.3, 0.2, 1)"> [Color] used to draw possible drop locations. See [enum DropModeFlags] constants for further description of drop locations. </theme_item> - <theme_item name="font" type="Font"> + <theme_item name="font" data_type="font" type="Font"> [Font] of the item's text. </theme_item> - <theme_item name="font_color" type="Color" default="Color(0.69, 0.69, 0.69, 1)"> + <theme_item name="font_color" data_type="color" type="Color" default="Color(0.69, 0.69, 0.69, 1)"> Default text [Color] of the item. </theme_item> - <theme_item name="font_outline_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_outline_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The tint of text outline of the item. </theme_item> - <theme_item name="font_selected_color" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="font_selected_color" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> Text [Color] used when the item is selected. </theme_item> - <theme_item name="font_size" type="int"> + <theme_item name="font_size" data_type="font_size" type="int"> Font size of the item's text. </theme_item> - <theme_item name="guide_color" type="Color" default="Color(0, 0, 0, 0.1)"> + <theme_item name="guide_color" data_type="color" type="Color" default="Color(0, 0, 0, 0.1)"> [Color] of the guideline. </theme_item> - <theme_item name="hseparation" type="int" default="4"> + <theme_item name="hseparation" data_type="constant" type="int" default="4"> The horizontal space between item cells. This is also used as the margin at the start of an item when folding is disabled. </theme_item> - <theme_item name="item_margin" type="int" default="12"> + <theme_item name="indeterminate" data_type="icon" type="Texture2D"> + The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is indeterminate. + </theme_item> + <theme_item name="item_margin" data_type="constant" type="int" default="12"> The horizontal margin at the start of an item. This is used when folding is enabled for the item. </theme_item> - <theme_item name="outline_size" type="int" default="0"> + <theme_item name="outline_size" data_type="constant" type="int" default="0"> The size of the text outline. </theme_item> - <theme_item name="parent_hl_line_color" type="Color" default="Color(0.27, 0.27, 0.27, 1)"> + <theme_item name="parent_hl_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)"> The [Color] of the relationship lines between the selected [TreeItem] and its parents. </theme_item> - <theme_item name="parent_hl_line_margin" type="int" default="0"> + <theme_item name="parent_hl_line_margin" data_type="constant" type="int" default="0"> The space between the parent relationship lines for the selected [TreeItem] and the relationship lines to its siblings that are not selected. </theme_item> - <theme_item name="parent_hl_line_width" type="int" default="1"> + <theme_item name="parent_hl_line_width" data_type="constant" type="int" default="1"> The width of the relationship lines between the selected [TreeItem] and its parents. </theme_item> - <theme_item name="relationship_line_color" type="Color" default="Color(0.27, 0.27, 0.27, 1)"> + <theme_item name="relationship_line_color" data_type="color" type="Color" default="Color(0.27, 0.27, 0.27, 1)"> The default [Color] of the relationship lines. </theme_item> - <theme_item name="relationship_line_width" type="int" default="1"> + <theme_item name="relationship_line_width" data_type="constant" type="int" default="1"> The default width of the relationship lines. </theme_item> - <theme_item name="scroll_border" type="int" default="4"> + <theme_item name="scroll_border" data_type="constant" type="int" default="4"> The maximum distance between the mouse cursor and the control's border to trigger border scrolling when dragging. </theme_item> - <theme_item name="scroll_speed" type="int" default="12"> + <theme_item name="scroll_speed" data_type="constant" type="int" default="12"> The speed of border scrolling. </theme_item> - <theme_item name="select_arrow" type="Texture2D"> + <theme_item name="select_arrow" data_type="icon" type="Texture2D"> The arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell. </theme_item> - <theme_item name="selected" type="StyleBox"> + <theme_item name="selected" data_type="style" type="StyleBox"> [StyleBox] for the selected items, used when the [Tree] is not being focused. </theme_item> - <theme_item name="selected_focus" type="StyleBox"> + <theme_item name="selected_focus" data_type="style" type="StyleBox"> [StyleBox] for the selected items, used when the [Tree] is being focused. </theme_item> - <theme_item name="title_button_color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> + <theme_item name="title_button_color" data_type="color" type="Color" default="Color(0.88, 0.88, 0.88, 1)"> Default text [Color] of the title button. </theme_item> - <theme_item name="title_button_font" type="Font"> + <theme_item name="title_button_font" data_type="font" type="Font"> [Font] of the title button's text. </theme_item> - <theme_item name="title_button_hover" type="StyleBox"> + <theme_item name="title_button_hover" data_type="style" type="StyleBox"> [StyleBox] used when the title button is being hovered. </theme_item> - <theme_item name="title_button_normal" type="StyleBox"> + <theme_item name="title_button_normal" data_type="style" type="StyleBox"> Default [StyleBox] for the title button. </theme_item> - <theme_item name="title_button_pressed" type="StyleBox"> + <theme_item name="title_button_pressed" data_type="style" type="StyleBox"> [StyleBox] used when the title button is being pressed. </theme_item> - <theme_item name="unchecked" type="Texture2D"> + <theme_item name="unchecked" data_type="icon" type="Texture2D"> The check icon to display when the [constant TreeItem.CELL_MODE_CHECK] mode cell is unchecked. </theme_item> - <theme_item name="updown" type="Texture2D"> + <theme_item name="updown" data_type="icon" type="Texture2D"> The updown arrow icon to display for the [constant TreeItem.CELL_MODE_RANGE] mode cell. </theme_item> - <theme_item name="vseparation" type="int" default="4"> + <theme_item name="vseparation" data_type="constant" type="int" default="4"> The vertical padding inside each item, i.e. the distance between the item's content and top/bottom border. </theme_item> </theme_items> diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index 85c9caa101..b997d87ac0 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -11,811 +11,644 @@ </tutorials> <methods> <method name="add_button"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="button" type="Texture2D"> - </argument> - <argument index="2" name="button_idx" type="int" default="-1"> - </argument> - <argument index="3" name="disabled" type="bool" default="false"> - </argument> - <argument index="4" name="tooltip" type="String" default=""""> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="button" type="Texture2D" /> + <argument index="2" name="button_idx" type="int" default="-1" /> + <argument index="3" name="disabled" type="bool" default="false" /> + <argument index="4" name="tooltip" type="String" default="""" /> <description> Adds a button with [Texture2D] [code]button[/code] at column [code]column[/code]. The [code]button_idx[/code] index is used to identify the button when calling other methods. If not specified, the next available index is used, which may be retrieved by calling [method get_button_count] immediately after this method. Optionally, the button can be [code]disabled[/code] and have a [code]tooltip[/code]. </description> </method> <method name="call_recursive" qualifiers="vararg"> - <return type="Variant"> - </return> - <argument index="0" name="method" type="StringName"> - </argument> + <return type="Variant" /> + <argument index="0" name="method" type="StringName" /> <description> Calls the [code]method[/code] on the actual TreeItem and its children recursively. Pass parameters as a comma separated list. </description> </method> <method name="clear_custom_bg_color"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> <description> Resets the background color for the given column to default. </description> </method> <method name="clear_custom_color"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> <description> Resets the color for the given column to default. </description> </method> <method name="clear_opentype_features"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> <description> Removes all OpenType features. </description> </method> <method name="create_child"> - <return type="TreeItem"> - </return> - <argument index="0" name="idx" type="int" default="-1"> - </argument> + <return type="TreeItem" /> + <argument index="0" name="idx" type="int" default="-1" /> <description> Creates an item and adds it as a child. The new item will be inserted as position [code]idx[/code] (the default value [code]-1[/code] means the last position), or it will be the last child if [code]idx[/code] is higher than the child count. </description> </method> <method name="deselect"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> <description> Deselects the given column. </description> </method> <method name="erase_button"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="button_idx" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="button_idx" type="int" /> <description> Removes the button at index [code]button_idx[/code] in column [code]column[/code]. </description> </method> <method name="get_button" qualifiers="const"> - <return type="Texture2D"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="button_idx" type="int"> - </argument> + <return type="Texture2D" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="button_idx" type="int" /> <description> Returns the [Texture2D] of the button at index [code]button_idx[/code] in column [code]column[/code]. </description> </method> <method name="get_button_count" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="column" type="int" /> <description> Returns the number of buttons in column [code]column[/code]. May be used to get the most recently added button's index, if no index was specified. </description> </method> <method name="get_button_tooltip" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="button_idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="button_idx" type="int" /> <description> Returns the tooltip string for the button at index [code]button_idx[/code] in column [code]column[/code]. </description> </method> <method name="get_cell_mode" qualifiers="const"> - <return type="int" enum="TreeItem.TreeCellMode"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="int" enum="TreeItem.TreeCellMode" /> + <argument index="0" name="column" type="int" /> <description> Returns the column's cell mode. </description> </method> <method name="get_child"> - <return type="TreeItem"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="TreeItem" /> + <argument index="0" name="idx" type="int" /> <description> Returns a child item by its index (see [method get_child_count]). This method is often used for iterating all children of an item. Negative indices access the children from the last one. </description> </method> <method name="get_child_count"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of child items. </description> </method> <method name="get_children"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns an array of references to the item's children. </description> </method> <method name="get_custom_bg_color" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="column" type="int" /> <description> Returns the custom background color of column [code]column[/code]. </description> </method> <method name="get_custom_color" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="column" type="int" /> <description> Returns the custom color of column [code]column[/code]. </description> </method> <method name="get_custom_font" qualifiers="const"> - <return type="Font"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="Font" /> + <argument index="0" name="column" type="int" /> <description> + Returns custom font used to draw text in the column [code]column[/code]. + </description> + </method> + <method name="get_custom_font_size" qualifiers="const"> + <return type="int" /> + <argument index="0" name="column" type="int" /> + <description> + Returns custom font size used to draw text in the column [code]column[/code]. </description> </method> <method name="get_expand_right" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="column" type="int" /> <description> Returns [code]true[/code] if [code]expand_right[/code] is set. </description> </method> <method name="get_first_child" qualifiers="const"> - <return type="TreeItem"> - </return> + <return type="TreeItem" /> <description> Returns the TreeItem's first child. </description> </method> <method name="get_icon" qualifiers="const"> - <return type="Texture2D"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="Texture2D" /> + <argument index="0" name="column" type="int" /> <description> Returns the given column's icon [Texture2D]. Error if no icon is set. </description> </method> <method name="get_icon_max_width" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="column" type="int" /> <description> Returns the column's icon's maximum width. </description> </method> <method name="get_icon_modulate" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="Color" /> + <argument index="0" name="column" type="int" /> <description> Returns the [Color] modulating the column's icon. </description> </method> <method name="get_icon_region" qualifiers="const"> - <return type="Rect2"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="Rect2" /> + <argument index="0" name="column" type="int" /> <description> Returns the icon [Texture2D] region as [Rect2]. </description> </method> <method name="get_index"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the node's order in the tree. For example, if called on the first child item the position is [code]0[/code]. </description> </method> <method name="get_language" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="column" type="int" /> <description> Returns item's text language code. </description> </method> <method name="get_metadata" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="Variant" /> + <argument index="0" name="column" type="int" /> <description> Returns the metadata value that was set for the given column using [method set_metadata]. </description> </method> <method name="get_next" qualifiers="const"> - <return type="TreeItem"> - </return> + <return type="TreeItem" /> <description> Returns the next TreeItem in the tree or a null object if there is none. </description> </method> <method name="get_next_visible"> - <return type="TreeItem"> - </return> - <argument index="0" name="wrap" type="bool" default="false"> - </argument> + <return type="TreeItem" /> + <argument index="0" name="wrap" type="bool" default="false" /> <description> Returns the next visible TreeItem in the tree or a null object if there is none. If [code]wrap[/code] is enabled, the method will wrap around to the first visible element in the tree when called on the last visible element, otherwise it returns [code]null[/code]. </description> </method> <method name="get_opentype_feature" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="tag" type="String"> - </argument> + <return type="int" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="tag" type="String" /> <description> Returns OpenType feature [code]tag[/code] of the item's text. </description> </method> <method name="get_parent" qualifiers="const"> - <return type="TreeItem"> - </return> + <return type="TreeItem" /> <description> Returns the parent TreeItem or a null object if there is none. </description> </method> <method name="get_prev"> - <return type="TreeItem"> - </return> + <return type="TreeItem" /> <description> Returns the previous TreeItem in the tree or a null object if there is none. </description> </method> <method name="get_prev_visible"> - <return type="TreeItem"> - </return> - <argument index="0" name="wrap" type="bool" default="false"> - </argument> + <return type="TreeItem" /> + <argument index="0" name="wrap" type="bool" default="false" /> <description> Returns the previous visible TreeItem in the tree or a null object if there is none. If [code]wrap[/code] is enabled, the method will wrap around to the last visible element in the tree when called on the first visible element, otherwise it returns [code]null[/code]. </description> </method> <method name="get_range" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="column" type="int" /> <description> Returns the value of a [constant CELL_MODE_RANGE] column. </description> </method> <method name="get_range_config"> - <return type="Dictionary"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="Dictionary" /> + <argument index="0" name="column" type="int" /> <description> Returns a dictionary containing the range parameters for a given column. The keys are "min", "max", "step", and "expr". </description> </method> <method name="get_structured_text_bidi_override" qualifiers="const"> - <return type="int" enum="Control.StructuredTextParser"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="int" enum="Control.StructuredTextParser" /> + <argument index="0" name="column" type="int" /> <description> </description> </method> <method name="get_structured_text_bidi_override_options" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="Array" /> + <argument index="0" name="column" type="int" /> <description> </description> </method> <method name="get_suffix" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="column" type="int" /> <description> Gets the suffix string shown after the column value. </description> </method> <method name="get_text" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="column" type="int" /> <description> Returns the given column's text. </description> </method> <method name="get_text_align" qualifiers="const"> - <return type="int" enum="TreeItem.TextAlign"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="int" enum="TreeItem.TextAlign" /> + <argument index="0" name="column" type="int" /> <description> Returns the given column's text alignment. </description> </method> <method name="get_text_direction" qualifiers="const"> - <return type="int" enum="Control.TextDirection"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="int" enum="Control.TextDirection" /> + <argument index="0" name="column" type="int" /> <description> Returns item's text base writing direction. </description> </method> <method name="get_tooltip" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="column" type="int" /> <description> Returns the given column's tooltip. </description> </method> <method name="get_tree" qualifiers="const"> - <return type="Tree"> - </return> + <return type="Tree" /> <description> Returns the [Tree] that owns this TreeItem. </description> </method> <method name="is_button_disabled" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="button_idx" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="button_idx" type="int" /> <description> Returns [code]true[/code] if the button at index [code]button_idx[/code] for the given column is disabled. </description> </method> <method name="is_checked" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="column" type="int" /> <description> Returns [code]true[/code] if the given column is checked. </description> </method> <method name="is_custom_set_as_button" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="column" type="int" /> <description> </description> </method> <method name="is_editable"> - <return type="bool"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="column" type="int" /> <description> Returns [code]true[/code] if column [code]column[/code] is editable. </description> </method> + <method name="is_indeterminate" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="column" type="int" /> + <description> + Returns [code]true[/code] if the given column is indeterminate. + </description> + </method> <method name="is_selectable" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="column" type="int" /> <description> Returns [code]true[/code] if column [code]column[/code] is selectable. </description> </method> <method name="is_selected"> - <return type="bool"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="column" type="int" /> <description> Returns [code]true[/code] if column [code]column[/code] is selected. </description> </method> <method name="move_after"> - <return type="void"> - </return> - <argument index="0" name="item" type="Object"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="Object" /> <description> Moves this TreeItem right after the given [code]item[/code]. [b]Note:[/b] You can't move to the root or move the root. </description> </method> <method name="move_before"> - <return type="void"> - </return> - <argument index="0" name="item" type="Object"> - </argument> + <return type="void" /> + <argument index="0" name="item" type="Object" /> <description> Moves this TreeItem right before the given [code]item[/code]. [b]Note:[/b] You can't move to the root or move the root. </description> </method> <method name="remove_child"> - <return type="void"> - </return> - <argument index="0" name="child" type="Object"> - </argument> + <return type="void" /> + <argument index="0" name="child" type="Object" /> <description> Removes the given child [TreeItem] and all its children from the [Tree]. Note that it doesn't free the item from memory, so it can be reused later. To completely remove a [TreeItem] use [method Object.free]. </description> </method> <method name="select"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> <description> Selects the column [code]column[/code]. </description> </method> <method name="set_button"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="button_idx" type="int"> - </argument> - <argument index="2" name="button" type="Texture2D"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="button_idx" type="int" /> + <argument index="2" name="button" type="Texture2D" /> <description> Sets the given column's button [Texture2D] at index [code]button_idx[/code] to [code]button[/code]. </description> </method> <method name="set_button_disabled"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="button_idx" type="int"> - </argument> - <argument index="2" name="disabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="button_idx" type="int" /> + <argument index="2" name="disabled" type="bool" /> <description> If [code]true[/code], disables the button at index [code]button_idx[/code] in column [code]column[/code]. </description> </method> <method name="set_cell_mode"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="mode" type="int" enum="TreeItem.TreeCellMode"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="mode" type="int" enum="TreeItem.TreeCellMode" /> <description> Sets the given column's cell mode to [code]mode[/code]. See [enum TreeCellMode] constants. </description> </method> <method name="set_checked"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="checked" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="checked" type="bool" /> <description> - If [code]true[/code], the column [code]column[/code] is checked. + If [code]true[/code], the column [code]column[/code] is checked. Clears column's indeterminate status. </description> </method> <method name="set_custom_as_button"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="enable" type="bool" /> <description> </description> </method> <method name="set_custom_bg_color"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> - <argument index="2" name="just_outline" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="color" type="Color" /> + <argument index="2" name="just_outline" type="bool" default="false" /> <description> Sets the given column's custom background color and whether to just use it as an outline. </description> </method> <method name="set_custom_color"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="color" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="color" type="Color" /> <description> Sets the given column's custom color. </description> </method> <method name="set_custom_draw"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="object" type="Object"> - </argument> - <argument index="2" name="callback" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="object" type="Object" /> + <argument index="2" name="callback" type="StringName" /> <description> Sets the given column's custom draw callback to [code]callback[/code] method on [code]object[/code]. The [code]callback[/code] should accept two arguments: the [TreeItem] that is drawn and its position and size as a [Rect2]. </description> </method> <method name="set_custom_font"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="font" type="Font"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="font" type="Font" /> <description> + Sets custom font used to draw text in the column [code]column[/code]. + </description> + </method> + <method name="set_custom_font_size"> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="font_size" type="int" /> + <description> + Sets custom font size used to draw text in the column [code]column[/code]. </description> </method> <method name="set_editable"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="enabled" type="bool" /> <description> If [code]true[/code], column [code]column[/code] is editable. </description> </method> <method name="set_expand_right"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="enable" type="bool" /> <description> If [code]true[/code], column [code]column[/code] is expanded to the right. </description> </method> <method name="set_icon"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="texture" type="Texture2D"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="texture" type="Texture2D" /> <description> Sets the given column's icon [Texture2D]. </description> </method> <method name="set_icon_max_width"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="width" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="width" type="int" /> <description> Sets the given column's icon's maximum width. </description> </method> <method name="set_icon_modulate"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="modulate" type="Color"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="modulate" type="Color" /> <description> Modulates the given column's icon with [code]modulate[/code]. </description> </method> <method name="set_icon_region"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="region" type="Rect2"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="region" type="Rect2" /> <description> Sets the given column's icon's texture region. </description> </method> + <method name="set_indeterminate"> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="indeterminate" type="bool" /> + <description> + If [code]true[/code], the column [code]column[/code] is marked indeterminate. + [b]Note:[/b] If set [code]true[/code] from [code]false[/code], then column is cleared of checked status. + </description> + </method> <method name="set_language"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="language" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="language" type="String" /> <description> Sets language code of item's text used for line-breaking and text shaping algorithms, if left empty current locale is used instead. </description> </method> <method name="set_metadata"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="meta" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="meta" type="Variant" /> <description> Sets the metadata value for the given column, which can be retrieved later using [method get_metadata]. This can be used, for example, to store a reference to the original data. </description> </method> <method name="set_opentype_feature"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="tag" type="String"> - </argument> - <argument index="2" name="value" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="tag" type="String" /> + <argument index="2" name="value" type="int" /> <description> Sets OpenType feature [code]tag[/code] for the item's text. </description> </method> <method name="set_range"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="value" type="float"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="value" type="float" /> <description> Sets the value of a [constant CELL_MODE_RANGE] column. </description> </method> <method name="set_range_config"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="min" type="float"> - </argument> - <argument index="2" name="max" type="float"> - </argument> - <argument index="3" name="step" type="float"> - </argument> - <argument index="4" name="expr" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="min" type="float" /> + <argument index="2" name="max" type="float" /> + <argument index="3" name="step" type="float" /> + <argument index="4" name="expr" type="bool" default="false" /> <description> Sets the range of accepted values for a column. The column must be in the [constant CELL_MODE_RANGE] mode. If [code]expr[/code] is [code]true[/code], the edit mode slider will use an exponential scale as with [member Range.exp_edit]. </description> </method> <method name="set_selectable"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="selectable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="selectable" type="bool" /> <description> If [code]true[/code], the given column is selectable. </description> </method> <method name="set_structured_text_bidi_override"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="parser" type="int" enum="Control.StructuredTextParser"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="parser" type="int" enum="Control.StructuredTextParser" /> <description> </description> </method> <method name="set_structured_text_bidi_override_options"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="args" type="Array"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="args" type="Array" /> <description> </description> </method> <method name="set_suffix"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="text" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="text" type="String" /> <description> Sets a string to be shown after a column's value (for example, a unit abbreviation). </description> </method> <method name="set_text"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="text" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="text" type="String" /> <description> Sets the given column's text value. </description> </method> <method name="set_text_align"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="text_align" type="int" enum="TreeItem.TextAlign"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="text_align" type="int" enum="TreeItem.TextAlign" /> <description> Sets the given column's text alignment. See [enum TextAlign] for possible values. </description> </method> <method name="set_text_direction"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="direction" type="int" enum="Control.TextDirection"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="direction" type="int" enum="Control.TextDirection" /> <description> Sets item's text base writing direction. </description> </method> <method name="set_tooltip"> - <return type="void"> - </return> - <argument index="0" name="column" type="int"> - </argument> - <argument index="1" name="tooltip" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="column" type="int" /> + <argument index="1" name="tooltip" type="String" /> <description> Sets the given column's tooltip text. </description> </method> <method name="uncollapse_tree"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index 253822cf32..372a6e7ebf 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -44,18 +44,15 @@ </tutorials> <methods> <method name="bind_node"> - <return type="Tween"> - </return> - <argument index="0" name="node" type="Node"> - </argument> + <return type="Tween" /> + <argument index="0" name="node" type="Node" /> <description> Binds this [Tween] with the given [code]node[/code]. [Tween]s are processed directly by the [SceneTree], so they run independently of the animated nodes. When you bind a [Node] with the [Tween], the [Tween] will halt the animation when the object is not inside tree and the [Tween] will be automatically killed when the bound object is freed. Also [constant TWEEN_PAUSE_BOUND] will make the pausing behavior dependent on the bound node. For a shorter way to create and bind a [Tween], you can use [method Node.create_tween]. </description> </method> <method name="chain"> - <return type="Tween"> - </return> + <return type="Tween" /> <description> Used to chain two [Tweener]s after [method set_parallel] is called with [code]true[/code]. [codeblock] @@ -67,10 +64,8 @@ </description> </method> <method name="custom_step"> - <return type="bool"> - </return> - <argument index="0" name="delta" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="delta" type="float" /> <description> Processes the [Tween] by given [code]delta[/code] value, in seconds. Mostly useful when the [Tween] is paused, for controlling it manually. Can also be used to end the [Tween] animation immediately, by using [code]delta[/code] longer than the whole duration. Returns [code]true[/code] if the [Tween] still has [Tweener]s that haven't finished. @@ -78,20 +73,13 @@ </description> </method> <method name="interpolate_value"> - <return type="Variant"> - </return> - <argument index="0" name="trans_type" type="Variant"> - </argument> - <argument index="1" name="ease_type" type="Variant"> - </argument> - <argument index="2" name="elapsed_time" type="float"> - </argument> - <argument index="3" name="initial_value" type="float"> - </argument> - <argument index="4" name="delta_value" type="int" enum="Tween.TransitionType"> - </argument> - <argument index="5" name="duration" type="int" enum="Tween.EaseType"> - </argument> + <return type="Variant" /> + <argument index="0" name="trans_type" type="Variant" /> + <argument index="1" name="ease_type" type="Variant" /> + <argument index="2" name="elapsed_time" type="float" /> + <argument index="3" name="initial_value" type="float" /> + <argument index="4" name="delta_value" type="int" enum="Tween.TransitionType" /> + <argument index="5" name="duration" type="int" enum="Tween.EaseType" /> <description> This method can be used for manual interpolation of a value, when you don't want [Tween] to do animating for you. It's similar to [method @GlobalScope.lerp], but with support for custom transition and easing. [code]elapsed_time[/code] is the time in seconds that passed after the interping started and it's used to control the position of the interpolation. E.g. when it's equal to half of the [code]duration[/code], the interpolated value will be halfway between initial and final values. This value can also be greater than [code]duration[/code] or lower than 0, which will extrapolate the value. @@ -101,31 +89,27 @@ </description> </method> <method name="is_running"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns whether the [Tween] is currently running, i.e. it wasn't paused and it's not finished. </description> </method> <method name="is_valid"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns whether the [Tween] is valid. A valid [Tween] is a [Tween] contained by the scene tree (i.e. the array from [method SceneTree.get_processed_tweens] will contain this [Tween]). [Tween] might become invalid when it has finished tweening or was killed, also when created with [code]Tween.new()[/code]. Invalid [Tween] can't have [Tweener]s appended, because it can't animate them. You can however still use [method interpolate_value]. </description> </method> <method name="kill"> - <return type="void"> - </return> + <return type="void" /> <description> Aborts all tweening operations and invalidates the [Tween]. </description> </method> <method name="parallel"> - <return type="Tween"> - </return> + <return type="Tween" /> <description> - Makes the next [Tweener] run parallely to the previous one. Example: + Makes the next [Tweener] run parallelly to the previous one. Example: [codeblock] var tween = create_tween() tween.tween_property(...) @@ -137,97 +121,78 @@ </description> </method> <method name="pause"> - <return type="void"> - </return> + <return type="void" /> <description> Pauses the tweening. The animation can be resumed by using [method play]. </description> </method> <method name="play"> - <return type="void"> - </return> + <return type="void" /> <description> Resumes a paused or stopped [Tween]. </description> </method> <method name="set_ease"> - <return type="Tween"> - </return> - <argument index="0" name="ease" type="int" enum="Tween.EaseType"> - </argument> + <return type="Tween" /> + <argument index="0" name="ease" type="int" enum="Tween.EaseType" /> <description> Sets the default ease type for [PropertyTweener]s and [MethodTweener]s animated by this [Tween]. </description> </method> <method name="set_loops"> - <return type="Tween"> - </return> - <argument index="0" name="loops" type="int" default="0"> - </argument> + <return type="Tween" /> + <argument index="0" name="loops" type="int" default="0" /> <description> Sets the number of times the tweening sequence will be repeated, i.e. [code]set_loops(2)[/code] will run the animation twice. Calling this method without arguments will make the [Tween] run infinitely, until it is either killed by [method kill] or by freeing bound node, or all the animated objects have been freed (which makes further animation impossible). </description> </method> <method name="set_parallel"> - <return type="Tween"> - </return> - <argument index="0" name="parallel" type="bool" default="true"> - </argument> + <return type="Tween" /> + <argument index="0" name="parallel" type="bool" default="true" /> <description> - If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after this method will by default run simultanously, as opposed to sequentially. + If [code]parallel[/code] is [code]true[/code], the [Tweener]s appended after this method will by default run simultaneously, as opposed to sequentially. </description> </method> <method name="set_pause_mode"> - <return type="Tween"> - </return> - <argument index="0" name="mode" type="int" enum="Tween.TweenPauseMode"> - </argument> + <return type="Tween" /> + <argument index="0" name="mode" type="int" enum="Tween.TweenPauseMode" /> <description> Determines the behavior of the [Tween] when the [SceneTree] is paused. Check [enum TweenPauseMode] for options. Default value is [constant TWEEN_PAUSE_BOUND]. </description> </method> <method name="set_process_mode"> - <return type="Tween"> - </return> - <argument index="0" name="mode" type="int" enum="Tween.TweenProcessMode"> - </argument> + <return type="Tween" /> + <argument index="0" name="mode" type="int" enum="Tween.TweenProcessMode" /> <description> Determines whether the [Tween] should run during idle frame (see [method Node._process]) or physics frame (see [method Node._physics_process]. Default value is [constant TWEEN_PROCESS_IDLE]. </description> </method> <method name="set_speed_scale"> - <return type="Tween"> - </return> - <argument index="0" name="speed" type="float"> - </argument> + <return type="Tween" /> + <argument index="0" name="speed" type="float" /> <description> Scales the speed of tweening. This affects all [Tweener]s and their delays. </description> </method> <method name="set_trans"> - <return type="Tween"> - </return> - <argument index="0" name="trans" type="int" enum="Tween.TransitionType"> - </argument> + <return type="Tween" /> + <argument index="0" name="trans" type="int" enum="Tween.TransitionType" /> <description> Sets the default transition type for [PropertyTweener]s and [MethodTweener]s animated by this [Tween]. </description> </method> <method name="stop"> - <return type="void"> - </return> + <return type="void" /> <description> Stops the tweening and resets the [Tween] to its initial state. This will not remove any appended [Tweener]s. </description> </method> <method name="tween_callback"> - <return type="CallbackTweener"> - </return> - <argument index="0" name="callback" type="Callable"> - </argument> + <return type="CallbackTweener" /> + <argument index="0" name="callback" type="Callable" /> <description> Creates and appends a [CallbackTweener]. This method can be used to call an arbitrary method in any object. Use [method Callable.bind] to bind additional arguments for the call. Example: object that keeps shooting every 1 second. @@ -244,10 +209,8 @@ </description> </method> <method name="tween_interval"> - <return type="IntervalTweener"> - </return> - <argument index="0" name="time" type="float"> - </argument> + <return type="IntervalTweener" /> + <argument index="0" name="time" type="float" /> <description> Creates and appends an [IntervalTweener]. This method can be used to create delays in the tween animation, as an alternative for using the delay in other [Tweener]s or when there's no animation (in which case the [Tween] acts as a timer). [code]time[/code] is the length of the interval, in seconds. Example: creating an interval in code execution. @@ -271,16 +234,11 @@ </description> </method> <method name="tween_method"> - <return type="MethodTweener"> - </return> - <argument index="0" name="method" type="Callable"> - </argument> - <argument index="1" name="from" type="float"> - </argument> - <argument index="2" name="to" type="float"> - </argument> - <argument index="3" name="duration" type="float"> - </argument> + <return type="MethodTweener" /> + <argument index="0" name="method" type="Callable" /> + <argument index="1" name="from" type="float" /> + <argument index="2" name="to" type="float" /> + <argument index="3" name="duration" type="float" /> <description> Creates and appends a [MethodTweener]. This method is similar to a combination of [method tween_callback] and [method tween_property]. It calls a method over time with a tweened value provided as an argument. The value is tweened between [code]from[/code] and [code]to[/code] over the time specified by [code]duration[/code], in seconds. Use [method Callable.bind] to bind additional arguments for the call. You can use [method MethodTweener.set_ease] and [method MethodTweener.set_trans] to tweak the easing and transition of the value or [method MethodTweener.set_delay] to delay the tweening. Example: making a 3D object look from one point to another point. @@ -300,16 +258,11 @@ </description> </method> <method name="tween_property"> - <return type="PropertyTweener"> - </return> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="property" type="NodePath"> - </argument> - <argument index="2" name="final_val" type="Variant"> - </argument> - <argument index="3" name="duration" type="float"> - </argument> + <return type="PropertyTweener" /> + <argument index="0" name="object" type="Object" /> + <argument index="1" name="property" type="NodePath" /> + <argument index="2" name="final_val" type="Variant" /> + <argument index="3" name="duration" type="float" /> <description> Creates and appends a [PropertyTweener]. This method tweens a [code]property[/code] of an [code]object[/code] between an initial value and [code]final_val[/code] in a span of time equal to [code]duration[/code], in seconds. The initial value by default is a value at the time the tweening of the [PropertyTweener] start. For example: [codeblock] @@ -336,15 +289,13 @@ </description> </signal> <signal name="loop_finished"> - <argument index="0" name="loop_count" type="int"> - </argument> + <argument index="0" name="loop_count" type="int" /> <description> Emitted when a full loop is complete (see [method set_loops]), providing the loop index. This signal is not emitted after final loop, use [signal finished] instead for this case. </description> </signal> <signal name="step_finished"> - <argument index="0" name="idx" type="int"> - </argument> + <argument index="0" name="idx" type="int" /> <description> Emitted when one step of the [Tween] is complete, providing the step index. One step is either a single [Tweener] or a group of [Tweener]s running parallelly. </description> diff --git a/doc/classes/Tweener.xml b/doc/classes/Tweener.xml index 5cd502ced9..a3279502e0 100644 --- a/doc/classes/Tweener.xml +++ b/doc/classes/Tweener.xml @@ -13,7 +13,7 @@ <signals> <signal name="finished"> <description> - Emited when the [Tweener] has just finished its job. + Emitted when the [Tweener] has just finished its job. </description> </signal> </signals> diff --git a/doc/classes/UDPServer.xml b/doc/classes/UDPServer.xml index 5e2906450c..eb6d42fb0f 100644 --- a/doc/classes/UDPServer.xml +++ b/doc/classes/UDPServer.xml @@ -124,54 +124,45 @@ </tutorials> <methods> <method name="get_local_port" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the local port this server is listening to. </description> </method> <method name="is_connection_available" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if a packet with a new address/port combination was received on the socket. </description> </method> <method name="is_listening" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the socket is open and listening on a port. </description> </method> <method name="listen"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="port" type="int"> - </argument> - <argument index="1" name="bind_address" type="String" default=""*""> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="port" type="int" /> + <argument index="1" name="bind_address" type="String" default=""*"" /> <description> Starts the server by opening a UDP socket listening on the given port. You can optionally specify a [code]bind_address[/code] to only listen for packets sent to that address. See also [method PacketPeerUDP.bind]. </description> </method> <method name="poll"> - <return type="int" enum="Error"> - </return> + <return type="int" enum="Error" /> <description> Call this method at regular intervals (e.g. inside [method Node._process]) to process new packets. And packet from known address/port pair will be delivered to the appropriate [PacketPeerUDP], any packet received from an unknown address/port pair will be added as a pending connection (see [method is_connection_available], [method take_connection]). The maximum number of pending connection is defined via [member max_pending_connections]. </description> </method> <method name="stop"> - <return type="void"> - </return> + <return type="void" /> <description> Stops the server, closing the UDP socket if open. Will close all connected [PacketPeerUDP] accepted via [method take_connection] (remote peers will not be notified). </description> </method> <method name="take_connection"> - <return type="PacketPeerUDP"> - </return> + <return type="PacketPeerUDP" /> <description> Returns the first pending connection (connected to the appropriate address/port). Will return [code]null[/code] if no new connection is available. See also [method is_connection_available], [method PacketPeerUDP.connect_to_host]. </description> diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml index aba6183124..def6fe5d1f 100644 --- a/doc/classes/UndoRedo.xml +++ b/doc/classes/UndoRedo.xml @@ -63,171 +63,135 @@ </tutorials> <methods> <method name="add_do_method" qualifiers="vararg"> - <return type="void"> - </return> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="method" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="object" type="Object" /> + <argument index="1" name="method" type="StringName" /> <description> Register a method that will be called when the action is committed. </description> </method> <method name="add_do_property"> - <return type="void"> - </return> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="property" type="StringName"> - </argument> - <argument index="2" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="object" type="Object" /> + <argument index="1" name="property" type="StringName" /> + <argument index="2" name="value" type="Variant" /> <description> Register a property value change for "do". </description> </method> <method name="add_do_reference"> - <return type="void"> - </return> - <argument index="0" name="object" type="Object"> - </argument> + <return type="void" /> + <argument index="0" name="object" type="Object" /> <description> Register a reference for "do" that will be erased if the "do" history is lost. This is useful mostly for new nodes created for the "do" call. Do not use for resources. </description> </method> <method name="add_undo_method" qualifiers="vararg"> - <return type="void"> - </return> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="method" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="object" type="Object" /> + <argument index="1" name="method" type="StringName" /> <description> Register a method that will be called when the action is undone. </description> </method> <method name="add_undo_property"> - <return type="void"> - </return> - <argument index="0" name="object" type="Object"> - </argument> - <argument index="1" name="property" type="StringName"> - </argument> - <argument index="2" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="object" type="Object" /> + <argument index="1" name="property" type="StringName" /> + <argument index="2" name="value" type="Variant" /> <description> Register a property value change for "undo". </description> </method> <method name="add_undo_reference"> - <return type="void"> - </return> - <argument index="0" name="object" type="Object"> - </argument> + <return type="void" /> + <argument index="0" name="object" type="Object" /> <description> Register a reference for "undo" that will be erased if the "undo" history is lost. This is useful mostly for nodes removed with the "do" call (not the "undo" call!). </description> </method> <method name="clear_history"> - <return type="void"> - </return> - <argument index="0" name="increase_version" type="bool" default="true"> - </argument> + <return type="void" /> + <argument index="0" name="increase_version" type="bool" default="true" /> <description> Clear the undo/redo history and associated references. Passing [code]false[/code] to [code]increase_version[/code] will prevent the version number to be increased from this. </description> </method> <method name="commit_action"> - <return type="void"> - </return> - <argument index="0" name="execute" type="bool" default="true"> - </argument> + <return type="void" /> + <argument index="0" name="execute" type="bool" default="true" /> <description> Commit the action. If [code]execute[/code] is true (default), all "do" methods/properties are called/set when this function is called. </description> </method> <method name="create_action"> - <return type="void"> - </return> - <argument index="0" name="name" type="String"> - </argument> - <argument index="1" name="merge_mode" type="int" enum="UndoRedo.MergeMode" default="0"> - </argument> + <return type="void" /> + <argument index="0" name="name" type="String" /> + <argument index="1" name="merge_mode" type="int" enum="UndoRedo.MergeMode" default="0" /> <description> Create a new action. After this is called, do all your calls to [method add_do_method], [method add_undo_method], [method add_do_property], and [method add_undo_property], then commit the action with [method commit_action]. The way actions are merged is dictated by the [code]merge_mode[/code] argument. See [enum MergeMode] for details. </description> </method> <method name="get_action_name"> - <return type="String"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="id" type="int" /> <description> Gets the action name from its index. </description> </method> <method name="get_current_action"> - <return type="int"> - </return> + <return type="int" /> <description> Gets the index of the current action. </description> </method> <method name="get_current_action_name" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Gets the name of the current action, equivalent to [code]get_action_name(get_current_action())[/code]. </description> </method> <method name="get_history_count"> - <return type="int"> - </return> + <return type="int" /> <description> Return how many elements are in the history. </description> </method> <method name="get_version" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Gets the version. Every time a new action is committed, the [UndoRedo]'s version number is increased automatically. This is useful mostly to check if something changed from a saved version. </description> </method> - <method name="has_redo"> - <return type="bool"> - </return> + <method name="has_redo" qualifiers="const"> + <return type="bool" /> <description> Returns [code]true[/code] if a "redo" action is available. </description> </method> - <method name="has_undo"> - <return type="bool"> - </return> + <method name="has_undo" qualifiers="const"> + <return type="bool" /> <description> Returns [code]true[/code] if an "undo" action is available. </description> </method> <method name="is_committing_action" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the [UndoRedo] is currently committing the action, i.e. running its "do" method or property change (see [method commit_action]). </description> </method> <method name="redo"> - <return type="bool"> - </return> + <return type="bool" /> <description> Redo the last action. </description> </method> <method name="undo"> - <return type="bool"> - </return> + <return type="bool" /> <description> Undo the last action. </description> diff --git a/doc/classes/VBoxContainer.xml b/doc/classes/VBoxContainer.xml index 213f8fd742..aa6c5fc8a4 100644 --- a/doc/classes/VBoxContainer.xml +++ b/doc/classes/VBoxContainer.xml @@ -14,7 +14,7 @@ <constants> </constants> <theme_items> - <theme_item name="separation" type="int" default="4"> + <theme_item name="separation" data_type="constant" type="int" default="4"> The vertical space between the [VBoxContainer]'s elements. </theme_item> </theme_items> diff --git a/doc/classes/VScrollBar.xml b/doc/classes/VScrollBar.xml index 727e32961c..98a0aea0c7 100644 --- a/doc/classes/VScrollBar.xml +++ b/doc/classes/VScrollBar.xml @@ -17,31 +17,31 @@ <constants> </constants> <theme_items> - <theme_item name="decrement" type="Texture2D"> + <theme_item name="decrement" data_type="icon" type="Texture2D"> Icon used as a button to scroll the [ScrollBar] up. Supports custom step using the [member ScrollBar.custom_step] property. </theme_item> - <theme_item name="decrement_highlight" type="Texture2D"> + <theme_item name="decrement_highlight" data_type="icon" type="Texture2D"> Displayed when the mouse cursor hovers over the decrement button. </theme_item> - <theme_item name="grabber" type="StyleBox"> + <theme_item name="grabber" data_type="style" type="StyleBox"> Used as texture for the grabber, the draggable element representing current scroll. </theme_item> - <theme_item name="grabber_highlight" type="StyleBox"> + <theme_item name="grabber_highlight" data_type="style" type="StyleBox"> Used when the mouse hovers over the grabber. </theme_item> - <theme_item name="grabber_pressed" type="StyleBox"> + <theme_item name="grabber_pressed" data_type="style" type="StyleBox"> Used when the grabber is being dragged. </theme_item> - <theme_item name="increment" type="Texture2D"> + <theme_item name="increment" data_type="icon" type="Texture2D"> Icon used as a button to scroll the [ScrollBar] down. Supports custom step using the [member ScrollBar.custom_step] property. </theme_item> - <theme_item name="increment_highlight" type="Texture2D"> + <theme_item name="increment_highlight" data_type="icon" type="Texture2D"> Displayed when the mouse cursor hovers over the increment button. </theme_item> - <theme_item name="scroll" type="StyleBox"> + <theme_item name="scroll" data_type="style" type="StyleBox"> Used as background of this [ScrollBar]. </theme_item> - <theme_item name="scroll_focus" type="StyleBox"> + <theme_item name="scroll_focus" data_type="style" type="StyleBox"> Used as background when the [ScrollBar] has the GUI focus. </theme_item> </theme_items> diff --git a/doc/classes/VSeparator.xml b/doc/classes/VSeparator.xml index 52f31b1da7..d59c7229ac 100644 --- a/doc/classes/VSeparator.xml +++ b/doc/classes/VSeparator.xml @@ -13,10 +13,10 @@ <constants> </constants> <theme_items> - <theme_item name="separation" type="int" default="4"> + <theme_item name="separation" data_type="constant" type="int" default="4"> The width of the area covered by the separator. Effectively works like a minimum width. </theme_item> - <theme_item name="separator" type="StyleBox"> + <theme_item name="separator" data_type="style" type="StyleBox"> The style for the separator line. Works best with [StyleBoxLine] (remember to enable [member StyleBoxLine.vertical]). </theme_item> </theme_items> diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml index 5830c9eaf3..becf3d1052 100644 --- a/doc/classes/VSlider.xml +++ b/doc/classes/VSlider.xml @@ -18,24 +18,24 @@ <constants> </constants> <theme_items> - <theme_item name="grabber" type="Texture2D"> + <theme_item name="grabber" data_type="icon" type="Texture2D"> The texture for the grabber (the draggable element). </theme_item> - <theme_item name="grabber_area" type="StyleBox"> + <theme_item name="grabber_area" data_type="style" type="StyleBox"> The background of the area below the grabber. </theme_item> - <theme_item name="grabber_area_highlight" type="StyleBox"> + <theme_item name="grabber_area_highlight" data_type="style" type="StyleBox"> </theme_item> - <theme_item name="grabber_disabled" type="Texture2D"> + <theme_item name="grabber_disabled" data_type="icon" type="Texture2D"> The texture for the grabber when it's disabled. </theme_item> - <theme_item name="grabber_highlight" type="Texture2D"> + <theme_item name="grabber_highlight" data_type="icon" type="Texture2D"> The texture for the grabber when it's focused. </theme_item> - <theme_item name="slider" type="StyleBox"> + <theme_item name="slider" data_type="style" type="StyleBox"> The background for the whole slider. Determines the width of the [code]grabber_area[/code]. </theme_item> - <theme_item name="tick" type="Texture2D"> + <theme_item name="tick" data_type="icon" type="Texture2D"> The texture for the ticks, visible when [member Slider.tick_count] is greater than 0. </theme_item> </theme_items> diff --git a/doc/classes/VSplitContainer.xml b/doc/classes/VSplitContainer.xml index 18b515e7ce..143f5b6b0a 100644 --- a/doc/classes/VSplitContainer.xml +++ b/doc/classes/VSplitContainer.xml @@ -13,15 +13,15 @@ <constants> </constants> <theme_items> - <theme_item name="autohide" type="int" default="1"> + <theme_item name="autohide" data_type="constant" type="int" default="1"> Boolean value. If 1 ([code]true[/code]), the grabber will hide automatically when it isn't under the cursor. If 0 ([code]false[/code]), it's always visible. </theme_item> - <theme_item name="bg" type="StyleBox"> + <theme_item name="bg" data_type="style" type="StyleBox"> </theme_item> - <theme_item name="grabber" type="Texture2D"> + <theme_item name="grabber" data_type="icon" type="Texture2D"> The icon used for the grabber drawn in the middle area. </theme_item> - <theme_item name="separation" type="int" default="12"> + <theme_item name="separation" data_type="constant" type="int" default="12"> The space between sides of the container. </theme_item> </theme_items> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 498aefbef0..ab4d0e181a 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -18,51 +18,41 @@ </tutorials> <methods> <method name="Vector2" qualifiers="constructor"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Constructs a default-initialized [Vector2] with all components set to [code]0[/code]. </description> </method> <method name="Vector2" qualifiers="constructor"> - <return type="Vector2"> - </return> - <argument index="0" name="from" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="from" type="Vector2" /> <description> Constructs a [Vector2] as a copy of the given [Vector2]. </description> </method> <method name="Vector2" qualifiers="constructor"> - <return type="Vector2"> - </return> - <argument index="0" name="from" type="Vector2i"> - </argument> + <return type="Vector2" /> + <argument index="0" name="from" type="Vector2i" /> <description> Constructs a new [Vector2] from [Vector2i]. </description> </method> <method name="Vector2" qualifiers="constructor"> - <return type="Vector2"> - </return> - <argument index="0" name="x" type="float"> - </argument> - <argument index="1" name="y" type="float"> - </argument> + <return type="Vector2" /> + <argument index="0" name="x" type="float" /> + <argument index="1" name="y" type="float" /> <description> Constructs a new [Vector2] from the given [code]x[/code] and [code]y[/code]. </description> </method> <method name="abs" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns a new vector with all components in absolute values (i.e. positive). </description> </method> <method name="angle" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns this vector's angle with respect to the positive X axis, or [code](1, 0)[/code] vector, in radians. For example, [code]Vector2.RIGHT.angle()[/code] will return zero, [code]Vector2.DOWN.angle()[/code] will return [code]PI / 2[/code] (a quarter turn, or 90 degrees), and [code]Vector2(1, -1).angle()[/code] will return [code]-PI / 4[/code] (a negative eighth turn, or -45 degrees). @@ -70,114 +60,88 @@ </description> </method> <method name="angle_to" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="to" type="Vector2"> - </argument> + <return type="float" /> + <argument index="0" name="to" type="Vector2" /> <description> Returns the angle to the given vector, in radians. </description> </method> <method name="angle_to_point" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="to" type="Vector2"> - </argument> + <return type="float" /> + <argument index="0" name="to" type="Vector2" /> <description> Returns the angle between the line connecting the two points and the X axis, in radians. </description> </method> <method name="aspect" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the aspect ratio of this vector, the ratio of [member x] to [member y]. </description> </method> <method name="bounce" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="n" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="n" type="Vector2" /> <description> Returns the vector "bounced off" from a plane defined by the given normal. </description> </method> <method name="ceil" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the vector with all components rounded up (towards positive infinity). </description> </method> <method name="clamp" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="min" type="Vector2"> - </argument> - <argument index="1" name="max" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="min" type="Vector2" /> + <argument index="1" name="max" type="Vector2" /> <description> Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component. </description> </method> <method name="cross" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="with" type="Vector2"> - </argument> + <return type="float" /> + <argument index="0" name="with" type="Vector2" /> <description> Returns the cross product of this vector and [code]with[/code]. </description> </method> <method name="cubic_interpolate" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="b" type="Vector2"> - </argument> - <argument index="1" name="pre_a" type="Vector2"> - </argument> - <argument index="2" name="post_b" type="Vector2"> - </argument> - <argument index="3" name="weight" type="float"> - </argument> + <return type="Vector2" /> + <argument index="0" name="b" type="Vector2" /> + <argument index="1" name="pre_a" type="Vector2" /> + <argument index="2" name="post_b" type="Vector2" /> + <argument index="3" name="weight" type="float" /> <description> Cubically interpolates between this vector and [code]b[/code] using [code]pre_a[/code] and [code]post_b[/code] as handles, and returns the result at position [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. </description> </method> <method name="direction_to" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="b" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="b" type="Vector2" /> <description> Returns the normalized vector pointing from this vector to [code]b[/code]. This is equivalent to using [code](b - a).normalized()[/code]. </description> </method> <method name="distance_squared_to" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="to" type="Vector2"> - </argument> + <return type="float" /> + <argument index="0" name="to" type="Vector2" /> <description> Returns the squared distance between this vector and [code]b[/code]. This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula. </description> </method> <method name="distance_to" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="to" type="Vector2"> - </argument> + <return type="float" /> + <argument index="0" name="to" type="Vector2" /> <description> Returns the distance between this vector and [code]to[/code]. </description> </method> <method name="dot" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="with" type="Vector2"> - </argument> + <return type="float" /> + <argument index="0" name="with" type="Vector2" /> <description> Returns the dot product of this vector and [code]with[/code]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player. The dot product will be [code]0[/code] for a straight angle (90 degrees), greater than 0 for angles narrower than 90 degrees and lower than 0 for angles wider than 90 degrees. @@ -186,313 +150,256 @@ </description> </method> <method name="floor" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the vector with all components rounded down (towards negative infinity). </description> </method> + <method name="from_angle" qualifiers="static"> + <return type="Vector2" /> + <argument index="0" name="angle" type="float" /> + <description> + Creates a unit [Vector2] rotated to the given [code]angle[/code] in radians. This is equivalent to doing [code]Vector2(cos(angle), sin(angle))[/code] or [code]Vector2.RIGHT.rotated(angle)[/code]. + [codeblock] + print(Vector2.from_angle(0)) # Prints (1, 0). + print(Vector2(1, 0).angle()) # Prints 0, which is the angle used above. + print(Vector2.from_angle(PI / 2)) # Prints (0, 1). + [/codeblock] + </description> + </method> <method name="is_equal_approx" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="to" type="Vector2"> - </argument> + <return type="bool" /> + <argument index="0" name="to" type="Vector2" /> <description> Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. </description> </method> <method name="is_normalized" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the vector is normalized, [code]false[/code] otherwise. </description> </method> <method name="length" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the length (magnitude) of this vector. </description> </method> <method name="length_squared" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the squared length (squared magnitude) of this vector. This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula. </description> </method> <method name="lerp" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="to" type="Vector2"> - </argument> - <argument index="1" name="weight" type="float"> - </argument> + <return type="Vector2" /> + <argument index="0" name="to" type="Vector2" /> + <argument index="1" name="weight" type="float" /> <description> Returns the result of the linear interpolation between this vector and [code]to[/code] by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. </description> </method> <method name="limit_length" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="length" type="float" default="1.0"> - </argument> + <return type="Vector2" /> + <argument index="0" name="length" type="float" default="1.0" /> <description> Returns the vector with a maximum length by limiting its length to [code]length[/code]. </description> </method> <method name="move_toward" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="to" type="Vector2"> - </argument> - <argument index="1" name="delta" type="float"> - </argument> + <return type="Vector2" /> + <argument index="0" name="to" type="Vector2" /> + <argument index="1" name="delta" type="float" /> <description> Moves the vector toward [code]to[/code] by the fixed [code]delta[/code] amount. </description> </method> <method name="normalized" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code]. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector2"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector2" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector2"> - </return> - <argument index="0" name="right" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="right" type="Vector2" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector2"> - </return> - <argument index="0" name="right" type="Transform2D"> - </argument> + <return type="Vector2" /> + <argument index="0" name="right" type="Transform2D" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector2"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="Vector2" /> + <argument index="0" name="right" type="float" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector2"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="right" type="int" /> <description> </description> </method> <method name="operator +" qualifiers="operator"> - <return type="Vector2"> - </return> - <argument index="0" name="right" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="right" type="Vector2" /> <description> </description> </method> <method name="operator -" qualifiers="operator"> - <return type="Vector2"> - </return> - <argument index="0" name="right" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="right" type="Vector2" /> <description> </description> </method> <method name="operator /" qualifiers="operator"> - <return type="Vector2"> - </return> - <argument index="0" name="right" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="right" type="Vector2" /> <description> </description> </method> <method name="operator /" qualifiers="operator"> - <return type="Vector2"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="Vector2" /> + <argument index="0" name="right" type="float" /> <description> </description> </method> <method name="operator /" qualifiers="operator"> - <return type="Vector2"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="right" type="int" /> <description> </description> </method> <method name="operator <" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector2"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector2" /> <description> </description> </method> <method name="operator <=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector2"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector2" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector2"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector2" /> <description> </description> </method> <method name="operator >" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector2"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector2" /> <description> </description> </method> <method name="operator >=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector2"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector2" /> <description> </description> </method> <method name="operator []" qualifiers="operator"> - <return type="float"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="operator unary+" qualifiers="operator"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> </description> </method> <method name="operator unary-" qualifiers="operator"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> </description> </method> <method name="orthogonal" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns a perpendicular vector rotated 90 degrees counter-clockwise compared to the original, with the same length. </description> </method> <method name="posmod" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="mod" type="float"> - </argument> + <return type="Vector2" /> + <argument index="0" name="mod" type="float" /> <description> Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]mod[/code]. </description> </method> <method name="posmodv" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="modv" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="modv" type="Vector2" /> <description> Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]modv[/code]'s components. </description> </method> <method name="project" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="b" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="b" type="Vector2" /> <description> Returns the vector projected onto the vector [code]b[/code]. </description> </method> <method name="reflect" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="n" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="n" type="Vector2" /> <description> Returns the vector reflected from a plane defined by the given normal. </description> </method> <method name="rotated" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="phi" type="float"> - </argument> + <return type="Vector2" /> + <argument index="0" name="phi" type="float" /> <description> Returns the vector rotated by [code]phi[/code] radians. See also [method @GlobalScope.deg2rad]. </description> </method> <method name="round" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. </description> </method> <method name="sign" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the vector with each component set to one or negative one, depending on the signs of the components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component. </description> </method> <method name="slerp" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="to" type="Vector2"> - </argument> - <argument index="1" name="weight" type="float"> - </argument> + <return type="Vector2" /> + <argument index="0" name="to" type="Vector2" /> + <argument index="1" name="weight" type="float" /> <description> Returns the result of spherical linear interpolation between this vector and [code]to[/code], by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. [b]Note:[/b] Both vectors must be normalized. </description> </method> <method name="slide" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="n" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="n" type="Vector2" /> <description> Returns this vector slid along a plane defined by the given normal. </description> </method> <method name="snapped" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="step" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="step" type="Vector2" /> <description> Returns this vector with each component snapped to the nearest multiple of [code]step[/code]. This can also be used to round to an arbitrary number of decimals. </description> diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml index 5f190de8ca..212b1fd22b 100644 --- a/doc/classes/Vector2i.xml +++ b/doc/classes/Vector2i.xml @@ -15,217 +15,167 @@ </tutorials> <methods> <method name="Vector2i" qualifiers="constructor"> - <return type="Vector2i"> - </return> + <return type="Vector2i" /> <description> Constructs a default-initialized [Vector2i] with all components set to [code]0[/code]. </description> </method> <method name="Vector2i" qualifiers="constructor"> - <return type="Vector2i"> - </return> - <argument index="0" name="from" type="Vector2i"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="from" type="Vector2i" /> <description> Constructs a [Vector2i] as a copy of the given [Vector2i]. </description> </method> <method name="Vector2i" qualifiers="constructor"> - <return type="Vector2i"> - </return> - <argument index="0" name="from" type="Vector2"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="from" type="Vector2" /> <description> Constructs a new [Vector2i] from [Vector2]. The floating point coordinates will be truncated. </description> </method> <method name="Vector2i" qualifiers="constructor"> - <return type="Vector2i"> - </return> - <argument index="0" name="x" type="int"> - </argument> - <argument index="1" name="y" type="int"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="x" type="int" /> + <argument index="1" name="y" type="int" /> <description> Constructs a new [Vector2i] from the given [code]x[/code] and [code]y[/code]. </description> </method> <method name="abs" qualifiers="const"> - <return type="Vector2i"> - </return> + <return type="Vector2i" /> <description> Returns a new vector with all components in absolute values (i.e. positive). </description> </method> <method name="aspect" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the ratio of [member x] to [member y]. </description> </method> <method name="clamp" qualifiers="const"> - <return type="Vector2i"> - </return> - <argument index="0" name="min" type="Vector2i"> - </argument> - <argument index="1" name="max" type="Vector2i"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="min" type="Vector2i" /> + <argument index="1" name="max" type="Vector2i" /> <description> Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector2i"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector2i" /> <description> </description> </method> <method name="operator %" qualifiers="operator"> - <return type="Vector2i"> - </return> - <argument index="0" name="right" type="Vector2i"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="right" type="Vector2i" /> <description> </description> </method> <method name="operator %" qualifiers="operator"> - <return type="Vector2i"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="right" type="int" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector2i"> - </return> - <argument index="0" name="right" type="Vector2i"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="right" type="Vector2i" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector2i"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="right" type="float" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector2i"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="right" type="int" /> <description> </description> </method> <method name="operator +" qualifiers="operator"> - <return type="Vector2i"> - </return> - <argument index="0" name="right" type="Vector2i"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="right" type="Vector2i" /> <description> </description> </method> <method name="operator -" qualifiers="operator"> - <return type="Vector2i"> - </return> - <argument index="0" name="right" type="Vector2i"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="right" type="Vector2i" /> <description> </description> </method> <method name="operator /" qualifiers="operator"> - <return type="Vector2i"> - </return> - <argument index="0" name="right" type="Vector2i"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="right" type="Vector2i" /> <description> </description> </method> <method name="operator /" qualifiers="operator"> - <return type="Vector2i"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="right" type="float" /> <description> </description> </method> <method name="operator /" qualifiers="operator"> - <return type="Vector2i"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="right" type="int" /> <description> </description> </method> <method name="operator <" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector2i"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector2i" /> <description> </description> </method> <method name="operator <=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector2i"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector2i" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector2i"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector2i" /> <description> </description> </method> <method name="operator >" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector2i"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector2i" /> <description> </description> </method> <method name="operator >=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector2i"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector2i" /> <description> </description> </method> <method name="operator []" qualifiers="operator"> - <return type="int"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="operator unary+" qualifiers="operator"> - <return type="Vector2i"> - </return> + <return type="Vector2i" /> <description> </description> </method> <method name="operator unary-" qualifiers="operator"> - <return type="Vector2i"> - </return> + <return type="Vector2i" /> <description> </description> </method> <method name="sign" qualifiers="const"> - <return type="Vector2i"> - </return> + <return type="Vector2i" /> <description> Returns the vector with each component set to one or negative one, depending on the signs of the components. </description> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 1361666c18..78251b0342 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -18,143 +18,110 @@ </tutorials> <methods> <method name="Vector3" qualifiers="constructor"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Constructs a default-initialized [Vector3] with all components set to [code]0[/code]. </description> </method> <method name="Vector3" qualifiers="constructor"> - <return type="Vector3"> - </return> - <argument index="0" name="from" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="from" type="Vector3" /> <description> Constructs a [Vector3] as a copy of the given [Vector3]. </description> </method> <method name="Vector3" qualifiers="constructor"> - <return type="Vector3"> - </return> - <argument index="0" name="from" type="Vector3i"> - </argument> + <return type="Vector3" /> + <argument index="0" name="from" type="Vector3i" /> <description> Constructs a new [Vector3] from [Vector3i]. </description> </method> <method name="Vector3" qualifiers="constructor"> - <return type="Vector3"> - </return> - <argument index="0" name="x" type="float"> - </argument> - <argument index="1" name="y" type="float"> - </argument> - <argument index="2" name="z" type="float"> - </argument> + <return type="Vector3" /> + <argument index="0" name="x" type="float" /> + <argument index="1" name="y" type="float" /> + <argument index="2" name="z" type="float" /> <description> Returns a [Vector3] with the given components. </description> </method> <method name="abs" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns a new vector with all components in absolute values (i.e. positive). </description> </method> <method name="angle_to" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="to" type="Vector3"> - </argument> + <return type="float" /> + <argument index="0" name="to" type="Vector3" /> <description> Returns the unsigned minimum angle to the given vector, in radians. </description> </method> <method name="bounce" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="n" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="n" type="Vector3" /> <description> Returns the vector "bounced off" from a plane defined by the given normal. </description> </method> <method name="ceil" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns a new vector with all components rounded up (towards positive infinity). </description> </method> <method name="clamp" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="min" type="Vector3"> - </argument> - <argument index="1" name="max" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="min" type="Vector3" /> + <argument index="1" name="max" type="Vector3" /> <description> Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component. </description> </method> <method name="cross" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="with" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="with" type="Vector3" /> <description> Returns the cross product of this vector and [code]b[/code]. </description> </method> <method name="cubic_interpolate" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="b" type="Vector3"> - </argument> - <argument index="1" name="pre_a" type="Vector3"> - </argument> - <argument index="2" name="post_b" type="Vector3"> - </argument> - <argument index="3" name="weight" type="float"> - </argument> + <return type="Vector3" /> + <argument index="0" name="b" type="Vector3" /> + <argument index="1" name="pre_a" type="Vector3" /> + <argument index="2" name="post_b" type="Vector3" /> + <argument index="3" name="weight" type="float" /> <description> Performs a cubic interpolation between vectors [code]pre_a[/code], [code]a[/code], [code]b[/code], [code]post_b[/code] ([code]a[/code] is current), by the given amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. </description> </method> <method name="direction_to" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="b" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="b" type="Vector3" /> <description> Returns the normalized vector pointing from this vector to [code]b[/code]. This is equivalent to using [code](b - a).normalized()[/code]. </description> </method> <method name="distance_squared_to" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="b" type="Vector3"> - </argument> + <return type="float" /> + <argument index="0" name="b" type="Vector3" /> <description> Returns the squared distance between this vector and [code]b[/code]. This method runs faster than [method distance_to], so prefer it if you need to compare vectors or need the squared distance for some formula. </description> </method> <method name="distance_to" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="b" type="Vector3"> - </argument> + <return type="float" /> + <argument index="0" name="b" type="Vector3" /> <description> Returns the distance between this vector and [code]b[/code]. </description> </method> <method name="dot" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="with" type="Vector3"> - </argument> + <return type="float" /> + <argument index="0" name="with" type="Vector3" /> <description> Returns the dot product of this vector and [code]b[/code]. This can be used to compare the angle between two vectors. For example, this can be used to determine whether an enemy is facing the player. The dot product will be [code]0[/code] for a straight angle (90 degrees), greater than 0 for angles narrower than 90 degrees and lower than 0 for angles wider than 90 degrees. @@ -163,372 +130,290 @@ </description> </method> <method name="floor" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns a new vector with all components rounded down (towards negative infinity). </description> </method> <method name="inverse" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns the inverse of the vector. This is the same as [code]Vector3(1.0 / v.x, 1.0 / v.y, 1.0 / v.z)[/code]. </description> </method> <method name="is_equal_approx" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="to" type="Vector3"> - </argument> + <return type="bool" /> + <argument index="0" name="to" type="Vector3" /> <description> Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GlobalScope.is_equal_approx] on each component. </description> </method> <method name="is_normalized" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the vector is normalized, [code]false[/code] otherwise. </description> </method> <method name="length" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the length (magnitude) of this vector. </description> </method> <method name="length_squared" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the squared length (squared magnitude) of this vector. This method runs faster than [method length], so prefer it if you need to compare vectors or need the squared distance for some formula. </description> </method> <method name="lerp" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="to" type="Vector3"> - </argument> - <argument index="1" name="weight" type="float"> - </argument> + <return type="Vector3" /> + <argument index="0" name="to" type="Vector3" /> + <argument index="1" name="weight" type="float" /> <description> Returns the result of the linear interpolation between this vector and [code]to[/code] by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. </description> </method> <method name="limit_length" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="length" type="float" default="1.0"> - </argument> + <return type="Vector3" /> + <argument index="0" name="length" type="float" default="1.0" /> <description> Returns the vector with a maximum length by limiting its length to [code]length[/code]. </description> </method> <method name="max_axis" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the axis of the vector's largest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]. </description> </method> <method name="min_axis" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z]. </description> </method> <method name="move_toward" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="to" type="Vector3"> - </argument> - <argument index="1" name="delta" type="float"> - </argument> + <return type="Vector3" /> + <argument index="0" name="to" type="Vector3" /> + <argument index="1" name="delta" type="float" /> <description> Moves this vector toward [code]to[/code] by the fixed [code]delta[/code] amount. </description> </method> <method name="normalized" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns the vector scaled to unit length. Equivalent to [code]v / v.length()[/code]. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector3"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector3" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector3"> - </return> - <argument index="0" name="right" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="right" type="Vector3" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector3"> - </return> - <argument index="0" name="right" type="Basis"> - </argument> + <return type="Vector3" /> + <argument index="0" name="right" type="Basis" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector3"> - </return> - <argument index="0" name="right" type="Quaternion"> - </argument> + <return type="Vector3" /> + <argument index="0" name="right" type="Quaternion" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector3"> - </return> - <argument index="0" name="right" type="Transform3D"> - </argument> + <return type="Vector3" /> + <argument index="0" name="right" type="Transform3D" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector3"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="Vector3" /> + <argument index="0" name="right" type="float" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector3"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="Vector3" /> + <argument index="0" name="right" type="int" /> <description> </description> </method> <method name="operator +" qualifiers="operator"> - <return type="Vector3"> - </return> - <argument index="0" name="right" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="right" type="Vector3" /> <description> </description> </method> <method name="operator -" qualifiers="operator"> - <return type="Vector3"> - </return> - <argument index="0" name="right" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="right" type="Vector3" /> <description> </description> </method> <method name="operator /" qualifiers="operator"> - <return type="Vector3"> - </return> - <argument index="0" name="right" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="right" type="Vector3" /> <description> </description> </method> <method name="operator /" qualifiers="operator"> - <return type="Vector3"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="Vector3" /> + <argument index="0" name="right" type="float" /> <description> </description> </method> <method name="operator /" qualifiers="operator"> - <return type="Vector3"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="Vector3" /> + <argument index="0" name="right" type="int" /> <description> </description> </method> <method name="operator <" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector3"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector3" /> <description> </description> </method> <method name="operator <=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector3"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector3" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector3"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector3" /> <description> </description> </method> <method name="operator >" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector3"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector3" /> <description> </description> </method> <method name="operator >=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector3"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector3" /> <description> </description> </method> <method name="operator []" qualifiers="operator"> - <return type="float"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="operator unary+" qualifiers="operator"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> </description> </method> <method name="operator unary-" qualifiers="operator"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> </description> </method> <method name="outer" qualifiers="const"> - <return type="Basis"> - </return> - <argument index="0" name="with" type="Vector3"> - </argument> + <return type="Basis" /> + <argument index="0" name="with" type="Vector3" /> <description> Returns the outer product with [code]b[/code]. </description> </method> <method name="posmod" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="mod" type="float"> - </argument> + <return type="Vector3" /> + <argument index="0" name="mod" type="float" /> <description> Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]mod[/code]. </description> </method> <method name="posmodv" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="modv" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="modv" type="Vector3" /> <description> Returns a vector composed of the [method @GlobalScope.fposmod] of this vector's components and [code]modv[/code]'s components. </description> </method> <method name="project" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="b" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="b" type="Vector3" /> <description> Returns this vector projected onto another vector [code]b[/code]. </description> </method> <method name="reflect" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="n" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="n" type="Vector3" /> <description> Returns this vector reflected from a plane defined by the given normal. </description> </method> <method name="rotated" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="by_axis" type="Vector3"> - </argument> - <argument index="1" name="phi" type="float"> - </argument> + <return type="Vector3" /> + <argument index="0" name="by_axis" type="Vector3" /> + <argument index="1" name="phi" type="float" /> <description> Rotates this vector around a given axis by [code]phi[/code] radians. The axis must be a normalized vector. </description> </method> <method name="round" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns this vector with all components rounded to the nearest integer, with halfway cases rounded away from zero. </description> </method> <method name="sign" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns a vector with each component set to one or negative one, depending on the signs of this vector's components, or zero if the component is zero, by calling [method @GlobalScope.sign] on each component. </description> </method> <method name="signed_angle_to" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="to" type="Vector3"> - </argument> - <argument index="1" name="axis" type="Vector3"> - </argument> + <return type="float" /> + <argument index="0" name="to" type="Vector3" /> + <argument index="1" name="axis" type="Vector3" /> <description> Returns the signed angle to the given vector, in radians. The sign of the angle is positive in a counter-clockwise direction and negative in a clockwise direction when viewed from the side specified by the [code]axis[/code]. </description> </method> <method name="slerp" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="to" type="Vector3"> - </argument> - <argument index="1" name="weight" type="float"> - </argument> + <return type="Vector3" /> + <argument index="0" name="to" type="Vector3" /> + <argument index="1" name="weight" type="float" /> <description> Returns the result of spherical linear interpolation between this vector and [code]to[/code], by amount [code]weight[/code]. [code]weight[/code] is on the range of 0.0 to 1.0, representing the amount of interpolation. [b]Note:[/b] Both vectors must be normalized. </description> </method> <method name="slide" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="n" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="n" type="Vector3" /> <description> Returns this vector slid along a plane defined by the given normal. </description> </method> <method name="snapped" qualifiers="const"> - <return type="Vector3"> - </return> - <argument index="0" name="step" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="step" type="Vector3" /> <description> Returns this vector with each component snapped to the nearest multiple of [code]step[/code]. This can also be used to round to an arbitrary number of decimals. </description> </method> <method name="to_diagonal_matrix" qualifiers="const"> - <return type="Basis"> - </return> + <return type="Basis" /> <description> Returns a diagonal matrix with the vector as main diagonal. This is equivalent to a Basis with no rotation or shearing and this vector's components set as the scale. diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml index e08bafa665..75df182025 100644 --- a/doc/classes/Vector3i.xml +++ b/doc/classes/Vector3i.xml @@ -15,225 +15,173 @@ </tutorials> <methods> <method name="Vector3i" qualifiers="constructor"> - <return type="Vector3i"> - </return> + <return type="Vector3i" /> <description> Constructs a default-initialized [Vector3i] with all components set to [code]0[/code]. </description> </method> <method name="Vector3i" qualifiers="constructor"> - <return type="Vector3i"> - </return> - <argument index="0" name="from" type="Vector3i"> - </argument> + <return type="Vector3i" /> + <argument index="0" name="from" type="Vector3i" /> <description> Constructs a [Vector3i] as a copy of the given [Vector3i]. </description> </method> <method name="Vector3i" qualifiers="constructor"> - <return type="Vector3i"> - </return> - <argument index="0" name="from" type="Vector3"> - </argument> + <return type="Vector3i" /> + <argument index="0" name="from" type="Vector3" /> <description> Constructs a new [Vector3i] from [Vector3]. The floating point coordinates will be truncated. </description> </method> <method name="Vector3i" qualifiers="constructor"> - <return type="Vector3i"> - </return> - <argument index="0" name="x" type="int"> - </argument> - <argument index="1" name="y" type="int"> - </argument> - <argument index="2" name="z" type="int"> - </argument> + <return type="Vector3i" /> + <argument index="0" name="x" type="int" /> + <argument index="1" name="y" type="int" /> + <argument index="2" name="z" type="int" /> <description> Returns a [Vector3i] with the given components. </description> </method> <method name="abs" qualifiers="const"> - <return type="Vector3i"> - </return> + <return type="Vector3i" /> <description> </description> </method> <method name="clamp" qualifiers="const"> - <return type="Vector3i"> - </return> - <argument index="0" name="min" type="Vector3i"> - </argument> - <argument index="1" name="max" type="Vector3i"> - </argument> + <return type="Vector3i" /> + <argument index="0" name="min" type="Vector3i" /> + <argument index="1" name="max" type="Vector3i" /> <description> Returns a new vector with all components clamped between the components of [code]min[/code] and [code]max[/code], by running [method @GlobalScope.clamp] on each component. </description> </method> <method name="max_axis" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the axis of the vector's largest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_X]. </description> </method> <method name="min_axis" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the axis of the vector's smallest value. See [code]AXIS_*[/code] constants. If all components are equal, this method returns [constant AXIS_Z]. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector3i"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector3i" /> <description> </description> </method> <method name="operator %" qualifiers="operator"> - <return type="Vector3i"> - </return> - <argument index="0" name="right" type="Vector3i"> - </argument> + <return type="Vector3i" /> + <argument index="0" name="right" type="Vector3i" /> <description> </description> </method> <method name="operator %" qualifiers="operator"> - <return type="Vector3i"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="Vector3i" /> + <argument index="0" name="right" type="int" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector3i"> - </return> - <argument index="0" name="right" type="Vector3i"> - </argument> + <return type="Vector3i" /> + <argument index="0" name="right" type="Vector3i" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector3i"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="Vector3i" /> + <argument index="0" name="right" type="float" /> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector3i"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="Vector3i" /> + <argument index="0" name="right" type="int" /> <description> </description> </method> <method name="operator +" qualifiers="operator"> - <return type="Vector3i"> - </return> - <argument index="0" name="right" type="Vector3i"> - </argument> + <return type="Vector3i" /> + <argument index="0" name="right" type="Vector3i" /> <description> </description> </method> <method name="operator -" qualifiers="operator"> - <return type="Vector3i"> - </return> - <argument index="0" name="right" type="Vector3i"> - </argument> + <return type="Vector3i" /> + <argument index="0" name="right" type="Vector3i" /> <description> </description> </method> <method name="operator /" qualifiers="operator"> - <return type="Vector3i"> - </return> - <argument index="0" name="right" type="Vector3i"> - </argument> + <return type="Vector3i" /> + <argument index="0" name="right" type="Vector3i" /> <description> </description> </method> <method name="operator /" qualifiers="operator"> - <return type="Vector3i"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="Vector3i" /> + <argument index="0" name="right" type="float" /> <description> </description> </method> <method name="operator /" qualifiers="operator"> - <return type="Vector3i"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="Vector3i" /> + <argument index="0" name="right" type="int" /> <description> </description> </method> <method name="operator <" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector3i"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector3i" /> <description> </description> </method> <method name="operator <=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector3i"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector3i" /> <description> </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector3i"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector3i" /> <description> </description> </method> <method name="operator >" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector3i"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector3i" /> <description> </description> </method> <method name="operator >=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="Vector3i"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="Vector3i" /> <description> </description> </method> <method name="operator []" qualifiers="operator"> - <return type="int"> - </return> - <argument index="0" name="index" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="index" type="int" /> <description> </description> </method> <method name="operator unary+" qualifiers="operator"> - <return type="Vector3i"> - </return> + <return type="Vector3i" /> <description> </description> </method> <method name="operator unary-" qualifiers="operator"> - <return type="Vector3i"> - </return> + <return type="Vector3i" /> <description> </description> </method> <method name="sign" qualifiers="const"> - <return type="Vector3i"> - </return> + <return type="Vector3i" /> <description> Returns the vector with each component set to one or negative one, depending on the signs of the components. </description> diff --git a/doc/classes/VehicleWheel3D.xml b/doc/classes/VehicleWheel3D.xml index fb0cb03d1c..35f1189a06 100644 --- a/doc/classes/VehicleWheel3D.xml +++ b/doc/classes/VehicleWheel3D.xml @@ -12,22 +12,19 @@ </tutorials> <methods> <method name="get_rpm" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns the rotational speed of the wheel in revolutions per minute. </description> </method> <method name="get_skidinfo" qualifiers="const"> - <return type="float"> - </return> + <return type="float" /> <description> Returns a value between 0.0 and 1.0 that indicates whether this wheel is skidding. 0.0 is skidding (the wheel has lost grip, e.g. icy terrain), 1.0 means not skidding (the wheel has full grip, e.g. dry asphalt road). </description> </method> <method name="is_in_contact" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if this wheel is in contact with a surface. </description> diff --git a/doc/classes/VelocityTracker3D.xml b/doc/classes/VelocityTracker3D.xml index 2d5e3a4d30..7e97cad5bf 100644 --- a/doc/classes/VelocityTracker3D.xml +++ b/doc/classes/VelocityTracker3D.xml @@ -8,24 +8,19 @@ </tutorials> <methods> <method name="get_tracked_linear_velocity" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> </description> </method> <method name="reset"> - <return type="void"> - </return> - <argument index="0" name="position" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="position" type="Vector3" /> <description> </description> </method> <method name="update_position"> - <return type="void"> - </return> - <argument index="0" name="position" type="Vector3"> - </argument> + <return type="void" /> + <argument index="0" name="position" type="Vector3" /> <description> </description> </method> diff --git a/doc/classes/VideoPlayer.xml b/doc/classes/VideoPlayer.xml index 12558ebbbc..86b2dd102b 100644 --- a/doc/classes/VideoPlayer.xml +++ b/doc/classes/VideoPlayer.xml @@ -13,37 +13,32 @@ </tutorials> <methods> <method name="get_stream_name" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the video stream's name, or [code]"<No Stream>"[/code] if no video stream is assigned. </description> </method> <method name="get_video_texture" qualifiers="const"> - <return type="Texture2D"> - </return> + <return type="Texture2D" /> <description> Returns the current frame as a [Texture2D]. </description> </method> <method name="is_playing" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the video is playing. [b]Note:[/b] The video is still considered playing if paused during playback. </description> </method> <method name="play"> - <return type="void"> - </return> + <return type="void" /> <description> Starts the video playback from the beginning. If the video is paused, this will not unpause the video. </description> </method> <method name="stop"> - <return type="void"> - </return> + <return type="void" /> <description> Stops the video playback and sets the stream position to 0. [b]Note:[/b] Although the stream position will be set to 0, the first frame of the video stream won't become the current frame. diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 833461814c..a02a23517f 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -23,62 +23,57 @@ </tutorials> <methods> <method name="find_world_2d" qualifiers="const"> - <return type="World2D"> - </return> + <return type="World2D" /> <description> Returns the 2D world of the viewport. </description> </method> <method name="find_world_3d" qualifiers="const"> - <return type="World3D"> - </return> + <return type="World3D" /> <description> Returns the 3D world of the viewport, or if none the world of the parent viewport. </description> </method> - <method name="get_camera" qualifiers="const"> - <return type="Camera3D"> - </return> + <method name="get_camera_2d" qualifiers="const"> + <return type="Camera2D" /> <description> - Returns the active 3D camera. + Returns the currently active 2D camera. Returns null if there are no active cameras. + </description> + </method> + <method name="get_camera_3d" qualifiers="const"> + <return type="Camera3D" /> + <description> + Returns the currently active 3D camera. </description> </method> <method name="get_final_transform" qualifiers="const"> - <return type="Transform2D"> - </return> + <return type="Transform2D" /> <description> Returns the total transform of the viewport. </description> </method> <method name="get_mouse_position" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the mouse position relative to the viewport. </description> </method> <method name="get_render_info"> - <return type="int"> - </return> - <argument index="0" name="type" type="int" enum="Viewport.RenderInfoType"> - </argument> - <argument index="1" name="info" type="int" enum="Viewport.RenderInfo"> - </argument> + <return type="int" /> + <argument index="0" name="type" type="int" enum="Viewport.RenderInfoType" /> + <argument index="1" name="info" type="int" enum="Viewport.RenderInfo" /> <description> </description> </method> <method name="get_shadow_atlas_quadrant_subdiv" qualifiers="const"> - <return type="int" enum="Viewport.ShadowAtlasQuadrantSubdiv"> - </return> - <argument index="0" name="quadrant" type="int"> - </argument> + <return type="int" enum="Viewport.ShadowAtlasQuadrantSubdiv" /> + <argument index="0" name="quadrant" type="int" /> <description> Returns the [enum ShadowAtlasQuadrantSubdiv] of the specified quadrant. </description> </method> <method name="get_texture" qualifiers="const"> - <return type="ViewportTexture"> - </return> + <return type="ViewportTexture" /> <description> Returns the viewport's texture. [b]Note:[/b] Due to the way OpenGL works, the resulting [ViewportTexture] is flipped vertically. You can use [method Image.flip_y] on the result of [method Texture2D.get_image] to flip it back, for example: @@ -95,97 +90,77 @@ </description> </method> <method name="get_viewport_rid" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> Returns the viewport's RID from the [RenderingServer]. </description> </method> <method name="get_visible_rect" qualifiers="const"> - <return type="Rect2"> - </return> + <return type="Rect2" /> <description> Returns the visible rectangle in global screen coordinates. </description> </method> <method name="gui_get_drag_data" qualifiers="const"> - <return type="Variant"> - </return> + <return type="Variant" /> <description> Returns the drag data from the GUI, that was previously returned by [method Control._get_drag_data]. </description> </method> <method name="gui_is_dragging" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the viewport is currently performing a drag operation. </description> </method> - <method name="input"> - <return type="void"> - </return> - <argument index="0" name="event" type="InputEvent"> - </argument> - <argument index="1" name="in_local_coords" type="bool" default="false"> - </argument> + <method name="is_embedding_subwindows" qualifiers="const"> + <return type="bool" /> + <description> + </description> + </method> + <method name="is_input_handled" qualifiers="const"> + <return type="bool" /> <description> </description> </method> - <method name="input_text"> - <return type="void"> - </return> - <argument index="0" name="text" type="String"> - </argument> + <method name="push_input"> + <return type="void" /> + <argument index="0" name="event" type="InputEvent" /> + <argument index="1" name="in_local_coords" type="bool" default="false" /> <description> </description> </method> - <method name="is_embedding_subwindows" qualifiers="const"> - <return type="bool"> - </return> + <method name="push_text_input"> + <return type="void" /> + <argument index="0" name="text" type="String" /> <description> Returns [code]true[/code] if the viewport is currently embedding windows. </description> </method> - <method name="is_input_handled" qualifiers="const"> - <return type="bool"> - </return> + <method name="push_unhandled_input"> + <return type="void" /> + <argument index="0" name="event" type="InputEvent" /> + <argument index="1" name="in_local_coords" type="bool" default="false" /> <description> </description> </method> <method name="set_input_as_handled"> - <return type="void"> - </return> + <return type="void" /> <description> Stops the input from propagating further down the [SceneTree]. </description> </method> <method name="set_shadow_atlas_quadrant_subdiv"> - <return type="void"> - </return> - <argument index="0" name="quadrant" type="int"> - </argument> - <argument index="1" name="subdiv" type="int" enum="Viewport.ShadowAtlasQuadrantSubdiv"> - </argument> + <return type="void" /> + <argument index="0" name="quadrant" type="int" /> + <argument index="1" name="subdiv" type="int" enum="Viewport.ShadowAtlasQuadrantSubdiv" /> <description> Sets the number of subdivisions to use in the specified quadrant. A higher number of subdivisions allows you to have more shadows in the scene at once, but reduces the quality of the shadows. A good practice is to have quadrants with a varying number of subdivisions and to have as few subdivisions as possible. </description> </method> - <method name="unhandled_input"> - <return type="void"> - </return> - <argument index="0" name="event" type="InputEvent"> - </argument> - <argument index="1" name="in_local_coords" type="bool" default="false"> - </argument> - <description> - </description> - </method> <method name="warp_mouse"> - <return type="void"> - </return> - <argument index="0" name="to_position" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="to_position" type="Vector2" /> <description> Warps the mouse to a position relative to the viewport. </description> @@ -195,7 +170,7 @@ <member name="audio_listener_enable_2d" type="bool" setter="set_as_audio_listener_2d" getter="is_audio_listener_2d" default="false"> If [code]true[/code], the viewport will process 2D audio streams. </member> - <member name="audio_listener_enable_3d" type="bool" setter="set_as_audio_listener" getter="is_audio_listener" default="false"> + <member name="audio_listener_enable_3d" type="bool" setter="set_as_audio_listener_3d" getter="is_audio_listener_3d" default="false"> If [code]true[/code], the viewport will process 3D audio streams. </member> <member name="canvas_item_default_texture_filter" type="int" setter="set_default_canvas_item_texture_filter" getter="get_default_canvas_item_texture_filter" enum="Viewport.DefaultCanvasItemTextureFilter" default="1"> @@ -237,6 +212,9 @@ <member name="physics_object_picking" type="bool" setter="set_physics_object_picking" getter="get_physics_object_picking" default="false"> If [code]true[/code], the objects rendered by viewport become subjects of mouse picking process. </member> + <member name="scale_3d" type="int" setter="set_scale_3d" getter="get_scale_3d" enum="Viewport.Scale3D" default="0"> + The scale at which 3D content is rendered. + </member> <member name="screen_space_aa" type="int" setter="set_screen_space_aa" getter="get_screen_space_aa" enum="Viewport.ScreenSpaceAA" default="0"> Sets the screen-space antialiasing method used. Screen-space antialiasing works by selectively blurring edges in a post-process shader. It differs from MSAA which takes multiple coverage samples while rendering objects. Screen-space AA methods are typically faster than MSAA and will smooth out specular aliasing, but tend to make scenes appear blurry. </member> @@ -285,8 +263,7 @@ </members> <signals> <signal name="gui_focus_changed"> - <argument index="0" name="node" type="Control"> - </argument> + <argument index="0" name="node" type="Control" /> <description> Emitted when a Control node grabs keyboard focus. </description> @@ -298,6 +275,16 @@ </signal> </signals> <constants> + <constant name="SCALE_3D_DISABLED" value="0" enum="Scale3D"> + </constant> + <constant name="SCALE_3D_75_PERCENT" value="1" enum="Scale3D"> + </constant> + <constant name="SCALE_3D_50_PERCENT" value="2" enum="Scale3D"> + </constant> + <constant name="SCALE_3D_33_PERCENT" value="3" enum="Scale3D"> + </constant> + <constant name="SCALE_3D_25_PERCENT" value="4" enum="Scale3D"> + </constant> <constant name="SHADOW_ATLAS_QUADRANT_SUBDIV_DISABLED" value="0" enum="ShadowAtlasQuadrantSubdiv"> This quadrant will not be used. </constant> @@ -323,19 +310,19 @@ Represents the size of the [enum ShadowAtlasQuadrantSubdiv] enum. </constant> <constant name="MSAA_DISABLED" value="0" enum="MSAA"> - Multisample antialiasing mode disabled. This is the default value, and also the fastest setting. + Multisample antialiasing mode disabled. This is the default value, and is also the fastest setting. </constant> <constant name="MSAA_2X" value="1" enum="MSAA"> - Use 2x Multisample Antialiasing. + Use 2× Multisample Antialiasing. This has a moderate performance cost. It helps reduce aliasing noticeably, but 4× MSAA still looks substantially better. </constant> <constant name="MSAA_4X" value="2" enum="MSAA"> - Use 4x Multisample Antialiasing. + Use 4× Multisample Antialiasing. This has a significant performance cost, and is generally a good compromise between performance and quality. </constant> <constant name="MSAA_8X" value="3" enum="MSAA"> - Use 8x Multisample Antialiasing. Likely unsupported on low-end and older hardware. + Use 8× Multisample Antialiasing. This has a very high performance cost. The difference between 4× and 8× MSAA may not always be visible in real gameplay conditions. Likely unsupported on low-end and older hardware. </constant> <constant name="MSAA_16X" value="4" enum="MSAA"> - Use 16x Multisample Antialiasing. Likely unsupported on medium and low-end hardware. + Use 16× Multisample Antialiasing. This has a very high performance cost. The difference between 8× and 16× MSAA may not always be visible in real gameplay conditions. Likely unsupported on medium and low-end hardware. </constant> <constant name="MSAA_MAX" value="5" enum="MSAA"> Represents the size of the [enum MSAA] enum. diff --git a/doc/classes/VisibleOnScreenNotifier2D.xml b/doc/classes/VisibleOnScreenNotifier2D.xml index daad200ca8..995bd9e9d7 100644 --- a/doc/classes/VisibleOnScreenNotifier2D.xml +++ b/doc/classes/VisibleOnScreenNotifier2D.xml @@ -12,8 +12,7 @@ </tutorials> <methods> <method name="is_on_screen" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> If [code]true[/code], the bounding rectangle is on the screen. [b]Note:[/b] It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return [code]false[/code] right after it is instantiated, even if it will be on screen in the draw pass. diff --git a/doc/classes/VisibleOnScreenNotifier3D.xml b/doc/classes/VisibleOnScreenNotifier3D.xml index 85ff324fbf..03db449c80 100644 --- a/doc/classes/VisibleOnScreenNotifier3D.xml +++ b/doc/classes/VisibleOnScreenNotifier3D.xml @@ -12,8 +12,7 @@ </tutorials> <methods> <method name="is_on_screen" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> If [code]true[/code], the bounding box is on the screen. [b]Note:[/b] It takes one frame for the node's visibility to be assessed once added to the scene tree, so this method will return [code]false[/code] right after it is instantiated, even if it will be on screen in the draw pass. diff --git a/doc/classes/VisualInstance3D.xml b/doc/classes/VisualInstance3D.xml index 2a12254b71..f949fbe7c0 100644 --- a/doc/classes/VisualInstance3D.xml +++ b/doc/classes/VisualInstance3D.xml @@ -10,61 +10,50 @@ </tutorials> <methods> <method name="get_aabb" qualifiers="const"> - <return type="AABB"> - </return> + <return type="AABB" /> <description> Returns the [AABB] (also known as the bounding box) for this [VisualInstance3D]. See also [method get_transformed_aabb]. </description> </method> <method name="get_base" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> Returns the RID of the resource associated with this [VisualInstance3D]. For example, if the Node is a [MeshInstance3D], this will return the RID of the associated [Mesh]. </description> </method> <method name="get_instance" qualifiers="const"> - <return type="RID"> - </return> + <return type="RID" /> <description> Returns the RID of this instance. This RID is the same as the RID returned by [method RenderingServer.instance_create]. This RID is needed if you want to call [RenderingServer] functions directly on this [VisualInstance3D]. </description> </method> - <method name="get_layer_mask_bit" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="layer" type="int"> - </argument> + <method name="get_layer_mask_value" qualifiers="const"> + <return type="bool" /> + <argument index="0" name="layer_number" type="int" /> <description> - Returns [code]true[/code] when the specified layer is enabled in [member layers] and [code]false[/code] otherwise. + Returns whether or not the specified layer of the [member layers] is enabled, given a [code]layer_number[/code] between 1 and 20. </description> </method> <method name="get_transformed_aabb" qualifiers="const"> - <return type="AABB"> - </return> + <return type="AABB" /> <description> Returns the transformed [AABB] (also known as the bounding box) for this [VisualInstance3D]. Transformed in this case means the [AABB] plus the position, rotation, and scale of the [Node3D]'s [Transform3D]. See also [method get_aabb]. </description> </method> <method name="set_base"> - <return type="void"> - </return> - <argument index="0" name="base" type="RID"> - </argument> + <return type="void" /> + <argument index="0" name="base" type="RID" /> <description> Sets the resource that is instantiated by this [VisualInstance3D], which changes how the engine handles the [VisualInstance3D] under the hood. Equivalent to [method RenderingServer.instance_set_base]. </description> </method> - <method name="set_layer_mask_bit"> - <return type="void"> - </return> - <argument index="0" name="layer" type="int"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <method name="set_layer_mask_value"> + <return type="void" /> + <argument index="0" name="layer_number" type="int" /> + <argument index="1" name="value" type="bool" /> <description> - Enables a particular layer in [member layers]. + Based on [code]value[/code], enables or disables the specified layer in the [member layers], given a [code]layer_number[/code] between 1 and 20. </description> </method> </methods> diff --git a/doc/classes/VisualScriptCustomNodes.xml b/doc/classes/VisualScriptCustomNodes.xml new file mode 100644 index 0000000000..3ef8022f5e --- /dev/null +++ b/doc/classes/VisualScriptCustomNodes.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualScriptCustomNodes" inherits="Object" version="4.0"> + <brief_description> + Manages custom nodes for the Visual Script editor. + </brief_description> + <description> + This singleton can be used to manage (i.e., add or remove) custom nodes for the Visual Script editor. + </description> + <tutorials> + </tutorials> + <methods> + <method name="add_custom_node"> + <return type="void" /> + <argument index="0" name="name" type="String" /> + <argument index="1" name="category" type="String" /> + <argument index="2" name="script" type="Script" /> + <description> + Add a custom Visual Script node to the editor. It'll be placed under "Custom Nodes" with the [code]category[/code] as the parameter. + </description> + </method> + <method name="remove_custom_node"> + <return type="void" /> + <argument index="0" name="name" type="String" /> + <argument index="1" name="category" type="String" /> + <description> + Remove a custom Visual Script node from the editor. Custom nodes already placed on scripts won't be removed. + </description> + </method> + </methods> + <signals> + <signal name="custom_nodes_updated"> + <description> + Emitted when a custom Visual Script node is added or removed. + </description> + </signal> + </signals> + <constants> + </constants> +</class> diff --git a/doc/classes/VisualShader.xml b/doc/classes/VisualShader.xml index 19b4acd8f1..cdb9de4f86 100644 --- a/doc/classes/VisualShader.xml +++ b/doc/classes/VisualShader.xml @@ -11,206 +11,148 @@ </tutorials> <methods> <method name="add_node"> - <return type="void"> - </return> - <argument index="0" name="type" type="int" enum="VisualShader.Type"> - </argument> - <argument index="1" name="node" type="VisualShaderNode"> - </argument> - <argument index="2" name="position" type="Vector2"> - </argument> - <argument index="3" name="id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="type" type="int" enum="VisualShader.Type" /> + <argument index="1" name="node" type="VisualShaderNode" /> + <argument index="2" name="position" type="Vector2" /> + <argument index="3" name="id" type="int" /> <description> Adds the specified node to the shader. </description> </method> <method name="can_connect_nodes" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="type" type="int" enum="VisualShader.Type"> - </argument> - <argument index="1" name="from_node" type="int"> - </argument> - <argument index="2" name="from_port" type="int"> - </argument> - <argument index="3" name="to_node" type="int"> - </argument> - <argument index="4" name="to_port" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="type" type="int" enum="VisualShader.Type" /> + <argument index="1" name="from_node" type="int" /> + <argument index="2" name="from_port" type="int" /> + <argument index="3" name="to_node" type="int" /> + <argument index="4" name="to_port" type="int" /> <description> Returns [code]true[/code] if the specified nodes and ports can be connected together. </description> </method> <method name="connect_nodes"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="type" type="int" enum="VisualShader.Type"> - </argument> - <argument index="1" name="from_node" type="int"> - </argument> - <argument index="2" name="from_port" type="int"> - </argument> - <argument index="3" name="to_node" type="int"> - </argument> - <argument index="4" name="to_port" type="int"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="type" type="int" enum="VisualShader.Type" /> + <argument index="1" name="from_node" type="int" /> + <argument index="2" name="from_port" type="int" /> + <argument index="3" name="to_node" type="int" /> + <argument index="4" name="to_port" type="int" /> <description> Connects the specified nodes and ports. </description> </method> <method name="connect_nodes_forced"> - <return type="void"> - </return> - <argument index="0" name="type" type="int" enum="VisualShader.Type"> - </argument> - <argument index="1" name="from_node" type="int"> - </argument> - <argument index="2" name="from_port" type="int"> - </argument> - <argument index="3" name="to_node" type="int"> - </argument> - <argument index="4" name="to_port" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="type" type="int" enum="VisualShader.Type" /> + <argument index="1" name="from_node" type="int" /> + <argument index="2" name="from_port" type="int" /> + <argument index="3" name="to_node" type="int" /> + <argument index="4" name="to_port" type="int" /> <description> Connects the specified nodes and ports, even if they can't be connected. Such connection is invalid and will not function properly. </description> </method> <method name="disconnect_nodes"> - <return type="void"> - </return> - <argument index="0" name="type" type="int" enum="VisualShader.Type"> - </argument> - <argument index="1" name="from_node" type="int"> - </argument> - <argument index="2" name="from_port" type="int"> - </argument> - <argument index="3" name="to_node" type="int"> - </argument> - <argument index="4" name="to_port" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="type" type="int" enum="VisualShader.Type" /> + <argument index="1" name="from_node" type="int" /> + <argument index="2" name="from_port" type="int" /> + <argument index="3" name="to_node" type="int" /> + <argument index="4" name="to_port" type="int" /> <description> Connects the specified nodes and ports. </description> </method> <method name="get_node" qualifiers="const"> - <return type="VisualShaderNode"> - </return> - <argument index="0" name="type" type="int" enum="VisualShader.Type"> - </argument> - <argument index="1" name="id" type="int"> - </argument> + <return type="VisualShaderNode" /> + <argument index="0" name="type" type="int" enum="VisualShader.Type" /> + <argument index="1" name="id" type="int" /> <description> Returns the shader node instance with specified [code]type[/code] and [code]id[/code]. </description> </method> <method name="get_node_connections" qualifiers="const"> - <return type="Array"> - </return> - <argument index="0" name="type" type="int" enum="VisualShader.Type"> - </argument> + <return type="Array" /> + <argument index="0" name="type" type="int" enum="VisualShader.Type" /> <description> Returns the list of connected nodes with the specified type. </description> </method> <method name="get_node_list" qualifiers="const"> - <return type="PackedInt32Array"> - </return> - <argument index="0" name="type" type="int" enum="VisualShader.Type"> - </argument> + <return type="PackedInt32Array" /> + <argument index="0" name="type" type="int" enum="VisualShader.Type" /> <description> Returns the list of all nodes in the shader with the specified type. </description> </method> <method name="get_node_position" qualifiers="const"> - <return type="Vector2"> - </return> - <argument index="0" name="type" type="int" enum="VisualShader.Type"> - </argument> - <argument index="1" name="id" type="int"> - </argument> + <return type="Vector2" /> + <argument index="0" name="type" type="int" enum="VisualShader.Type" /> + <argument index="1" name="id" type="int" /> <description> Returns the position of the specified node within the shader graph. </description> </method> <method name="get_valid_node_id" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="type" type="int" enum="VisualShader.Type"> - </argument> + <return type="int" /> + <argument index="0" name="type" type="int" enum="VisualShader.Type" /> <description> </description> </method> <method name="is_node_connection" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="type" type="int" enum="VisualShader.Type"> - </argument> - <argument index="1" name="from_node" type="int"> - </argument> - <argument index="2" name="from_port" type="int"> - </argument> - <argument index="3" name="to_node" type="int"> - </argument> - <argument index="4" name="to_port" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="type" type="int" enum="VisualShader.Type" /> + <argument index="1" name="from_node" type="int" /> + <argument index="2" name="from_port" type="int" /> + <argument index="3" name="to_node" type="int" /> + <argument index="4" name="to_port" type="int" /> <description> Returns [code]true[/code] if the specified node and port connection exist. </description> </method> <method name="remove_node"> - <return type="void"> - </return> - <argument index="0" name="type" type="int" enum="VisualShader.Type"> - </argument> - <argument index="1" name="id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="type" type="int" enum="VisualShader.Type" /> + <argument index="1" name="id" type="int" /> <description> Removes the specified node from the shader. </description> </method> <method name="replace_node"> - <return type="void"> - </return> - <argument index="0" name="type" type="int" enum="VisualShader.Type"> - </argument> - <argument index="1" name="id" type="int"> - </argument> - <argument index="2" name="new_class" type="StringName"> - </argument> + <return type="void" /> + <argument index="0" name="type" type="int" enum="VisualShader.Type" /> + <argument index="1" name="id" type="int" /> + <argument index="2" name="new_class" type="StringName" /> <description> Replaces the specified node with a node of new class type. </description> </method> <method name="set_mode"> - <return type="void"> - </return> - <argument index="0" name="mode" type="int" enum="Shader.Mode"> - </argument> + <return type="void" /> + <argument index="0" name="mode" type="int" enum="Shader.Mode" /> <description> Sets the mode of this shader. </description> </method> <method name="set_node_position"> - <return type="void"> - </return> - <argument index="0" name="type" type="int" enum="VisualShader.Type"> - </argument> - <argument index="1" name="id" type="int"> - </argument> - <argument index="2" name="position" type="Vector2"> - </argument> + <return type="void" /> + <argument index="0" name="type" type="int" enum="VisualShader.Type" /> + <argument index="1" name="id" type="int" /> + <argument index="2" name="position" type="Vector2" /> <description> Sets the position of the specified node. </description> </method> </methods> <members> + <member name="engine_version" type="Dictionary" setter="set_engine_version" getter="get_engine_version" default="{}"> + The Godot version this [VisualShader] was designed for, in the form of a [Dictionary] with [code]major[/code] and [code]minor[/code] keys with integer values. Example: [code]{"major": 4, "minor": 0}[/code] + This is used by the editor to convert visual shaders from older Godot versions. + </member> <member name="graph_offset" type="Vector2" setter="set_graph_offset" getter="get_graph_offset" default="Vector2(0, 0)"> The offset vector of the whole graph. </member> - <member name="version" type="String" setter="set_version" getter="get_version" default=""""> - </member> </members> <constants> <constant name="TYPE_VERTEX" value="0" enum="Type"> diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml index 9a74f2322e..2cff70b4f1 100644 --- a/doc/classes/VisualShaderNode.xml +++ b/doc/classes/VisualShaderNode.xml @@ -4,59 +4,49 @@ Base class for nodes in a visual shader graph. </brief_description> <description> + Visual shader graphs consist of various nodes. Each node in the graph is a separate object and they are represented as a rectangular boxes with title and a set of properties. Each node has also connection ports that allow to connect it to another nodes and control the flow of the shader. </description> <tutorials> <link title="VisualShaders">https://docs.godotengine.org/en/latest/tutorials/shading/visual_shaders.html</link> </tutorials> <methods> <method name="clear_default_input_values"> - <return type="void"> - </return> + <return type="void" /> <description> Clears the default input ports value. </description> </method> <method name="get_default_input_values" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns an [Array] containing default values for all of the input ports of the node in the form [code][index0, value0, index1, value1, ...][/code]. </description> </method> <method name="get_input_port_default_value" qualifiers="const"> - <return type="Variant"> - </return> - <argument index="0" name="port" type="int"> - </argument> + <return type="Variant" /> + <argument index="0" name="port" type="int" /> <description> Returns the default value of the input [code]port[/code]. </description> </method> <method name="remove_input_port_default_value"> - <return type="void"> - </return> - <argument index="0" name="port" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="port" type="int" /> <description> Removes the default value of the input [code]port[/code]. </description> </method> <method name="set_default_input_values"> - <return type="void"> - </return> - <argument index="0" name="values" type="Array"> - </argument> + <return type="void" /> + <argument index="0" name="values" type="Array" /> <description> Sets the default input ports values using an [Array] of the form [code][index0, value0, index1, value1, ...][/code]. For example: [code][0, Vector3(0, 0, 0), 1, Vector3(0, 0, 0)][/code]. </description> </method> <method name="set_input_port_default_value"> - <return type="void"> - </return> - <argument index="0" name="port" type="int"> - </argument> - <argument index="1" name="value" type="Variant"> - </argument> + <return type="void" /> + <argument index="0" name="port" type="int" /> + <argument index="1" name="value" type="Variant" /> <description> Sets the default value for the selected input [code]port[/code]. </description> diff --git a/doc/classes/VisualShaderNodeColorFunc.xml b/doc/classes/VisualShaderNodeColorFunc.xml index b9abf85802..8d410104b8 100644 --- a/doc/classes/VisualShaderNodeColorFunc.xml +++ b/doc/classes/VisualShaderNodeColorFunc.xml @@ -36,5 +36,8 @@ return vec3(r, g, b); [/codeblock] </constant> + <constant name="FUNC_MAX" value="2" enum="Function"> + Represents the size of the [enum Function] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeColorOp.xml b/doc/classes/VisualShaderNodeColorOp.xml index 629e84d47b..55b006b098 100644 --- a/doc/classes/VisualShaderNodeColorOp.xml +++ b/doc/classes/VisualShaderNodeColorOp.xml @@ -94,5 +94,8 @@ } [/codeblock] </constant> + <constant name="OP_MAX" value="9" enum="Operator"> + Represents the size of the [enum Operator] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeCompare.xml b/doc/classes/VisualShaderNodeCompare.xml index 9c2331edea..96bb3df494 100644 --- a/doc/classes/VisualShaderNodeCompare.xml +++ b/doc/classes/VisualShaderNodeCompare.xml @@ -37,6 +37,9 @@ <constant name="CTYPE_TRANSFORM" value="4" enum="ComparisonType"> A transform ([code]mat4[/code]) type. </constant> + <constant name="CTYPE_MAX" value="5" enum="ComparisonType"> + Represents the size of the [enum ComparisonType] enum. + </constant> <constant name="FUNC_EQUAL" value="0" enum="Function"> Comparison for equality ([code]a == b[/code]). </constant> @@ -55,11 +58,17 @@ <constant name="FUNC_LESS_THAN_EQUAL" value="5" enum="Function"> Comparison for less than or equal ([code]a <= b[/code]). Cannot be used if [member type] set to [constant CTYPE_BOOLEAN] or [constant CTYPE_TRANSFORM]. </constant> + <constant name="FUNC_MAX" value="6" enum="Function"> + Represents the size of the [enum Function] enum. + </constant> <constant name="COND_ALL" value="0" enum="Condition"> The result will be true if all of component in vector satisfy the comparison condition. </constant> <constant name="COND_ANY" value="1" enum="Condition"> The result will be true if any of component in vector satisfy the comparison condition. </constant> + <constant name="COND_MAX" value="2" enum="Condition"> + Represents the size of the [enum Condition] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeCubemap.xml b/doc/classes/VisualShaderNodeCubemap.xml index 13b367e8f2..4a5f58261d 100644 --- a/doc/classes/VisualShaderNodeCubemap.xml +++ b/doc/classes/VisualShaderNodeCubemap.xml @@ -28,6 +28,9 @@ <constant name="SOURCE_PORT" value="1" enum="Source"> Use the [Cubemap] sampler reference passed via the [code]samplerCube[/code] port. If this is set to [member source], the [member cube_map] texture is ignored. </constant> + <constant name="SOURCE_MAX" value="2" enum="Source"> + Represents the size of the [enum Source] enum. + </constant> <constant name="TYPE_DATA" value="0" enum="TextureType"> No hints are added to the uniform declaration. </constant> @@ -37,5 +40,8 @@ <constant name="TYPE_NORMAL_MAP" value="2" enum="TextureType"> Adds [code]hint_normal[/code] as hint to the uniform declaration, which internally converts the texture for proper usage as normal map. </constant> + <constant name="TYPE_MAX" value="3" enum="TextureType"> + Represents the size of the [enum TextureType] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeCurveTexture.xml b/doc/classes/VisualShaderNodeCurveTexture.xml index 26b7b07df2..4839ceab92 100644 --- a/doc/classes/VisualShaderNodeCurveTexture.xml +++ b/doc/classes/VisualShaderNodeCurveTexture.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeCurveTexture" inherits="VisualShaderNodeResizableBase" version="4.0"> <brief_description> + Performs a [CurveTexture] lookup within the visual shader graph. </brief_description> <description> + Comes with a built-in editor for texture's curves. </description> <tutorials> </tutorials> @@ -10,6 +12,7 @@ </methods> <members> <member name="texture" type="CurveTexture" setter="set_texture" getter="get_texture"> + The source texture. </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeCurveXYZTexture.xml b/doc/classes/VisualShaderNodeCurveXYZTexture.xml new file mode 100644 index 0000000000..11cdc541bb --- /dev/null +++ b/doc/classes/VisualShaderNodeCurveXYZTexture.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeCurveXYZTexture" inherits="VisualShaderNodeResizableBase" version="4.0"> + <brief_description> + Performs a [CurveXYZTexture] lookup within the visual shader graph. + </brief_description> + <description> + Comes with a built-in editor for texture's curves. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="texture" type="CurveXYZTexture" setter="set_texture" getter="get_texture"> + The source texture. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeCustom.xml b/doc/classes/VisualShaderNodeCustom.xml index 17fc2f8c4d..3a489419c1 100644 --- a/doc/classes/VisualShaderNodeCustom.xml +++ b/doc/classes/VisualShaderNodeCustom.xml @@ -16,25 +16,19 @@ <link title="Visual Shader plugins">https://docs.godotengine.org/en/latest/tutorials/plugins/editor/visual_shader_plugins.html</link> </tutorials> <methods> - <method name="_get_category" qualifiers="virtual"> - <return type="String"> - </return> + <method name="_get_category" qualifiers="virtual const"> + <return type="String" /> <description> Override this method to define the path to the associated custom node in the Visual Shader Editor's members dialog. The path may look like [code]"MyGame/MyFunctions/Noise"[/code]. Defining this method is [b]optional[/b]. If not overridden, the node will be filed under the "Addons" category. </description> </method> - <method name="_get_code" qualifiers="virtual"> - <return type="String"> - </return> - <argument index="0" name="input_vars" type="Array"> - </argument> - <argument index="1" name="output_vars" type="Array"> - </argument> - <argument index="2" name="mode" type="int"> - </argument> - <argument index="3" name="type" type="int"> - </argument> + <method name="_get_code" qualifiers="virtual const"> + <return type="String" /> + <argument index="0" name="input_vars" type="PackedStringArray" /> + <argument index="1" name="output_vars" type="String[]" /> + <argument index="2" name="mode" type="int" /> + <argument index="3" name="type" type="int" /> <description> Override this method to define the actual shader code of the associated custom node. The shader code should be returned as a string, which can have multiple lines (the [code]"""[/code] multiline string construct can be used for convenience). The [code]input_vars[/code] and [code]output_vars[/code] arrays contain the string names of the various input and output variables, as defined by [code]_get_input_*[/code] and [code]_get_output_*[/code] virtual methods in this class. @@ -43,19 +37,16 @@ Defining this method is [b]required[/b]. </description> </method> - <method name="_get_description" qualifiers="virtual"> - <return type="String"> - </return> + <method name="_get_description" qualifiers="virtual const"> + <return type="String" /> <description> Override this method to define the description of the associated custom node in the Visual Shader Editor's members dialog. Defining this method is [b]optional[/b]. </description> </method> - <method name="_get_global_code" qualifiers="virtual"> - <return type="String"> - </return> - <argument index="0" name="mode" type="int"> - </argument> + <method name="_get_global_code" qualifiers="virtual const"> + <return type="String" /> + <argument index="0" name="mode" type="int" /> <description> Override this method to add shader code on top of the global shader, to define your own standard library of reusable methods, varyings, constants, uniforms, etc. The shader code should be returned as a string, which can have multiple lines (the [code]"""[/code] multiline string construct can be used for convenience). Be careful with this functionality as it can cause name conflicts with other custom nodes, so be sure to give the defined entities unique names. @@ -63,81 +54,68 @@ Defining this method is [b]optional[/b]. </description> </method> - <method name="_get_input_port_count" qualifiers="virtual"> - <return type="int"> - </return> + <method name="_get_input_port_count" qualifiers="virtual const"> + <return type="int" /> <description> Override this method to define the amount of input ports of the associated custom node. Defining this method is [b]required[/b]. If not overridden, the node has no input ports. </description> </method> - <method name="_get_input_port_name" qualifiers="virtual"> - <return type="StringName"> - </return> - <argument index="0" name="port" type="int"> - </argument> + <method name="_get_input_port_name" qualifiers="virtual const"> + <return type="String" /> + <argument index="0" name="port" type="int" /> <description> Override this method to define the names of input ports of the associated custom node. The names are used both for the input slots in the editor and as identifiers in the shader code, and are passed in the [code]input_vars[/code] array in [method _get_code]. Defining this method is [b]optional[/b], but recommended. If not overridden, input ports are named as [code]"in" + str(port)[/code]. </description> </method> - <method name="_get_input_port_type" qualifiers="virtual"> - <return type="int"> - </return> - <argument index="0" name="port" type="int"> - </argument> + <method name="_get_input_port_type" qualifiers="virtual const"> + <return type="int" /> + <argument index="0" name="port" type="int" /> <description> Override this method to define the returned type of each input port of the associated custom node (see [enum VisualShaderNode.PortType] for possible types). Defining this method is [b]optional[/b], but recommended. If not overridden, input ports will return the [constant VisualShaderNode.PORT_TYPE_SCALAR] type. </description> </method> - <method name="_get_name" qualifiers="virtual"> - <return type="String"> - </return> + <method name="_get_name" qualifiers="virtual const"> + <return type="String" /> <description> Override this method to define the name of the associated custom node in the Visual Shader Editor's members dialog and graph. Defining this method is [b]optional[/b], but recommended. If not overridden, the node will be named as "Unnamed". </description> </method> - <method name="_get_output_port_count" qualifiers="virtual"> - <return type="int"> - </return> + <method name="_get_output_port_count" qualifiers="virtual const"> + <return type="int" /> <description> Override this method to define the amount of output ports of the associated custom node. Defining this method is [b]required[/b]. If not overridden, the node has no output ports. </description> </method> - <method name="_get_output_port_name" qualifiers="virtual"> - <return type="StringName"> - </return> - <argument index="0" name="port" type="int"> - </argument> + <method name="_get_output_port_name" qualifiers="virtual const"> + <return type="String" /> + <argument index="0" name="port" type="int" /> <description> Override this method to define the names of output ports of the associated custom node. The names are used both for the output slots in the editor and as identifiers in the shader code, and are passed in the [code]output_vars[/code] array in [method _get_code]. Defining this method is [b]optional[/b], but recommended. If not overridden, output ports are named as [code]"out" + str(port)[/code]. </description> </method> - <method name="_get_output_port_type" qualifiers="virtual"> - <return type="int"> - </return> - <argument index="0" name="port" type="int"> - </argument> + <method name="_get_output_port_type" qualifiers="virtual const"> + <return type="int" /> + <argument index="0" name="port" type="int" /> <description> Override this method to define the returned type of each output port of the associated custom node (see [enum VisualShaderNode.PortType] for possible types). Defining this method is [b]optional[/b], but recommended. If not overridden, output ports will return the [constant VisualShaderNode.PORT_TYPE_SCALAR] type. </description> </method> - <method name="_get_return_icon_type" qualifiers="virtual"> - <return type="int"> - </return> + <method name="_get_return_icon_type" qualifiers="virtual const"> + <return type="int" /> <description> Override this method to define the return icon of the associated custom node in the Visual Shader Editor's members dialog. Defining this method is [b]optional[/b]. If not overridden, no return icon is shown. </description> </method> - <method name="_is_highend" qualifiers="virtual"> - <return type="bool"> - </return> + <method name="_is_highend" qualifiers="virtual const"> + <return type="bool" /> <description> Override this method to enable high-end mark in the Visual Shader Editor's members dialog. Defining this method is [b]optional[/b]. If not overridden, it's false. diff --git a/doc/classes/VisualShaderNodeFloatFunc.xml b/doc/classes/VisualShaderNodeFloatFunc.xml index bb7486e8cf..ff499d25a6 100644 --- a/doc/classes/VisualShaderNodeFloatFunc.xml +++ b/doc/classes/VisualShaderNodeFloatFunc.xml @@ -112,5 +112,8 @@ <constant name="FUNC_ONEMINUS" value="31" enum="Function"> Subtracts scalar [code]x[/code] from 1 (i.e. [code]1 - x[/code]). </constant> + <constant name="FUNC_MAX" value="32" enum="Function"> + Represents the size of the [enum Function] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeFloatOp.xml b/doc/classes/VisualShaderNodeFloatOp.xml index 2c9ebabb89..ba000f258b 100644 --- a/doc/classes/VisualShaderNodeFloatOp.xml +++ b/doc/classes/VisualShaderNodeFloatOp.xml @@ -46,5 +46,8 @@ <constant name="OP_STEP" value="9" enum="Operator"> Generates a step function by comparing [code]b[/code](x) to [code]a[/code](edge). Returns 0.0 if [code]x[/code] is smaller than [code]edge[/code] and otherwise 1.0. Translates to [code]step(a, b)[/code] in the Godot Shader Language. </constant> + <constant name="OP_ENUM_SIZE" value="10" enum="Operator"> + Represents the size of the [enum Operator] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeFloatUniform.xml b/doc/classes/VisualShaderNodeFloatUniform.xml index 705d5e8796..fcfd78dbea 100644 --- a/doc/classes/VisualShaderNodeFloatUniform.xml +++ b/doc/classes/VisualShaderNodeFloatUniform.xml @@ -40,5 +40,8 @@ <constant name="HINT_RANGE_STEP" value="2" enum="Hint"> A range hint for scalar value with step, which limits possible input values between [member min] and [member max], with a step (increment) of [member step]). Translated to [code]hint_range(min, max, step)[/code] in shader code. </constant> + <constant name="HINT_MAX" value="3" enum="Hint"> + Represents the size of the [enum Hint] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeGroupBase.xml b/doc/classes/VisualShaderNodeGroupBase.xml index be3f7f173d..a692d47638 100644 --- a/doc/classes/VisualShaderNodeGroupBase.xml +++ b/doc/classes/VisualShaderNodeGroupBase.xml @@ -10,190 +10,148 @@ </tutorials> <methods> <method name="add_input_port"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="type" type="int"> - </argument> - <argument index="2" name="name" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="type" type="int" /> + <argument index="2" name="name" type="String" /> <description> Adds an input port with the specified [code]type[/code] (see [enum VisualShaderNode.PortType]) and [code]name[/code]. </description> </method> <method name="add_output_port"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="type" type="int"> - </argument> - <argument index="2" name="name" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="type" type="int" /> + <argument index="2" name="name" type="String" /> <description> Adds an output port with the specified [code]type[/code] (see [enum VisualShaderNode.PortType]) and [code]name[/code]. </description> </method> <method name="clear_input_ports"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all previously specified input ports. </description> </method> <method name="clear_output_ports"> - <return type="void"> - </return> + <return type="void" /> <description> Removes all previously specified output ports. </description> </method> <method name="get_free_input_port_id" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns a free input port ID which can be used in [method add_input_port]. </description> </method> <method name="get_free_output_port_id" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns a free output port ID which can be used in [method add_output_port]. </description> </method> <method name="get_input_port_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of input ports in use. Alternative for [method get_free_input_port_id]. </description> </method> <method name="get_inputs" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns a [String] description of the input ports as a colon-separated list using the format [code]id,type,name;[/code] (see [method add_input_port]). </description> </method> <method name="get_output_port_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of output ports in use. Alternative for [method get_free_output_port_id]. </description> </method> <method name="get_outputs" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns a [String] description of the output ports as a colon-separated list using the format [code]id,type,name;[/code] (see [method add_output_port]). </description> </method> <method name="has_input_port" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="id" type="int" /> <description> Returns [code]true[/code] if the specified input port exists. </description> </method> <method name="has_output_port" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="id" type="int" /> <description> Returns [code]true[/code] if the specified output port exists. </description> </method> <method name="is_valid_port_name" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="String" /> <description> Returns [code]true[/code] if the specified port name does not override an existed port name and is valid within the shader. </description> </method> <method name="remove_input_port"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> <description> Removes the specified input port. </description> </method> <method name="remove_output_port"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> <description> Removes the specified output port. </description> </method> <method name="set_input_port_name"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="name" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="name" type="String" /> <description> Renames the specified input port. </description> </method> <method name="set_input_port_type"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="type" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="type" type="int" /> <description> Sets the specified input port's type (see [enum VisualShaderNode.PortType]). </description> </method> <method name="set_inputs"> - <return type="void"> - </return> - <argument index="0" name="inputs" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="inputs" type="String" /> <description> Defines all input ports using a [String] formatted as a colon-separated list: [code]id,type,name;[/code] (see [method add_input_port]). </description> </method> <method name="set_output_port_name"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="name" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="name" type="String" /> <description> Renames the specified output port. </description> </method> <method name="set_output_port_type"> - <return type="void"> - </return> - <argument index="0" name="id" type="int"> - </argument> - <argument index="1" name="type" type="int"> - </argument> + <return type="void" /> + <argument index="0" name="id" type="int" /> + <argument index="1" name="type" type="int" /> <description> Sets the specified output port's type (see [enum VisualShaderNode.PortType]). </description> </method> <method name="set_outputs"> - <return type="void"> - </return> - <argument index="0" name="outputs" type="String"> - </argument> + <return type="void" /> + <argument index="0" name="outputs" type="String" /> <description> Defines all output ports using a [String] formatted as a colon-separated list: [code]id,type,name;[/code] (see [method add_output_port]). </description> diff --git a/doc/classes/VisualShaderNodeInput.xml b/doc/classes/VisualShaderNodeInput.xml index 067f78dffe..dd62d668eb 100644 --- a/doc/classes/VisualShaderNodeInput.xml +++ b/doc/classes/VisualShaderNodeInput.xml @@ -11,8 +11,7 @@ </tutorials> <methods> <method name="get_input_real_name" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns a translated name of the current constant in the Godot Shader Language. E.g. [code]"ALBEDO"[/code] if the [member input_name] equal to [code]"albedo"[/code]. </description> diff --git a/doc/classes/VisualShaderNodeIntFunc.xml b/doc/classes/VisualShaderNodeIntFunc.xml index a9f4144a01..358a3f3512 100644 --- a/doc/classes/VisualShaderNodeIntFunc.xml +++ b/doc/classes/VisualShaderNodeIntFunc.xml @@ -25,5 +25,8 @@ <constant name="FUNC_SIGN" value="2" enum="Function"> Extracts the sign of the parameter. Translates to [code]sign(x)[/code] in the Godot Shader Language. </constant> + <constant name="FUNC_MAX" value="3" enum="Function"> + Represents the size of the [enum Function] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeIntOp.xml b/doc/classes/VisualShaderNodeIntOp.xml index fc9a0a9a0a..2d55cdaf78 100644 --- a/doc/classes/VisualShaderNodeIntOp.xml +++ b/doc/classes/VisualShaderNodeIntOp.xml @@ -37,5 +37,8 @@ <constant name="OP_MIN" value="6" enum="Operator"> Returns the lesser of two numbers. Translates to [code]max(a, b)[/code] in the Godot Shader Language. </constant> + <constant name="OP_ENUM_SIZE" value="7" enum="Operator"> + Represents the size of the [enum Operator] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeIntUniform.xml b/doc/classes/VisualShaderNodeIntUniform.xml index e39eba865b..4070553884 100644 --- a/doc/classes/VisualShaderNodeIntUniform.xml +++ b/doc/classes/VisualShaderNodeIntUniform.xml @@ -40,5 +40,8 @@ <constant name="HINT_RANGE_STEP" value="2" enum="Hint"> A range hint for scalar value with step, which limits possible input values between [member min] and [member max], with a step (increment) of [member step]). Translated to [code]hint_range(min, max, step)[/code] in shader code. </constant> + <constant name="HINT_MAX" value="3" enum="Hint"> + Represents the size of the [enum Hint] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeIs.xml b/doc/classes/VisualShaderNodeIs.xml index b767a9638e..f46267677e 100644 --- a/doc/classes/VisualShaderNodeIs.xml +++ b/doc/classes/VisualShaderNodeIs.xml @@ -22,5 +22,8 @@ <constant name="FUNC_IS_NAN" value="1" enum="Function"> Comparison with [code]NaN[/code] (Not a Number; denotes invalid numeric results, e.g. division by zero). </constant> + <constant name="FUNC_MAX" value="2" enum="Function"> + Represents the size of the [enum Function] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeParticleAccelerator.xml b/doc/classes/VisualShaderNodeParticleAccelerator.xml index 82aae1df63..2f3f58c0cf 100644 --- a/doc/classes/VisualShaderNodeParticleAccelerator.xml +++ b/doc/classes/VisualShaderNodeParticleAccelerator.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeParticleAccelerator" inherits="VisualShaderNodeOutput" version="4.0"> +<class name="VisualShaderNodeParticleAccelerator" inherits="VisualShaderNode" version="4.0"> <brief_description> </brief_description> <description> @@ -20,6 +20,7 @@ <constant name="MODE_TANGENTIAL" value="2" enum="Mode"> </constant> <constant name="MODE_MAX" value="3" enum="Mode"> + Represents the size of the [enum Mode] enum. </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeParticleRandomness.xml b/doc/classes/VisualShaderNodeParticleRandomness.xml index f19723a663..75736992ee 100644 --- a/doc/classes/VisualShaderNodeParticleRandomness.xml +++ b/doc/classes/VisualShaderNodeParticleRandomness.xml @@ -18,6 +18,7 @@ <constant name="OP_TYPE_VECTOR" value="1" enum="OpType"> </constant> <constant name="OP_TYPE_MAX" value="2" enum="OpType"> + Represents the size of the [enum OpType] enum. </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeResizableBase.xml b/doc/classes/VisualShaderNodeResizableBase.xml index 9052f6854b..f42289a10e 100644 --- a/doc/classes/VisualShaderNodeResizableBase.xml +++ b/doc/classes/VisualShaderNodeResizableBase.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeResizableBase" inherits="VisualShaderNode" version="4.0"> <brief_description> + Base class for resizable nodes in a visual shader graph. </brief_description> <description> + Resizable nodes have a handle that allows the user to adjust their size as needed. </description> <tutorials> </tutorials> diff --git a/doc/classes/VisualShaderNodeSample3D.xml b/doc/classes/VisualShaderNodeSample3D.xml index cf6933ab55..82bcac5f69 100644 --- a/doc/classes/VisualShaderNodeSample3D.xml +++ b/doc/classes/VisualShaderNodeSample3D.xml @@ -22,5 +22,8 @@ <constant name="SOURCE_PORT" value="1" enum="Source"> Use the uniform texture from sampler port. </constant> + <constant name="SOURCE_MAX" value="2" enum="Source"> + Represents the size of the [enum Source] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml b/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml index 33777c1e49..305586ac49 100644 --- a/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml +++ b/doc/classes/VisualShaderNodeScalarDerivativeFunc.xml @@ -25,5 +25,8 @@ <constant name="FUNC_Y" value="2" enum="Function"> Derivative in [code]y[/code] using local differencing. </constant> + <constant name="FUNC_MAX" value="3" enum="Function"> + Represents the size of the [enum Function] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeTexture.xml b/doc/classes/VisualShaderNodeTexture.xml index 8fa71b490d..17c079f385 100644 --- a/doc/classes/VisualShaderNodeTexture.xml +++ b/doc/classes/VisualShaderNodeTexture.xml @@ -40,6 +40,9 @@ <constant name="SOURCE_PORT" value="5" enum="Source"> Use the texture provided in the input port for this function. </constant> + <constant name="SOURCE_MAX" value="6" enum="Source"> + Represents the size of the [enum Source] enum. + </constant> <constant name="TYPE_DATA" value="0" enum="TextureType"> No hints are added to the uniform declaration. </constant> @@ -49,5 +52,8 @@ <constant name="TYPE_NORMAL_MAP" value="2" enum="TextureType"> Adds [code]hint_normal[/code] as hint to the uniform declaration, which internally converts the texture for proper usage as normal map. </constant> + <constant name="TYPE_MAX" value="3" enum="TextureType"> + Represents the size of the [enum TextureType] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeTextureUniform.xml b/doc/classes/VisualShaderNodeTextureUniform.xml index 5a7474cca1..492c6010df 100644 --- a/doc/classes/VisualShaderNodeTextureUniform.xml +++ b/doc/classes/VisualShaderNodeTextureUniform.xml @@ -31,11 +31,17 @@ <constant name="TYPE_ANISO" value="3" enum="TextureType"> Adds [code]hint_aniso[/code] as hint to the uniform declaration to use for a flowmap. </constant> + <constant name="TYPE_MAX" value="4" enum="TextureType"> + Represents the size of the [enum TextureType] enum. + </constant> <constant name="COLOR_DEFAULT_WHITE" value="0" enum="ColorDefault"> Defaults to white color. </constant> <constant name="COLOR_DEFAULT_BLACK" value="1" enum="ColorDefault"> Defaults to black color. </constant> + <constant name="COLOR_DEFAULT_MAX" value="2" enum="ColorDefault"> + Represents the size of the [enum ColorDefault] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeTransformFunc.xml b/doc/classes/VisualShaderNodeTransformFunc.xml index 41a58e1458..51b1100e22 100644 --- a/doc/classes/VisualShaderNodeTransformFunc.xml +++ b/doc/classes/VisualShaderNodeTransformFunc.xml @@ -22,5 +22,8 @@ <constant name="FUNC_TRANSPOSE" value="1" enum="Function"> Perform the transpose operation on the [Transform3D] matrix. </constant> + <constant name="FUNC_MAX" value="2" enum="Function"> + Represents the size of the [enum Function] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeTransformMult.xml b/doc/classes/VisualShaderNodeTransformMult.xml deleted file mode 100644 index f26f60a1f3..0000000000 --- a/doc/classes/VisualShaderNodeTransformMult.xml +++ /dev/null @@ -1,32 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="VisualShaderNodeTransformMult" inherits="VisualShaderNode" version="4.0"> - <brief_description> - Multiplies [Transform3D] by [Transform3D] within the visual shader graph. - </brief_description> - <description> - A multiplication operation on two transforms (4x4 matrices), with support for different multiplication operators. - </description> - <tutorials> - </tutorials> - <methods> - </methods> - <members> - <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeTransformMult.Operator" default="0"> - The multiplication type to be performed on the transforms. See [enum Operator] for options. - </member> - </members> - <constants> - <constant name="OP_AxB" value="0" enum="Operator"> - Multiplies transform [code]a[/code] by the transform [code]b[/code]. - </constant> - <constant name="OP_BxA" value="1" enum="Operator"> - Multiplies transform [code]b[/code] by the transform [code]a[/code]. - </constant> - <constant name="OP_AxB_COMP" value="2" enum="Operator"> - Performs a component-wise multiplication of transform [code]a[/code] by the transform [code]b[/code]. - </constant> - <constant name="OP_BxA_COMP" value="3" enum="Operator"> - Performs a component-wise multiplication of transform [code]b[/code] by the transform [code]a[/code]. - </constant> - </constants> -</class> diff --git a/doc/classes/VisualShaderNodeTransformOp.xml b/doc/classes/VisualShaderNodeTransformOp.xml new file mode 100644 index 0000000000..02debd890f --- /dev/null +++ b/doc/classes/VisualShaderNodeTransformOp.xml @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeTransformOp" inherits="VisualShaderNode" version="4.0"> + <brief_description> + A [Transform3D] operator to be used within the visual shader graph. + </brief_description> + <description> + Applies [member operator] to two transform (4x4 matrices) inputs. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="operator" type="int" setter="set_operator" getter="get_operator" enum="VisualShaderNodeTransformOp.Operator" default="0"> + The type of the operation to be performed on the transforms. See [enum Operator] for options. + </member> + </members> + <constants> + <constant name="OP_AxB" value="0" enum="Operator"> + Multiplies transform [code]a[/code] by the transform [code]b[/code]. + </constant> + <constant name="OP_BxA" value="1" enum="Operator"> + Multiplies transform [code]b[/code] by the transform [code]a[/code]. + </constant> + <constant name="OP_AxB_COMP" value="2" enum="Operator"> + Performs a component-wise multiplication of transform [code]a[/code] by the transform [code]b[/code]. + </constant> + <constant name="OP_BxA_COMP" value="3" enum="Operator"> + Performs a component-wise multiplication of transform [code]b[/code] by the transform [code]a[/code]. + </constant> + <constant name="OP_ADD" value="4" enum="Operator"> + Adds two transforms. + </constant> + <constant name="OP_A_MINUS_B" value="5" enum="Operator"> + Subtracts the transform [code]a[/code] from the transform [code]b[/code]. + </constant> + <constant name="OP_B_MINUS_A" value="6" enum="Operator"> + Subtracts the transform [code]b[/code] from the transform [code]a[/code]. + </constant> + <constant name="OP_A_DIV_B" value="7" enum="Operator"> + Divides the transform [code]a[/code] by the transform [code]b[/code]. + </constant> + <constant name="OP_B_DIV_A" value="8" enum="Operator"> + Divides the transform [code]b[/code] by the transform [code]a[/code]. + </constant> + <constant name="OP_MAX" value="9" enum="Operator"> + Represents the size of the [enum Operator] enum. + </constant> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeTransformVecMult.xml b/doc/classes/VisualShaderNodeTransformVecMult.xml index 2c9c115d9c..d8f7ebbd55 100644 --- a/doc/classes/VisualShaderNodeTransformVecMult.xml +++ b/doc/classes/VisualShaderNodeTransformVecMult.xml @@ -28,5 +28,8 @@ <constant name="OP_3x3_BxA" value="3" enum="Operator"> Multiplies vector [code]b[/code] by the transform [code]a[/code], skipping the last row and column of the transform. </constant> + <constant name="OP_MAX" value="4" enum="Operator"> + Represents the size of the [enum Operator] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeUniform.xml b/doc/classes/VisualShaderNodeUniform.xml index 83261344bd..561d87af45 100644 --- a/doc/classes/VisualShaderNodeUniform.xml +++ b/doc/classes/VisualShaderNodeUniform.xml @@ -24,5 +24,8 @@ </constant> <constant name="QUAL_INSTANCE" value="2" enum="Qualifier"> </constant> + <constant name="QUAL_MAX" value="3" enum="Qualifier"> + Represents the size of the [enum Qualifier] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml b/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml index 859c47bc33..9fd8ba2806 100644 --- a/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml +++ b/doc/classes/VisualShaderNodeVectorDerivativeFunc.xml @@ -25,5 +25,8 @@ <constant name="FUNC_Y" value="2" enum="Function"> Derivative in [code]y[/code] using local differencing. </constant> + <constant name="FUNC_MAX" value="3" enum="Function"> + Represents the size of the [enum Function] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeVectorFunc.xml b/doc/classes/VisualShaderNodeVectorFunc.xml index cbda3dfb46..79bf3f6a07 100644 --- a/doc/classes/VisualShaderNodeVectorFunc.xml +++ b/doc/classes/VisualShaderNodeVectorFunc.xml @@ -121,5 +121,8 @@ <constant name="FUNC_ONEMINUS" value="34" enum="Function"> Returns [code]1.0 - vector[/code]. </constant> + <constant name="FUNC_MAX" value="35" enum="Function"> + Represents the size of the [enum Function] enum. + </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeVectorOp.xml b/doc/classes/VisualShaderNodeVectorOp.xml index d56c012f8f..263485d38e 100644 --- a/doc/classes/VisualShaderNodeVectorOp.xml +++ b/doc/classes/VisualShaderNodeVectorOp.xml @@ -52,5 +52,8 @@ <constant name="OP_STEP" value="11" enum="Operator"> Vector step operator. Returns [code]0.0[/code] if [code]a[/code] is smaller than [code]b[/code] and [code]1.0[/code] otherwise. </constant> + <constant name="OP_ENUM_SIZE" value="12" enum="Operator"> + Represents the size of the [enum Operator] enum. + </constant> </constants> </class> diff --git a/doc/classes/VoxelGI.xml b/doc/classes/VoxelGI.xml index 5b395becb7..eceb651d5e 100644 --- a/doc/classes/VoxelGI.xml +++ b/doc/classes/VoxelGI.xml @@ -14,19 +14,15 @@ </tutorials> <methods> <method name="bake"> - <return type="void"> - </return> - <argument index="0" name="from_node" type="Node" default="null"> - </argument> - <argument index="1" name="create_visual_debug" type="bool" default="false"> - </argument> + <return type="void" /> + <argument index="0" name="from_node" type="Node" default="null" /> + <argument index="1" name="create_visual_debug" type="bool" default="false" /> <description> Bakes the effect from all [GeometryInstance3D]s marked with [constant GeometryInstance3D.GI_MODE_BAKED] and [Light3D]s marked with either [constant Light3D.BAKE_DYNAMIC] or [constant Light3D.BAKE_STATIC]. If [code]create_visual_debug[/code] is [code]true[/code], after baking the light, this will generate a [MultiMesh] that has a cube representing each solid cell with each cube colored to the cell's albedo color. This can be used to visualize the [VoxelGI]'s data and debug any issues that may be occurring. </description> </method> <method name="debug_bake"> - <return type="void"> - </return> + <return type="void" /> <description> Calls [method bake] with [code]create_visual_debug[/code] enabled. </description> diff --git a/doc/classes/VoxelGIData.xml b/doc/classes/VoxelGIData.xml index f613002233..5c2c7f9dc6 100644 --- a/doc/classes/VoxelGIData.xml +++ b/doc/classes/VoxelGIData.xml @@ -9,58 +9,44 @@ </tutorials> <methods> <method name="allocate"> - <return type="void"> - </return> - <argument index="0" name="to_cell_xform" type="Transform3D"> - </argument> - <argument index="1" name="aabb" type="AABB"> - </argument> - <argument index="2" name="octree_size" type="Vector3"> - </argument> - <argument index="3" name="octree_cells" type="PackedByteArray"> - </argument> - <argument index="4" name="data_cells" type="PackedByteArray"> - </argument> - <argument index="5" name="distance_field" type="PackedByteArray"> - </argument> - <argument index="6" name="level_counts" type="PackedInt32Array"> - </argument> + <return type="void" /> + <argument index="0" name="to_cell_xform" type="Transform3D" /> + <argument index="1" name="aabb" type="AABB" /> + <argument index="2" name="octree_size" type="Vector3" /> + <argument index="3" name="octree_cells" type="PackedByteArray" /> + <argument index="4" name="data_cells" type="PackedByteArray" /> + <argument index="5" name="distance_field" type="PackedByteArray" /> + <argument index="6" name="level_counts" type="PackedInt32Array" /> <description> </description> </method> <method name="get_bounds" qualifiers="const"> - <return type="AABB"> - </return> + <return type="AABB" /> <description> </description> </method> <method name="get_data_cells" qualifiers="const"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> </description> </method> <method name="get_level_counts" qualifiers="const"> - <return type="PackedInt32Array"> - </return> + <return type="PackedInt32Array" /> <description> </description> </method> <method name="get_octree_cells" qualifiers="const"> - <return type="PackedByteArray"> - </return> + <return type="PackedByteArray" /> <description> </description> </method> <method name="get_octree_size" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> </description> </method> <method name="get_to_cell_xform" qualifiers="const"> - <return type="Transform3D"> - </return> + <return type="Transform3D" /> <description> </description> </method> diff --git a/doc/classes/WeakRef.xml b/doc/classes/WeakRef.xml index 6c9a7de67f..339c1620bf 100644 --- a/doc/classes/WeakRef.xml +++ b/doc/classes/WeakRef.xml @@ -10,8 +10,7 @@ </tutorials> <methods> <method name="get_ref" qualifiers="const"> - <return type="Variant"> - </return> + <return type="Variant" /> <description> Returns the [Object] this weakref is referring to. </description> diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index 73a95967bd..d7b156cc57 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -8,314 +8,239 @@ </tutorials> <methods> <method name="can_draw" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> </description> </method> <method name="child_controls_changed"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> <method name="get_contents_minimum_size" qualifiers="const"> - <return type="Vector2"> - </return> + <return type="Vector2" /> <description> Returns the combined minimum size from the child [Control] nodes of the window. </description> </method> <method name="get_flag" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="flag" type="int" enum="Window.Flags"> - </argument> + <return type="bool" /> + <argument index="0" name="flag" type="int" enum="Window.Flags" /> <description> </description> </method> <method name="get_layout_direction" qualifiers="const"> - <return type="int" enum="Window.LayoutDirection"> - </return> + <return type="int" enum="Window.LayoutDirection" /> <description> Returns layout direction and text writing direction. </description> </method> <method name="get_real_size" qualifiers="const"> - <return type="Vector2i"> - </return> + <return type="Vector2i" /> <description> </description> </method> <method name="get_theme_color" qualifiers="const"> - <return type="Color"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> + <return type="Color" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> <description> </description> </method> <method name="get_theme_constant" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> + <return type="int" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> <description> </description> </method> <method name="get_theme_font" qualifiers="const"> - <return type="Font"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> + <return type="Font" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> <description> Returns the [Font] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_theme_font_size" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> + <return type="int" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> <description> Returns the font size at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> <method name="get_theme_icon" qualifiers="const"> - <return type="Texture2D"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> + <return type="Texture2D" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> <description> </description> </method> <method name="get_theme_stylebox" qualifiers="const"> - <return type="StyleBox"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> + <return type="StyleBox" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> <description> </description> </method> <method name="grab_focus"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> <method name="has_focus" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> </description> </method> <method name="has_theme_color" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> <description> </description> </method> <method name="has_theme_constant" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> <description> </description> </method> <method name="has_theme_font" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> <description> Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]theme_type[/code]. Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_theme_font_size" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> <description> Returns [code]true[/code] if font size with [code]name[/code] is in [code]theme_type[/code]. Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> <method name="has_theme_icon" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> <description> </description> </method> <method name="has_theme_stylebox" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="StringName"> - </argument> - <argument index="1" name="theme_type" type="StringName" default=""""> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="StringName" /> + <argument index="1" name="theme_type" type="StringName" default="""" /> <description> </description> </method> <method name="hide"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> <method name="is_embedded" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> </description> </method> <method name="is_layout_rtl" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if layout is right-to-left. </description> </method> <method name="is_maximize_allowed" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> </description> </method> <method name="is_using_font_oversampling" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> </description> </method> <method name="move_to_foreground"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> <method name="popup"> - <return type="void"> - </return> - <argument index="0" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)" /> <description> </description> </method> <method name="popup_centered"> - <return type="void"> - </return> - <argument index="0" name="minsize" type="Vector2i" default="Vector2i(0, 0)"> - </argument> + <return type="void" /> + <argument index="0" name="minsize" type="Vector2i" default="Vector2i(0, 0)" /> <description> </description> </method> <method name="popup_centered_clamped"> - <return type="void"> - </return> - <argument index="0" name="minsize" type="Vector2i" default="Vector2i(0, 0)"> - </argument> - <argument index="1" name="fallback_ratio" type="float" default="0.75"> - </argument> + <return type="void" /> + <argument index="0" name="minsize" type="Vector2i" default="Vector2i(0, 0)" /> + <argument index="1" name="fallback_ratio" type="float" default="0.75" /> <description> </description> </method> <method name="popup_centered_ratio"> - <return type="void"> - </return> - <argument index="0" name="ratio" type="float" default="0.8"> - </argument> + <return type="void" /> + <argument index="0" name="ratio" type="float" default="0.8" /> <description> </description> </method> <method name="popup_on_parent"> - <return type="void"> - </return> - <argument index="0" name="parent_rect" type="Rect2i"> - </argument> + <return type="void" /> + <argument index="0" name="parent_rect" type="Rect2i" /> <description> </description> </method> <method name="request_attention"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> <method name="set_flag"> - <return type="void"> - </return> - <argument index="0" name="flag" type="int" enum="Window.Flags"> - </argument> - <argument index="1" name="enabled" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="flag" type="int" enum="Window.Flags" /> + <argument index="1" name="enabled" type="bool" /> <description> </description> </method> <method name="set_ime_active"> - <return type="void"> - </return> - <argument index="0" name="active" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="active" type="bool" /> <description> </description> </method> <method name="set_ime_position"> - <return type="void"> - </return> - <argument index="0" name="position" type="Vector2i"> - </argument> + <return type="void" /> + <argument index="0" name="position" type="Vector2i" /> <description> </description> </method> <method name="set_layout_direction"> - <return type="void"> - </return> - <argument index="0" name="direction" type="int" enum="Window.LayoutDirection"> - </argument> + <return type="void" /> + <argument index="0" name="direction" type="int" enum="Window.LayoutDirection" /> <description> Sets layout direction and text writing direction. Right-to-left layouts are necessary for certain languages (e.g. Arabic and Hebrew). </description> </method> <method name="set_use_font_oversampling"> - <return type="void"> - </return> - <argument index="0" name="enable" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="enable" type="bool" /> <description> </description> </method> <method name="show"> - <return type="void"> - </return> + <return type="void" /> <description> </description> </method> @@ -323,6 +248,9 @@ <members> <member name="always_on_top" type="bool" setter="set_flag" getter="get_flag" default="false"> </member> + <member name="auto_translate" type="bool" setter="set_auto_translate" getter="is_auto_translating" default="true"> + Toggles if any text should automatically change to its translated version depending on the current locale. + </member> <member name="borderless" type="bool" setter="set_flag" getter="get_flag" default="false"> </member> <member name="content_scale_aspect" type="int" setter="set_content_scale_aspect" getter="get_content_scale_aspect" enum="Window.ContentScaleAspect" default="0"> @@ -347,7 +275,7 @@ </member> <member name="theme" type="Theme" setter="set_theme" getter="get_theme"> </member> - <member name="theme_custom_type" type="StringName" setter="set_theme_custom_type" getter="get_theme_custom_type" default="&"""> + <member name="theme_type_variation" type="StringName" setter="set_theme_type_variation" getter="get_theme_type_variation" default="&"""> </member> <member name="title" type="String" setter="set_title" getter="get_title" default=""""> </member> @@ -374,8 +302,7 @@ </description> </signal> <signal name="files_dropped"> - <argument index="0" name="files" type="PackedStringArray"> - </argument> + <argument index="0" name="files" type="PackedStringArray" /> <description> </description> </signal> @@ -404,8 +331,7 @@ </description> </signal> <signal name="window_input"> - <argument index="0" name="event" type="InputEvent"> - </argument> + <argument index="0" name="event" type="InputEvent" /> <description> </description> </signal> @@ -465,36 +391,34 @@ </constant> </constants> <theme_items> - <theme_item name="close" type="Texture2D"> + <theme_item name="close" data_type="icon" type="Texture2D"> </theme_item> - <theme_item name="close_h_ofs" type="int" default="18"> + <theme_item name="close_h_ofs" data_type="constant" type="int" default="18"> </theme_item> - <theme_item name="close_highlight" type="Texture2D"> + <theme_item name="close_pressed" data_type="icon" type="Texture2D"> </theme_item> - <theme_item name="close_v_ofs" type="int" default="18"> + <theme_item name="close_v_ofs" data_type="constant" type="int" default="18"> </theme_item> - <theme_item name="panel" type="StyleBox"> + <theme_item name="embedded_border" data_type="style" type="StyleBox"> </theme_item> - <theme_item name="resize_margin" type="int" default="4"> + <theme_item name="resize_margin" data_type="constant" type="int" default="4"> </theme_item> - <theme_item name="scaleborder_size" type="int" default="4"> + <theme_item name="scaleborder_size" data_type="constant" type="int" default="4"> </theme_item> - <theme_item name="title_color" type="Color" default="Color(0, 0, 0, 1)"> + <theme_item name="title_color" data_type="color" type="Color" default="Color(0, 0, 0, 1)"> </theme_item> - <theme_item name="title_font" type="Font"> + <theme_item name="title_font" data_type="font" type="Font"> </theme_item> - <theme_item name="title_font_size" type="int"> + <theme_item name="title_font_size" data_type="font_size" type="int"> The size of the title font. </theme_item> - <theme_item name="title_height" type="int" default="20"> + <theme_item name="title_height" data_type="constant" type="int" default="20"> </theme_item> - <theme_item name="title_outline_modulate" type="Color" default="Color(1, 1, 1, 1)"> + <theme_item name="title_outline_modulate" data_type="color" type="Color" default="Color(1, 1, 1, 1)"> The color of the title outline. </theme_item> - <theme_item name="title_outline_size" type="int" default="0"> + <theme_item name="title_outline_size" data_type="constant" type="int" default="0"> The size of the title outline. </theme_item> - <theme_item name="window_panel" type="StyleBox"> - </theme_item> </theme_items> </class> diff --git a/doc/classes/LineShape2D.xml b/doc/classes/WorldMarginShape2D.xml index 434e6fba8e..1839ab16ad 100644 --- a/doc/classes/LineShape2D.xml +++ b/doc/classes/WorldMarginShape2D.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="LineShape2D" inherits="Shape2D" version="4.0"> +<class name="WorldMarginShape2D" inherits="Shape2D" version="4.0"> <brief_description> Line shape for 2D collisions. </brief_description> diff --git a/doc/classes/X509Certificate.xml b/doc/classes/X509Certificate.xml index d2b7b20cd6..5900e68339 100644 --- a/doc/classes/X509Certificate.xml +++ b/doc/classes/X509Certificate.xml @@ -12,19 +12,15 @@ </tutorials> <methods> <method name="load"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> <description> Loads a certificate from [code]path[/code] ("*.crt" file). </description> </method> <method name="save"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="path" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="path" type="String" /> <description> Saves a certificate to the given [code]path[/code] (should be a "*.crt" file). </description> diff --git a/doc/classes/XMLParser.xml b/doc/classes/XMLParser.xml index ab5c58c51c..4af3de8dfd 100644 --- a/doc/classes/XMLParser.xml +++ b/doc/classes/XMLParser.xml @@ -10,136 +10,111 @@ </tutorials> <methods> <method name="get_attribute_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Gets the amount of attributes in the current element. </description> </method> <method name="get_attribute_name" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="idx" type="int" /> <description> Gets the name of the attribute specified by the index in [code]idx[/code] argument. </description> </method> <method name="get_attribute_value" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="String" /> + <argument index="0" name="idx" type="int" /> <description> Gets the value of the attribute specified by the index in [code]idx[/code] argument. </description> </method> <method name="get_current_line" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Gets the current line in the parsed file (currently not implemented). </description> </method> <method name="get_named_attribute_value" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="String" /> + <argument index="0" name="name" type="String" /> <description> Gets the value of a certain attribute of the current element by name. This will raise an error if the element has no such attribute. </description> </method> <method name="get_named_attribute_value_safe" qualifiers="const"> - <return type="String"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="String" /> + <argument index="0" name="name" type="String" /> <description> Gets the value of a certain attribute of the current element by name. This will return an empty [String] if the attribute is not found. </description> </method> <method name="get_node_data" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Gets the contents of a text node. This will raise an error in any other type of node. </description> </method> <method name="get_node_name" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Gets the name of the current element node. This will raise an error if the current node type is neither [constant NODE_ELEMENT] nor [constant NODE_ELEMENT_END]. </description> </method> <method name="get_node_offset" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Gets the byte offset of the current node since the beginning of the file or buffer. </description> </method> <method name="get_node_type"> - <return type="int" enum="XMLParser.NodeType"> - </return> + <return type="int" enum="XMLParser.NodeType" /> <description> Gets the type of the current node. Compare with [enum NodeType] constants. </description> </method> <method name="has_attribute" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="bool" /> + <argument index="0" name="name" type="String" /> <description> Check whether the current element has a certain attribute. </description> </method> <method name="is_empty" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Check whether the current element is empty (this only works for completely empty tags, e.g. [code]<element \>[/code]). </description> </method> <method name="open"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="file" type="String"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="file" type="String" /> <description> Opens an XML file for parsing. This returns an error code. </description> </method> <method name="open_buffer"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="buffer" type="PackedByteArray"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="buffer" type="PackedByteArray" /> <description> Opens an XML raw buffer for parsing. This returns an error code. </description> </method> <method name="read"> - <return type="int" enum="Error"> - </return> + <return type="int" enum="Error" /> <description> Reads the next node of the file. This returns an error code. </description> </method> <method name="seek"> - <return type="int" enum="Error"> - </return> - <argument index="0" name="position" type="int"> - </argument> + <return type="int" enum="Error" /> + <argument index="0" name="position" type="int" /> <description> Moves the buffer cursor to a certain offset (since the beginning) and read the next node there. This returns an error code. </description> </method> <method name="skip_section"> - <return type="void"> - </return> + <return type="void" /> <description> Skips the current section. If the node contains other elements, they will be ignored and the cursor will go to the closing of the current element. </description> diff --git a/doc/classes/XRAnchor3D.xml b/doc/classes/XRAnchor3D.xml index a409c79230..ccbfab1273 100644 --- a/doc/classes/XRAnchor3D.xml +++ b/doc/classes/XRAnchor3D.xml @@ -12,36 +12,31 @@ </tutorials> <methods> <method name="get_anchor_name" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> Returns the name given to this anchor. </description> </method> <method name="get_is_active" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the anchor is being tracked and [code]false[/code] if no anchor with this ID is currently known. </description> </method> <method name="get_mesh" qualifiers="const"> - <return type="Mesh"> - </return> + <return type="Mesh" /> <description> If provided by the [XRInterface], this returns a mesh object for the anchor. For an anchor, this can be a shape related to the object being tracked or it can be a mesh that provides topology related to the anchor and can be used to create shadows/reflections on surfaces or for generating collision shapes. </description> </method> <method name="get_plane" qualifiers="const"> - <return type="Plane"> - </return> + <return type="Plane" /> <description> Returns a plane aligned with our anchor; handy for intersection testing. </description> </method> <method name="get_size" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns the estimated size of the plane that was detected. Say when the anchor relates to a table in the real world, this is the estimated size of the surface of that table. </description> @@ -54,8 +49,7 @@ </members> <signals> <signal name="mesh_updated"> - <argument index="0" name="mesh" type="Mesh"> - </argument> + <argument index="0" name="mesh" type="Mesh" /> <description> Emitted when the mesh associated with the anchor changes or when one becomes available. This is especially important for topology that is constantly being [code]mesh_updated[/code]. </description> diff --git a/doc/classes/XRController3D.xml b/doc/classes/XRController3D.xml index 5d8c23bd6f..47ddc22823 100644 --- a/doc/classes/XRController3D.xml +++ b/doc/classes/XRController3D.xml @@ -13,54 +13,45 @@ </tutorials> <methods> <method name="get_controller_name" qualifiers="const"> - <return type="String"> - </return> + <return type="String" /> <description> If active, returns the name of the associated controller if provided by the AR/VR SDK used. </description> </method> <method name="get_is_active" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if the bound controller is active. XR systems attempt to track active controllers. </description> </method> <method name="get_joystick_axis" qualifiers="const"> - <return type="float"> - </return> - <argument index="0" name="axis" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="axis" type="int" /> <description> Returns the value of the given axis for things like triggers, touchpads, etc. that are embedded into the controller. </description> </method> <method name="get_joystick_id" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the ID of the joystick object bound to this. Every controller tracked by the [XRServer] that has buttons and axis will also be registered as a joystick within Godot. This means that all the normal joystick tracking and input mapping will work for buttons and axis found on the AR/VR controllers. This ID is purely offered as information so you can link up the controller with its joystick entry. </description> </method> <method name="get_mesh" qualifiers="const"> - <return type="Mesh"> - </return> + <return type="Mesh" /> <description> If provided by the [XRInterface], this returns a mesh associated with the controller. This can be used to visualize the controller. </description> </method> <method name="get_tracker_hand" qualifiers="const"> - <return type="int" enum="XRPositionalTracker.TrackerHand"> - </return> + <return type="int" enum="XRPositionalTracker.TrackerHand" /> <description> Returns the hand holding this controller, if known. See [enum XRPositionalTracker.TrackerHand]. </description> </method> <method name="is_button_pressed" qualifiers="const"> - <return type="bool"> - </return> - <argument index="0" name="button" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="button" type="int" /> <description> Returns [code]true[/code] if the button at index [code]button[/code] is pressed. See [enum JoyButton]. </description> @@ -80,22 +71,19 @@ </members> <signals> <signal name="button_pressed"> - <argument index="0" name="button" type="int"> - </argument> + <argument index="0" name="button" type="int" /> <description> Emitted when a button on this controller is pressed. </description> </signal> <signal name="button_released"> - <argument index="0" name="button" type="int"> - </argument> + <argument index="0" name="button" type="int" /> <description> Emitted when a button on this controller is released. </description> </signal> <signal name="mesh_updated"> - <argument index="0" name="mesh" type="Mesh"> - </argument> + <argument index="0" name="mesh" type="Mesh" /> <description> Emitted when the mesh associated with the controller changes or when one becomes available. Generally speaking this will be a static mesh after becoming available. </description> diff --git a/doc/classes/XRInterface.xml b/doc/classes/XRInterface.xml index fec98007c3..2a740ab1e8 100644 --- a/doc/classes/XRInterface.xml +++ b/doc/classes/XRInterface.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="XRInterface" inherits="RefCounted" version="4.0"> <brief_description> - Base class for an AR/VR interface implementation. + Base class for an XR interface implementation. </brief_description> <description> This class needs to be implemented to make an AR or VR platform available to Godot and these should be implemented as C++ modules or GDNative modules (note that for GDNative the subclass XRScriptInterface should be used). Part of the interface is exposed to GDScript so you can detect, enable and configure an AR or VR platform. @@ -12,61 +12,59 @@ </tutorials> <methods> <method name="get_camera_feed_id"> - <return type="int"> - </return> + <return type="int" /> <description> If this is an AR interface that requires displaying a camera feed as the background, this method returns the feed ID in the [CameraServer] for this interface. </description> </method> <method name="get_capabilities" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns a combination of [enum Capabilities] flags providing information about the capabilities of this interface. </description> </method> <method name="get_name" qualifiers="const"> - <return type="StringName"> - </return> + <return type="StringName" /> <description> - Returns the name of this interface (OpenVR, OpenHMD, ARKit, etc). + Returns the name of this interface (OpenXR, OpenVR, OpenHMD, ARKit, etc). </description> </method> - <method name="get_render_targetsize"> - <return type="Vector2"> - </return> + <method name="get_render_target_size"> + <return type="Vector2" /> <description> Returns the resolution at which we should render our intermediate results before things like lens distortion are applied by the VR platform. </description> </method> <method name="get_tracking_status" qualifiers="const"> - <return type="int" enum="XRInterface.Tracking_status"> - </return> + <return type="int" enum="XRInterface.TrackingStatus" /> <description> If supported, returns the status of our tracking. This will allow you to provide feedback to the user whether there are issues with positional tracking. </description> </method> <method name="get_view_count"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of views that need to be rendered for this device. 1 for Monoscopic, 2 for Stereoscopic. </description> </method> <method name="initialize"> - <return type="bool"> - </return> + <return type="bool" /> <description> Call this to initialize this interface. The first interface that is initialized is identified as the primary interface and it will be used for rendering output. After initializing the interface you want to use you then need to enable the AR/VR mode of a viewport and rendering should commence. - [b]Note:[/b] You must enable the AR/VR mode on the main viewport for any device that uses the main output of Godot, such as for mobile VR. + [b]Note:[/b] You must enable the XR mode on the main viewport for any device that uses the main output of Godot, such as for mobile VR. If you do this for a platform that handles its own output (such as OpenVR) Godot will show just one eye without distortion on screen. Alternatively, you can add a separate viewport node to your scene and enable AR/VR on that viewport. It will be used to output to the HMD, leaving you free to do anything you like in the main window, such as using a separate camera as a spectator camera or rendering something completely different. While currently not used, you can activate additional interfaces. You may wish to do this if you want to track controllers from other platforms. However, at this point in time only one interface can render to an HMD. </description> </method> + <method name="is_initialized" qualifiers="const"> + <return type="bool" /> + <description> + Is [code]true[/code] if this interface has been initialised. + </description> + </method> <method name="uninitialize"> - <return type="void"> - </return> + <return type="void" /> <description> Turns the interface off. </description> @@ -76,10 +74,7 @@ <member name="ar_is_anchor_detection_enabled" type="bool" setter="set_anchor_detection_is_enabled" getter="get_anchor_detection_is_enabled" default="false"> On an AR interface, [code]true[/code] if anchor detection is enabled. </member> - <member name="interface_is_initialized" type="bool" setter="set_is_initialized" getter="is_initialized" default="false"> - [code]true[/code] if this interface been initialized. - </member> - <member name="interface_is_primary" type="bool" setter="set_is_primary" getter="is_primary" default="false"> + <member name="interface_is_primary" type="bool" setter="set_primary" getter="is_primary" default="false"> [code]true[/code] if this is the primary interface. </member> </members> @@ -97,7 +92,7 @@ This interface supports AR (video background and real world tracking). </constant> <constant name="XR_EXTERNAL" value="8" enum="Capabilities"> - This interface outputs to an external device. If the main viewport is used, the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of [method get_render_targetsize]). Using a separate viewport node frees up the main viewport for other purposes. + This interface outputs to an external device. If the main viewport is used, the on screen output is an unmodified buffer of either the left or right eye (stretched if the viewport size is not changed to the same aspect ratio of [method get_render_target_size]). Using a separate viewport node frees up the main viewport for other purposes. </constant> <constant name="EYE_MONO" value="0" enum="Eyes"> Mono output, this is mostly used internally when retrieving positioning information for our camera node or when stereo scopic rendering is not supported. @@ -108,19 +103,19 @@ <constant name="EYE_RIGHT" value="2" enum="Eyes"> Right eye output, this is mostly used internally when rendering the image for the right eye and obtaining positioning and projection information. </constant> - <constant name="XR_NORMAL_TRACKING" value="0" enum="Tracking_status"> + <constant name="XR_NORMAL_TRACKING" value="0" enum="TrackingStatus"> Tracking is behaving as expected. </constant> - <constant name="XR_EXCESSIVE_MOTION" value="1" enum="Tracking_status"> + <constant name="XR_EXCESSIVE_MOTION" value="1" enum="TrackingStatus"> Tracking is hindered by excessive motion (the player is moving faster than tracking can keep up). </constant> - <constant name="XR_INSUFFICIENT_FEATURES" value="2" enum="Tracking_status"> + <constant name="XR_INSUFFICIENT_FEATURES" value="2" enum="TrackingStatus"> Tracking is hindered by insufficient features, it's too dark (for camera-based tracking), player is blocked, etc. </constant> - <constant name="XR_UNKNOWN_TRACKING" value="3" enum="Tracking_status"> + <constant name="XR_UNKNOWN_TRACKING" value="3" enum="TrackingStatus"> We don't know the status of the tracking or this interface does not provide feedback. </constant> - <constant name="XR_NOT_TRACKING" value="4" enum="Tracking_status"> + <constant name="XR_NOT_TRACKING" value="4" enum="TrackingStatus"> Tracking is not functional (camera not plugged in or obscured, lighthouses turned off, etc.). </constant> </constants> diff --git a/doc/classes/XRInterfaceExtension.xml b/doc/classes/XRInterfaceExtension.xml new file mode 100644 index 0000000000..66440d4bb4 --- /dev/null +++ b/doc/classes/XRInterfaceExtension.xml @@ -0,0 +1,127 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="XRInterfaceExtension" inherits="XRInterface" version="4.0"> + <brief_description> + Base class for XR interface extensions (plugins). + </brief_description> + <description> + External XR interface plugins should inherit from this class. + </description> + <tutorials> + </tutorials> + <methods> + <method name="_commit_views" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="render_target" type="RID" /> + <argument index="1" name="screen_rect" type="Rect2" /> + <description> + </description> + </method> + <method name="_get_anchor_detection_is_enabled" qualifiers="virtual const"> + <return type="bool" /> + <description> + </description> + </method> + <method name="_get_camera_feed_id" qualifiers="virtual const"> + <return type="int" /> + <description> + </description> + </method> + <method name="_get_camera_transform" qualifiers="virtual"> + <return type="Transform3D" /> + <description> + </description> + </method> + <method name="_get_capabilities" qualifiers="virtual const"> + <return type="int" /> + <description> + </description> + </method> + <method name="_get_name" qualifiers="virtual const"> + <return type="StringName" /> + <description> + </description> + </method> + <method name="_get_projection_for_view" qualifiers="virtual"> + <return type="PackedFloat64Array" /> + <argument index="0" name="view" type="int" /> + <argument index="1" name="aspect" type="float" /> + <argument index="2" name="z_near" type="float" /> + <argument index="3" name="z_far" type="float" /> + <description> + </description> + </method> + <method name="_get_render_target_size" qualifiers="virtual"> + <return type="Vector2" /> + <description> + </description> + </method> + <method name="_get_tracking_status" qualifiers="virtual const"> + <return type="int" /> + <description> + </description> + </method> + <method name="_get_transform_for_view" qualifiers="virtual"> + <return type="Transform3D" /> + <argument index="0" name="view" type="int" /> + <argument index="1" name="cam_transform" type="Transform3D" /> + <description> + </description> + </method> + <method name="_get_view_count" qualifiers="virtual"> + <return type="int" /> + <description> + </description> + </method> + <method name="_initialize" qualifiers="virtual"> + <return type="bool" /> + <description> + </description> + </method> + <method name="_is_initialized" qualifiers="virtual const"> + <return type="bool" /> + <description> + </description> + </method> + <method name="_notification" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="what" type="int" /> + <description> + </description> + </method> + <method name="_process" qualifiers="virtual"> + <return type="void" /> + <description> + </description> + </method> + <method name="_set_anchor_detection_is_enabled" qualifiers="virtual"> + <return type="void" /> + <argument index="0" name="enabled" type="bool" /> + <description> + </description> + </method> + <method name="_uninitialize" qualifiers="virtual"> + <return type="void" /> + <description> + </description> + </method> + <method name="add_blit"> + <return type="void" /> + <argument index="0" name="render_target" type="RID" /> + <argument index="1" name="src_rect" type="Rect2" /> + <argument index="2" name="dst_rect" type="Rect2i" /> + <argument index="3" name="use_layer" type="bool" /> + <argument index="4" name="layer" type="int" /> + <argument index="5" name="apply_lens_distortion" type="bool" /> + <argument index="6" name="eye_center" type="Vector2" /> + <argument index="7" name="k1" type="float" /> + <argument index="8" name="k2" type="float" /> + <argument index="9" name="upscale" type="float" /> + <argument index="10" name="aspect_ratio" type="float" /> + <description> + Blits our render results to screen optionally applying lens distortion. This can only be called while processing [code]_commit_views[/code]. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/XRPositionalTracker.xml b/doc/classes/XRPositionalTracker.xml index cd8cb71cd9..8cc7c872b6 100644 --- a/doc/classes/XRPositionalTracker.xml +++ b/doc/classes/XRPositionalTracker.xml @@ -13,80 +13,68 @@ </tutorials> <methods> <method name="get_joy_id" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> If this is a controller that is being tracked, the controller will also be represented by a joystick entry with this ID. </description> </method> <method name="get_mesh" qualifiers="const"> - <return type="Mesh"> - </return> + <return type="Mesh" /> <description> Returns the mesh related to a controller or anchor point if one is available. </description> </method> <method name="get_orientation" qualifiers="const"> - <return type="Basis"> - </return> + <return type="Basis" /> <description> Returns the controller's orientation matrix. </description> </method> <method name="get_position" qualifiers="const"> - <return type="Vector3"> - </return> + <return type="Vector3" /> <description> Returns the world-space controller position. </description> </method> <method name="get_tracker_hand" qualifiers="const"> - <return type="int" enum="XRPositionalTracker.TrackerHand"> - </return> + <return type="int" enum="XRPositionalTracker.TrackerHand" /> <description> Returns the hand holding this tracker, if known. See [enum TrackerHand] constants. </description> </method> <method name="get_tracker_id" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the internal tracker ID. This uniquely identifies the tracker per tracker type and matches the ID you need to specify for nodes such as the [XRController3D] and [XRAnchor3D] nodes. </description> </method> <method name="get_tracker_name" qualifiers="const"> - <return type="StringName"> - </return> + <return type="StringName" /> <description> Returns the controller or anchor point's name, if applicable. </description> </method> <method name="get_tracker_type" qualifiers="const"> - <return type="int" enum="XRServer.TrackerType"> - </return> + <return type="int" enum="XRServer.TrackerType" /> <description> Returns the tracker's type, which will be one of the values from the [enum XRServer.TrackerType] enum. </description> </method> <method name="get_transform" qualifiers="const"> - <return type="Transform3D"> - </return> - <argument index="0" name="adjust_by_reference_frame" type="bool"> - </argument> + <return type="Transform3D" /> + <argument index="0" name="adjust_by_reference_frame" type="bool" /> <description> Returns the transform combining this device's orientation and position. </description> </method> <method name="is_tracking_orientation" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if this device is tracking orientation. </description> </method> <method name="is_tracking_position" qualifiers="const"> - <return type="bool"> - </return> + <return type="bool" /> <description> Returns [code]true[/code] if this device is tracking position. </description> diff --git a/doc/classes/XRServer.xml b/doc/classes/XRServer.xml index 149e177700..85170804cc 100644 --- a/doc/classes/XRServer.xml +++ b/doc/classes/XRServer.xml @@ -11,30 +11,23 @@ </tutorials> <methods> <method name="add_interface"> - <return type="void"> - </return> - <argument index="0" name="interface" type="XRInterface"> - </argument> + <return type="void" /> + <argument index="0" name="interface" type="XRInterface" /> <description> Registers an [XRInterface] object. </description> </method> <method name="add_tracker"> - <return type="void"> - </return> - <argument index="0" name="tracker" type="XRPositionalTracker"> - </argument> + <return type="void" /> + <argument index="0" name="tracker" type="XRPositionalTracker" /> <description> Registers a new [XRPositionalTracker] that tracks a spatial location in real space. </description> </method> <method name="center_on_hmd"> - <return type="void"> - </return> - <argument index="0" name="rotation_mode" type="int" enum="XRServer.RotationMode"> - </argument> - <argument index="1" name="keep_height" type="bool"> - </argument> + <return type="void" /> + <argument index="0" name="rotation_mode" type="int" enum="XRServer.RotationMode" /> + <argument index="1" name="keep_height" type="bool" /> <description> This is an important function to understand correctly. AR and VR platforms all handle positioning slightly differently. For platforms that do not offer spatial tracking, our origin point (0,0,0) is the location of our HMD, but you have little control over the direction the player is facing in the real world. @@ -44,112 +37,85 @@ You should call this method after a few seconds have passed. For instance, when the user requests a realignment of the display holding a designated button on a controller for a short period of time, or when implementing a teleport mechanism. </description> </method> - <method name="clear_primary_interface_if"> - <return type="void"> - </return> - <argument index="0" name="interface" type="XRInterface"> - </argument> - <description> - Clears our current primary interface if it is set to the provided interface. - </description> - </method> <method name="find_interface" qualifiers="const"> - <return type="XRInterface"> - </return> - <argument index="0" name="name" type="String"> - </argument> + <return type="XRInterface" /> + <argument index="0" name="name" type="String" /> <description> Finds an interface by its name. For instance, if your project uses capabilities of an AR/VR platform, you can find the interface for that platform by name and initialize it. </description> </method> <method name="get_hmd_transform"> - <return type="Transform3D"> - </return> + <return type="Transform3D" /> <description> Returns the primary interface's transformation. </description> </method> <method name="get_interface" qualifiers="const"> - <return type="XRInterface"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="XRInterface" /> + <argument index="0" name="idx" type="int" /> <description> Returns the interface registered at a given index in our list of interfaces. </description> </method> <method name="get_interface_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of interfaces currently registered with the AR/VR server. If your project supports multiple AR/VR platforms, you can look through the available interface, and either present the user with a selection or simply try to initialize each interface and use the first one that returns [code]true[/code]. </description> </method> <method name="get_interfaces" qualifiers="const"> - <return type="Array"> - </return> + <return type="Array" /> <description> Returns a list of available interfaces the ID and name of each interface. </description> </method> <method name="get_last_commit_usec"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the absolute timestamp (in μs) of the last [XRServer] commit of the AR/VR eyes to [RenderingServer]. The value comes from an internal call to [method Time.get_ticks_usec]. </description> </method> <method name="get_last_frame_usec"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the duration (in μs) of the last frame. This is computed as the difference between [method get_last_commit_usec] and [method get_last_process_usec] when committing. </description> </method> <method name="get_last_process_usec"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the absolute timestamp (in μs) of the last [XRServer] process callback. The value comes from an internal call to [method Time.get_ticks_usec]. </description> </method> <method name="get_reference_frame" qualifiers="const"> - <return type="Transform3D"> - </return> + <return type="Transform3D" /> <description> Returns the reference frame transform. Mostly used internally and exposed for GDNative build interfaces. </description> </method> <method name="get_tracker" qualifiers="const"> - <return type="XRPositionalTracker"> - </return> - <argument index="0" name="idx" type="int"> - </argument> + <return type="XRPositionalTracker" /> + <argument index="0" name="idx" type="int" /> <description> Returns the positional tracker at the given ID. </description> </method> <method name="get_tracker_count" qualifiers="const"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the number of trackers currently registered. </description> </method> <method name="remove_interface"> - <return type="void"> - </return> - <argument index="0" name="interface" type="XRInterface"> - </argument> + <return type="void" /> + <argument index="0" name="interface" type="XRInterface" /> <description> Removes this interface. </description> </method> <method name="remove_tracker"> - <return type="void"> - </return> - <argument index="0" name="tracker" type="XRPositionalTracker"> - </argument> + <return type="void" /> + <argument index="0" name="tracker" type="XRPositionalTracker" /> <description> Removes this positional tracker. </description> @@ -165,37 +131,29 @@ </members> <signals> <signal name="interface_added"> - <argument index="0" name="interface_name" type="StringName"> - </argument> + <argument index="0" name="interface_name" type="StringName" /> <description> Emitted when a new interface has been added. </description> </signal> <signal name="interface_removed"> - <argument index="0" name="interface_name" type="StringName"> - </argument> + <argument index="0" name="interface_name" type="StringName" /> <description> Emitted when an interface is removed. </description> </signal> <signal name="tracker_added"> - <argument index="0" name="tracker_name" type="StringName"> - </argument> - <argument index="1" name="type" type="int"> - </argument> - <argument index="2" name="id" type="int"> - </argument> + <argument index="0" name="tracker_name" type="StringName" /> + <argument index="1" name="type" type="int" /> + <argument index="2" name="id" type="int" /> <description> Emitted when a new tracker has been added. If you don't use a fixed number of controllers or if you're using [XRAnchor3D]s for an AR solution, it is important to react to this signal to add the appropriate [XRController3D] or [XRAnchor3D] nodes related to this new tracker. </description> </signal> <signal name="tracker_removed"> - <argument index="0" name="tracker_name" type="StringName"> - </argument> - <argument index="1" name="type" type="int"> - </argument> - <argument index="2" name="id" type="int"> - </argument> + <argument index="0" name="tracker_name" type="StringName" /> + <argument index="1" name="type" type="int" /> + <argument index="2" name="id" type="int" /> <description> Emitted when a tracker is removed. You should remove any [XRController3D] or [XRAnchor3D] points if applicable. This is not mandatory, the nodes simply become inactive and will be made active again when a new tracker becomes available (i.e. a new controller is switched on that takes the place of the previous one). </description> diff --git a/doc/classes/bool.xml b/doc/classes/bool.xml index 48f336d58c..f3b16217e5 100644 --- a/doc/classes/bool.xml +++ b/doc/classes/bool.xml @@ -93,71 +93,56 @@ </tutorials> <methods> <method name="bool" qualifiers="constructor"> - <return type="bool"> - </return> + <return type="bool" /> <description> Constructs a default-initialized [bool] set to [code]false[/code]. </description> </method> <method name="bool" qualifiers="constructor"> - <return type="bool"> - </return> - <argument index="0" name="from" type="bool"> - </argument> + <return type="bool" /> + <argument index="0" name="from" type="bool" /> <description> Constructs a [bool] as a copy of the given [bool]. </description> </method> <method name="bool" qualifiers="constructor"> - <return type="bool"> - </return> - <argument index="0" name="from" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="from" type="float" /> <description> Cast a [float] value to a boolean value, this method will return [code]false[/code] if [code]0.0[/code] is passed in, and [code]true[/code] for all other floats. </description> </method> <method name="bool" qualifiers="constructor"> - <return type="bool"> - </return> - <argument index="0" name="from" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="from" type="int" /> <description> Cast an [int] value to a boolean value, this method will return [code]false[/code] if [code]0[/code] is passed in, and [code]true[/code] for all other ints. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="bool"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="bool" /> <description> Returns [code]true[/code] if two bools are different, i.e. one is [code]true[/code] and the other is [code]false[/code]. </description> </method> <method name="operator <" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="bool"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="bool" /> <description> Returns [code]true[/code] if left operand is [code]false[/code] and right operand is [code]true[/code]. </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="bool"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="bool" /> <description> Returns [code]true[/code] if two bools are equal, i.e. both are [code]true[/code] or both are [code]false[/code]. </description> </method> <method name="operator >" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="bool"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="bool" /> <description> Returns [code]true[/code] if left operand is [code]true[/code] and right operand is [code]false[/code]. </description> diff --git a/doc/classes/float.xml b/doc/classes/float.xml index 585c847d22..4bf04fe25f 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -4,77 +4,66 @@ Float built-in type. </brief_description> <description> - Float built-in type. + The [float] built-in type is a 64-bit double-precision floating-point number, equivalent to [code]double[/code] in C++. This type has 14 reliable decimal digits of precision. The [float] type can be stored in [Variant], which is the generic type used by the engine. The maximum value of [float] is approximately [code]1.79769e308[/code], and the minimum is approximately [code]-1.79769e308[/code]. + Many methods and properties in the engine use 32-bit single-precision floating-point numbers instead, equivalent to [code]float[/code] in C++, which have 6 reliable decimal digits of precision. For data structures such as [Vector2] and [Vector3], Godot uses 32-bit floating-point numbers by default, but it can be changed to use 64-bit doubles if Godot is compiled with the [code]float=64[/code] option. + Math done using the [float] type is not guaranteed to be exact or deterministic, and will often result in small errors. You should usually use the [method @GlobalScope.is_equal_approx] and [method @GlobalScope.is_zero_approx] methods instead of [code]==[/code] to compare [float] values for equality. </description> <tutorials> + <link title="Wikipedia: Double-precision floating-point format">https://en.wikipedia.org/wiki/Double-precision_floating-point_format</link> + <link title="Wikipedia: Single-precision floating-point format">https://en.wikipedia.org/wiki/Single-precision_floating-point_format</link> </tutorials> <methods> <method name="float" qualifiers="constructor"> - <return type="float"> - </return> + <return type="float" /> <description> Constructs a default-initialized [float] set to [code]0.0[/code]. </description> </method> <method name="float" qualifiers="constructor"> - <return type="float"> - </return> - <argument index="0" name="from" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="from" type="float" /> <description> Constructs a [float] as a copy of the given [float]. </description> </method> <method name="float" qualifiers="constructor"> - <return type="float"> - </return> - <argument index="0" name="from" type="bool"> - </argument> + <return type="float" /> + <argument index="0" name="from" type="bool" /> <description> Cast a [bool] value to a floating-point value, [code]float(true)[/code] will be equal to 1.0 and [code]float(false)[/code] will be equal to 0.0. </description> </method> <method name="float" qualifiers="constructor"> - <return type="float"> - </return> - <argument index="0" name="from" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="from" type="int" /> <description> Cast an [int] value to a floating-point value, [code]float(1)[/code] will be equal to [code]1.0[/code]. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="float" /> <description> Returns [code]true[/code] if two floats are different from each other. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="int" /> <description> Returns [code]true[/code] if the integer has different value than the float. </description> </method> <method name="operator *" qualifiers="operator"> - <return type="float"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="right" type="float" /> <description> Multiplies two [float]s. </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector2"> - </return> - <argument index="0" name="right" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="right" type="Vector2" /> <description> Multiplies each component of the [Vector2] by the given [float]. [codeblock] @@ -83,10 +72,8 @@ </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector2i"> - </return> - <argument index="0" name="right" type="Vector2i"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="right" type="Vector2i" /> <description> Multiplies each component of the [Vector2i] by the given [float]. [codeblock] @@ -95,37 +82,29 @@ </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector3"> - </return> - <argument index="0" name="right" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="right" type="Vector3" /> <description> Multiplies each component of the [Vector3] by the given [float]. </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector3i"> - </return> - <argument index="0" name="right" type="Vector3i"> - </argument> + <return type="Vector3i" /> + <argument index="0" name="right" type="Vector3i" /> <description> Multiplies each component of the [Vector3i] by the given [float]. </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Quaternion"> - </return> - <argument index="0" name="right" type="Quaternion"> - </argument> + <return type="Quaternion" /> + <argument index="0" name="right" type="Quaternion" /> <description> Multiplies each component of the [Quaternion] by the given [float]. </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Color"> - </return> - <argument index="0" name="right" type="Color"> - </argument> + <return type="Color" /> + <argument index="0" name="right" type="Color" /> <description> Multiplies each component of the [Color] by the given [float]. [codeblock] @@ -134,169 +113,135 @@ </description> </method> <method name="operator *" qualifiers="operator"> - <return type="float"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="right" type="int" /> <description> Multiplies a [float] and an [int]. The result is a [float]. </description> </method> <method name="operator +" qualifiers="operator"> - <return type="float"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="right" type="float" /> <description> Adds two floats. </description> </method> <method name="operator +" qualifiers="operator"> - <return type="float"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="right" type="int" /> <description> Adds a [float] and an [int]. The result is a [float]. </description> </method> <method name="operator -" qualifiers="operator"> - <return type="float"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="right" type="float" /> <description> Subtracts a float from a float. </description> </method> <method name="operator -" qualifiers="operator"> - <return type="float"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="right" type="int" /> <description> Subtracts an [int] from a [float]. The result is a [float]. </description> </method> <method name="operator /" qualifiers="operator"> - <return type="float"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="right" type="float" /> <description> Divides two floats. </description> </method> <method name="operator /" qualifiers="operator"> - <return type="float"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="float" /> + <argument index="0" name="right" type="int" /> <description> Divides a [float] by an [int]. The result is a [float]. </description> </method> <method name="operator <" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="float" /> <description> Returns [code]true[/code] the left float is less than the right one. </description> </method> <method name="operator <" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="int" /> <description> Returns [code]true[/code] if this [float] is less than the given [int]. </description> </method> <method name="operator <=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="float" /> <description> Returns [code]true[/code] the left integer is less than or equal to the right one. </description> </method> <method name="operator <=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="int" /> <description> Returns [code]true[/code] if this [float] is less than or equal to the given [int]. </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="float" /> <description> Returns [code]true[/code] if both floats are exactly equal. [b]Note:[/b] Due to floating-point precision errors, consider using [method @GlobalScope.is_equal_approx] or [method @GlobalScope.is_zero_approx] instead, which are more reliable. </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="int" /> <description> Returns [code]true[/code] if the [float] and the given [int] are equal. </description> </method> <method name="operator >" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="float" /> <description> Returns [code]true[/code] the left float is greater than the right one. </description> </method> <method name="operator >" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="int" /> <description> Returns [code]true[/code] if this [float] is greater than the given [int]. </description> </method> <method name="operator >=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="float" /> <description> Returns [code]true[/code] the left float is greater than or equal to the right one. </description> </method> <method name="operator >=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="int" /> <description> Returns [code]true[/code] if this [float] is greater than or equal to the given [int]. </description> </method> <method name="operator unary+" qualifiers="operator"> - <return type="float"> - </return> + <return type="float" /> <description> + Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable. </description> </method> <method name="operator unary-" qualifiers="operator"> - <return type="float"> - </return> + <return type="float" /> <description> + Returns the negative value of the [float]. If positive, turns the number negative. If negative, turns the number positive. With floats, the number zero can be either positive or negative. </description> </method> </methods> diff --git a/doc/classes/int.xml b/doc/classes/int.xml index 95918c9007..32b5fe1012 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -40,62 +40,49 @@ </tutorials> <methods> <method name="int" qualifiers="constructor"> - <return type="int"> - </return> + <return type="int" /> <description> Constructs a default-initialized [int] set to [code]0[/code]. </description> </method> <method name="int" qualifiers="constructor"> - <return type="int"> - </return> - <argument index="0" name="from" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="from" type="int" /> <description> Constructs an [int] as a copy of the given [int]. </description> </method> <method name="int" qualifiers="constructor"> - <return type="int"> - </return> - <argument index="0" name="from" type="bool"> - </argument> + <return type="int" /> + <argument index="0" name="from" type="bool" /> <description> Cast a [bool] value to an integer value, [code]int(true)[/code] will be equals to 1 and [code]int(false)[/code] will be equals to 0. </description> </method> <method name="int" qualifiers="constructor"> - <return type="int"> - </return> - <argument index="0" name="from" type="float"> - </argument> + <return type="int" /> + <argument index="0" name="from" type="float" /> <description> Cast a float value to an integer value, this method simply removes the number fractions (i.e. rounds [code]from[/code] towards zero), so for example [code]int(2.7)[/code] will be equals to 2, [code]int(0.1)[/code] will be equals to 0 and [code]int(-2.7)[/code] will be equals to -2. This operation is also called truncation. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="float" /> <description> Returns [code]true[/code] if operands are different from each other. </description> </method> <method name="operator !=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="int" /> <description> Returns [code]true[/code] if operands are different from each other. </description> </method> <method name="operator %" qualifiers="operator"> - <return type="int"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="right" type="int" /> <description> Returns the result of the modulo operator for two integers, i.e. the remainder after dividing both numbers. [codeblock] @@ -106,10 +93,8 @@ </description> </method> <method name="operator &" qualifiers="operator"> - <return type="int"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="right" type="int" /> <description> Returns the result of bitwise [code]AND[/code] operation for two integers. [codeblock] @@ -126,28 +111,22 @@ </description> </method> <method name="operator *" qualifiers="operator"> - <return type="int"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="right" type="int" /> <description> Multiplies two [int]s. </description> </method> <method name="operator *" qualifiers="operator"> - <return type="float"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="right" type="float" /> <description> Multiplies an [int] and a [float]. The result is a [float]. </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector2"> - </return> - <argument index="0" name="right" type="Vector2"> - </argument> + <return type="Vector2" /> + <argument index="0" name="right" type="Vector2" /> <description> Multiplies each component of the vector by the given integer. [codeblock] @@ -156,46 +135,36 @@ </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector2i"> - </return> - <argument index="0" name="right" type="Vector2i"> - </argument> + <return type="Vector2i" /> + <argument index="0" name="right" type="Vector2i" /> <description> Multiplies each component of the integer vector by the given integer. </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector3"> - </return> - <argument index="0" name="right" type="Vector3"> - </argument> + <return type="Vector3" /> + <argument index="0" name="right" type="Vector3" /> <description> Multiplies each component of the vector by the given integer. </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector3i"> - </return> - <argument index="0" name="right" type="Vector3i"> - </argument> + <return type="Vector3i" /> + <argument index="0" name="right" type="Vector3i" /> <description> Multiplies each component of the integer vector by the given integer. </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Quaternion"> - </return> - <argument index="0" name="right" type="Quaternion"> - </argument> + <return type="Quaternion" /> + <argument index="0" name="right" type="Quaternion" /> <description> Multiplies each component of the quaternion by the given integer. </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Color"> - </return> - <argument index="0" name="right" type="Color"> - </argument> + <return type="Color" /> + <argument index="0" name="right" type="Color" /> <description> Multiplies each component of the color by the given integer. [codeblock] @@ -204,46 +173,36 @@ </description> </method> <method name="operator +" qualifiers="operator"> - <return type="float"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="right" type="float" /> <description> Adds an [int] to a [float]. The result is a [float]. </description> </method> <method name="operator +" qualifiers="operator"> - <return type="int"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="right" type="int" /> <description> Adds two integers. </description> </method> <method name="operator -" qualifiers="operator"> - <return type="float"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="right" type="float" /> <description> Subtracts a [float] from an [int]. The result is a [float]. </description> </method> <method name="operator -" qualifiers="operator"> - <return type="int"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="right" type="int" /> <description> Subtracts two integers. </description> </method> <method name="operator /" qualifiers="operator"> - <return type="float"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="float" /> + <argument index="0" name="right" type="float" /> <description> Divides an [int] by a [float]. The result is a [float]. [codeblock] @@ -252,10 +211,8 @@ </description> </method> <method name="operator /" qualifiers="operator"> - <return type="int"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="right" type="int" /> <description> Divides two integers. The decimal part of the result is discarded (truncated). [codeblock] @@ -265,28 +222,22 @@ </description> </method> <method name="operator <" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="float" /> <description> Returns [code]true[/code] if this [int] is less than the given [float]. </description> </method> <method name="operator <" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="int" /> <description> Returns [code]true[/code] the left integer is less than the right one. </description> </method> <method name="operator <<" qualifiers="operator"> - <return type="int"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="right" type="int" /> <description> Performs bitwise shift left operation on the integer. Effectively the same as multiplying by a power of 2. [codeblock] @@ -296,82 +247,64 @@ </description> </method> <method name="operator <=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="float" /> <description> Returns [code]true[/code] if this [int] is less than or equal to the given [float]. </description> </method> <method name="operator <=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="int" /> <description> Returns [code]true[/code] the left integer is less than or equal to the right one. </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="float" /> <description> Returns [code]true[/code] if the integer is equal to the given [float]. </description> </method> <method name="operator ==" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="int" /> <description> Returns [code]true[/code] if both integers are equal. </description> </method> <method name="operator >" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="float" /> <description> Returns [code]true[/code] if this [int] is greater than the given [float]. </description> </method> <method name="operator >" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="int" /> <description> Returns [code]true[/code] the left integer is greater than the right one. </description> </method> <method name="operator >=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="float"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="float" /> <description> Returns [code]true[/code] if this [int] is greater than or equal to the given [float]. </description> </method> <method name="operator >=" qualifiers="operator"> - <return type="bool"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="bool" /> + <argument index="0" name="right" type="int" /> <description> Returns [code]true[/code] the left integer is greater than or equal to the right one. </description> </method> <method name="operator >>" qualifiers="operator"> - <return type="int"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="right" type="int" /> <description> Performs bitwise shift right operation on the integer. Effectively the same as dividing by a power of 2. [codeblock] @@ -381,10 +314,8 @@ </description> </method> <method name="operator ^" qualifiers="operator"> - <return type="int"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="right" type="int" /> <description> Returns the result of bitwise [code]XOR[/code] operation for two integers. [codeblock] @@ -394,22 +325,20 @@ </description> </method> <method name="operator unary+" qualifiers="operator"> - <return type="int"> - </return> + <return type="int" /> <description> + Returns the same value as if the [code]+[/code] was not there. Unary [code]+[/code] does nothing, but sometimes it can make your code more readable. </description> </method> <method name="operator unary-" qualifiers="operator"> - <return type="int"> - </return> + <return type="int" /> <description> + Returns the negated value of the [int]. If positive, turns the number negative. If negative, turns the number positive. If zero, does nothing. </description> </method> <method name="operator |" qualifiers="operator"> - <return type="int"> - </return> - <argument index="0" name="right" type="int"> - </argument> + <return type="int" /> + <argument index="0" name="right" type="int" /> <description> Returns the result of bitwise [code]OR[/code] operation for two integers. [codeblock] @@ -426,8 +355,7 @@ </description> </method> <method name="operator ~" qualifiers="operator"> - <return type="int"> - </return> + <return type="int" /> <description> Returns the result of bitwise [code]NOT[/code] operation for the integer. It's effectively equal to [code]-int + 1[/code]. [codeblock] |