diff options
Diffstat (limited to 'doc')
123 files changed, 1300 insertions, 474 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index b25de3cf99..e84e265983 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -879,7 +879,7 @@ Ctrl key mask. </constant> <constant name="KEY_MASK_CMD" value="268435456" enum="KeyModifierMask"> - Cmd key mask. + Command key mask. On macOS, this is equivalent to [constant KEY_MASK_META]. On other platforms, this is equivalent to [constant KEY_MASK_CTRL]. This mask should be preferred to [constant KEY_MASK_META] or [constant KEY_MASK_CTRL] for system shortcuts as it handles all platforms correctly. </constant> <constant name="KEY_MASK_KPAD" value="536870912" enum="KeyModifierMask"> Keypad key mask. diff --git a/doc/classes/AABB.xml b/doc/classes/AABB.xml index 61e1ea9b8d..af5598f126 100644 --- a/doc/classes/AABB.xml +++ b/doc/classes/AABB.xml @@ -43,7 +43,7 @@ <return type="float"> </return> <description> - Gets the area of the [AABB]. + Returns the volume of the [AABB]. </description> </method> <method name="get_endpoint"> @@ -66,7 +66,7 @@ <return type="int"> </return> <description> - Returns the index of the longest axis of the [AABB] (according to [Vector3]::AXIS* enum). + 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"> @@ -182,6 +182,7 @@ <argument index="0" name="aabb" type="AABB"> </argument> <description> + Returns [code]true[/code] if this [AABB] and [code]aabb[/code] are approximately equal, by calling [method @GDScript.is_equal_approx] on each component. </description> </method> <method name="merge"> @@ -190,13 +191,13 @@ <argument index="0" name="with" type="AABB"> </argument> <description> - Returns a larger AABB that contains this AABB and [code]with[/code]. + Returns a larger [AABB] that contains both this [AABB] and [code]with[/code]. </description> </method> </methods> <members> <member name="end" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> - Ending corner. + Ending corner. This is calculated as [code]position + size[/code]. Changing this property changes [member size] accordingly. </member> <member name="position" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> Beginning corner. diff --git a/doc/classes/ARVRController.xml b/doc/classes/ARVRController.xml index 9c6cfc1d7d..24d8b48077 100644 --- a/doc/classes/ARVRController.xml +++ b/doc/classes/ARVRController.xml @@ -22,7 +22,7 @@ <return type="int" enum="ARVRPositionalTracker.TrackerHand"> </return> <description> - Returns the hand holding this controller, if known. See [code]TRACKER_*[/code] constants in [ARVRPositionalTracker]. + Returns the hand holding this controller, if known. See [enum ARVRPositionalTracker.TrackerHand]. </description> </method> <method name="get_is_active" qualifiers="const"> @@ -61,7 +61,7 @@ <argument index="0" name="button" type="int"> </argument> <description> - Returns [code]true[/code] if the button at index [code]button[/code] is pressed. + Returns [code]true[/code] if the button at index [code]button[/code] is pressed. See [enum JoystickList], in particular the [code]JOY_VR_*[/code] constants. </description> </method> </methods> @@ -73,7 +73,8 @@ When a controller is turned off, its slot is freed. This ensures controllers will keep the same ID even when controllers with lower IDs are turned off. </member> <member name="rumble" type="float" setter="set_rumble" getter="get_rumble" default="0.0"> - The degree to which the tracker rumbles. Ranges from [code]0.0[/code] to [code]1.0[/code] with precision [code].01[/code]. If changed, updates [member ARVRPositionalTracker.rumble] accordingly. + The degree to which the controller vibrates. Ranges from [code]0.0[/code] to [code]1.0[/code] with precision [code].01[/code]. If changed, updates [member ARVRPositionalTracker.rumble] accordingly. + This is a useful property to animate if you want the controller to vibrate for a limited duration. </member> </members> <signals> diff --git a/doc/classes/ARVRInterface.xml b/doc/classes/ARVRInterface.xml index 1da1351e49..41effcaecb 100644 --- a/doc/classes/ARVRInterface.xml +++ b/doc/classes/ARVRInterface.xml @@ -21,7 +21,7 @@ <return type="int"> </return> <description> - Returns a combination of flags providing information about the capabilities of this interface. + Returns a combination of [enum Capabilities] flags providing information about the capabilities of this interface. </description> </method> <method name="get_name" qualifiers="const"> @@ -51,9 +51,9 @@ <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. - 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 and 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 render out 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. + [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. + 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_stereo"> @@ -73,13 +73,13 @@ </methods> <members> <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, is our anchor detection enabled? + 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"> - Has this interface been initialized? + [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"> - Is this our primary interface? + [code]true[/code] if this is the primary interface. </member> </members> <constants> @@ -93,10 +93,10 @@ This interface supports stereoscopic rendering. </constant> <constant name="ARVR_AR" value="4" enum="Capabilities"> - This interface support AR (video background and real world tracking). + This interface supports AR (video background and real world tracking). </constant> <constant name="ARVR_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_targetsize]). 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. @@ -111,7 +111,7 @@ Tracking is behaving as expected. </constant> <constant name="ARVR_EXCESSIVE_MOTION" value="1" enum="Tracking_status"> - Tracking is hindered by excessive motion, player is moving faster than tracking can keep up. + Tracking is hindered by excessive motion (the player is moving faster than tracking can keep up). </constant> <constant name="ARVR_INSUFFICIENT_FEATURES" value="2" enum="Tracking_status"> Tracking is hindered by insufficient features, it's too dark (for camera-based tracking), player is blocked, etc. diff --git a/doc/classes/ARVRPositionalTracker.xml b/doc/classes/ARVRPositionalTracker.xml index 5551d48a08..c4acfd3b51 100644 --- a/doc/classes/ARVRPositionalTracker.xml +++ b/doc/classes/ARVRPositionalTracker.xml @@ -15,7 +15,7 @@ <return type="int" enum="ARVRPositionalTracker.TrackerHand"> </return> <description> - Returns the hand holding this tracker, if known. See [code]TRACKER_*[/code] constants. + Returns the hand holding this tracker, if known. See [enum TrackerHand] constants. </description> </method> <method name="get_joy_id" qualifiers="const"> diff --git a/doc/classes/Animation.xml b/doc/classes/Animation.xml index 97da8c9980..9924f75289 100644 --- a/doc/classes/Animation.xml +++ b/doc/classes/Animation.xml @@ -656,7 +656,7 @@ <argument index="1" name="mode" type="int" enum="Animation.UpdateMode"> </argument> <description> - Sets the update mode ([code]UPDATE_*[/code]) of a value track. + Sets the update mode (see [enum UpdateMode]) of a value track. </description> </method> </methods> diff --git a/doc/classes/AnimationNode.xml b/doc/classes/AnimationNode.xml index b4288bbfaa..79ec0f0a47 100644 --- a/doc/classes/AnimationNode.xml +++ b/doc/classes/AnimationNode.xml @@ -204,7 +204,7 @@ </methods> <members> <member name="filter_enabled" type="bool" setter="set_filter_enabled" getter="is_filter_enabled"> - Returns whether filtering is enabled. + If [code]true[/code], filtering is enabled. </member> </members> <signals> diff --git a/doc/classes/AnimationPlayer.xml b/doc/classes/AnimationPlayer.xml index 60d04649a8..a47b4a590e 100644 --- a/doc/classes/AnimationPlayer.xml +++ b/doc/classes/AnimationPlayer.xml @@ -106,7 +106,7 @@ <return type="float"> </return> <description> - Gets the actual playing speed of current animation or 0 if not playing. This speed is the [code]playback_speed[/code] property multiplied by [code]custom_speed[/code] argument specified when calling the [code]play[/code] method. + 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"> @@ -144,9 +144,9 @@ <argument index="3" name="from_end" type="bool" default="false"> </argument> <description> - Plays the animation with key [code]name[/code]. Custom speed and blend times can be set. If [code]custom_speed[/code] is negative and [code]from_end[/code] is [code]true[/code], the animation will play backwards. - If the animation has been paused by [method stop], it will be resumed. Calling [method play] without arguments will also resume the animation. - [b]Note:[/b] The animation will be updated the next time the AnimationPlayer is processed. If other variables are updated at the same time this is called, they may be updated too early. To perform the update immediately, call [code]advance(0)[/code]. + 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. + [b]Note:[/b] The animation will be updated the next time the [AnimationPlayer] is processed. If other variables are updated at the same time this is called, they may be updated too early. To perform the update immediately, call [code]advance(0)[/code]. </description> </method> <method name="play_backwards"> @@ -158,8 +158,7 @@ </argument> <description> Plays the animation with key [code]name[/code] in reverse. - If the animation has been paused by [code]stop(true)[/code], it will be resumed backwards. Calling [code]play_backwards()[/code] without arguments will also resume the animation backwards. - [b]Note:[/b] This is the same as [code]play[/code] in regards to process/update behavior. + 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"> @@ -222,8 +221,8 @@ <argument index="0" name="reset" type="bool" default="true"> </argument> <description> - Stops 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], then calling [method play] without arguments or [code]play("same_as_before")[/code] will resume the animation. Works the same for the [method play_backwards]. + 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. </description> </method> </methods> diff --git a/doc/classes/AnimationTreePlayer.xml b/doc/classes/AnimationTreePlayer.xml index 3b6003b478..0d7a34b179 100644 --- a/doc/classes/AnimationTreePlayer.xml +++ b/doc/classes/AnimationTreePlayer.xml @@ -285,7 +285,7 @@ <argument index="0" name="id" type="String"> </argument> <description> - Gets the node type, will return from [code]NODE_*[/code] enum. + Gets the node type, will return from [enum NodeType] enum. </description> </method> <method name="node_rename"> diff --git a/doc/classes/Area.xml b/doc/classes/Area.xml index 6bd1382488..4b0858935d 100644 --- a/doc/classes/Area.xml +++ b/doc/classes/Area.xml @@ -166,7 +166,7 @@ <argument index="3" name="self_shape" type="int"> </argument> <description> - Emitted when another area enters, reporting which areas overlapped. + Emitted when another area enters, reporting which areas overlapped. [code]shape_owner_get_owner(shape_find_owner(shape))[/code] returns the parent object of the owner of the [code]shape[/code]. </description> </signal> <signal name="area_shape_exited"> diff --git a/doc/classes/Area2D.xml b/doc/classes/Area2D.xml index 9a5870c73d..be3acee9ef 100644 --- a/doc/classes/Area2D.xml +++ b/doc/classes/Area2D.xml @@ -155,7 +155,7 @@ <argument index="3" name="self_shape" type="int"> </argument> <description> - Emitted when another area enters, reporting which shapes overlapped. + Emitted when another area enters, reporting which shapes overlapped. [code]shape_owner_get_owner(shape_find_owner(shape))[/code] returns the parent object of the owner of the [code]shape[/code]. </description> </signal> <signal name="area_shape_exited"> diff --git a/doc/classes/Array.xml b/doc/classes/Array.xml index e09c1f4b08..2d330fc935 100644 --- a/doc/classes/Array.xml +++ b/doc/classes/Array.xml @@ -93,7 +93,7 @@ <return type="Variant"> </return> <description> - Returns the last element of the array if the array is not empty. + Returns the last element of the array, or [code]null[/code] if the array is empty. </description> </method> <method name="bsearch"> @@ -186,7 +186,7 @@ <return type="Variant"> </return> <description> - Returns the first element of the array if the array is not empty. + Returns the first element of the array, or [code]null[/code] if the array is empty. </description> </method> <method name="has"> @@ -243,14 +243,14 @@ <return type="Variant"> </return> <description> - Removes the last element of the array. + Removes and returns the last element of the array. Returns [code]null[/code] if the array is empty. </description> </method> <method name="pop_front"> <return type="Variant"> </return> <description> - Removes the first element of the array. + Removes and returns the first element of the array. Returns [code]null[/code] if the array is empty. </description> </method> <method name="push_back"> diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 9f32691e57..62ff0edbd2 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -47,7 +47,7 @@ </argument> <description> Creates a new surface. - Surfaces are created to be rendered using a "primitive", which may be PRIMITIVE_POINTS, PRIMITIVE_LINES, PRIMITIVE_LINE_STRIP, PRIMITIVE_LINE_LOOP, PRIMITIVE_TRIANGLES, PRIMITIVE_TRIANGLE_STRIP, PRIMITIVE_TRIANGLE_FAN. See [Mesh] for details. (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 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 ARRAY_INDEX] if it is used. 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 order of the vertices. Godot uses clockwise winding order for front faces of triangle primitive modes. diff --git a/doc/classes/AudioStreamPlayer.xml b/doc/classes/AudioStreamPlayer.xml index 4bc29335ff..89fc18476b 100644 --- a/doc/classes/AudioStreamPlayer.xml +++ b/doc/classes/AudioStreamPlayer.xml @@ -57,7 +57,7 @@ Bus on which this audio is playing. </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 [code]MIX_TARGET_*[/code] constants. + If the audio configuration has more than two speakers, this sets the target channels. See [enum MixTarget] constants. </member> <member name="pitch_scale" type="float" setter="set_pitch_scale" getter="get_pitch_scale" default="1.0"> Changes the pitch and the tempo of the audio. diff --git a/doc/classes/AudioStreamSample.xml b/doc/classes/AudioStreamSample.xml index a496902ded..bb418f3c36 100644 --- a/doc/classes/AudioStreamSample.xml +++ b/doc/classes/AudioStreamSample.xml @@ -27,7 +27,7 @@ [b]Note:[/b] This property expects signed PCM8 data. To convert unsigned PCM8 to signed PCM8, subtract 128 from each byte. </member> <member name="format" type="int" setter="set_format" getter="get_format" enum="AudioStreamSample.Format" default="0"> - Audio format. See [code]FORMAT_*[/code] constants for values. + Audio format. See [enum Format] constants for values. </member> <member name="loop_begin" type="int" setter="set_loop_begin" getter="get_loop_begin" default="0"> Loop start in bytes. @@ -36,7 +36,7 @@ Loop end in bytes. </member> <member name="loop_mode" type="int" setter="set_loop_mode" getter="get_loop_mode" enum="AudioStreamSample.LoopMode" default="0"> - Loop mode. See [code]LOOP_*[/code] constants for values. + Loop mode. See [enum LoopMode] constants for values. </member> <member name="mix_rate" type="int" setter="set_mix_rate" getter="get_mix_rate" default="44100"> The sample rate for mixing this audio. diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index b4f4b21afd..21f46efe84 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -22,14 +22,14 @@ <argument index="0" name="button_pressed" type="bool"> </argument> <description> - Called when the button is toggled (only if toggle_mode is active). + 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> <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 [code]DRAW_*[/code] enum. + 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"> @@ -42,7 +42,7 @@ </methods> <members> <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="BaseButton.ActionMode" default="1"> - Determines when the button is considered clicked, one of the [code]ACTION_MODE_*[/code] constants. + Determines when the button is considered clicked, one of the [enum ActionMode] constants. </member> <member name="button_mask" type="int" setter="set_button_mask" getter="get_button_mask" default="1"> Binary mask to choose which mouse buttons this button will respond to. @@ -62,7 +62,7 @@ If [code]true[/code], the button stays pressed when moving the cursor outside the button while pressing it. </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 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). </member> <member name="shortcut" type="ShortCut" setter="set_shortcut" getter="get_shortcut"> [ShortCut] associated to the button. diff --git a/doc/classes/Basis.xml b/doc/classes/Basis.xml index df9438e695..b8fe23c2c9 100644 --- a/doc/classes/Basis.xml +++ b/doc/classes/Basis.xml @@ -64,20 +64,21 @@ <return type="Vector3"> </return> <description> - Assuming that the matrix is a proper rotation matrix (orthonormal matrix with determinant +1), return Euler angles (in the YXZ convention: first Z, then X, and Y last). Returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). + Returns the basis's rotation in the form of Euler angles (in the YXZ convention: first Z, then X, and Y last). The returned vector contains the rotation angles in the format (X angle, Y angle, Z angle). See [method get_rotation_quat] if you need a quaternion instead. </description> </method> <method name="get_orthogonal_index"> <return type="int"> </return> <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 grid map editor. For further details, refer to Godot source code. + 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 grid map editor. For further details, refer to the Godot source code. </description> </method> <method name="get_rotation_quat"> <return type="Quat"> </return> <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"> @@ -102,6 +103,7 @@ <argument index="1" name="epsilon" type="float" default="0.00001"> </argument> <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="orthonormalized"> @@ -209,12 +211,16 @@ </members> <constants> <constant name="IDENTITY" value="Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )"> + The identity basis. This is identical to calling [code]Basis()[/code] without any parameters. This constant can be used to make your code clearer. </constant> <constant name="FLIP_X" value="Basis( -1, 0, 0, 0, 1, 0, 0, 0, 1 )"> + The basis that will flip something along the X axis when used in a transformation. </constant> <constant name="FLIP_Y" value="Basis( 1, 0, 0, 0, -1, 0, 0, 0, 1 )"> + The basis that will flip something along the Y axis when used in a transformation. </constant> <constant name="FLIP_Z" value="Basis( 1, 0, 0, 0, 1, 0, 0, 0, -1 )"> + The basis that will flip something along the Z axis when used in a transformation. </constant> </constants> </class> diff --git a/doc/classes/BitmapFont.xml b/doc/classes/BitmapFont.xml index 16a28978d5..5b7c3def63 100644 --- a/doc/classes/BitmapFont.xml +++ b/doc/classes/BitmapFont.xml @@ -1,7 +1,8 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="BitmapFont" inherits="Font" category="Core" version="3.2"> <brief_description> - Renders text using [code]*.fnt[/code] fonts. + Renders text using fonts under the [url=https://www.angelcode.com/products/bmfont/]BMFont[/url] format. + Handles files with the [code].fnt[/code] extension </brief_description> <description> Renders text using [code]*.fnt[/code] fonts containing texture atlases. Supports distance fields. For using vector font files like TTF directly, see [DynamicFont]. diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index 305be8b58d..3b73580294 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -12,7 +12,7 @@ </methods> <members> <member name="align" type="int" setter="set_text_align" getter="get_text_align" enum="Button.TextAlign" default="1"> - Text alignment policy for the button's text, use one of the [code]ALIGN_*[/code] constants. + Text alignment policy for the button's text, use one of the [enum TextAlign] constants. </member> <member name="clip_text" type="bool" setter="set_clip_text" getter="get_clip_text" default="false"> When this property is enabled, text that is too large to fit the button is clipped, when disabled the Button will always be wide enough to hold the text. diff --git a/doc/classes/Camera.xml b/doc/classes/Camera.xml index 3b4313b204..aca53d4ed0 100644 --- a/doc/classes/Camera.xml +++ b/doc/classes/Camera.xml @@ -38,12 +38,14 @@ <argument index="0" name="layer" type="int"> </argument> <description> + Returns [code]true[/code] if the given [code]layer[/code] in the [member cull_mask] is enabled, [code]false[/code] otherwise. </description> </method> <method name="get_frustum" qualifiers="const"> <return type="Array"> </return> <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]. </description> </method> <method name="is_position_behind" qualifiers="const"> @@ -109,6 +111,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + Enables or disables the given [code]layer[/code] in the [member cull_mask]. </description> </method> <method name="set_frustum"> @@ -123,6 +126,7 @@ <argument index="3" name="z_far" type="float"> </argument> <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. </description> </method> <method name="set_orthogonal"> @@ -135,7 +139,7 @@ <argument index="2" name="z_far" type="float"> </argument> <description> - Sets the camera projection to orthogonal mode, by specifying a width and the [code]near[/code] and [code]far[/code] clip planes in worldspace 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"> @@ -148,7 +152,7 @@ <argument index="2" name="z_far" type="float"> </argument> <description> - Sets the camera projection to perspective mode, by specifying a [code]fov[/code] angle in degrees (FOV means Field of View), and the [code]near[/code] and [code]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"> @@ -169,7 +173,7 @@ If [code]true[/code], the ancestor [Viewport] is currently using this camera. </member> <member name="doppler_tracking" type="int" setter="set_doppler_tracking" getter="get_doppler_tracking" enum="Camera.DopplerTracking" default="0"> - If not [constant DOPPLER_TRACKING_DISABLED], this camera will simulate the Doppler effect for objects changed in particular [code]_process[/code] methods. See [enum DopplerTracking] for possible values. + If not [constant DOPPLER_TRACKING_DISABLED], this camera will simulate the [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] for objects changed in particular [code]_process[/code] methods. See [enum DopplerTracking] for possible values. </member> <member name="environment" type="Environment" setter="set_environment" getter="get_environment"> The [Environment] to use for this camera. @@ -181,6 +185,7 @@ The camera's field of view angle (in degrees). Only applicable in perspective mode. Since [member keep_aspect] locks one axis, [code]fov[/code] sets the other axis' field of view angle. </member> <member name="frustum_offset" type="Vector2" setter="set_frustum_offset" getter="get_frustum_offset" default="Vector2( 0, 0 )"> + The camera's frustum offset. This can be changed from the default to create "tilted frustum" effects such as [url=https://zdoom.org/wiki/Y-shearing]Y-shearing[/url]. </member> <member name="h_offset" type="float" setter="set_h_offset" getter="get_h_offset" default="0.0"> The horizontal (X) offset of the camera viewport. @@ -218,13 +223,13 @@ Preserves the vertical aspect ratio; also known as Hor+ scaling. This is usually the best option for projects running in landscape mode, as wider aspect ratios will automatically benefit from a wider horizontal FOV. </constant> <constant name="DOPPLER_TRACKING_DISABLED" value="0" enum="DopplerTracking"> - Disables Doppler effect simulation (default). + Disables [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] simulation (default). </constant> <constant name="DOPPLER_TRACKING_IDLE_STEP" value="1" enum="DopplerTracking"> - Simulate Doppler effect by tracking positions of objects that are changed in [code]_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]). + Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in [code]_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]). </constant> <constant name="DOPPLER_TRACKING_PHYSICS_STEP" value="2" enum="DopplerTracking"> - Simulate Doppler effect by tracking positions of objects that are changed in [code]_physics_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]). + Simulate [url=https://en.wikipedia.org/wiki/Doppler_effect]Doppler effect[/url] by tracking positions of objects that are changed in [code]_physics_process[/code]. Changes in the relative velocity of this camera compared to those objects affect how Audio is perceived (changing the Audio's [code]pitch shift[/code]). </constant> </constants> </class> diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml index 6f1627e296..b575fa72e0 100644 --- a/doc/classes/Camera2D.xml +++ b/doc/classes/Camera2D.xml @@ -103,7 +103,7 @@ </methods> <members> <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 [code]ANCHOR_MODE_*[/code] constants. + 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. diff --git a/doc/classes/CharFXTransform.xml b/doc/classes/CharFXTransform.xml index e03229abe1..ef9a366c86 100644 --- a/doc/classes/CharFXTransform.xml +++ b/doc/classes/CharFXTransform.xml @@ -1,39 +1,51 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="CharFXTransform" inherits="Reference" category="Core" version="3.2"> <brief_description> + Controls how an individual character will be displayed in a [RichTextEffect]. </brief_description> <description> + By setting various properties on this object, you can control how individual characters will be displayed in a [RichTextEffect]. </description> <tutorials> + <link>http://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link> + <link>https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link> </tutorials> <methods> - <method name="get_value_or"> - <return type="Variant"> - </return> - <argument index="0" name="key" type="String"> - </argument> - <argument index="1" name="default_value" type="Variant"> - </argument> - <description> - </description> - </method> </methods> <members> <member name="absolute_index" type="int" setter="set_absolute_index" getter="get_absolute_index" default="0"> + The index of the current character (starting from 0). Setting this property won't affect drawing. </member> <member name="character" type="int" setter="set_character" getter="get_character" default="0"> + The Unicode codepoint the character will use. This only affects non-whitespace characters. [method @GDScript.ord] can be useful here. For example, the following will replace all characters with asterisks: + [codeblock] + # `char_fx` is the CharFXTransform parameter from `_process_custom_fx()`. + # See the RichTextEffect documentation for details. + char_fx.character = ord("*") + [/codeblock] </member> <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 0, 0, 0, 1 )"> + The color the character will be drawn with. </member> <member name="elapsed_time" type="float" setter="set_elapsed_time" getter="get_elapsed_time" default="0.0"> + The time elapsed since the [RichTextLabel] was added to the scene tree (in seconds). Time stops when the project is paused, unless the [RichTextLabel]'s [member Node.pause_mode] is set to [constant Node.PAUSE_MODE_PROCESS]. + [b]Note:[/b] Time still passes while the [RichTextLabel] is hidden. </member> <member name="env" type="Dictionary" setter="set_environment" getter="get_environment" default="{}"> + Contains the arguments passed in the opening BBCode tag. By default, arguments are strings; if their contents match a type such as [bool], [int] or [float], they will be converted automatically. Color codes in the form [code]#rrggbb[/code] or [code]#rgb[/code] will be converted to an opaque [Color]. String arguments may not contain spaces, even if they're quoted. If present, quotes will also be present in the final string. + For example, the opening BBCode tag [code][example foo=hello bar=true baz=42 color=#ffffff][/code] will map to the following [Dictionary]: + [codeblock] + {"foo": "hello", "bar": true, "baz": 42, "color": Color(1, 1, 1, 1)} + [/codeblock] </member> <member name="offset" type="Vector2" setter="set_offset" getter="get_offset" default="Vector2( 0, 0 )"> + The position offset the character will be drawn with (in pixels). </member> <member name="relative_index" type="int" setter="set_relative_index" getter="get_relative_index" default="0"> + The index of the current character (starting from 0). Setting this property won't affect drawing. </member> <member name="visible" type="bool" setter="set_visibility" getter="is_visible" default="true"> + If [code]true[/code], the character will be drawn. If [code]false[/code], the character will be hidden. Characters around hidden characters will reflow to take the space of hidden characters. If this is not desired, set their [member color] to [code]Color(1, 1, 1, 0)[/code] instead. </member> </members> <constants> diff --git a/doc/classes/CollisionPolygon2D.xml b/doc/classes/CollisionPolygon2D.xml index fe46d45f71..1d935a3e99 100644 --- a/doc/classes/CollisionPolygon2D.xml +++ b/doc/classes/CollisionPolygon2D.xml @@ -4,7 +4,7 @@ Defines a 2D collision polygon. </brief_description> <description> - Provides a 2D collision polygon to a [CollisionObject2D] parent. Polygon can be drawn in the editor or specified by a list of vertices. + Provides a 2D collision polygon to a [CollisionObject2D] parent. Polygons can be drawn in the editor or specified by a list of vertices. </description> <tutorials> </tutorials> @@ -12,18 +12,18 @@ </methods> <members> <member name="build_mode" type="int" setter="set_build_mode" getter="get_build_mode" enum="CollisionPolygon2D.BuildMode" default="0"> - Collision build mode. Use one of the [code]BUILD_*[/code] constants. + Collision build mode. Use one of the [enum BuildMode] constants. </member> <member name="disabled" type="bool" setter="set_disabled" getter="is_disabled" default="false"> If [code]true[/code], no collisions will be detected. </member> <member name="one_way_collision" type="bool" setter="set_one_way_collision" getter="is_one_way_collision_enabled" default="false"> - If [code]true[/code], only edges that face up, relative to CollisionPolygon2D's rotation, will collide with other objects. + If [code]true[/code], only edges that face up, relative to [CollisionPolygon2D]'s rotation, will collide with other objects. </member> <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0"> </member> <member name="polygon" type="PoolVector2Array" setter="set_polygon" getter="get_polygon" default="PoolVector2Array( )"> - The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the PoolVector2Array, not a reference. + The polygon's list of vertices. The final point will be connected to the first. The returned value is a clone of the [PoolVector2Array], not a reference. </member> </members> <constants> diff --git a/doc/classes/CollisionShape2D.xml b/doc/classes/CollisionShape2D.xml index 5fd8826a98..4166ee31d3 100644 --- a/doc/classes/CollisionShape2D.xml +++ b/doc/classes/CollisionShape2D.xml @@ -19,6 +19,7 @@ Sets whether this collision shape should only detect collision on one side (top or bottom). </member> <member name="one_way_collision_margin" type="float" setter="set_one_way_collision_margin" getter="get_one_way_collision_margin" default="1.0"> + The margin used for one-way collision (in pixels). </member> <member name="shape" type="Shape2D" setter="set_shape" getter="get_shape"> The actual shape owned by this collision shape. diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index deba30712e..1d4225542a 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -157,6 +157,7 @@ <argument index="0" name="color" type="Color"> </argument> <description> + Returns [code]true[/code] if this color and [code]color[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component. </description> </method> <method name="lightened"> diff --git a/doc/classes/ConfigFile.xml b/doc/classes/ConfigFile.xml index 56f54e4434..d99f90d09a 100644 --- a/doc/classes/ConfigFile.xml +++ b/doc/classes/ConfigFile.xml @@ -104,7 +104,8 @@ <argument index="0" name="path" type="String"> </argument> <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 [constant OK], [constant FAILED] or [code]ERR_*[/code] constants listed in [@GlobalScope]. If the load was successful, the return value is [constant OK]. + 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"> @@ -133,7 +134,8 @@ <argument index="0" name="path" type="String"> </argument> <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 [constant OK], [constant FAILED] or [code]ERR_*[/code] constants listed in [@GlobalScope]. If the load was successful, the return value is [constant OK]. + 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"> diff --git a/doc/classes/ConfirmationDialog.xml b/doc/classes/ConfirmationDialog.xml index 8a8d1ed9e8..01a2eebce5 100644 --- a/doc/classes/ConfirmationDialog.xml +++ b/doc/classes/ConfirmationDialog.xml @@ -5,6 +5,10 @@ </brief_description> <description> Dialog for confirmation of actions. This dialog inherits from [AcceptDialog], but has by default an OK and Cancel button (in host OS order). + To get cancel action, you can use: + [codeblock] + get_cancel().connect("pressed", self, "cancelled") + [/codeblock]. </description> <tutorials> </tutorials> diff --git a/doc/classes/CubeMap.xml b/doc/classes/CubeMap.xml index 2cedc78499..6db1cf2d64 100644 --- a/doc/classes/CubeMap.xml +++ b/doc/classes/CubeMap.xml @@ -22,7 +22,7 @@ <argument index="0" name="side" type="int" enum="CubeMap.Side"> </argument> <description> - Returns an [Image] for a side of the [CubeMap] using one of the [code]SIDE_*[/code] constants or an integer 0-5. + Returns an [Image] for a side of the [CubeMap] using one of the [enum Side] constants. </description> </method> <method name="get_width" qualifiers="const"> @@ -40,19 +40,19 @@ <argument index="1" name="image" type="Image"> </argument> <description> - Sets an [Image] for a side of the [CubeMap] using one of the [code]SIDE_*[/code] constants or an integer 0-5. + Sets an [Image] for a side of the [CubeMap] using one of the [enum Side] constants. </description> </method> </methods> <members> <member name="flags" type="int" setter="set_flags" getter="get_flags" default="7"> - The render flags for the [CubeMap]. See the [code]FLAG_*[/code] constants for details. + The render flags for the [CubeMap]. See the [enum Flags] constants for details. </member> <member name="lossy_storage_quality" type="float" setter="set_lossy_storage_quality" getter="get_lossy_storage_quality" default="0.7"> - The lossy storage quality of the [CubeMap] if the storage mode is set to STORAGE_COMPRESS_LOSSY. + The lossy storage quality of the [CubeMap] if the storage mode is set to [constant STORAGE_COMPRESS_LOSSY]. </member> <member name="storage_mode" type="int" setter="set_storage" getter="get_storage" enum="CubeMap.Storage" default="0"> - The [CubeMap]'s storage mode. See [code]STORAGE_*[/code] constants. + The [CubeMap]'s storage mode. See [enum Storage] constants. </member> </members> <constants> diff --git a/doc/classes/Directory.xml b/doc/classes/Directory.xml index 8aae85563a..754fafadbe 100644 --- a/doc/classes/Directory.xml +++ b/doc/classes/Directory.xml @@ -33,7 +33,7 @@ </argument> <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]). - The method returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]ERR_*[/code]). + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="copy"> @@ -45,7 +45,7 @@ </argument> <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 error code constants defined in [@GlobalScope] ([code]OK[/code], [code]FAILED[/code] or [code]ERR_*[/code]). + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="current_is_dir" qualifiers="const"> @@ -145,7 +145,7 @@ </argument> <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]). - The method returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code], [code]FAILED[/code] or [code]ERR_*[/code]). + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="make_dir_recursive"> @@ -155,7 +155,7 @@ </argument> <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 error code constants defined in [@GlobalScope] ([code]0K[/code], [code]FAILED[/code] or [code]ERR_*[/code]). + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="open"> @@ -165,7 +165,7 @@ </argument> <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]). - The method returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]ERR_*[/code]). + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="remove"> @@ -175,7 +175,7 @@ </argument> <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 error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]FAILED[/code]). + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> <method name="rename"> @@ -187,7 +187,7 @@ </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. - Returns one of the error code constants defined in [@GlobalScope] ([code]OK[/code] or [code]FAILED[/code]). + Returns one of the [enum Error] code constants ([code]OK[/code] on success). </description> </method> </methods> diff --git a/doc/classes/DynamicFont.xml b/doc/classes/DynamicFont.xml index 0820d4e1b6..ac8595d783 100644 --- a/doc/classes/DynamicFont.xml +++ b/doc/classes/DynamicFont.xml @@ -4,7 +4,8 @@ DynamicFont renders vector font files at runtime. </brief_description> <description> - DynamicFont renders vector font files (such as TTF or OTF) dynamically at runtime instead of using a prerendered texture atlas like [BitmapFont]. This trades the faster loading time of [BitmapFont]s for the ability to change font parameters like size and spacing during runtime. [DynamicFontData] is used for referencing the font file paths. + DynamicFont renders vector font files (such as TTF or OTF) dynamically at runtime instead of using a prerendered texture atlas like [BitmapFont]. This trades the faster loading time of [BitmapFont]s for the ability to change font parameters like size and spacing during runtime. [DynamicFontData] is used for referencing the font file paths. DynamicFont also supports defining one or more fallbacks fonts, which will be used when displaying a character not supported by the main font. + DynamicFont uses the [url=https://www.freetype.org/]FreeType[/url] library for rasterization. [codeblock] var dynamic_font = DynamicFont.new() dynamic_font.font_data = load("res://BarlowCondensed-Bold.ttf") @@ -46,6 +47,7 @@ <argument index="0" name="type" type="int"> </argument> <description> + Returns the spacing for the given [code]type[/code] (see [enum SpacingType]). </description> </method> <method name="remove_fallback"> @@ -76,6 +78,7 @@ <argument index="1" name="value" type="int"> </argument> <description> + Sets the spacing for [code]type[/code] (see [enum SpacingType]) to [code]value[/code] in pixels (not relative to the font size). </description> </method> </methods> @@ -96,17 +99,20 @@ The font data. </member> <member name="outline_color" type="Color" setter="set_outline_color" getter="get_outline_color" default="Color( 1, 1, 1, 1 )"> + The font outline's color. + [b]Note:[/b] It's recommended to leave this at the default value so that you can adjust it in individual controls. For example, if the outline is made black here, it won't be possible to change its color using a Label's font outline modulate theme item. </member> <member name="outline_size" type="int" setter="set_outline_size" getter="get_outline_size" default="0"> + The font outline's thickness in pixels (not relative to the font size). </member> <member name="size" type="int" setter="set_size" getter="get_size" default="16"> - The font size. + The font size in pixels. </member> <member name="use_filter" type="bool" setter="set_use_filter" getter="get_use_filter" default="false"> - If [code]true[/code], filtering is used. + If [code]true[/code], filtering is used. This makes the font blurry instead of pixelated when scaling it if font oversampling is disabled or ineffective. It's recommended to enable this when using the font in a control whose size changes over time, unless a pixel art aesthetic is desired. </member> <member name="use_mipmaps" type="bool" setter="set_use_mipmaps" getter="get_use_mipmaps" default="false"> - If [code]true[/code], mipmapping is used. + If [code]true[/code], mipmapping is used. This improves the font's appearance when downscaling it if font oversampling is disabled or ineffective. </member> </members> <constants> diff --git a/doc/classes/DynamicFontData.xml b/doc/classes/DynamicFontData.xml index ecdab32e80..399e103930 100644 --- a/doc/classes/DynamicFontData.xml +++ b/doc/classes/DynamicFontData.xml @@ -12,13 +12,13 @@ </methods> <members> <member name="antialiased" type="bool" setter="set_antialiased" getter="is_antialiased" default="true"> - Controls whether the font should be rendered with anti-aliasing. + If [code]true[/code], the font is rendered with anti-aliasing. </member> <member name="font_path" type="String" setter="set_font_path" getter="get_font_path" default=""""> The path to the vector font file. </member> <member name="hinting" type="int" setter="set_hinting" getter="get_hinting" enum="DynamicFontData.Hinting" default="2"> - The font hinting mode used by FreeType. + The font hinting mode used by FreeType. See [enum Hinting] for options. </member> </members> <constants> diff --git a/doc/classes/EditorSettings.xml b/doc/classes/EditorSettings.xml index 5395a8fcb0..18e8ee2d7e 100644 --- a/doc/classes/EditorSettings.xml +++ b/doc/classes/EditorSettings.xml @@ -21,7 +21,10 @@ <argument index="0" name="info" type="Dictionary"> </argument> <description> - Adds a custom property info to a property. The dictionary must contain: name:[String](the name of the property) and type:[int](see [code]TYPE_*[/code] in [@GlobalScope]), and optionally hint:[int](see [code]PROPERTY_HINT_*[/code] in [@GlobalScope]), hint_string:[String]. + Adds a custom property info to a property. The dictionary must contain: + - [code]name[/code]: [String] (the name of the property) + - [code]type[/code]: [int] (see [enum Variant.Type]) + - optionally [code]hint[/code]: [int] (see [enum PropertyHint]) and [code]hint_string[/code]: [String] [b]Example:[/b] [codeblock] editor_settings.set("category/property_name", 0) diff --git a/doc/classes/EditorSpatialGizmo.xml b/doc/classes/EditorSpatialGizmo.xml index 22e4a21757..419a0c5248 100644 --- a/doc/classes/EditorSpatialGizmo.xml +++ b/doc/classes/EditorSpatialGizmo.xml @@ -51,6 +51,8 @@ </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> <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]. </description> @@ -76,6 +78,8 @@ </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> <description> Adds an unscaled billboard for visualization. Call this function during [method redraw]. </description> diff --git a/doc/classes/Environment.xml b/doc/classes/Environment.xml index 2b44eb81b1..00a80a084b 100644 --- a/doc/classes/Environment.xml +++ b/doc/classes/Environment.xml @@ -21,6 +21,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns [code]true[/code] if the glow level [code]idx[/code] is specified, [code]false[/code] otherwise. </description> </method> <method name="set_glow_level"> @@ -31,132 +32,134 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + Enables or disables the glow level at index [code]idx[/code]. The more glow levels are enabled, the slower the glow effect will be. </description> </method> </methods> <members> <member name="adjustment_brightness" type="float" setter="set_adjustment_brightness" getter="get_adjustment_brightness" default="1.0"> - Global brightness value of the rendered scene (default value is 1). + The global brightness value of the rendered scene. Effective only if [code]adjustment_enabled[/code] is [code]true[/code]. </member> <member name="adjustment_color_correction" type="Texture" setter="set_adjustment_color_correction" getter="get_adjustment_color_correction"> - Applies the provided [Texture] resource to affect the global color aspect of the rendered scene. + Applies the provided [Texture] resource to affect the global color aspect of the rendered scene. Effective only if [code]adjustment_enabled[/code] is [code]true[/code]. </member> <member name="adjustment_contrast" type="float" setter="set_adjustment_contrast" getter="get_adjustment_contrast" default="1.0"> - Global contrast value of the rendered scene (default value is 1). + The global contrast value of the rendered scene (default value is 1). Effective only if [code]adjustment_enabled[/code] is [code]true[/code]. </member> <member name="adjustment_enabled" type="bool" setter="set_adjustment_enable" getter="is_adjustment_enabled" default="false"> - Enables the adjustment_* options provided by this resource. If [code]false[/code], adjustments modifications will have no effect on the rendered scene. + If [code]true[/code], enables the [code]adjustment_*[/code] properties provided by this resource. If [code]false[/code], modifications to the [code]adjustment_*[/code] properties will have no effect on the rendered scene. </member> <member name="adjustment_saturation" type="float" setter="set_adjustment_saturation" getter="get_adjustment_saturation" default="1.0"> - Global color saturation value of the rendered scene (default value is 1). + The global color saturation value of the rendered scene (default value is 1). Effective only if [code]adjustment_enabled[/code] is [code]true[/code]. </member> <member name="ambient_light_color" type="Color" setter="set_ambient_light_color" getter="get_ambient_light_color" default="Color( 0, 0, 0, 1 )"> - [Color] of the ambient light. + The ambient light's [Color]. </member> <member name="ambient_light_energy" type="float" setter="set_ambient_light_energy" getter="get_ambient_light_energy" default="1.0"> - Energy of the ambient light. The higher the value, the stronger the light. + The ambient light's energy. The higher the value, the stronger the light. </member> <member name="ambient_light_sky_contribution" type="float" setter="set_ambient_light_sky_contribution" getter="get_ambient_light_sky_contribution" default="1.0"> Defines the amount of light that the sky brings on the scene. A value of 0 means that the sky's light emission has no effect on the scene illumination, thus all ambient illumination is provided by the ambient light. On the contrary, a value of 1 means that all the light that affects the scene is provided by the sky, thus the ambient light parameter has no effect on the scene. + This value is multiplied by [member ambient_light_energy], so it must be set to a value higher than [code]0[/code] for changes to be visible when adjusting [member ambient_light_sky_contribution]. </member> <member name="auto_exposure_enabled" type="bool" setter="set_tonemap_auto_exposure" getter="get_tonemap_auto_exposure" default="false"> - Enables the tonemapping auto exposure mode of the scene renderer. If activated, the renderer will automatically determine the exposure setting to adapt to the illumination of the scene and the observed light. + If [code]true[/code], enables the tonemapping auto exposure mode of the scene renderer. If [code]true[/code], the renderer will automatically determine the exposure setting to adapt to the scene's illumination and the observed light. </member> <member name="auto_exposure_max_luma" type="float" setter="set_tonemap_auto_exposure_max" getter="get_tonemap_auto_exposure_max" default="8.0"> - Maximum luminance value for the auto exposure. + The maximum luminance value for the auto exposure. </member> <member name="auto_exposure_min_luma" type="float" setter="set_tonemap_auto_exposure_min" getter="get_tonemap_auto_exposure_min" default="0.05"> - Minimum luminance value for the auto exposure. + The minimum luminance value for the auto exposure. </member> <member name="auto_exposure_scale" type="float" setter="set_tonemap_auto_exposure_grey" getter="get_tonemap_auto_exposure_grey" default="0.4"> - Scale of the auto exposure effect. Affects the intensity of auto exposure. + The scale of the auto exposure effect. Affects the intensity of auto exposure. </member> <member name="auto_exposure_speed" type="float" setter="set_tonemap_auto_exposure_speed" getter="get_tonemap_auto_exposure_speed" default="0.5"> - Speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure. + The speed of the auto exposure effect. Affects the time needed for the camera to perform auto exposure. </member> <member name="background_camera_feed_id" type="int" setter="set_camera_feed_id" getter="get_camera_feed_id" default="1"> - The id of the camera feed to show in the background. + The ID of the camera feed to show in the background. </member> <member name="background_canvas_max_layer" type="int" setter="set_canvas_max_layer" getter="get_canvas_max_layer" default="0"> - Maximum layer id (if using Layer background mode). + The maximum layer ID to display. Only effective when using the [constant BG_CANVAS] background mode. </member> <member name="background_color" type="Color" setter="set_bg_color" getter="get_bg_color" default="Color( 0, 0, 0, 1 )"> - Color displayed for clear areas of the scene (if using Custom color or Color+Sky background modes). + The [Color] displayed for clear areas of the scene. Only effective when using the [constant BG_COLOR] or [constant BG_COLOR_SKY] background modes). </member> <member name="background_energy" type="float" setter="set_bg_energy" getter="get_bg_energy" default="1.0"> - Power of light emitted by the background. + The power of the light emitted by the background. </member> <member name="background_mode" type="int" setter="set_background" getter="get_background" enum="Environment.BGMode" default="0"> - Defines the mode of background. + The background mode. See [enum BGMode] for possible values. </member> <member name="background_sky" type="Sky" setter="set_sky" getter="get_sky"> - [Sky] resource defined as background. + The [Sky] resource defined as background. </member> <member name="background_sky_custom_fov" type="float" setter="set_sky_custom_fov" getter="get_sky_custom_fov" default="0.0"> - [Sky] resource's custom field of view. + The [Sky] resource's custom field of view. </member> <member name="background_sky_orientation" type="Basis" setter="set_sky_orientation" getter="get_sky_orientation" default="Basis( 1, 0, 0, 0, 1, 0, 0, 0, 1 )"> - [Sky] resource's rotation expressed as a [Basis] + The [Sky] resource's rotation expressed as a [Basis]. </member> <member name="background_sky_rotation" type="Vector3" setter="set_sky_rotation" getter="get_sky_rotation" default="Vector3( 0, 0, 0 )"> - [Sky] resource's rotation expressed as euler angles in radians + The [Sky] resource's rotation expressed as Euler angles in radians. </member> <member name="background_sky_rotation_degrees" type="Vector3" setter="set_sky_rotation_degrees" getter="get_sky_rotation_degrees" default="Vector3( 0, 0, 0 )"> - [Sky] resource's rotation expressed as euler angles in degrees + The [Sky] resource's rotation expressed as Euler angles in degrees. </member> <member name="dof_blur_far_amount" type="float" setter="set_dof_blur_far_amount" getter="get_dof_blur_far_amount" default="0.1"> - Amount of far blur. + The amount of far blur for the depth-of-field effect. </member> <member name="dof_blur_far_distance" type="float" setter="set_dof_blur_far_distance" getter="get_dof_blur_far_distance" default="10.0"> - Distance from the camera where the far blur effect affects the rendering. + The distance from the camera where the far blur effect affects the rendering. </member> <member name="dof_blur_far_enabled" type="bool" setter="set_dof_blur_far_enabled" getter="is_dof_blur_far_enabled" default="false"> - Enables the far blur effect. + If [code]true[/code], enables the depth-of-field far blur effect. </member> <member name="dof_blur_far_quality" type="int" setter="set_dof_blur_far_quality" getter="get_dof_blur_far_quality" enum="Environment.DOFBlurQuality" default="1"> - Quality of the far blur quality. + The depth-of-field far blur's quality. Higher values can mitigate the visible banding effect seen at higher strengths, but are much slower. </member> <member name="dof_blur_far_transition" type="float" setter="set_dof_blur_far_transition" getter="get_dof_blur_far_transition" default="5.0"> - Transition between no-blur area and far blur. + The length of the transition between the no-blur area and far blur. </member> <member name="dof_blur_near_amount" type="float" setter="set_dof_blur_near_amount" getter="get_dof_blur_near_amount" default="0.1"> - Amount of near blur. + The amount of near blur for the depth-of-field effect. </member> <member name="dof_blur_near_distance" type="float" setter="set_dof_blur_near_distance" getter="get_dof_blur_near_distance" default="2.0"> Distance from the camera where the near blur effect affects the rendering. </member> <member name="dof_blur_near_enabled" type="bool" setter="set_dof_blur_near_enabled" getter="is_dof_blur_near_enabled" default="false"> - Enables the near blur effect. + If [code]true[/code], enables the depth-of-field near blur effect. </member> <member name="dof_blur_near_quality" type="int" setter="set_dof_blur_near_quality" getter="get_dof_blur_near_quality" enum="Environment.DOFBlurQuality" default="1"> - Quality of the near blur quality. + The depth-of-field near blur's quality. Higher values can mitigate the visible banding effect seen at higher strengths, but are much slower. </member> <member name="dof_blur_near_transition" type="float" setter="set_dof_blur_near_transition" getter="get_dof_blur_near_transition" default="1.0"> - Transition between near blur and no-blur area. + The length of the transition between the near blur and no-blur area. </member> <member name="fog_color" type="Color" setter="set_fog_color" getter="get_fog_color" default="Color( 0.5, 0.6, 0.7, 1 )"> - Fog's [Color]. + The fog's [Color]. </member> <member name="fog_depth_begin" type="float" setter="set_fog_depth_begin" getter="get_fog_depth_begin" default="10.0"> - Fog's depth starting distance from the camera. + The fog's depth starting distance from the camera. </member> <member name="fog_depth_curve" type="float" setter="set_fog_depth_curve" getter="get_fog_depth_curve" default="1.0"> - Value defining the fog depth intensity. + The fog depth's intensity curve. A number of presets are available in the [b]Inspector[/b] by right-clicking the curve. </member> <member name="fog_depth_enabled" type="bool" setter="set_fog_depth_enabled" getter="is_fog_depth_enabled" default="true"> - Enables the fog depth. + If [code]true[/code], the depth fog effect is enabled. When enabled, fog will appear in the distance (relative to the camera). </member> <member name="fog_depth_end" type="float" setter="set_fog_depth_end" getter="get_fog_depth_end" default="100.0"> - Fog's depth end distance from the camera. If this value is set to 0, it will be equal to the current camera's [member Camera.far] value. + The fog's depth end distance from the camera. If this value is set to 0, it will be equal to the current camera's [member Camera.far] value. </member> <member name="fog_enabled" type="bool" setter="set_fog_enabled" getter="is_fog_enabled" default="false"> - Enables the fog. Needs [member fog_height_enabled] and/or [member fog_depth_enabled] to actually display fog. + If [code]true[/code], fog effects are enabled. [member fog_height_enabled] and/or [member fog_depth_enabled] must be set to [code]true[/code] to actually display fog. </member> <member name="fog_height_curve" type="float" setter="set_fog_height_curve" getter="get_fog_height_curve" default="1.0"> - Value defining the fog height intensity. + The height fog's intensity. A number of presets are available in the [b]Inspector[/b] by right-clicking the curve. </member> <member name="fog_height_enabled" type="bool" setter="set_fog_height_enabled" getter="is_fog_height_enabled" default="false"> - Enables the fog height. + If [code]true[/code], the height fog effect is enabled. When enabled, fog will appear in a defined height range, regardless of the distance from the camera. This can be used to simulate "deep water" effects with a lower performance cost compared to a dedicated shader. </member> <member name="fog_height_max" type="float" setter="set_fog_height_max" getter="get_fog_height_max" default="0.0"> The Y coordinate where the height fog will be the most intense. If this value is greater than [member fog_height_min], fog will be displayed from bottom to top. Otherwise, it will be displayed from top to bottom. @@ -165,131 +168,151 @@ The Y coordinate where the height fog will be the least intense. If this value is greater than [member fog_height_max], fog will be displayed from top to bottom. Otherwise, it will be displayed from bottom to top. </member> <member name="fog_sun_amount" type="float" setter="set_fog_sun_amount" getter="get_fog_sun_amount" default="0.0"> - Amount of sun that affects the fog rendering. + The intensity of the depth fog color transition when looking towards the sun. The sun's direction is determined automatically using the DirectionalLight node in the scene. </member> <member name="fog_sun_color" type="Color" setter="set_fog_sun_color" getter="get_fog_sun_color" default="Color( 1, 0.9, 0.7, 1 )"> - Sun [Color]. + The depth fog's [Color] when looking towards the sun. </member> <member name="fog_transmit_curve" type="float" setter="set_fog_transmit_curve" getter="get_fog_transmit_curve" default="1.0"> - Amount of light that the fog transmits. + The intensity of the fog light transmittance effect. Amount of light that the fog transmits. </member> <member name="fog_transmit_enabled" type="bool" setter="set_fog_transmit_enabled" getter="is_fog_transmit_enabled" default="false"> - Enables fog's light transmission. If enabled, lets reflections light to be transmitted by the fog. + Enables fog's light transmission effect. If [code]true[/code], light will be more visible in the fog to simulate light scattering as in real life. </member> <member name="glow_bicubic_upscale" type="bool" setter="set_glow_bicubic_upscale" getter="is_glow_bicubic_upscale_enabled" default="false"> - Smooths out blockiness created by sampling higher levels. + Smooths out the blockiness created by sampling higher levels, at the cost of performance. + [b]Note:[/b] Only available when using the GLES3 renderer. </member> <member name="glow_blend_mode" type="int" setter="set_glow_blend_mode" getter="get_glow_blend_mode" enum="Environment.GlowBlendMode" default="2"> - Glow blending mode. + The glow blending mode. </member> <member name="glow_bloom" type="float" setter="set_glow_bloom" getter="get_glow_bloom" default="0.0"> - Bloom value (global glow). + The bloom's intensity. If set to a value higher than [code]0[/code], this will make glow visible in areas darker than the [member glow_hdr_threshold]. </member> <member name="glow_enabled" type="bool" setter="set_glow_enabled" getter="is_glow_enabled" default="false"> - Enables glow rendering. + If [code]true[/code], the glow effect is enabled. </member> <member name="glow_hdr_luminance_cap" type="float" setter="set_glow_hdr_luminance_cap" getter="get_glow_hdr_luminance_cap" default="12.0"> + The higher threshold of the HDR glow. Areas brighter than this threshold will be clamped for the purposes of the glow effect. </member> <member name="glow_hdr_scale" type="float" setter="set_glow_hdr_bleed_scale" getter="get_glow_hdr_bleed_scale" default="2.0"> - Bleed scale of the HDR glow. + The bleed scale of the HDR glow. </member> <member name="glow_hdr_threshold" type="float" setter="set_glow_hdr_bleed_threshold" getter="get_glow_hdr_bleed_threshold" default="1.0"> - Bleed threshold of the HDR glow. In GLES2, this needs to be below 1.0 in order for glow to be visible, a default value of 0.9 works well. + The lower threshold of the HDR glow. When using the GLES2 renderer (which doesn't support HDR), this needs to be below [code]1.0[/code] for glow to be visible. A value of [code]0.9[/code] works well in this case. </member> <member name="glow_intensity" type="float" setter="set_glow_intensity" getter="get_glow_intensity" default="0.8"> - Glow intensity. In GLES2, this should be increased to 1.5 by default to compensate for not using HDR. + The glow intensity. When using the GLES2 renderer, this should be increased to 1.5 to compensate for the lack of HDR rendering. </member> <member name="glow_levels/1" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> - First level of glow (most local). + If [code]true[/code], the 1st level of glow is enabled. This is the most "local" level (least blurry). </member> <member name="glow_levels/2" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> - Second level of glow. + If [code]true[/code], the 2th level of glow is enabled. </member> <member name="glow_levels/3" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="true"> - Third level of glow. + If [code]true[/code], the 3th level of glow is enabled. </member> <member name="glow_levels/4" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> - Fourth level of glow. + If [code]true[/code], the 4th level of glow is enabled. </member> <member name="glow_levels/5" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="true"> - Fifth level of glow. + If [code]true[/code], the 5th level of glow is enabled. </member> <member name="glow_levels/6" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> - Sixth level of glow. + If [code]true[/code], the 6th level of glow is enabled. </member> <member name="glow_levels/7" type="bool" setter="set_glow_level" getter="is_glow_level_enabled" default="false"> - Seventh level of glow (most global). + If [code]true[/code], the 7th level of glow is enabled. This is the most "global" level (blurriest). </member> <member name="glow_strength" type="float" setter="set_glow_strength" getter="get_glow_strength" default="1.0"> - Glow strength. In GLES2, this should be increased to 1.3 by default to compensate for not using HDR. + The glow strength. When using the GLES2 renderer, this should be increased to 1.3 to compensate for the lack of HDR rendering. </member> <member name="ss_reflections_depth_tolerance" type="float" setter="set_ssr_depth_tolerance" getter="get_ssr_depth_tolerance" default="0.2"> + The depth tolerance for screen-space reflections. </member> <member name="ss_reflections_enabled" type="bool" setter="set_ssr_enabled" getter="is_ssr_enabled" default="false"> + If [code]true[/code], screen-space reflections are enabled. Screen-space reflections are more accurate than reflections from [GIProbe]s or [ReflectionProbe]s, but are slower and can't reflect surfaces occluded by others. </member> <member name="ss_reflections_fade_in" type="float" setter="set_ssr_fade_in" getter="get_ssr_fade_in" default="0.15"> + The fade-in distance for screen-space reflections. Affects the area from the reflected material to the screen-space reflection). </member> <member name="ss_reflections_fade_out" type="float" setter="set_ssr_fade_out" getter="get_ssr_fade_out" default="2.0"> + The fade-out distance for screen-space reflections. Affects the area from the screen-space reflection to the "global" reflection. </member> <member name="ss_reflections_max_steps" type="int" setter="set_ssr_max_steps" getter="get_ssr_max_steps" default="64"> + The maximum number of steps for screen-space reflections. Higher values are slower. </member> <member name="ss_reflections_roughness" type="bool" setter="set_ssr_rough" getter="is_ssr_rough" default="true"> + If [code]true[/code], screen-space reflections will take the material roughness into account. </member> <member name="ssao_ao_channel_affect" type="float" setter="set_ssao_ao_channel_affect" getter="get_ssao_ao_channel_affect" default="0.0"> + The screen-space ambient occlusion intensity on materials that have an AO texture defined. Values higher than [code]0[/code] will make the SSAO effect visible in areas darkened by AO textures. </member> <member name="ssao_bias" type="float" setter="set_ssao_bias" getter="get_ssao_bias" default="0.01"> + The screen-space ambient occlusion bias. This should be kept high enough to prevent "smooth" curves from being affected by ambient occlusion. </member> <member name="ssao_blur" type="int" setter="set_ssao_blur" getter="get_ssao_blur" enum="Environment.SSAOBlur" default="3"> + The screen-space ambient occlusion blur quality. See [enum SSAOBlur] for possible values. </member> <member name="ssao_color" type="Color" setter="set_ssao_color" getter="get_ssao_color" default="Color( 0, 0, 0, 1 )"> + The screen-space ambient occlusion color. </member> <member name="ssao_edge_sharpness" type="float" setter="set_ssao_edge_sharpness" getter="get_ssao_edge_sharpness" default="4.0"> + The screen-space ambient occlusion edge sharpness. </member> <member name="ssao_enabled" type="bool" setter="set_ssao_enabled" getter="is_ssao_enabled" default="false"> + If [code]true[/code], the screen-space ambient occlusion effect is enabled. This is a costly effect and should be disabled first when having performance issues. </member> <member name="ssao_intensity" type="float" setter="set_ssao_intensity" getter="get_ssao_intensity" default="1.0"> + The primary screen-space ambient occlusion intensity. See also [member ssao_radius]. </member> <member name="ssao_intensity2" type="float" setter="set_ssao_intensity2" getter="get_ssao_intensity2" default="1.0"> + The secondary screen-space ambient occlusion intensity. See also [member ssao_radius2]. </member> <member name="ssao_light_affect" type="float" setter="set_ssao_direct_light_affect" getter="get_ssao_direct_light_affect" default="0.0"> + The screen-space ambient occlusion intensity in direct light. In real life, ambient occlusion only applies to indirect light, which means its effects can't be seen in direct light. Values higher than [code]0[/code] will make the SSAO effect visible in direct light. </member> <member name="ssao_quality" type="int" setter="set_ssao_quality" getter="get_ssao_quality" enum="Environment.SSAOQuality" default="1"> + The screen-space ambient occlusion quality. Higher qualities will make better use of small objects for ambient occlusion, but are slower. </member> <member name="ssao_radius" type="float" setter="set_ssao_radius" getter="get_ssao_radius" default="1.0"> + The primary screen-space ambient occlusion radius. </member> <member name="ssao_radius2" type="float" setter="set_ssao_radius2" getter="get_ssao_radius2" default="0.0"> + The secondary screen-space ambient occlusion radius. If set to a value higher than [code]0[/code], enables the secondary screen-space ambient occlusion effect which can be used to improve the effect's appearance (at the cost of performance). </member> <member name="tonemap_exposure" type="float" setter="set_tonemap_exposure" getter="get_tonemap_exposure" default="1.0"> - Default exposure for tonemap. + The default exposure used for tonemapping. </member> <member name="tonemap_mode" type="int" setter="set_tonemapper" getter="get_tonemapper" enum="Environment.ToneMapper" default="0"> - Tonemapping mode. + The tonemapping mode to use. Tonemapping is the process that "converts" HDR values to be suitable for rendering on a LDR display. (Godot doesn't support rendering on HDR displays yet.) </member> <member name="tonemap_white" type="float" setter="set_tonemap_white" getter="get_tonemap_white" default="1.0"> - White reference value for tonemap. + The white reference value for tonemapping. Only effective if the [member tonemap_mode] isn't set to [constant TONE_MAPPER_LINEAR]. </member> </members> <constants> <constant name="BG_KEEP" value="5" enum="BGMode"> - Keep on screen every pixel drawn in the background. + Keeps on screen every pixel drawn in the background. This is the fastest background mode, but it can only be safely used in fully-interior scenes (no visible sky or sky reflections). If enabled in a scene where the background is visible, "ghost trail" artifacts will be visible when moving the camera. </constant> <constant name="BG_CLEAR_COLOR" value="0" enum="BGMode"> - Clear the background using the project's clear color. + Clears the background using the clear color defined in [member ProjectSettings.rendering/environment/default_clear_color]. </constant> <constant name="BG_COLOR" value="1" enum="BGMode"> - Clear the background using a custom clear color. + Clears the background using a custom clear color. </constant> <constant name="BG_SKY" value="2" enum="BGMode"> - Display a user-defined sky in the background. + Displays a user-defined sky in the background. </constant> <constant name="BG_COLOR_SKY" value="3" enum="BGMode"> - Clear the background using a custom clear color and allows defining a sky for shading and reflection. + Clears the background using a custom clear color and allows defining a sky for shading and reflection. This mode is slightly faster than [constant BG_SKY] and should be preferred in scenes where reflections can be visible, but the sky itself never is (e.g. top-down camera). </constant> <constant name="BG_CANVAS" value="4" enum="BGMode"> - Display a [CanvasLayer] in the background. + Displays a [CanvasLayer] in the background. </constant> <constant name="BG_CAMERA_FEED" value="6" enum="BGMode"> - Display a camera feed in the background. + Displays a camera feed in the background. </constant> <constant name="BG_MAX" value="7" enum="BGMode"> Represents the size of the [enum BGMode] enum. @@ -301,10 +324,10 @@ Screen glow blending mode. Increases brightness, used frequently with bloom. </constant> <constant name="GLOW_BLEND_MODE_SOFTLIGHT" value="2" enum="GlowBlendMode"> - Soft light glow blending mode. Modifies contrast, exposes shadows and highlights, vivid bloom. + Soft light glow blending mode. Modifies contrast, exposes shadows and highlights (vivid bloom). </constant> <constant name="GLOW_BLEND_MODE_REPLACE" value="3" enum="GlowBlendMode"> - Replace glow blending mode. Replaces all pixels' color by the glow value. + Replace glow blending mode. Replaces all pixels' color by the glow value. This can be used to simulate a full-screen blur effect by tweaking the glow parameters to match the original image's brightness. </constant> <constant name="TONE_MAPPER_LINEAR" value="0" enum="ToneMapper"> Linear tonemapper operator. Reads the linear data and passes it on unmodified. @@ -319,27 +342,34 @@ Academy Color Encoding System tonemapper operator. </constant> <constant name="DOF_BLUR_QUALITY_LOW" value="0" enum="DOFBlurQuality"> - Low depth-of-field blur quality. + Low depth-of-field blur quality (fastest). </constant> <constant name="DOF_BLUR_QUALITY_MEDIUM" value="1" enum="DOFBlurQuality"> Medium depth-of-field blur quality. </constant> <constant name="DOF_BLUR_QUALITY_HIGH" value="2" enum="DOFBlurQuality"> - High depth-of-field blur quality. + High depth-of-field blur quality (slowest). </constant> <constant name="SSAO_BLUR_DISABLED" value="0" enum="SSAOBlur"> + No blur for the screen-space ambient occlusion effect (fastest). </constant> <constant name="SSAO_BLUR_1x1" value="1" enum="SSAOBlur"> + 1×1 blur for the screen-space ambient occlusion effect. </constant> <constant name="SSAO_BLUR_2x2" value="2" enum="SSAOBlur"> + 2×2 blur for the screen-space ambient occlusion effect. </constant> <constant name="SSAO_BLUR_3x3" value="3" enum="SSAOBlur"> + 3×3 blur for the screen-space ambient occlusion effect (slowest). </constant> <constant name="SSAO_QUALITY_LOW" value="0" enum="SSAOQuality"> + Low quality for the screen-space ambient occlusion effect (fastest). </constant> <constant name="SSAO_QUALITY_MEDIUM" value="1" enum="SSAOQuality"> + Low quality for the screen-space ambient occlusion effect. </constant> <constant name="SSAO_QUALITY_HIGH" value="2" enum="SSAOQuality"> + Low quality for the screen-space ambient occlusion effect (slowest). </constant> </constants> </class> diff --git a/doc/classes/GraphEdit.xml b/doc/classes/GraphEdit.xml index 80e9b152ef..802134d3b6 100644 --- a/doc/classes/GraphEdit.xml +++ b/doc/classes/GraphEdit.xml @@ -87,6 +87,8 @@ <return type="HBoxContainer"> </return> <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 it's children use their [member CanvasItem.visible] property instead. </description> </method> <method name="is_node_connected"> @@ -158,6 +160,7 @@ <argument index="4" name="amount" type="float"> </argument> <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"> @@ -192,12 +195,12 @@ <signals> <signal name="_begin_node_move"> <description> - Signal sent at the beginning of a GraphNode movement. + Emitted at the beginning of a GraphNode movement. </description> </signal> <signal name="_end_node_move"> <description> - Signal sent at the end of a GraphNode movement. + Emitted at the end of a GraphNode movement. </description> </signal> <signal name="connection_from_empty"> @@ -208,7 +211,7 @@ <argument index="2" name="release_position" type="Vector2"> </argument> <description> - Signal sent when user dragging connection from input port into empty space of the graph. + Emitted when user dragging connection from input port into empty space of the graph. </description> </signal> <signal name="connection_request"> @@ -221,7 +224,7 @@ <argument index="3" name="to_slot" type="int"> </argument> <description> - Signal sent 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. + 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"> @@ -232,17 +235,17 @@ <argument index="2" name="release_position" type="Vector2"> </argument> <description> - Signal sent when user dragging connection from output port into empty space of the graph. + Emitted when user dragging connection from output port into empty space of the graph. </description> </signal> <signal name="copy_nodes_request"> <description> - Signal sent when the user presses [code]Ctrl + C[/code]. + Emitted when the user presses [code]Ctrl + C[/code]. </description> </signal> <signal name="delete_nodes_request"> <description> - Signal sent when a GraphNode is attempted to be removed from the GraphEdit. + Emitted when a GraphNode is attempted to be removed from the GraphEdit. </description> </signal> <signal name="disconnection_request"> @@ -272,7 +275,7 @@ </signal> <signal name="paste_nodes_request"> <description> - Signal sent when the user presses [code]Ctrl + V[/code]. + Emitted when the user presses [code]Ctrl + V[/code]. </description> </signal> <signal name="popup_request"> @@ -286,6 +289,7 @@ <argument index="0" name="ofs" type="Vector2"> </argument> <description> + Emitted when the scroll offset is changed by the user. It will not be emitted when changed in code. </description> </signal> </signals> @@ -314,6 +318,10 @@ </theme_item> <theme_item name="reset" type="Texture"> </theme_item> + <theme_item name="selection_fill" type="Color" default="Color( 1, 1, 1, 0.3 )"> + </theme_item> + <theme_item name="selection_stroke" type="Color" default="Color( 1, 1, 1, 0.8 )"> + </theme_item> <theme_item name="snap" type="Texture"> </theme_item> </theme_items> diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index 8470a346ff..8fda9c20a5 100644 --- a/doc/classes/GraphNode.xml +++ b/doc/classes/GraphNode.xml @@ -5,6 +5,7 @@ </brief_description> <description> A GraphNode is a container defined by a title. It can have one or more input and output slots, which can be enabled (shown) or disabled (not shown) and have different (incompatible) types. Colors can also be assigned to slots. A tuple of input and output slots is defined for each GUI element included in the GraphNode. Input and output connections are left and right slots, but only enabled slots are counted as connections. + To add a slot to GraphNode, add any [Control]-derived child node to it. </description> <tutorials> </tutorials> @@ -169,6 +170,12 @@ <argument index="8" name="custom_right" type="Texture" default="null"> </argument> <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. + [code]type_left[/code]/[code]right[/code] is an arbitrary type of the port. Only ports with the same type values can be connected. + [code]color_left[/code]/[code]right[/code] is the tint of the port's icon on this side. + [code]custom_left[/code]/[code]right[/code] is a custom texture for this side's port. + [b]Note:[/b] This method only sets properties of the slot. To create the slot, add a [Control]-derived child to the GraphNode. </description> </method> </methods> @@ -181,20 +188,27 @@ [b]Note:[/b] You cannot use position directly, as [GraphEdit] is a [Container]. </member> <member name="overlay" type="int" setter="set_overlay" getter="get_overlay" enum="GraphNode.Overlay" default="0"> + Sets the overlay shown above the GraphNode. See [enum Overlay]. </member> <member name="resizable" type="bool" setter="set_resizable" getter="is_resizable" default="false"> + If [code]true[/code], the user can resize the GraphNode. + [b]Note:[/b] Dragging the handle will only trigger the [signal resize_request] signal, the GraphNode needs to be resized manually. </member> <member name="selected" type="bool" setter="set_selected" getter="is_selected" default="false"> + If [code]true[/code], the GraphNode is selected. </member> <member name="show_close" type="bool" setter="set_show_close_button" getter="is_close_button_visible" default="false"> + If [code]true[/code], the close button will be visible. + [b]Note:[/b] Pressing it will only trigger the [signal close_request] signal, the GraphNode needs to be removed manually. </member> <member name="title" type="String" setter="set_title" getter="get_title" default=""""> + The text displayed in the GraphNode's title bar. </member> </members> <signals> <signal name="close_request"> <description> - Signal sent on closing the GraphNode. + Emitted when the GraphNode is requested to be closed. Happens on clicking the close button (see [member show_close]). </description> </signal> <signal name="dragged"> @@ -203,32 +217,36 @@ <argument index="1" name="to" type="Vector2"> </argument> <description> - Signal sent when the GraphNode is dragged. + Emitted when the GraphNode is dragged. </description> </signal> <signal name="offset_changed"> <description> - Signal sent when the GraphNode is moved. + Emitted when the GraphNode is moved. </description> </signal> <signal name="raise_request"> <description> - Signal sent when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode. + Emitted when the GraphNode is requested to be displayed over other ones. Happens on focusing (clicking into) the GraphNode. </description> </signal> <signal name="resize_request"> <argument index="0" name="new_minsize" type="Vector2"> </argument> <description> + Emitted when the GraphNode is requested to be resized. Happens on dragging the resizer handle (see [member resizable]). </description> </signal> </signals> <constants> <constant name="OVERLAY_DISABLED" value="0" enum="Overlay"> + No overlay is shown. </constant> <constant name="OVERLAY_BREAKPOINT" value="1" enum="Overlay"> + Show overlay set in the [code]breakpoint[/code] theme property. </constant> <constant name="OVERLAY_POSITION" value="2" enum="Overlay"> + Show overlay set in the [code]position[/code] theme property. </constant> </constants> <theme_items> diff --git a/doc/classes/HSlider.xml b/doc/classes/HSlider.xml index 2fef4669d2..4e7d9bc9f3 100644 --- a/doc/classes/HSlider.xml +++ b/doc/classes/HSlider.xml @@ -13,20 +13,14 @@ <constants> </constants> <theme_items> - <theme_item name="focus" type="StyleBox"> - </theme_item> <theme_item name="grabber" type="Texture"> </theme_item> <theme_item name="grabber_area" type="StyleBox"> </theme_item> <theme_item name="grabber_disabled" type="Texture"> </theme_item> - <theme_item name="grabber_disabled" type="StyleBox"> - </theme_item> <theme_item name="grabber_highlight" type="Texture"> </theme_item> - <theme_item name="grabber_highlight" type="StyleBox"> - </theme_item> <theme_item name="slider" type="StyleBox"> </theme_item> <theme_item name="tick" type="Texture"> diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index 52e4b94051..3a63b2dc07 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -79,7 +79,7 @@ <return type="int" enum="HTTPClient.Status"> </return> <description> - Returns a [code]STATUS_*[/code] enum constant. Need to call [method poll] in order to get status updates. + Returns a [enum Status] constant. Need to call [method poll] in order to get status updates. </description> </method> <method name="has_response" qualifiers="const"> @@ -112,13 +112,13 @@ Generates a GET/POST application/x-www-form-urlencoded style query string from a provided dictionary, e.g.: [codeblock] var fields = {"username": "user", "password": "pass"} - String query_string = http_client.query_string_from_dict(fields) + var query_string = http_client.query_string_from_dict(fields) # Returns "username=user&password=pass" [/codeblock] Furthermore, if a key has a [code]null[/code] value, only the key itself is added, without equal sign and value. If the value is an array, for each value in it a pair with the same key is added. [codeblock] var fields = {"single": 123, "not_valued": null, "multiple": [22, 33, 44]} - String query_string = http_client.query_string_from_dict(fields) + var query_string = http_client.query_string_from_dict(fields) # Returns "single=123&not_valued&multiple=22&multiple=33&multiple=44" [/codeblock] </description> @@ -143,7 +143,7 @@ </argument> <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]. - Headers are HTTP request headers. For available HTTP methods, see [code]METHOD_*[/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: [codeblock] var fields = {"username" : "user", "password" : "pass"} @@ -166,19 +166,10 @@ </argument> <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]. - Headers are HTTP request headers. For available HTTP methods, see [code]METHOD_*[/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> </method> - <method name="set_read_chunk_size"> - <return type="void"> - </return> - <argument index="0" name="bytes" type="int"> - </argument> - <description> - Sets the size of the buffer used and maximum bytes to read per iteration. See [method read_response_body_chunk]. - </description> - </method> </methods> <members> <member name="blocking_mode_enabled" type="bool" setter="set_blocking_mode" getter="is_blocking_mode_enabled" default="false"> @@ -187,6 +178,9 @@ <member name="connection" type="StreamPeer" setter="set_connection" getter="get_connection"> The connection to use for this client. </member> + <member name="read_chunk_size" type="int" setter="set_read_chunk_size" getter="get_read_chunk_size" default="4096"> + The size of the buffer used and maximum bytes to read per iteration. See [method read_response_body_chunk]. + </member> </members> <constants> <constant name="METHOD_GET" value="0" enum="Method"> diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index d0e8a5972f..748ed504c3 100644 --- a/doc/classes/HTTPRequest.xml +++ b/doc/classes/HTTPRequest.xml @@ -6,6 +6,27 @@ <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]Example of contacting a REST API and printing one of its returned fields:[/b] + [codeblock] + func _ready(): + # Create an HTTP request node and connect its completion signal. + var http_request = HTTPRequest.new() + add_child(http_request) + http_request.connect("request_completed", self, "_http_request_completed") + + # Perform the HTTP request. The URL below returns some JSON as of writing. + var error = http_request.request("https://httpbin.org/get") + if error != OK: + push_error("An error occurred in the HTTP request.") + + + # Called when the HTTP request is completed. + func _http_request_completed(result, response_code, headers, body): + var response = parse_json(body.get_string_from_utf8()) + + # Will print the user agent string used by the HTTPRequest node (as recognized by httpbin.org). + print(response.headers["User-Agent"]) + [/codeblock] [b]Example of loading and displaying an image using HTTPRequest:[/b] [codeblock] func _ready(): @@ -67,7 +88,7 @@ <return type="int" enum="HTTPClient.Status"> </return> <description> - Returns the current status of the underlying [HTTPClient]. See [code]STATUS_*[/code] enum on [HTTPClient]. + Returns the current status of the underlying [HTTPClient]. See [enum HTTPClient.Status]. </description> </method> <method name="request"> @@ -93,6 +114,10 @@ <member name="body_size_limit" type="int" setter="set_body_size_limit" getter="get_body_size_limit" default="-1"> Maximum allowed size for response bodies. </member> + <member name="download_chunk_size" type="int" setter="set_download_chunk_size" getter="get_download_chunk_size" default="4096"> + The size of the buffer used and maximum bytes to read per iteration. See [member HTTPClient.read_chunk_size]. + Set this to a higher value (e.g. 65536 for 64 KiB) when downloading large files to achieve better speeds at the cost of memory. + </member> <member name="download_file" type="String" setter="set_download_file" getter="get_download_file" default=""""> The file to download into. Will output any received file into it. </member> diff --git a/doc/classes/IP.xml b/doc/classes/IP.xml index b8b5f0bd39..bfc645b8e7 100644 --- a/doc/classes/IP.xml +++ b/doc/classes/IP.xml @@ -65,7 +65,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns a queued hostname's status as a [code]RESOLVER_STATUS_*[/code] constant, given its queue [code]id[/code]. + Returns a queued hostname's status as a [enum ResolverStatus] constant, given its queue [code]id[/code]. </description> </method> <method name="resolve_hostname"> @@ -76,7 +76,7 @@ <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3"> </argument> <description> - Returns a given hostname's IPv4 or IPv6 address when resolved (blocking-type method). The address type returned depends on the [code]TYPE_*[/code] constant given as [code]ip_type[/code]. + 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_queue_item"> @@ -87,7 +87,7 @@ <argument index="1" name="ip_type" type="int" enum="IP.Type" default="3"> </argument> <description> - Creates a queue item to resolve a hostname to an IPv4 or IPv6 address depending on the [code]TYPE_*[/code] constant given as [code]ip_type[/code]. Returns the queue ID if successful, or [constant RESOLVER_INVALID_ID] on error. + 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> </method> </methods> diff --git a/doc/classes/Image.xml b/doc/classes/Image.xml index c6d63035d1..0303585120 100644 --- a/doc/classes/Image.xml +++ b/doc/classes/Image.xml @@ -90,7 +90,7 @@ <argument index="2" name="lossy_quality" type="float"> </argument> <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 [code]COMPRESS_*[/code] constants. + 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="convert"> @@ -99,7 +99,7 @@ <argument index="0" name="format" type="int" enum="Image.Format"> </argument> <description> - Converts the image's format. See [code]FORMAT_*[/code] constants. + Converts the image's format. See [enum Format] constants. </description> </method> <method name="copy_from"> @@ -123,7 +123,7 @@ <argument index="3" name="format" type="int" enum="Image.Format"> </argument> <description> - Creates an empty image of given size and format. See [code]FORMAT_*[/code] constants. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps]. + 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"> @@ -140,7 +140,7 @@ <argument index="4" name="data" type="PoolByteArray"> </argument> <description> - Creates a new image of given size and format. See [code]FORMAT_*[/code] constants. Fills the image with the given raw data. If [code]use_mipmaps[/code] is [code]true[/code] then generate mipmaps for this image. See the [method generate_mipmaps]. + 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 generate mipmaps for this image. See the [method generate_mipmaps]. </description> </method> <method name="crop"> @@ -165,7 +165,7 @@ <return type="int" enum="Image.AlphaMode"> </return> <description> - Returns ALPHA_BLEND if the image has data for alpha values. Returns ALPHA_BIT if all the alpha values are below a certain threshold or the maximum value. Returns ALPHA_NONE if no data for alpha values is found. + Returns [constant ALPHA_BLEND] if the image has data for alpha values. Returns [constant ALPHA_BIT] if all the alpha values are below a certain threshold or the maximum value. Returns [constant ALPHA_NONE] if no data for alpha values is found. </description> </method> <method name="expand_x2_hq2x"> @@ -225,7 +225,7 @@ <return type="int" enum="Image.Format"> </return> <description> - Returns the image's format. See [code]FORMAT_*[/code] constants. + Returns the image's format. See [enum Format] constants. </description> </method> <method name="get_height" qualifiers="const"> @@ -491,7 +491,7 @@ </methods> <members> <member name="data" type="Dictionary" setter="_set_data" getter="_get_data" default="{"data": PoolByteArray( ),"format": "Lum8","height": 0,"mipmaps": false,"width": 0}"> - Holds all of the image's color data in a given format. See [code]FORMAT_*[/code] constants. + Holds all of the image's color data in a given format. See [enum Format] constants. </member> </members> <constants> diff --git a/doc/classes/ImmediateGeometry.xml b/doc/classes/ImmediateGeometry.xml index ddfd3d74d5..416128c9b1 100644 --- a/doc/classes/ImmediateGeometry.xml +++ b/doc/classes/ImmediateGeometry.xml @@ -30,7 +30,7 @@ <argument index="0" name="position" type="Vector3"> </argument> <description> - Adds a vertex with the currently set color/uv/etc. + Adds a vertex in local coordinate space with the currently set color/uv/etc. </description> </method> <method name="begin"> @@ -41,8 +41,8 @@ <argument index="1" name="texture" type="Texture" default="null"> </argument> <description> - Begin drawing (And optionally pass a texture override). When done call end(). For more information on how this works, search for glBegin() glEnd() references. - For the type of primitive, use the [Mesh].[code]PRIMITIVE_*[/code] enumerations. + Begin drawing (and optionally pass a texture override). When done call [method end]. For more information on how this works, search for [code]glBegin()[/code] and [code]glEnd()[/code] references. + For the type of primitive, see the [enum Mesh.PrimitiveType] enum. </description> </method> <method name="clear"> diff --git a/doc/classes/Input.xml b/doc/classes/Input.xml index 6d4adfad51..3f94ad2d2c 100644 --- a/doc/classes/Input.xml +++ b/doc/classes/Input.xml @@ -314,7 +314,7 @@ <argument index="2" name="hotspot" type="Vector2" default="Vector2( 0, 0 )"> </argument> <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 [code]CURSOR_*[/code] for the list of shapes. + 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. [code]hotspot[/code] must be within [code]image[/code]'s size. [b]Note:[/b] [AnimatedTexture]s aren't supported as custom mouse cursors. If using an [AnimatedTexture], only the first frame will be displayed. diff --git a/doc/classes/InputEvent.xml b/doc/classes/InputEvent.xml index d412ce09e2..ccb5c5400a 100644 --- a/doc/classes/InputEvent.xml +++ b/doc/classes/InputEvent.xml @@ -111,6 +111,7 @@ <members> <member name="device" type="int" setter="set_device" getter="get_device" default="0"> The event's device ID. + [b]Note:[/b] This device ID will always be [code]-1[/code] for emulated mouse input from a touchscreen. This can be used to distinguish emulated mouse input from physical mouse input. </member> </members> <constants> diff --git a/doc/classes/ItemList.xml b/doc/classes/ItemList.xml index c82d6a27c0..51d13627ad 100644 --- a/doc/classes/ItemList.xml +++ b/doc/classes/ItemList.xml @@ -6,6 +6,7 @@ <description> This control provides a selectable list of items that may be in a single (or multiple columns) with option of text, icons, or both text and icon. Tooltips are supported and may be different for every item in the list. Selectable items in the list may be selected or deselected and multiple selection may be enabled. Selection with right mouse button may also be enabled to allow use of popup context menus. Items may also be "activated" by double-clicking them or by pressing Enter. + Item text only supports single-line strings, newline characters (e.g. [code]\n[/code]) in the string won't produce a newline. Text wrapping is enabled in [constant ICON_MODE_TOP] mode, but column's width is adjusted to fully fit its content by default. You need to set [member fixed_column_width] greater than zero to wrap the text. </description> <tutorials> </tutorials> @@ -57,7 +58,8 @@ <argument index="1" name="exact" type="bool" default="false"> </argument> <description> - Given a position within the control return the item (if any) at that point. + 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"> @@ -109,6 +111,7 @@ <argument index="0" name="idx" type="int"> </argument> <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_metadata" qualifiers="const"> @@ -174,6 +177,7 @@ <argument index="0" name="idx" type="int"> </argument> <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"> @@ -307,6 +311,7 @@ <argument index="1" name="rect" type="Rect2"> </argument> <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"> @@ -314,9 +319,10 @@ </return> <argument index="0" name="idx" type="int"> </argument> - <argument index="1" name="rect" type="bool"> + <argument index="1" name="transposed" type="bool"> </argument> <description> + Sets whether the item icon will be drawn transposed. </description> </method> <method name="set_item_metadata"> @@ -409,26 +415,33 @@ If [code]true[/code], the control will automatically resize the height to fit its content. </member> <member name="fixed_column_width" type="int" setter="set_fixed_column_width" getter="get_fixed_column_width" default="0"> - Sets the default column width in pixels. If left to default value, each item will have a width equal to the width of its content and the columns will have an uneven width. + The width all columns will be adjusted to. + A value of zero disables the adjustment, each item will have a width equal to the width of its content and the columns will have an uneven width. </member> <member name="fixed_icon_size" type="Vector2" setter="set_fixed_icon_size" getter="get_fixed_icon_size" default="Vector2( 0, 0 )"> - Sets the default icon size in pixels. + The size all icons will be adjusted to. + If either X or Y component is not greater than zero, icon size won't be affected. </member> <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" /> <member name="icon_mode" type="int" setter="set_icon_mode" getter="get_icon_mode" enum="ItemList.IconMode" default="1"> - Sets the default position of the icon to either [constant ICON_MODE_LEFT] or [constant ICON_MODE_TOP]. + The icon position, whether above or to the left of the text. See the [enum IconMode] constants. </member> <member name="icon_scale" type="float" setter="set_icon_scale" getter="get_icon_scale" default="1.0"> - Sets the icon size to its initial size multiplied by the specified scale. + The scale of icon applied after [member fixed_icon_size] and transposing takes effect. </member> <member name="max_columns" type="int" setter="set_max_columns" getter="get_max_columns" default="1"> - Sets the maximum columns the list will have. If set to anything other than the default, the content will be split among the specified columns. + Maximum columns the list will have. + If greater than zero, the content will be split among the specified columns. + A value of zero means unlimited columns, i.e. all items will be put in the same row. </member> <member name="max_text_lines" type="int" setter="set_max_text_lines" getter="get_max_text_lines" default="1"> + Maximum lines of text allowed in each item. Space will be reserved even when there is not enough lines of text to display. + [b]Note:[/b] This property takes effect only when [member icon_mode] is [constant ICON_MODE_TOP]. To make the text wrap, [member fixed_column_width] should be greater than zero. </member> <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" /> <member name="same_column_width" type="bool" setter="set_same_column_width" getter="is_same_column_width" default="false"> - If set to [code]true[/code], all columns will have the same width specified by [member fixed_column_width]. + Whether all columns will have the same width. + If [code]true[/code], the width is equal to the largest column width of all columns. </member> <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. @@ -486,8 +499,10 @@ </signals> <constants> <constant name="ICON_MODE_TOP" value="0" enum="IconMode"> + Icon is drawn above the text. </constant> <constant name="ICON_MODE_LEFT" value="1" enum="IconMode"> + Icon is drawn to the left of the text. </constant> <constant name="SELECT_SINGLE" value="0" enum="SelectMode"> Only allow selecting a single item. diff --git a/doc/classes/JSONParseResult.xml b/doc/classes/JSONParseResult.xml index 98db123f5b..01cffe6262 100644 --- a/doc/classes/JSONParseResult.xml +++ b/doc/classes/JSONParseResult.xml @@ -12,13 +12,13 @@ </methods> <members> <member name="error" type="int" setter="set_error" getter="get_error" enum="Error"> - The error type if the JSON source was not successfully parsed. See the [@GlobalScope] [code]ERR_*[/code] constants. + The error type if the JSON source was not successfully parsed. See the [enum Error] constants. </member> <member name="error_line" type="int" setter="set_error_line" getter="get_error_line" default="-1"> The line number where the error occurred if JSON source was not successfully parsed. </member> <member name="error_string" type="String" setter="set_error_string" getter="get_error_string" default=""""> - The error message if JSON source was not successfully parsed. See the [@GlobalScope] [code]ERR_*[/code] constants. + The error message if JSON source was not successfully parsed. See the [enum Error] constants. </member> <member name="result" type="Variant" setter="set_result" getter="get_result"> A [Variant] containing the parsed JSON. Use [method @GDScript.typeof] or the [code]is[/code] keyword to check if it is what you expect. For example, if the JSON source starts with curly braces ([code]{}[/code]), a [Dictionary] will be returned. If the JSON source starts with braces ([code][][/code]), an [Array] will be returned. diff --git a/doc/classes/KinematicBody.xml b/doc/classes/KinematicBody.xml index 2fab689f89..164932749f 100644 --- a/doc/classes/KinematicBody.xml +++ b/doc/classes/KinematicBody.xml @@ -18,6 +18,7 @@ <argument index="0" name="axis" type="int" enum="PhysicsServer.BodyAxis"> </argument> <description> + Returns [code]true[/code] if the specified [code]axis[/code] is locked. See also [member move_lock_x], [member move_lock_y] and [member move_lock_z]. </description> </method> <method name="get_floor_velocity" qualifiers="const"> @@ -125,7 +126,7 @@ </argument> <description> Moves the body while keeping it attached to slopes. Similar to [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](0, 0, 0)[/code] or by using [method move_and_slide] instead. + 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](0, 0, 0)[/code] or by using [method move_and_slide] instead. </description> </method> <method name="set_axis_lock"> @@ -136,6 +137,7 @@ <argument index="1" name="lock" type="bool"> </argument> <description> + Locks or unlocks the specified [code]axis[/code] depending on the value of [code]lock[/code]. See also [member move_lock_x], [member move_lock_y] and [member move_lock_z]. </description> </method> <method name="test_move"> diff --git a/doc/classes/KinematicCollision.xml b/doc/classes/KinematicCollision.xml index 44447c8fc8..46e4176e9f 100644 --- a/doc/classes/KinematicCollision.xml +++ b/doc/classes/KinematicCollision.xml @@ -16,7 +16,7 @@ The colliding body. </member> <member name="collider_id" type="int" setter="" getter="get_collider_id" default="0"> - The colliding body's unique [RID]. + The colliding body's unique instance ID. See [method Object.get_instance_id]. </member> <member name="collider_metadata" type="Variant" setter="" getter="get_collider_metadata"> The colliding body's metadata. See [Object]. diff --git a/doc/classes/KinematicCollision2D.xml b/doc/classes/KinematicCollision2D.xml index 51c2277fb2..4c9337f82d 100644 --- a/doc/classes/KinematicCollision2D.xml +++ b/doc/classes/KinematicCollision2D.xml @@ -16,7 +16,7 @@ The colliding body. </member> <member name="collider_id" type="int" setter="" getter="get_collider_id" default="0"> - The colliding body's unique [RID]. + The colliding body's unique instance ID. See [method Object.get_instance_id]. </member> <member name="collider_metadata" type="Variant" setter="" getter="get_collider_metadata"> The colliding body's metadata. See [Object]. diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index 4d1584e9de..9222611090 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -41,7 +41,7 @@ </methods> <members> <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 [code]ALIGN_*[/code] constants. + 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. @@ -67,7 +67,7 @@ If [code]true[/code], all the text displays as UPPERCASE. </member> <member name="valign" type="int" setter="set_valign" getter="get_valign" enum="Label.VAlign" default="0"> - Controls the text's vertical align. Supports top, center, bottom, and fill. Set it to one of the [code]VALIGN_*[/code] constants. + Controls the text's vertical align. Supports top, center, bottom, and fill. Set it to one of the [enum VAlign] constants. </member> <member name="visible_characters" type="int" setter="set_visible_characters" getter="get_visible_characters" default="-1"> Restricts the number of characters to display. Set to -1 to disable. diff --git a/doc/classes/Light2D.xml b/doc/classes/Light2D.xml index f61be5a5af..cdc0270269 100644 --- a/doc/classes/Light2D.xml +++ b/doc/classes/Light2D.xml @@ -26,7 +26,7 @@ The Light2D's energy value. The larger the value, the stronger the light. </member> <member name="mode" type="int" setter="set_mode" getter="get_mode" enum="Light2D.Mode" default="0"> - The Light2D's mode. See [code]MODE_*[/code] constants for values. + The Light2D's mode. See [enum Mode] constants for values. </member> <member name="offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2( 0, 0 )"> The offset of the Light2D's [code]texture[/code]. @@ -68,7 +68,7 @@ Smooth shadow gradient length. </member> <member name="shadow_item_cull_mask" type="int" setter="set_item_shadow_cull_mask" getter="get_item_shadow_cull_mask" default="1"> - The shadow mask. Used with [LightOccluder2D] to cast shadows. Only occluders with a matching shadow mask will cast shadows. + The shadow mask. Used with [LightOccluder2D] to cast shadows. Only occluders with a matching light mask will cast shadows. </member> <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> [Texture] used for the Light2D's appearance. diff --git a/doc/classes/Line2D.xml b/doc/classes/Line2D.xml index 3cb04b8b89..9eaf70711e 100644 --- a/doc/classes/Line2D.xml +++ b/doc/classes/Line2D.xml @@ -66,14 +66,17 @@ </method> </methods> <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. + </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 [code]LINE_CAP_*[/code] constants. + Controls the style of the line's first point. Use [enum LineCapMode] constants. </member> <member name="default_color" type="Color" setter="set_default_color" getter="get_default_color" default="Color( 0.4, 0.5, 1, 1 )"> The line's color. Will not be used if a gradient is set. </member> <member name="end_cap_mode" type="int" setter="set_end_cap_mode" getter="get_end_cap_mode" enum="Line2D.LineCapMode" default="0"> - Controls the style of the line's last point. Use [code]LINE_CAP_*[/code] constants. + Controls the style of the line's last point. Use [enum LineCapMode] constants. </member> <member name="gradient" type="Gradient" setter="set_gradient" getter="get_gradient"> The gradient is drawn through the whole line from start to finish. The default color will not be used if a gradient is set. @@ -94,7 +97,7 @@ The texture used for the line's texture. Uses [code]texture_mode[/code] for drawing style. </member> <member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="Line2D.LineTextureMode" default="0"> - The style to render the [code]texture[/code] on the line. Use [code]LINE_TEXTURE_*[/code] constants. + The style to render the [code]texture[/code] on the line. Use [enum LineTextureMode] constants. </member> <member name="width" type="float" setter="set_width" getter="get_width" default="10.0"> The line's width. diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index de216563d3..78459d2839 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -54,7 +54,7 @@ <argument index="0" name="option" type="int"> </argument> <description> - Executes a given action as defined in the[code]MENU_*[/code] enum. + Executes a given action as defined in the [enum MenuItems] enum. </description> </method> <method name="select"> @@ -84,7 +84,7 @@ </methods> <members> <member name="align" type="int" setter="set_align" getter="get_align" enum="LineEdit.Align" default="0"> - Text alignment as defined in the [code]ALIGN_*[/code] enum. + Text alignment as defined in the [enum Align] enum. </member> <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. diff --git a/doc/classes/Listener.xml b/doc/classes/Listener.xml index 130263a069..ae8c38198f 100644 --- a/doc/classes/Listener.xml +++ b/doc/classes/Listener.xml @@ -1,8 +1,11 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Listener" inherits="Spatial" category="Core" version="3.2"> <brief_description> + Overrides the location sounds are heard from. </brief_description> <description> + Once added to the scene tree and enabled using [method make_current], this node will override the location sounds are heard from. This can be used to listen from a location different from the [Camera]. + [b]Note:[/b] There is no 2D equivalent for this node yet. </description> <tutorials> </tutorials> @@ -11,24 +14,29 @@ <return type="void"> </return> <description> + Disables the listener to use the current camera's listener instead. </description> </method> <method name="get_listener_transform" qualifiers="const"> <return type="Transform"> </return> <description> + Returns the listener's global orthonormalized [Transform]. </description> </method> <method name="is_current" qualifiers="const"> <return type="bool"> </return> <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 Listener 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> <description> + Enables the listener. This will override the current camera's listener. </description> </method> </methods> diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index f7b3b0d7ea..d4804930e1 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -40,6 +40,14 @@ Generate a [TriangleMesh] from the mesh. </description> </method> + <method name="get_aabb" qualifiers="const"> + <return type="AABB"> + </return> + <description> + Returns the smallest [AABB] enclosing this mesh. Not affected by [code]custom_aabb[/code]. + [b]Note:[/b] This is only implemented for [ArrayMesh] and [PrimitiveMesh]. + </description> + </method> <method name="get_faces" qualifiers="const"> <return type="PoolVector3Array"> </return> diff --git a/doc/classes/MeshLibrary.xml b/doc/classes/MeshLibrary.xml index 44dc4f334f..49278be44e 100644 --- a/doc/classes/MeshLibrary.xml +++ b/doc/classes/MeshLibrary.xml @@ -4,7 +4,7 @@ Library of meshes. </brief_description> <description> - A library of meshes. Contains a list of [Mesh] resources, each with a name and ID. This resource is used in [GridMap]. + A library of meshes. Contains a list of [Mesh] resources, each with a name and ID. Each item can also include collision and navigation shapes. This resource is used in [GridMap]. </description> <tutorials> </tutorials> @@ -22,7 +22,8 @@ <argument index="0" name="id" type="int"> </argument> <description> - Create a new item in the library, supplied as an ID. + 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"> @@ -31,13 +32,14 @@ <argument index="0" name="name" type="String"> </argument> <description> + Returns the first item with the given name. </description> </method> <method name="get_item_list" qualifiers="const"> <return type="PoolIntArray"> </return> <description> - Returns the list of items. + Returns the list of item IDs in use. </description> </method> <method name="get_item_mesh" qualifiers="const"> @@ -46,7 +48,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns the mesh of the item. + Returns the item's mesh. </description> </method> <method name="get_item_name" qualifiers="const"> @@ -55,7 +57,7 @@ <argument index="0" name="id" type="int"> </argument> <description> - Returns the name of the item. + Returns the item's name. </description> </method> <method name="get_item_navmesh" qualifiers="const"> @@ -64,6 +66,7 @@ <argument index="0" name="id" type="int"> </argument> <description> + Returns the item's navigation mesh. </description> </method> <method name="get_item_navmesh_transform" qualifiers="const"> @@ -72,6 +75,7 @@ <argument index="0" name="id" type="int"> </argument> <description> + Returns the transform applied to the item's navigation mesh. </description> </method> <method name="get_item_preview" qualifiers="const"> @@ -90,6 +94,8 @@ <argument index="0" name="id" type="int"> </argument> <description> + Returns an item's collision shapes. + The array consists of each [Shape] followed by its [Transform]. </description> </method> <method name="get_last_unused_item_id" qualifiers="const"> @@ -128,6 +134,7 @@ </argument> <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"> @@ -138,6 +145,7 @@ <argument index="1" name="navmesh" type="NavigationMesh"> </argument> <description> + Sets the item's navigation mesh. </description> </method> <method name="set_item_navmesh_transform"> @@ -148,6 +156,7 @@ <argument index="1" name="navmesh" type="Transform"> </argument> <description> + Sets the transform to apply to the item's navigation mesh. </description> </method> <method name="set_item_preview"> @@ -158,6 +167,7 @@ <argument index="1" name="texture" type="Texture"> </argument> <description> + Sets a texture to use as the item's preview icon in the editor. </description> </method> <method name="set_item_shapes"> @@ -168,6 +178,8 @@ <argument index="1" name="shapes" type="Array"> </argument> <description> + Sets an item's collision shapes. + The array should consist of [Shape] objects, each followed by a [Transform] that will be applied to it. For shapes that should not have a transform, use [constant Transform.IDENTITY]. </description> </method> </methods> diff --git a/doc/classes/MultiMesh.xml b/doc/classes/MultiMesh.xml index 8a72aa155b..ec65f407cd 100644 --- a/doc/classes/MultiMesh.xml +++ b/doc/classes/MultiMesh.xml @@ -11,6 +11,7 @@ </description> <tutorials> <link>http://docs.godotengine.org/en/latest/tutorials/3d/vertex_animation/animating_thousands_of_fish.html</link> + <link>http://docs.godotengine.org/en/latest/tutorials/optimization/using_multimesh.html</link> </tutorials> <methods> <method name="get_aabb" qualifiers="const"> @@ -87,7 +88,7 @@ <argument index="1" name="custom_data" type="Color"> </argument> <description> - Sets custom data for a specific instance. Although [Color] is used, it is just a container for 4 numbers. + Sets custom data for a specific instance. Although [Color] is used, it is just a container for 4 floating point numbers. The format of the number can change depending on the [enum CustomDataFormat] used. </description> </method> <method name="set_instance_transform"> @@ -153,7 +154,7 @@ Use when you are not using per-instance custom data. </constant> <constant name="CUSTOM_DATA_8BIT" value="1" enum="CustomDataFormat"> - Compress custom_data into 8 bits when passing to shader. This uses less memory and can be faster, but loses precision. + Compress custom_data into 8 bits when passing to shader. This uses less memory and can be faster, but loses precision and range. Floats packed into 8 bits can only represent values between 0 and 1, numbers outside that range will be clamped. </constant> <constant name="CUSTOM_DATA_FLOAT" value="2" enum="CustomDataFormat"> The [Color] passed into [method set_instance_custom_data] will use 4 floats. Use this for highest precision. diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml index 5f8c7ed120..9cd3fe7bb4 100644 --- a/doc/classes/MultiplayerAPI.xml +++ b/doc/classes/MultiplayerAPI.xml @@ -92,7 +92,7 @@ [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 (see [code]NETWORK_MODE_*[/code] constants in [Node]), 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. + 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> <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. diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index cecbce90b3..e3f1165c55 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -129,6 +129,7 @@ child_node.get_parent().remove_child(child_node) add_child(child_node) [/codeblock] + [b]Note:[/b] If you want a child to be persisted to a [PackedScene], you must set [member owner] in addition to calling [method add_child]. This is typically relevant for [url=https://godot.readthedocs.io/en/latest/tutorials/misc/running_code_in_the_editor.html]tool scripts[/url] and [url=https://godot.readthedocs.io/en/latest/tutorials/plugins/editor/index.html]editor plugins[/url]. If [method add_child] is called without setting [member owner], the newly added [Node] will not be visible in the scene tree, though it will be visible in the 2D/3D view. </description> </method> <method name="add_child_below_node"> @@ -251,7 +252,7 @@ <argument index="0" name="path" type="NodePath"> </argument> <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 attempts to access it will result in an "Attempt to call <method> on a null instance." error. + 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]). [b]Example:[/b] Assume your current node is Character and the following tree: [codeblock] @@ -295,7 +296,7 @@ <argument index="0" name="path" type="NodePath"> </argument> <description> - Similar to [method get_node], but does not raise an error if [code]path[/code] does not point to a valid [Node]. + 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"> @@ -839,7 +840,7 @@ Pause mode. How the node will behave if the [SceneTree] is paused. </member> <member name="process_priority" type="int" setter="set_process_priority" getter="get_process_priority" default="0"> - The node's priority in the execution order of the enabled processing callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes with a higher process priority will have their processing callbacks executed first. + The node's priority in the execution order of the enabled processing callbacks (i.e. [constant NOTIFICATION_PROCESS], [constant NOTIFICATION_PHYSICS_PROCESS] and their internal counterparts). Nodes whose process priority value is [i]lower[/i] will have their processing callbacks executed first. </member> </members> <signals> @@ -994,6 +995,7 @@ </constant> <constant name="DUPLICATE_USE_INSTANCING" value="8" enum="DuplicateFlags"> Duplicate using instancing. + An instance stays linked to the original so when the original changes, the instance changes too. </constant> </constants> </class> diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml index 29c4680685..67e9597781 100644 --- a/doc/classes/Node2D.xml +++ b/doc/classes/Node2D.xml @@ -1,10 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Node2D" inherits="CanvasItem" category="Core" version="3.2"> <brief_description> - A 2D game object, parent of all 2D-related nodes. Has a position, rotation, scale and Z index. + A 2D game object, inherited by all 2D-related nodes. Has a position, rotation, scale, and Z index. </brief_description> <description> - A 2D game object, with a position, rotation and scale. All 2D physics nodes and sprites inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control on the node's render order. + A 2D game object, with a transform (position, rotation, and scale). All 2D nodes, including physics objects and sprites, inherit from Node2D. Use Node2D as a parent node to move, scale and rotate children in a 2D project. Also gives control of the node's render order. </description> <tutorials> <link>https://docs.godotengine.org/en/latest/tutorials/2d/custom_drawing_in_2d.html</link> diff --git a/doc/classes/OS.xml b/doc/classes/OS.xml index 6da0547352..71d0c1a6fe 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -45,6 +45,8 @@ <return type="void"> </return> <description> + Shuts down system MIDI driver. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="delay_msec" qualifiers="const"> @@ -119,6 +121,7 @@ [codeblock] OS.execute("CMD.exe", ["/C", "cd %TEMP% && dir"], true, output) [/codeblock] + [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows. </description> </method> <method name="find_scancode_from_string" qualifiers="const"> @@ -159,6 +162,7 @@ <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]. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="get_current_video_driver" qualifiers="const"> @@ -224,6 +228,7 @@ </return> <description> 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_ime_selection" qualifiers="const"> @@ -232,6 +237,7 @@ <description> Returns the IME cursor position (the currently-edited portion of the string) relative to the characters in the composition string. [constant MainLoop.NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME cursor position. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="get_ime_text" qualifiers="const"> @@ -240,6 +246,7 @@ <description> Returns the IME intermediate composition string. [constant MainLoop.NOTIFICATION_OS_IME_UPDATE] is sent to the application to notify it of changes to the IME composition string. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="get_latin_keyboard_variant" qualifiers="const"> @@ -248,6 +255,7 @@ <description> Returns the current latin keyboard variant as a String. Possible return values are: [code]"QWERTY"[/code], [code]"AZERTY"[/code], [code]"QZERTY"[/code], [code]"DVORAK"[/code], [code]"NEO"[/code], [code]"COLEMAK"[/code] or [code]"ERROR"[/code]. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. Returns [code]"QWERTY"[/code] on unsupported platforms. </description> </method> <method name="get_locale" qualifiers="const"> @@ -262,6 +270,7 @@ </return> <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"> @@ -275,14 +284,16 @@ <return type="int"> </return> <description> - Returns the amount of battery left in the device as a percentage. + Returns the amount of battery left in the device as a percentage. Returns [code]-1[/code] if power state is unknown. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="get_power_seconds_left"> <return type="int"> </return> <description> - Returns an estimate of the time left in seconds before the device runs out of battery. + Returns an estimate of the time left in seconds before the device runs out of battery. Returns [code]-1[/code] if power state is unknown. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="get_power_state"> @@ -290,6 +301,7 @@ </return> <description> Returns the current state of the device regarding battery and power. See [enum PowerState] constants. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="get_process_id" qualifiers="const"> @@ -297,6 +309,7 @@ </return> <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"> @@ -345,6 +358,7 @@ xxhdpi - 480 dpi xxxhdpi - 640 dpi [/codeblock] + [b]Note:[/b] This method is implemented on Android, Linux, macOS and Windows. Returns [code]72[/code] on unsupported platforms. </description> </method> <method name="get_screen_position" qualifiers="const"> @@ -393,6 +407,7 @@ </argument> <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. </description> </method> <method name="get_system_time_msecs" qualifiers="const"> @@ -519,6 +534,7 @@ </argument> <description> Add a new item with text "label" to global menu. Use "_dock" menu to add item to the macOS dock icon menu. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="global_menu_add_separator"> @@ -528,6 +544,7 @@ </argument> <description> Add a separator between items. Separators also occupy an index. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="global_menu_clear"> @@ -537,6 +554,7 @@ </argument> <description> Clear the global menu, in effect removing all items. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="global_menu_remove_item"> @@ -548,6 +566,7 @@ </argument> <description> Removes the item at index "idx" from the global menu. Note that the indexes of items after the removed item are going to be shifted by one. + [b]Note:[/b] This method is implemented on macOS. </description> </method> <method name="has_environment" qualifiers="const"> @@ -636,6 +655,14 @@ Returns [code]true[/code] if the window should always be on top of other windows. </description> </method> + <method name="is_window_focused" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the window is currently focused. + [b]Note:[/b] Only implemented on desktop platforms. On other platforms, it will always return [code]true[/code]. + </description> + </method> <method name="kill"> <return type="int" enum="Error"> </return> @@ -644,6 +671,7 @@ <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. + [b]Note:[/b] This method is implemented on Android, iOS, Linux, macOS and Windows. </description> </method> <method name="move_window_to_foreground"> @@ -651,6 +679,7 @@ </return> <description> Moves the window to the front. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="native_video_is_playing"> @@ -658,6 +687,7 @@ </return> <description> Returns [code]true[/code] if native video is playing. + [b]Note:[/b] This method is implemented on Android and iOS. </description> </method> <method name="native_video_pause"> @@ -665,6 +695,7 @@ </return> <description> Pauses native video playback. + [b]Note:[/b] This method is implemented on Android and iOS. </description> </method> <method name="native_video_play"> @@ -680,7 +711,7 @@ </argument> <description> Plays native video from the specified path, at the given volume and with audio and subtitle tracks. - [b]Note:[/b] This method is only implemented on Android and iOS, and the current Android implementation does not support the [code]volume[/code], [code]audio_track[/code] and [code]subtitle_track[/code] options. + [b]Note:[/b] This method is implemented on Android and iOS, and the current Android implementation does not support the [code]volume[/code], [code]audio_track[/code] and [code]subtitle_track[/code] options. </description> </method> <method name="native_video_stop"> @@ -688,6 +719,7 @@ </return> <description> Stops native video playback. + [b]Note:[/b] This method is implemented on Android and iOS. </description> </method> <method name="native_video_unpause"> @@ -695,6 +727,7 @@ </return> <description> Resumes native video playback. + [b]Note:[/b] This method is implemented on Android and iOS. </description> </method> <method name="open_midi_inputs"> @@ -702,6 +735,7 @@ </return> <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"> @@ -743,6 +777,7 @@ </return> <description> Request the user attention to the window. It'll flash the taskbar button on Windows or bounce the dock icon on OSX. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="request_permission"> @@ -759,6 +794,7 @@ </return> <description> With this function you can request dangerous permissions since normal permissions are automatically granted at install time in Android application. + [b]Note:[/b] This method is implemented on Android. </description> </method> <method name="set_icon"> @@ -769,6 +805,7 @@ <description> Sets the game's icon using an [Image] resource. The same image is used for window caption, taskbar/dock and window selection dialog. Image is scaled as needed. + [b]Note:[/b] This method is implemented on HTML5, Linux, macOS and Windows. </description> </method> <method name="set_ime_active"> @@ -781,6 +818,7 @@ If active IME handles key events before the application and creates an composition string and suggestion list. Application can retrieve the composition status by using [method get_ime_selection] and [method get_ime_text] functions. Completed composition string is committed when input is finished. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="set_ime_position"> @@ -790,6 +828,7 @@ </argument> <description> Sets position of IME suggestion list popup (in window coordinates). + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="set_native_icon"> @@ -800,7 +839,7 @@ <description> Sets the game's icon using a multi-size platform-specific icon file ([code]*.ico[/code] on Windows and [code]*.icns[/code] on macOS). Appropriate size sub-icons are used for window caption, taskbar/dock and window selection dialog. - [b]Note:[/b] This method is only implemented on macOS and Windows. + [b]Note:[/b] This method is implemented on macOS and Windows. </description> </method> <method name="set_thread_name"> @@ -828,6 +867,7 @@ </argument> <description> Sets whether the window should always be on top. + [b]Note:[/b] This method is implemented on Linux, macOS and Windows. </description> </method> <method name="set_window_title"> @@ -838,6 +878,7 @@ <description> Sets the window title to the specified string. [b]Note:[/b] This should be used sporadically. Don't set this every frame, as that will negatively affect performance on some window managers. + [b]Note:[/b] This method is implemented on HTML5, Linux, macOS and Windows. </description> </method> <method name="shell_open"> @@ -850,6 +891,7 @@ - [code]OS.shell_open("C:\\Users\name\Downloads")[/code] on Windows opens the file explorer at the user's Downloads folder. - [code]OS.shell_open("https://godotengine.org")[/code] opens the default web browser on the official Godot website. - [code]OS.shell_open("mailto:example@example.com")[/code] opens the default email client with the "To" field set to [code]example@example.com[/code]. See [url=https://blog.escapecreative.com/customizing-mailto-links/]Customizing [code]mailto:[/code] Links[/url] for a list of fields that can be added. + [b]Note:[/b] This method is implemented on Android, iOS, HTML5, Linux, macOS and Windows. </description> </method> <method name="show_virtual_keyboard"> @@ -859,6 +901,7 @@ </argument> <description> Shows the virtual keyboard if the platform has one. The [code]existing_text[/code] parameter is useful for implementing your own LineEdit, as it tells the virtual keyboard what text has already been typed (the virtual keyboard uses it for auto-correct and predictions). + [b]Note:[/b] This method is implemented on Android, iOS and UWP. </description> </method> </methods> @@ -870,7 +913,8 @@ The current screen index (starting from 0). </member> <member name="exit_code" type="int" setter="set_exit_code" getter="get_exit_code" default="0"> - The exit code passed to the OS when the main loop exits. + The exit code passed to the OS when the main loop exits. By convention, an exit code of [code]0[/code] indicates success whereas a non-zero exit code indicates an error. For portability reasons, the exit code should be set between 0 and 125 (inclusive). + [b]Note:[/b] This value will be ignored if using [method SceneTree.quit] with an [code]exit_code[/code] argument passed. </member> <member name="keep_screen_on" type="bool" setter="set_keep_screen_on" getter="is_keep_screen_on" default="true"> If [code]true[/code], the engine tries to keep the screen on while the game is running. Useful on mobile. @@ -893,6 +937,9 @@ <member name="vsync_enabled" type="bool" setter="set_use_vsync" getter="is_vsync_enabled" default="true"> If [code]true[/code], vertical synchronization (Vsync) is enabled. </member> + <member name="vsync_via_compositor" type="bool" setter="set_vsync_via_compositor" getter="is_vsync_via_compositor_enabled" default="false"> + If [code]true[/code] and [code]vsync_enabled[/code] is true, the operating system's window compositor will be used for vsync when the compositor is enabled and the game is in windowed mode. + </member> <member name="window_borderless" type="bool" setter="set_borderless_window" getter="get_borderless_window" default="false"> If [code]true[/code], removes the window frame. [b]Note:[/b] Setting [code]window_borderless[/code] to [code]false[/code] disables per-pixel transparency. @@ -910,6 +957,7 @@ If [code]true[/code], the window background is transparent and window frame is removed. Use [code]get_tree().get_root().set_transparent_background(true)[/code] to disable main viewport background rendering. [b]Note:[/b] This property has no effect if [b]Project > Project Settings > Display > Window > Per-pixel transparency > Allowed[/b] setting is disabled. + [b]Note:[/b] This property is implemented on Linux, macOS and Windows. </member> <member name="window_position" type="Vector2" setter="set_window_position" getter="get_window_position" default="Vector2( 0, 0 )"> The window position relative to the screen, the origin is the top left corner, +Y axis goes to the bottom and +X axis goes to the right. diff --git a/doc/classes/Object.xml b/doc/classes/Object.xml index 5a09fe39c0..d063bd81e7 100644 --- a/doc/classes/Object.xml +++ b/doc/classes/Object.xml @@ -9,6 +9,12 @@ Objects do not manage memory. If a class inherits from Object, you will have to delete instances of it manually. To do so, call the [method free] method from your script or delete the instance from C++. Some classes that extend Object add memory management. This is the case of [Reference], which counts references and deletes itself automatically when no longer referenced. [Node], another fundamental type, deletes all its children when freed from memory. Objects export properties, which are mainly useful for storage and editing, but not really so much in programming. Properties are exported in [method _get_property_list] and handled in [method _get] and [method _set]. However, scripting languages and C++ have simpler means to export them. + Property membership can be tested directly in GDScript using [code]in[/code]: + [codeblock] + var n = Node2D.new() + print("position" in n) # Prints "True". + print("other_property" in n) # Prints "False". + [/codeblock] Objects also receive notifications. Notifications are a simple way to notify the object about different events, so they can all be handled together. See [method _notification]. </description> <tutorials> @@ -93,12 +99,12 @@ </description> </method> <method name="call_deferred" qualifiers="vararg"> - <return type="Variant"> + <return type="void"> </return> <argument index="0" name="method" type="String"> </argument> <description> - Calls the [code]method[/code] on the object during idle time and returns the result. This method supports a variable number of arguments, so parameters are passed as a comma separated list. Example: + 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: [codeblock] call_deferred("set", "position", Vector2(42.0, 0.0)) [/codeblock] @@ -172,7 +178,7 @@ </description> </method> <method name="emit_signal" qualifiers="vararg"> - <return type="Variant"> + <return type="void"> </return> <argument index="0" name="signal" type="String"> </argument> @@ -197,7 +203,7 @@ <argument index="0" name="property" type="String"> </argument> <description> - Returns the [Variant] value of the given [code]property[/code]. + Returns the [Variant] value of the given [code]property[/code]. If the [code]property[/code] doesn't exist, this will return [code]null[/code]. </description> </method> <method name="get_class" qualifiers="const"> @@ -454,6 +460,7 @@ </argument> <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"> diff --git a/doc/classes/OptionButton.xml b/doc/classes/OptionButton.xml index b3f1359e69..0debb988ce 100644 --- a/doc/classes/OptionButton.xml +++ b/doc/classes/OptionButton.xml @@ -19,7 +19,7 @@ <argument index="2" name="id" type="int" default="-1"> </argument> <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, [code]id[/code] becomes the item index. New items are appended at the end. + 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"> @@ -30,7 +30,7 @@ <argument index="1" name="id" type="int" default="-1"> </argument> <description> - Adds an item, with text [code]label[/code] and (optionally) [code]id[/code]. If no [code]id[/code] is passed, [code]id[/code] becomes the item index. New items are appended at the end. + 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"> @@ -44,14 +44,14 @@ <return type="void"> </return> <description> - Clear all the items in the [OptionButton]. + Clears all the items in the [OptionButton]. </description> </method> <method name="get_item_count" qualifiers="const"> <return type="int"> </return> <description> - Returns the amount of items in the OptionButton. + Returns the amount of items in the OptionButton, including separators. </description> </method> <method name="get_item_icon" qualifiers="const"> @@ -87,6 +87,7 @@ <argument index="0" name="idx" type="int"> </argument> <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"> @@ -109,12 +110,14 @@ <return type="int"> </return> <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> <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"> @@ -123,6 +126,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns [code]true[/code] if the item at index [code]idx[/code] is disabled. </description> </method> <method name="remove_item"> @@ -131,6 +135,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Removes the item at index [code]idx[/code]. </description> </method> <method name="select"> @@ -139,7 +144,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Select an item by index and make it the current item. + 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"> @@ -150,6 +155,8 @@ <argument index="1" name="disabled" type="bool"> </argument> <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"> @@ -160,7 +167,7 @@ <argument index="1" name="texture" type="Texture"> </argument> <description> - Sets the icon of an item at index [code]idx[/code]. + Sets the icon of the item at index [code]idx[/code]. </description> </method> <method name="set_item_id"> @@ -171,7 +178,7 @@ <argument index="1" name="id" type="int"> </argument> <description> - Sets the ID of an item at index [code]idx[/code]. + Sets the ID of the item at index [code]idx[/code]. </description> </method> <method name="set_item_metadata"> @@ -182,6 +189,7 @@ <argument index="1" name="metadata" type="Variant"> </argument> <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"> @@ -192,7 +200,7 @@ <argument index="1" name="text" type="String"> </argument> <description> - Sets the text of an item at index [code]idx[/code]. + Sets the text of the item at index [code]idx[/code]. </description> </method> </methods> @@ -200,6 +208,7 @@ <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" override="true" enum="BaseButton.ActionMode" default="0" /> <member name="align" type="int" setter="set_text_align" getter="get_text_align" override="true" enum="Button.TextAlign" default="0" /> <member name="selected" type="int" setter="_select_int" getter="get_selected" default="-1"> + The index of the currently selected item, or [code]-1[/code] if no item is selected. </member> <member name="toggle_mode" type="bool" setter="set_toggle_mode" getter="is_toggle_mode" override="true" default="true" /> </members> diff --git a/doc/classes/PCKPacker.xml b/doc/classes/PCKPacker.xml index ff45ca925c..e9ff2c0916 100644 --- a/doc/classes/PCKPacker.xml +++ b/doc/classes/PCKPacker.xml @@ -1,16 +1,17 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="PCKPacker" inherits="Reference" category="Core" version="3.2"> <brief_description> + Creates packages that can be loaded into a running project. </brief_description> <description> - The [PCKPacker] is used to create packages in application runtime. + The [PCKPacker] is used to create packages that can be loaded into a running project using [method ProjectSettings.load_resource_pack]. [codeblock] var packer = PCKPacker.new() - packer.pck_start("test.pck", 0) + packer.pck_start("test.pck") packer.add_file("res://text.txt", "text.txt") - packer.flush(false) + packer.flush() [/codeblock] - The above [PCKPacker] creates package [b]test.pck[/b], then adds a file named [b]text.txt[/b] in the root of the package. + The above [PCKPacker] creates package [code]test.pck[/code], then adds a file named [code]text.txt[/code] at the root of the package. </description> <tutorials> </tutorials> @@ -29,9 +30,10 @@ <method name="flush"> <return type="int" enum="Error"> </return> - <argument index="0" name="verbose" type="bool"> + <argument index="0" name="verbose" type="bool" default="false"> </argument> <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"> @@ -39,9 +41,10 @@ </return> <argument index="0" name="pck_name" type="String"> </argument> - <argument index="1" name="alignment" type="int"> + <argument index="1" name="alignment" type="int" default="0"> </argument> <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> </method> </methods> diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml index 260dbae8e2..3dc83ce8b4 100644 --- a/doc/classes/PacketPeerUDP.xml +++ b/doc/classes/PacketPeerUDP.xml @@ -47,6 +47,7 @@ <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. + Note: Some Android devices might require the [code]CHANGE_WIFI_MULTICAST_STATE[/code] permission for multicast to work. </description> </method> <method name="leave_multicast_group"> @@ -76,6 +77,16 @@ If [code]bind_address[/code] is set to any valid address (e.g. [code]"192.168.1.101"[/code], [code]"::1"[/code], etc), the peer will only listen on the interface with that addresses (or fail if no interface with the given address exists). </description> </method> + <method name="set_broadcast_enabled"> + <return type="void"> + </return> + <argument index="0" name="enabled" type="bool"> + </argument> + <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> @@ -85,6 +96,7 @@ </argument> <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"> diff --git a/doc/classes/Particles.xml b/doc/classes/Particles.xml index 7bfea8bce4..2219be5a26 100644 --- a/doc/classes/Particles.xml +++ b/doc/classes/Particles.xml @@ -51,7 +51,7 @@ Number of particles to emit. </member> <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="Particles.DrawOrder" default="0"> - Particle draw order. Uses [code]DRAW_ORDER_*[/code] values. + Particle draw order. Uses [enum DrawOrder] values. </member> <member name="draw_pass_1" type="Mesh" setter="set_draw_pass_mesh" getter="get_draw_pass_mesh"> [Mesh] that is drawn for the first draw pass. diff --git a/doc/classes/Particles2D.xml b/doc/classes/Particles2D.xml index 7c7b42ce88..100585768d 100644 --- a/doc/classes/Particles2D.xml +++ b/doc/classes/Particles2D.xml @@ -31,7 +31,7 @@ Number of particles emitted in one emission cycle. </member> <member name="draw_order" type="int" setter="set_draw_order" getter="get_draw_order" enum="Particles2D.DrawOrder" default="0"> - Particle draw order. Uses [code]DRAW_ORDER_*[/code] values. + Particle draw order. Uses [enum DrawOrder] values. </member> <member name="emitting" type="bool" setter="set_emitting" getter="is_emitting" default="true"> If [code]true[/code], particles are being emitted. diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index 64751cdf76..187ad1688d 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -157,7 +157,7 @@ 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_shape" type="int" setter="set_emission_shape" getter="get_emission_shape" enum="ParticlesMaterial.EmissionShape" default="0"> - Particles will be emitted inside this region. Use [code]EMISSION_SHAPE_*[/code] constants for values. + Particles will be emitted inside this region. Use [enum EmissionShape] constants for values. </member> <member name="emission_sphere_radius" type="float" setter="set_emission_sphere_radius" getter="get_emission_sphere_radius"> The sphere's radius if [code]emission_shape[/code] is set to [constant EMISSION_SHAPE_SPHERE]. diff --git a/doc/classes/PhysicalBone.xml b/doc/classes/PhysicalBone.xml index 583c24e2c0..81446063f2 100644 --- a/doc/classes/PhysicalBone.xml +++ b/doc/classes/PhysicalBone.xml @@ -7,6 +7,24 @@ <tutorials> </tutorials> <methods> + <method name="apply_central_impulse"> + <return type="void"> + </return> + <argument index="0" name="impulse" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="apply_impulse"> + <return type="void"> + </return> + <argument index="0" name="position" type="Vector3"> + </argument> + <argument index="1" name="impulse" type="Vector3"> + </argument> + <description> + </description> + </method> <method name="get_bone_id" qualifiers="const"> <return type="int"> </return> diff --git a/doc/classes/Physics2DServer.xml b/doc/classes/Physics2DServer.xml index a139fa4664..02e3ef5efb 100644 --- a/doc/classes/Physics2DServer.xml +++ b/doc/classes/Physics2DServer.xml @@ -203,7 +203,7 @@ </argument> <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: AREA_BODY_ADDED or AREA_BODY_REMOVED, depending on whether the object entered or exited the area. + 1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area. 2: [RID] of the object that entered/exited the area. 3: Instance ID of the object that entered/exited the area. 4: The shape index of the object that entered/exited the area. @@ -1155,7 +1155,7 @@ Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance. </constant> <constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="4" enum="AreaParameter"> - This constant was used to set/get the falloff factor for point gravity. It has been superseded by AREA_PARAM_GRAVITY_DISTANCE_SCALE. + This constant was used to set/get the falloff factor for point gravity. It has been superseded by [constant AREA_PARAM_GRAVITY_DISTANCE_SCALE]. </constant> <constant name="AREA_PARAM_LINEAR_DAMP" value="5" enum="AreaParameter"> Constant to set/get the linear dampening factor of an area. diff --git a/doc/classes/Physics2DShapeQueryParameters.xml b/doc/classes/Physics2DShapeQueryParameters.xml index 7d46dd2876..7ea00cbddc 100644 --- a/doc/classes/Physics2DShapeQueryParameters.xml +++ b/doc/classes/Physics2DShapeQueryParameters.xml @@ -4,7 +4,7 @@ Parameters to be sent to a 2D shape physics query. </brief_description> <description> - This class contains the shape and other parameters for intersection/collision queries. + This class contains the shape and other parameters for 2D intersection/collision queries. See also [Physics2DShapeQueryResult]. </description> <tutorials> </tutorials> @@ -21,14 +21,16 @@ </methods> <members> <member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false"> + If [code]true[/code], the query will take [Area2D]s into account. </member> <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 the query should be made on. + The physics layer(s) the query will take into account (as a bitmask). </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. + The list of objects or object [RID]s that will be excluded from collisions. </member> <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0"> The collision margin for the shape. @@ -37,10 +39,10 @@ The motion of the shape being queried for. </member> <member name="shape_rid" type="RID" setter="set_shape_rid" getter="get_shape_rid"> - The [RID] of the queried shape. See also [method set_shape]. + The queried shape's [RID]. See also [method set_shape]. </member> <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform" default="Transform2D( 1, 0, 0, 1, 0, 0 )"> - the transform matrix of the queried shape. + The queried shape's transform matrix. </member> </members> <constants> diff --git a/doc/classes/Physics2DShapeQueryResult.xml b/doc/classes/Physics2DShapeQueryResult.xml index dd38b488f5..06f943cb6d 100644 --- a/doc/classes/Physics2DShapeQueryResult.xml +++ b/doc/classes/Physics2DShapeQueryResult.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="Physics2DShapeQueryResult" inherits="Reference" category="Core" version="3.2"> <brief_description> + Result of a 2D shape query in [Physics2DServer]. </brief_description> <description> + The result of a 2D shape query in [Physics2DServer]. See also [Physics2DShapeQueryParameters]. </description> <tutorials> </tutorials> @@ -11,6 +13,7 @@ <return type="int"> </return> <description> + Returns the number of objects that intersected with the shape. </description> </method> <method name="get_result_object" qualifiers="const"> @@ -19,6 +22,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the [Object] that intersected with the shape at index [code]idx[/code]. </description> </method> <method name="get_result_object_id" qualifiers="const"> @@ -27,6 +31,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the instance ID of the [Object] that intersected with the shape at index [code]idx[/code]. </description> </method> <method name="get_result_object_shape" qualifiers="const"> @@ -35,6 +40,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the child index of the object's [Shape] that intersected with the shape at index [code]idx[/code]. </description> </method> <method name="get_result_rid" qualifiers="const"> @@ -43,6 +49,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the [RID] of the object that intersected with the shape at index [code]idx[/code]. </description> </method> </methods> diff --git a/doc/classes/PhysicsServer.xml b/doc/classes/PhysicsServer.xml index a779a34e6a..d7eb4c8c4f 100644 --- a/doc/classes/PhysicsServer.xml +++ b/doc/classes/PhysicsServer.xml @@ -68,7 +68,7 @@ <argument index="1" name="param" type="int" enum="PhysicsServer.AreaParameter"> </argument> <description> - Returns an area parameter value. A list of available parameters is on the [code]AREA_PARAM_*[/code] constants. + 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"> @@ -194,7 +194,7 @@ </argument> <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: AREA_BODY_ADDED or AREA_BODY_REMOVED, depending on whether the object entered or exited the area. + 1: [constant AREA_BODY_ADDED] or [constant AREA_BODY_REMOVED], depending on whether the object entered or exited the area. 2: [RID] of the object that entered/exited the area. 3: Instance ID of the object that entered/exited the area. 4: The shape index of the object that entered/exited the area. @@ -221,7 +221,7 @@ <argument index="2" name="value" type="Variant"> </argument> <description> - Sets the value for an area parameter. A list of available parameters is on the [code]AREA_PARAM_*[/code] constants. + 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"> @@ -292,7 +292,7 @@ <argument index="1" name="mode" type="int" enum="PhysicsServer.AreaSpaceOverrideMode"> </argument> <description> - Sets the space override mode for the area. The modes are described in the constants [code]AREA_SPACE_OVERRIDE_*[/code]. + Sets the space override mode for the area. The modes are described in the [enum AreaSpaceOverrideMode] constants. </description> </method> <method name="area_set_transform"> @@ -426,7 +426,7 @@ <argument index="1" name="init_sleeping" type="bool" default="false"> </argument> <description> - Creates a physics body. The first parameter can be any value from constants BODY_MODE*, for the type of body created. Additionally, the body can be created in sleeping state to save processing time. + Creates a physics body. The first parameter can be any value from [enum BodyMode] constants, for the type of body created. Additionally, the body can be created in sleeping state to save processing time. </description> </method> <method name="body_get_collision_layer" qualifiers="const"> @@ -500,7 +500,7 @@ <argument index="1" name="param" type="int" enum="PhysicsServer.BodyParameter"> </argument> <description> - Returns the value of a body parameter. A list of available parameters is on the [code]BODY_PARAM_*[/code] constants. + 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"> @@ -715,7 +715,7 @@ <argument index="1" name="mode" type="int" enum="PhysicsServer.BodyMode"> </argument> <description> - Sets the body mode, from one of the constants BODY_MODE*. + Sets the body mode, from one of the [enum BodyMode] constants. </description> </method> <method name="body_set_omit_force_integration"> @@ -739,7 +739,7 @@ <argument index="2" name="value" type="float"> </argument> <description> - Sets a body parameter. A list of available parameters is on the [code]BODY_PARAM_*[/code] constants. + Sets a body parameter. A list of available parameters is on the [enum BodyParameter] constants. </description> </method> <method name="body_set_ray_pickable"> @@ -812,7 +812,7 @@ <argument index="2" name="value" type="Variant"> </argument> <description> - Sets a body state (see BODY_STATE* constants). + Sets a body state (see [enum BodyState] constants). </description> </method> <method name="cone_twist_joint_get_param" qualifiers="const"> @@ -823,7 +823,7 @@ <argument index="1" name="param" type="int" enum="PhysicsServer.ConeTwistJointParam"> </argument> <description> - Gets a cone_twist_joint parameter (see CONE_TWIST_JOINT* constants). + Gets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants). </description> </method> <method name="cone_twist_joint_set_param"> @@ -836,7 +836,7 @@ <argument index="2" name="value" type="float"> </argument> <description> - Sets a cone_twist_joint parameter (see CONE_TWIST_JOINT* constants). + Sets a cone_twist_joint parameter (see [enum ConeTwistJointParam] constants). </description> </method> <method name="free_rid"> @@ -858,7 +858,7 @@ <argument index="2" name="flag" type="int" enum="PhysicsServer.G6DOFJointAxisFlag"> </argument> <description> - Gets a generic_6_DOF_joint flag (see G6DOF_JOINT_FLAG* constants). + Gets a generic_6_DOF_joint flag (see [enum G6DOFJointAxisFlag] constants). </description> </method> <method name="generic_6dof_joint_get_param"> @@ -871,7 +871,7 @@ <argument index="2" name="param" type="int" enum="PhysicsServer.G6DOFJointAxisParam"> </argument> <description> - Gets a generic_6_DOF_joint parameter (see G6DOF_JOINT* constants without the G6DOF_JOINT_FLAG*). + Gets a generic_6_DOF_joint parameter (see [enum G6DOFJointAxisParam] constants). </description> </method> <method name="generic_6dof_joint_set_flag"> @@ -886,7 +886,7 @@ <argument index="3" name="enable" type="bool"> </argument> <description> - Sets a generic_6_DOF_joint flag (see G6DOF_JOINT_FLAG* constants). + Sets a generic_6_DOF_joint flag (see [enum G6DOFJointAxisFlag] constants). </description> </method> <method name="generic_6dof_joint_set_param"> @@ -901,7 +901,7 @@ <argument index="3" name="value" type="float"> </argument> <description> - Sets a generic_6_DOF_joint parameter (see G6DOF_JOINT* constants without the G6DOF_JOINT_FLAG*). + Sets a generic_6_DOF_joint parameter (see [enum G6DOFJointAxisParam] constants). </description> </method> <method name="get_process_info"> @@ -921,7 +921,7 @@ <argument index="1" name="flag" type="int" enum="PhysicsServer.HingeJointFlag"> </argument> <description> - Gets a hinge_joint flag (see HINGE_JOINT_FLAG* constants). + Gets a hinge_joint flag (see [enum HingeJointFlag] constants). </description> </method> <method name="hinge_joint_get_param" qualifiers="const"> @@ -932,7 +932,7 @@ <argument index="1" name="param" type="int" enum="PhysicsServer.HingeJointParam"> </argument> <description> - Gets a hinge_joint parameter (see HINGE_JOINT* constants without the HINGE_JOINT_FLAG*). + Gets a hinge_joint parameter (see [enum HingeJointParam]). </description> </method> <method name="hinge_joint_set_flag"> @@ -945,7 +945,7 @@ <argument index="2" name="enabled" type="bool"> </argument> <description> - Sets a hinge_joint flag (see HINGE_JOINT_FLAG* constants). + Sets a hinge_joint flag (see [enum HingeJointFlag] constants). </description> </method> <method name="hinge_joint_set_param"> @@ -958,7 +958,7 @@ <argument index="2" name="value" type="float"> </argument> <description> - Sets a hinge_joint parameter (see HINGE_JOINT* constants without the HINGE_JOINT_FLAG*). + Sets a hinge_joint parameter (see [enum HingeJointParam] constants). </description> </method> <method name="joint_create_cone_twist"> @@ -1091,7 +1091,7 @@ <argument index="1" name="param" type="int" enum="PhysicsServer.PinJointParam"> </argument> <description> - Gets a pin_joint parameter (see PIN_JOINT* constants). + Gets a pin_joint parameter (see [enum PinJointParam] constants). </description> </method> <method name="pin_joint_set_local_a"> @@ -1126,7 +1126,7 @@ <argument index="2" name="value" type="float"> </argument> <description> - Sets a pin_joint parameter (see PIN_JOINT* constants). + Sets a pin_joint parameter (see [enum PinJointParam] constants). </description> </method> <method name="set_active"> @@ -1144,7 +1144,7 @@ <argument index="0" name="type" type="int" enum="PhysicsServer.ShapeType"> </argument> <description> - Creates a shape of type [code]SHAPE_*[/code]. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape]. + Creates a shape of a type from [enum ShapeType]. Does not assign it to a body or an area. To do so, you must use [method area_set_shape] or [method body_set_shape]. </description> </method> <method name="shape_get_data" qualifiers="const"> @@ -1162,7 +1162,7 @@ <argument index="0" name="shape" type="RID"> </argument> <description> - Returns the type of shape (see [code]SHAPE_*[/code] constants). + Returns the type of shape (see [enum ShapeType] constants). </description> </method> <method name="shape_set_data"> @@ -1184,7 +1184,7 @@ <argument index="1" name="param" type="int" enum="PhysicsServer.SliderJointParam"> </argument> <description> - Gets a slider_joint parameter (see SLIDER_JOINT* constants). + Gets a slider_joint parameter (see [enum SliderJointParam] constants). </description> </method> <method name="slider_joint_set_param"> @@ -1197,7 +1197,7 @@ <argument index="2" name="value" type="float"> </argument> <description> - Gets a slider_joint parameter (see SLIDER_JOINT* constants). + Gets a slider_joint parameter (see [enum SliderJointParam] constants). </description> </method> <method name="space_create"> @@ -1257,7 +1257,7 @@ <argument index="2" name="value" type="float"> </argument> <description> - Sets the value for a space parameter. A list of available parameters is on the [code]SPACE_PARAM_*[/code] constants. + Sets the value for a space parameter. A list of available parameters is on the [enum SpaceParameter] constants. </description> </method> </methods> @@ -1509,7 +1509,7 @@ Constant to set/get the falloff factor for point gravity of an area. The greater this value is, the faster the strength of gravity decreases with the square of distance. </constant> <constant name="AREA_PARAM_GRAVITY_POINT_ATTENUATION" value="4" enum="AreaParameter"> - This constant was used to set/get the falloff factor for point gravity. It has been superseded by AREA_PARAM_GRAVITY_DISTANCE_SCALE. + This constant was used to set/get the falloff factor for point gravity. It has been superseded by [constant AREA_PARAM_GRAVITY_DISTANCE_SCALE]. </constant> <constant name="AREA_PARAM_LINEAR_DAMP" value="5" enum="AreaParameter"> Constant to set/get the linear dampening factor of an area. diff --git a/doc/classes/PhysicsShapeQueryParameters.xml b/doc/classes/PhysicsShapeQueryParameters.xml index 7d7307592e..d56247fcaf 100644 --- a/doc/classes/PhysicsShapeQueryParameters.xml +++ b/doc/classes/PhysicsShapeQueryParameters.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="PhysicsShapeQueryParameters" inherits="Reference" category="Core" version="3.2"> <brief_description> + Parameters to be sent to a 3D shape physics query. </brief_description> <description> + This class contains the shape and other parameters for 3D intersection/collision queries. See also [PhysicsShapeQueryResult]. </description> <tutorials> </tutorials> @@ -13,23 +15,31 @@ <argument index="0" name="shape" type="Resource"> </argument> <description> + Sets the [Shape] that will be used for collision/intersection queries. </description> </method> </methods> <members> <member name="collide_with_areas" type="bool" setter="set_collide_with_areas" getter="is_collide_with_areas_enabled" default="false"> + If [code]true[/code], the query will take [Area]s into account. </member> <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 [PhysicsBody]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). </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. </member> <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.0"> + The collision margin for the shape. </member> <member name="shape_rid" type="RID" setter="set_shape_rid" getter="get_shape_rid"> + The queried shape's [RID]. See also [method set_shape]. </member> <member name="transform" type="Transform" setter="set_transform" getter="get_transform" default="Transform( 1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0 )"> + The queried shape's transform matrix. </member> </members> <constants> diff --git a/doc/classes/PhysicsShapeQueryResult.xml b/doc/classes/PhysicsShapeQueryResult.xml index 92a4393979..1f151ebb1a 100644 --- a/doc/classes/PhysicsShapeQueryResult.xml +++ b/doc/classes/PhysicsShapeQueryResult.xml @@ -1,9 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="PhysicsShapeQueryResult" inherits="Reference" category="Core" version="3.2"> <brief_description> - Result of a shape query in Physics2DServer. + Result of a 3D shape query in [PhysicsServer]. </brief_description> <description> + The result of a 3D shape query in [PhysicsServer]. See also [PhysicsShapeQueryParameters]. </description> <tutorials> </tutorials> @@ -12,6 +13,7 @@ <return type="int"> </return> <description> + Returns the number of objects that intersected with the shape. </description> </method> <method name="get_result_object" qualifiers="const"> @@ -20,6 +22,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the [Object] that intersected with the shape at index [code]idx[/code]. </description> </method> <method name="get_result_object_id" qualifiers="const"> @@ -28,6 +31,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the instance ID of the [Object] that intersected with the shape at index [code]idx[/code]. </description> </method> <method name="get_result_object_shape" qualifiers="const"> @@ -36,6 +40,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the child index of the object's [Shape] that intersected with the shape at index [code]idx[/code]. </description> </method> <method name="get_result_rid" qualifiers="const"> @@ -44,6 +49,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Returns the [RID] of the object that intersected with the shape at index [code]idx[/code]. </description> </method> </methods> diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml index bb72f2734e..0164943ccc 100644 --- a/doc/classes/Plane.xml +++ b/doc/classes/Plane.xml @@ -22,7 +22,7 @@ <argument index="3" name="d" type="float"> </argument> <description> - Creates a plane from the four parameters [code]a[/code], [code]b[/code], [code]c[/code] and [code]d[/code]. + 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"> @@ -35,7 +35,7 @@ <argument index="2" name="v3" type="Vector3"> </argument> <description> - Creates a plane from three points. + Creates a plane from the three points, given in clockwise order. </description> </method> <method name="Plane"> @@ -122,6 +122,7 @@ <argument index="0" name="plane" type="Plane"> </argument> <description> + Returns [code]true[/code] if this plane and [code]plane[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component. </description> </method> <method name="is_point_over"> @@ -152,14 +153,19 @@ </methods> <members> <member name="d" type="float" setter="" getter="" default="0.0"> + Distance from the origin to the plane, in the direction of [member normal]. </member> <member name="normal" type="Vector3" setter="" getter="" default="Vector3( 0, 0, 0 )"> + The normal of the plane. "Over" or "Above" the plane is considered the side of the plane towards where the normal is pointing. </member> <member name="x" type="float" setter="" getter="" default="0.0"> + The [member normal]'s X component. </member> <member name="y" type="float" setter="" getter="" default="0.0"> + The [member normal]'s Y component. </member> <member name="z" type="float" setter="" getter="" default="0.0"> + The [member normal]'s Z component. </member> </members> <constants> diff --git a/doc/classes/PlaneShape.xml b/doc/classes/PlaneShape.xml index b94bb8e613..ee841a3cff 100644 --- a/doc/classes/PlaneShape.xml +++ b/doc/classes/PlaneShape.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="PlaneShape" inherits="Shape" category="Core" version="3.2"> <brief_description> + Infinite plane shape for 3D collisions. </brief_description> <description> + An infinite plane shape for 3D collisions. Note that the [Plane]'s normal matters; anything "below" the plane will collide with it. If the [PlaneShape] is used in a [PhysicsBody], it will cause colliding objects placed "below" it to teleport "above" the plane. </description> <tutorials> </tutorials> @@ -10,6 +12,7 @@ </methods> <members> <member name="plane" type="Plane" setter="set_plane" getter="get_plane" default="Plane( 0, 1, 0, 0 )"> + The [Plane] used by the [PlaneShape] for collision. </member> </members> <constants> diff --git a/doc/classes/Popup.xml b/doc/classes/Popup.xml index 2357ee2469..6b15b5a1ea 100644 --- a/doc/classes/Popup.xml +++ b/doc/classes/Popup.xml @@ -4,7 +4,7 @@ Base container control for popups and dialogs. </brief_description> <description> - Popup is a base [Control] used to show dialogs and popups. It's a subwindow and modal by default (see [Control]) and has helpers for custom popup behavior. + Popup is a base [Control] used to show dialogs and popups. It's a subwindow and modal by default (see [Control]) and has helpers for custom popup behavior. All popup methods ensure correct placement within the viewport. </description> <tutorials> </tutorials> diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index bdb6ca84ee..89039eebda 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -334,7 +334,7 @@ <return type="bool"> </return> <description> - Returns whether the popup will be hidden when the window loses focus or not. + Returns [code]true[/code] if the popup will be hidden when the window loses focus or not. </description> </method> <method name="is_item_checkable" qualifiers="const"> @@ -391,7 +391,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> - Returns whether the shortcut of the specified item [code]idx[/code] is disabled or not. + Returns [code]true[/code] if the specified item's shortcut is disabled. </description> </method> <method name="remove_item"> @@ -477,7 +477,7 @@ <argument index="1" name="disabled" type="bool"> </argument> <description> - Sets whether the item at index [code]idx[/code] is disabled or not. When it is disabled, it can't be selected and its action can't be invoked. + 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"> @@ -521,6 +521,7 @@ <argument index="1" name="state" type="int"> </argument> <description> + Sets the state of an multistate item. See [method add_multistate_item] for details. </description> </method> <method name="set_item_shortcut"> @@ -595,6 +596,7 @@ <argument index="0" name="idx" type="int"> </argument> <description> + Cycle to the next state of an multistate item. See [method add_multistate_item] for details. </description> </method> </methods> diff --git a/doc/classes/PrimitiveMesh.xml b/doc/classes/PrimitiveMesh.xml index b0e69bd089..3f07affdfd 100644 --- a/doc/classes/PrimitiveMesh.xml +++ b/doc/classes/PrimitiveMesh.xml @@ -22,7 +22,8 @@ Overrides the [AABB] with one defined by user for use with frustum culling. Especially useful to avoid unnexpected culling when using a shader to offset vertices. </member> <member name="flip_faces" type="bool" setter="set_flip_faces" getter="get_flip_faces" default="false"> - If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. Result is the same as using *CULL_BACK* in [SpatialMaterial]. + If set, the order of the vertices in each triangle are reversed resulting in the backside of the mesh being drawn. + This gives the same result as using [constant SpatialMaterial.CULL_BACK] in [member SpatialMaterial.params_cull_mode]. </member> <member name="material" type="Material" setter="set_material" getter="get_material"> The current [Material] of the primitive mesh. diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 772c2f5073..126f11a4ed 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -17,7 +17,10 @@ <argument index="0" name="hint" type="Dictionary"> </argument> <description> - Adds a custom property info to a property. The dictionary must contain: name:[String](the property's name) and type:[int](see [code]TYPE_*[/code] in [@GlobalScope]), and optionally hint:[int](see [code]PROPERTY_HINT_*[/code] in [@GlobalScope]), hint_string:[String]. + Adds a custom property info to a property. The dictionary must contain: + - [code]name[/code]: [String] (the property's name) + - [code]type[/code]: [int] (see [enum Variant.Type]) + - optionally [code]hint[/code]: [int] (see [enum PropertyHint]) and [code]hint_string[/code]: [String] [b]Example:[/b] [codeblock] ProjectSettings.set("category/property_name", 0) @@ -345,7 +348,7 @@ <member name="debug/gdscript/warnings/unused_argument" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables warnings when a function parameter is unused. </member> - <member name="debug/gdscript/warnings/unused_class_variable" type="bool" setter="" getter="" default="true"> + <member name="debug/gdscript/warnings/unused_class_variable" type="bool" setter="" getter="" default="false"> If [code]true[/code], enables warnings when a member variable is unused. </member> <member name="debug/gdscript/warnings/unused_signal" type="bool" setter="" getter="" default="true"> @@ -398,6 +401,9 @@ <member name="display/window/handheld/orientation" type="String" setter="" getter="" default=""landscape""> Default orientation on mobile devices. </member> + <member name="display/window/ios/hide_home_indicator" type="bool" setter="" getter="" default="true"> + If [code]true[/code], the home indicator is hidden automatically. This only affects iOS devices without a physical home button. + </member> <member name="display/window/per_pixel_transparency/allowed" type="bool" setter="" getter="" default="false"> If [code]true[/code], allows per-pixel transparency in a desktop window. This affects performance, so leave it on [code]false[/code] unless you need it. </member> @@ -431,6 +437,9 @@ <member name="display/window/vsync/use_vsync" type="bool" setter="" getter="" default="true"> If [code]true[/code], enables vertical synchronization. This eliminates tearing that may appear in moving scenes, at the cost of higher input latency and stuttering at lower framerates. If [code]false[/code], vertical synchronization will be disabled, however, many platforms will enforce it regardless (such as mobile platforms and HTML5). </member> + <member name="display/window/vsync/vsync_via_compositor" type="bool" setter="" getter="" default="false"> + If [code]Use Vsync[/code] is enabled and this setting is [code]true[/code], enables vertical synchronization via the operating system's window compositor when in windowed mode and the compositor is enabled. This will prevent stutter in certain situations. (Windows only.) + </member> <member name="editor/script_templates_search_path" type="String" setter="" getter="" default=""res://script_templates""> </member> <member name="editor/search_in_file_extensions" type="PoolStringArray" setter="" getter="" default="PoolStringArray( "gd", "shader" )"> diff --git a/doc/classes/Quat.xml b/doc/classes/Quat.xml index f5ee99d30c..eeb633f480 100644 --- a/doc/classes/Quat.xml +++ b/doc/classes/Quat.xml @@ -100,6 +100,7 @@ <argument index="0" name="quat" type="Quat"> </argument> <description> + Returns [code]true[/code] if this quaterion and [code]quat[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component. </description> </method> <method name="is_normalized"> diff --git a/doc/classes/Rect2.xml b/doc/classes/Rect2.xml index 07fa7777fe..90dd996691 100644 --- a/doc/classes/Rect2.xml +++ b/doc/classes/Rect2.xml @@ -143,6 +143,7 @@ <argument index="0" name="rect" type="Rect2"> </argument> <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"> @@ -151,7 +152,7 @@ <argument index="0" name="b" type="Rect2"> </argument> <description> - Returns a larger Rect2 that contains this Rect2 and [code]b[/code]. + Returns a larger [Rect2] that contains this [Rect2] and [code]b[/code]. </description> </method> </methods> diff --git a/doc/classes/RichTextEffect.xml b/doc/classes/RichTextEffect.xml index 5c3ffd9cff..0e043b1d50 100644 --- a/doc/classes/RichTextEffect.xml +++ b/doc/classes/RichTextEffect.xml @@ -1,10 +1,20 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="RichTextEffect" inherits="Resource" category="Core" version="3.2"> <brief_description> + A custom effect for use with [RichTextLabel]. </brief_description> <description> + A custom effect for use with [RichTextLabel]. + [b]Note:[/b] For a [RichTextEffect] to be usable, a BBCode tag must be defined as a member variable called [code]bbcode[/code] in the script. + [codeblock] + # The RichTextEffect will be usable like this: `[example]Some text[/example]` + var bbcode = "example" + [/codeblock] + [b]Note:[/b] As soon as a [RichTextLabel] contains at least one [RichTextEffect], it will continuously process the effect unless the project is paused. This may impact battery life negatively. </description> <tutorials> + <link>http://docs.godotengine.org/en/latest/tutorials/gui/bbcode_in_richtextlabel.html</link> + <link>https://github.com/Eoin-ONeill-Yokai/Godot-Rich-Text-Effect-Test-Project</link> </tutorials> <methods> <method name="_process_custom_fx" qualifiers="virtual"> @@ -13,6 +23,7 @@ <argument index="0" name="char_fx" type="CharFXTransform"> </argument> <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> </method> </methods> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 2962391b99..c3fb226b6a 100644 --- a/doc/classes/RichTextLabel.xml +++ b/doc/classes/RichTextLabel.xml @@ -91,6 +91,7 @@ <argument index="0" name="effect" type="Variant"> </argument> <description> + Installs a custom effect. [code]effect[/code] should be a valid [RichTextEffect]. </description> </method> <method name="newline"> @@ -115,6 +116,7 @@ <argument index="0" name="expressions" type="PoolStringArray"> </argument> <description> + Parses BBCode parameter [code]expressions[/code] into a dictionary. </description> </method> <method name="pop"> @@ -137,12 +139,14 @@ <return type="void"> </return> <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> <description> + Adds a [code][font][/code] tag with a bold italics font to the tag stack. </description> </method> <method name="push_cell"> @@ -176,13 +180,14 @@ <argument index="0" name="level" type="int"> </argument> <description> - Adds an [code][indent][/code] tag to the tag stack. Multiplies "level" by current tab_size to determine new margin length. + 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> <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"> @@ -207,12 +212,14 @@ <return type="void"> </return> <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> <description> + Adds a [code][font][/code] tag with a normal font to the tag stack. </description> </method> <method name="push_strikethrough"> @@ -245,6 +252,7 @@ </argument> <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"> @@ -278,8 +286,11 @@ </member> <member name="bbcode_text" type="String" setter="set_bbcode" getter="get_bbcode" default=""""> The label's text in BBCode format. Is not representative of manual modifications to the internal tag stack. Erases changes made by other methods when edited. + [b]Note:[/b] It is unadvised to use [code]+=[/code] operator with [code]bbcode_text[/code] (e.g. [code]bbcode_text += "some string"[/code]) as it replaces the whole text and can cause slowdowns. Use [method append_bbcode] for adding text instead. </member> <member name="custom_effects" type="Array" setter="set_effects" getter="get_effects" default="[ ]"> + The currently installed custom effects. This is an array of [RichTextEffect]s. + To add a custom effect, it's more convenient to use [method install_effect]. </member> <member name="meta_underlined" type="bool" setter="set_meta_underline" getter="is_meta_underlined" default="true"> If [code]true[/code], the label underlines meta tags such as [code][url]{text}[/url][/code]. @@ -288,11 +299,12 @@ If [code]true[/code], the label uses the custom font color. </member> <member name="percent_visible" type="float" setter="set_percent_visible" getter="get_percent_visible" default="1.0"> - The text's visibility, as a [float] between 0.0 and 1.0. + The range of characters to display, as a [float] between 0.0 and 1.0. When assigned an out of range value, it's the same as assigning 1.0. + [b]Note:[/b] Setting this property updates [member visible_characters] based on current [method get_total_character_count]. </member> <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" /> <member name="scroll_active" type="bool" setter="set_scroll_active" getter="is_scroll_active" default="true"> - If [code]true[/code], the scrollbar is visible. Does not block scrolling completely. See [method scroll_to_line]. + If [code]true[/code], the scrollbar is visible. Setting this to [code]false[/code] does not block scrolling completely. See [method scroll_to_line]. </member> <member name="scroll_following" type="bool" setter="set_scroll_follow" getter="is_scroll_following" default="false"> If [code]true[/code], the window scrolls down to display new content automatically. @@ -316,7 +328,7 @@ <argument index="0" name="meta" type="Nil"> </argument> <description> - Triggered when the user clicks on content between [code][url][/code] 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. + 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"> @@ -336,18 +348,25 @@ </signals> <constants> <constant name="ALIGN_LEFT" value="0" enum="Align"> + Makes text left aligned. </constant> <constant name="ALIGN_CENTER" value="1" enum="Align"> + Makes text centered. </constant> <constant name="ALIGN_RIGHT" value="2" enum="Align"> + Makes text right aligned. </constant> <constant name="ALIGN_FILL" value="3" enum="Align"> + Makes text fill width. </constant> <constant name="LIST_NUMBERS" value="0" enum="ListType"> + Each list item has a number marker. </constant> <constant name="LIST_LETTERS" value="1" enum="ListType"> + Each list item has a letter marker. </constant> <constant name="LIST_DOTS" value="2" enum="ListType"> + Each list item has a filled circle marker. </constant> <constant name="ITEM_FRAME" value="0" enum="ItemType"> </constant> diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index bf22b865d3..6a4105ca2f 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -185,8 +185,10 @@ <method name="quit"> <return type="void"> </return> + <argument index="0" name="exit_code" type="int" default="-1"> + </argument> <description> - Quits the application. + Quits the application. A process [code]exit_code[/code] can optionally be passed as an argument. If this argument is [code]0[/code] or greater, it will override the [member OS.exit_code] defined before quitting the application. </description> </method> <method name="reload_current_scene"> @@ -289,7 +291,7 @@ 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 (see [code]NETWORK_MODE_*[/code] constants in [Node]), 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. + 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. </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: diff --git a/doc/classes/Script.xml b/doc/classes/Script.xml index e8a88acdb5..91014580d3 100644 --- a/doc/classes/Script.xml +++ b/doc/classes/Script.xml @@ -4,7 +4,7 @@ A class stored as a resource. </brief_description> <description> - A class stored as a resource. A script exends the functionality of all objects that instance it. + A class stored as a resource. A script extends the functionality of all objects that instance it. The [code]new[/code] method of a script subclass creates a new instance. [method Object.set_script] extends an existing object, if that object's class matches one of the script's base classes. </description> <tutorials> diff --git a/doc/classes/ScrollContainer.xml b/doc/classes/ScrollContainer.xml index 5218b65886..94920d57e5 100644 --- a/doc/classes/ScrollContainer.xml +++ b/doc/classes/ScrollContainer.xml @@ -23,6 +23,9 @@ </method> </methods> <members> + <member name="follow_focus" type="bool" setter="set_follow_focus" getter="is_following_focus" default="false"> + If [code]true[/code], the ScrollContainer will automatically scroll to focused children (including indirect children) to make sure they are fully visible. + </member> <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" /> <member name="scroll_deadzone" type="int" setter="set_deadzone" getter="get_deadzone" default="0"> </member> diff --git a/doc/classes/Shape.xml b/doc/classes/Shape.xml index ce5947bc06..123353b59a 100644 --- a/doc/classes/Shape.xml +++ b/doc/classes/Shape.xml @@ -13,6 +13,7 @@ </methods> <members> <member name="margin" type="float" setter="set_margin" getter="get_margin" default="0.04"> + The collision margin for the shape. </member> </members> <constants> diff --git a/doc/classes/Shape2D.xml b/doc/classes/Shape2D.xml index 2c3120f04d..70d55344ca 100644 --- a/doc/classes/Shape2D.xml +++ b/doc/classes/Shape2D.xml @@ -77,6 +77,7 @@ </methods> <members> <member name="custom_solver_bias" type="float" setter="set_custom_solver_bias" getter="get_custom_solver_bias" default="0.0"> + The shape's custom solver bias. </member> </members> <constants> diff --git a/doc/classes/SphereMesh.xml b/doc/classes/SphereMesh.xml index 6d81d8ff82..43f19f9f4e 100644 --- a/doc/classes/SphereMesh.xml +++ b/doc/classes/SphereMesh.xml @@ -15,7 +15,7 @@ Full height of the sphere. </member> <member name="is_hemisphere" type="bool" setter="set_is_hemisphere" getter="get_is_hemisphere" default="false"> - Determines whether a full sphere or a hemisphere is created. + If [code]true[/code], a hemisphere is created rather than a full sphere. [b]Note:[/b] To get a regular hemisphere, the height and radius of the sphere must be equal. </member> <member name="radial_segments" type="int" setter="set_radial_segments" getter="get_radial_segments" default="64"> diff --git a/doc/classes/SplitContainer.xml b/doc/classes/SplitContainer.xml index d756c17cef..25d4546c3a 100644 --- a/doc/classes/SplitContainer.xml +++ b/doc/classes/SplitContainer.xml @@ -4,7 +4,7 @@ Container for splitting and adjusting. </brief_description> <description> - Container for splitting two controls vertically or horizontally, with a grabber that allows adjusting the split offset or ratio. + Container for splitting two [Control]s vertically or horizontally, with a grabber that allows adjusting the split offset or ratio. </description> <tutorials> </tutorials> @@ -13,16 +13,19 @@ <return type="void"> </return> <description> + Clamps the [member split_offset] value to not go outside the currently possible minimal and maximum values. </description> </method> </methods> <members> <member name="collapsed" type="bool" setter="set_collapsed" getter="is_collapsed" default="false"> + If [code]true[/code], the area of the first [Control] will be collapsed and the dragger will be disabled. </member> <member name="dragger_visibility" type="int" setter="set_dragger_visibility" getter="get_dragger_visibility" enum="SplitContainer.DraggerVisibility" default="0"> - Determines whether the dragger is visible. + Determines the dragger's visibility. See [enum DraggerVisibility] for details. </member> <member name="split_offset" type="int" setter="set_split_offset" getter="get_split_offset" default="0"> + The initial offset of the splitting between the two [Control]s, with [code]0[/code] being at the end of the first [Control]. </member> </members> <signals> @@ -36,13 +39,13 @@ </signals> <constants> <constant name="DRAGGER_VISIBLE" value="0" enum="DraggerVisibility"> - The split dragger is visible. + The split dragger is visible when the cursor hovers it. </constant> <constant name="DRAGGER_HIDDEN" value="1" enum="DraggerVisibility"> - The split dragger is invisible. + The split dragger is never visible. </constant> <constant name="DRAGGER_HIDDEN_COLLAPSED" value="2" enum="DraggerVisibility"> - The split dragger is invisible and collapsed. + The split dragger is never visible and its space collapsed. </constant> </constants> </class> diff --git a/doc/classes/StyleBoxFlat.xml b/doc/classes/StyleBoxFlat.xml index 05ee79eef2..46b11ac010 100644 --- a/doc/classes/StyleBoxFlat.xml +++ b/doc/classes/StyleBoxFlat.xml @@ -1,14 +1,14 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="StyleBoxFlat" inherits="StyleBox" category="Core" version="3.2"> <brief_description> - Customizable Stylebox with a given set of parameters. (no texture required) + Customizable [StyleBox] with a given set of parameters (no texture required). </brief_description> <description> - This stylebox can be used to achieve all kinds of looks without the need of a texture. Those properties are customizable: + This [StyleBox] can be used to achieve all kinds of looks without the need of a texture. Those properties are customizable: - Color - Border width (individual width for each border) - Rounded corners (individual radius for each corner) - - Shadow + - Shadow (with blur and offset) Setting corner radius to high values is allowed. As soon as corners would overlap, the stylebox will switch to a relative system. Example: [codeblock] height = 30 @@ -30,12 +30,14 @@ <argument index="0" name="margin" type="int" enum="Margin"> </argument> <description> + Returns the given [code]margin[/code]'s border width. See [enum Margin] for possible values. </description> </method> <method name="get_border_width_min" qualifiers="const"> <return type="int"> </return> <description> + Returns the smallest border width out of all four borders. </description> </method> <method name="get_corner_radius" qualifiers="const"> @@ -44,6 +46,7 @@ <argument index="0" name="corner" type="int" enum="Corner"> </argument> <description> + Returns the given [code]corner[/code]'s radius. See [enum Corner] for possible values. </description> </method> <method name="get_expand_margin" qualifiers="const"> @@ -52,6 +55,7 @@ <argument index="0" name="margin" type="int" enum="Margin"> </argument> <description> + Returns the size of the given [code]margin[/code]'s expand margin. See [enum Margin] for possible values. </description> </method> <method name="set_border_width"> @@ -62,6 +66,7 @@ <argument index="1" name="width" type="int"> </argument> <description> + Sets the border width to [code]width[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values. </description> </method> <method name="set_border_width_all"> @@ -70,6 +75,7 @@ <argument index="0" name="width" type="int"> </argument> <description> + Sets the border width to [code]width[/code] pixels for all margins. </description> </method> <method name="set_corner_radius"> @@ -80,6 +86,7 @@ <argument index="1" name="radius" type="int"> </argument> <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"> @@ -88,6 +95,7 @@ <argument index="0" name="radius" type="int"> </argument> <description> + Sets the corner radius to [code]radius[/code] pixels for all corners. </description> </method> <method name="set_corner_radius_individual"> @@ -102,6 +110,7 @@ <argument index="3" name="radius_bottom_left" type="int"> </argument> <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"> @@ -112,6 +121,7 @@ <argument index="1" name="size" type="float"> </argument> <description> + Sets the expand margin to [code]size[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values. </description> </method> <method name="set_expand_margin_all"> @@ -120,6 +130,7 @@ <argument index="0" name="size" type="float"> </argument> <description> + Sets the expand margin to [code]size[/code] pixels for all margins. </description> </method> <method name="set_expand_margin_individual"> @@ -134,6 +145,7 @@ <argument index="3" name="size_bottom" type="float"> </argument> <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> </methods> diff --git a/doc/classes/StyleBoxLine.xml b/doc/classes/StyleBoxLine.xml index c0745c5f39..b5da81de79 100644 --- a/doc/classes/StyleBoxLine.xml +++ b/doc/classes/StyleBoxLine.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="StyleBoxLine" inherits="StyleBox" category="Core" version="3.2"> <brief_description> + [StyleBox] that displays a single line. </brief_description> <description> + [StyleBox] that displays a single line of a given color and thickness. It can be used to draw things like separators. </description> <tutorials> </tutorials> @@ -10,14 +12,19 @@ </methods> <members> <member name="color" type="Color" setter="set_color" getter="get_color" default="Color( 0, 0, 0, 1 )"> + The line's color. </member> <member name="grow_begin" type="float" setter="set_grow_begin" getter="get_grow_begin" default="1.0"> + The number of pixels the line will extend before the [StyleBoxLine]'s bounds. If set to a negative value, the line will begin inside the [StyleBoxLine]'s bounds. </member> <member name="grow_end" type="float" setter="set_grow_end" getter="get_grow_end" default="1.0"> + The number of pixels the line will extend past the [StyleBoxLine]'s bounds. If set to a negative value, the line will end inside the [StyleBoxLine]'s bounds. </member> <member name="thickness" type="int" setter="set_thickness" getter="get_thickness" default="1"> + The line's thickness in pixels. </member> <member name="vertical" type="bool" setter="set_vertical" getter="is_vertical" default="false"> + If [code]true[/code], the line will be vertical. If [code]false[/code], the line will be horizontal. </member> </members> <constants> diff --git a/doc/classes/StyleBoxTexture.xml b/doc/classes/StyleBoxTexture.xml index d5efc80846..af4186dcb6 100644 --- a/doc/classes/StyleBoxTexture.xml +++ b/doc/classes/StyleBoxTexture.xml @@ -15,6 +15,7 @@ <argument index="0" name="margin" type="int" enum="Margin"> </argument> <description> + Returns the size of the given [code]margin[/code]'s expand margin. See [enum Margin] for possible values. </description> </method> <method name="get_margin_size" qualifiers="const"> @@ -23,6 +24,7 @@ <argument index="0" name="margin" type="int" enum="Margin"> </argument> <description> + Returns the size of the given [code]margin[/code]. See [enum Margin] for possible values. </description> </method> <method name="set_expand_margin_all"> @@ -31,6 +33,7 @@ <argument index="0" name="size" type="float"> </argument> <description> + Sets the expand margin to [code]size[/code] pixels for all margins. </description> </method> <method name="set_expand_margin_individual"> @@ -45,6 +48,7 @@ <argument index="3" name="size_bottom" type="float"> </argument> <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"> @@ -55,6 +59,7 @@ <argument index="1" name="size" type="float"> </argument> <description> + Sets the expand margin to [code]size[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values. </description> </method> <method name="set_margin_size"> @@ -65,15 +70,19 @@ <argument index="1" name="size" type="float"> </argument> <description> + Sets the margin to [code]size[/code] pixels for the given [code]margin[/code]. See [enum Margin] for possible values. </description> </method> </methods> <members> <member name="axis_stretch_horizontal" type="int" setter="set_h_axis_stretch_mode" getter="get_h_axis_stretch_mode" enum="StyleBoxTexture.AxisStretchMode" default="0"> + Controls how the stylebox's texture will be stretched or tiled horizontally. See [enum AxisStretchMode] for possible values. </member> <member name="axis_stretch_vertical" type="int" setter="set_v_axis_stretch_mode" getter="get_v_axis_stretch_mode" enum="StyleBoxTexture.AxisStretchMode" default="0"> + Controls how the stylebox's texture will be stretched or tiled vertically. See [enum AxisStretchMode] for possible values. </member> <member name="draw_center" type="bool" setter="set_draw_center" getter="is_draw_center_enabled" default="true"> + If [code]true[/code], the nine-patch texture's center tile will be drawn. </member> <member name="expand_margin_bottom" type="float" setter="set_expand_margin_size" getter="get_expand_margin_size" default="0.0"> Expands the bottom margin of this style box when drawing, causing it to be drawn larger than requested. @@ -114,7 +123,7 @@ The normal map to use when drawing this style box. </member> <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2( 0, 0, 0, 0 )"> - Species a sub region of the texture to use. + Species a sub-region of the texture to use. This is equivalent to first wrapping the texture in an [AtlasTexture] with the same region. </member> <member name="texture" type="Texture" setter="set_texture" getter="get_texture"> @@ -124,15 +133,19 @@ <signals> <signal name="texture_changed"> <description> + Emitted when the stylebox's texture is changed. </description> </signal> </signals> <constants> <constant name="AXIS_STRETCH_MODE_STRETCH" value="0" enum="AxisStretchMode"> + Stretch the stylebox's texture. This results in visible distortion unless the texture size matches the stylebox's size perfectly. </constant> <constant name="AXIS_STRETCH_MODE_TILE" value="1" enum="AxisStretchMode"> + Repeats the stylebox's texture to match the stylebox's size according to the nine-patch system. </constant> <constant name="AXIS_STRETCH_MODE_TILE_FIT" value="2" enum="AxisStretchMode"> + Repeats the stylebox's texture to match the stylebox's size according to the nine-patch system. Unlike [constant AXIS_STRETCH_MODE_TILE], the texture may be slightly stretched to make the nine-patch texture tile seamlessly. </constant> </constants> </class> diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index 7cfd8c6919..0c9ac9fbff 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -167,7 +167,7 @@ </argument> <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]. - Default flag is [constant Mesh.ARRAY_COMPRESS_DEFAULT]. See [code]Mesh.ARRAY_COMPRESS_*[/code] constants for other flags. + Default flag is [constant Mesh.ARRAY_COMPRESS_DEFAULT]. See [code]ARRAY_COMPRESS_*[/code] constants in [enum Mesh.ArrayFormat] for other flags. </description> </method> <method name="commit_to_arrays"> diff --git a/doc/classes/TabContainer.xml b/doc/classes/TabContainer.xml index 1b9f38fc54..e5f126c344 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -144,12 +144,13 @@ If [code]true[/code], tabs can be rearranged with mouse drag. </member> <member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" enum="TabContainer.TabAlign" default="1"> - The alignment of all tabs in the tab container. See the [code]ALIGN_*[/code] constants for details. + The alignment of all tabs in the tab container. See the [enum TabAlign] constants for details. </member> <member name="tabs_visible" type="bool" setter="set_tabs_visible" getter="are_tabs_visible" default="true"> If [code]true[/code], tabs are visible. If [code]false[/code], tabs' content and titles are hidden. </member> <member name="use_hidden_tabs_for_min_size" type="bool" setter="set_use_hidden_tabs_for_min_size" getter="get_use_hidden_tabs_for_min_size" default="false"> + If [code]true[/code], children [Control] nodes that are hidden have their minimum size take into account in the total, instead of only the currently visible one. </member> </members> <signals> diff --git a/doc/classes/Tabs.xml b/doc/classes/Tabs.xml index 6bd7b8c2c3..04119b7cdb 100644 --- a/doc/classes/Tabs.xml +++ b/doc/classes/Tabs.xml @@ -33,6 +33,7 @@ <return type="bool"> </return> <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_select_with_rmb" qualifiers="const"> @@ -71,6 +72,7 @@ <return type="int"> </return> <description> + Returns the number of hidden tabs offsetted to the left. </description> </method> <method name="get_tab_rect" qualifiers="const"> @@ -179,11 +181,13 @@ If [code]true[/code], tabs can be rearranged with mouse drag. </member> <member name="scrolling_enabled" type="bool" setter="set_scrolling_enabled" getter="get_scrolling_enabled" default="true"> + if [code]true[/code], the mouse's scroll wheel cab be used to navigate the scroll view. </member> <member name="tab_align" type="int" setter="set_tab_align" getter="get_tab_align" enum="Tabs.TabAlign" default="1"> - The alignment of all tabs. See enum [code]TabAlign[/code] constants for details. + The alignment of all tabs. See [enum TabAlign] for details. </member> <member name="tab_close_display_policy" type="int" setter="set_tab_close_display_policy" getter="get_tab_close_display_policy" enum="Tabs.CloseButtonDisplayPolicy" default="0"> + Sets when the close button will appear on the tabs. See [enum CloseButtonDisplayPolicy] for details. </member> </members> <signals> @@ -191,36 +195,42 @@ <argument index="0" name="idx_to" type="int"> </argument> <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> <description> + Emitted when a tab is right-clicked. </description> </signal> <signal name="tab_changed"> <argument index="0" name="tab" type="int"> </argument> <description> + Emitted when switching to another tab. </description> </signal> <signal name="tab_clicked"> <argument index="0" name="tab" type="int"> </argument> <description> + Emitted when a tab is clicked, even if it is the current tab. </description> </signal> <signal name="tab_close"> <argument index="0" name="tab" type="int"> </argument> <description> + Emitted when a tab is closed. </description> </signal> <signal name="tab_hover"> <argument index="0" name="tab" type="int"> </argument> <description> + Emitted when a tab is hovered by the mouse. </description> </signal> </signals> @@ -238,10 +248,13 @@ Represents the size of the [enum TabAlign] enum. </constant> <constant name="CLOSE_BUTTON_SHOW_NEVER" value="0" enum="CloseButtonDisplayPolicy"> + Never show the close buttons. </constant> <constant name="CLOSE_BUTTON_SHOW_ACTIVE_ONLY" value="1" enum="CloseButtonDisplayPolicy"> + Only show the close button on the currently active tab. </constant> <constant name="CLOSE_BUTTON_SHOW_ALWAYS" value="2" enum="CloseButtonDisplayPolicy"> + Show the close button on all tabs. </constant> <constant name="CLOSE_BUTTON_MAX" value="3" enum="CloseButtonDisplayPolicy"> Represents the size of the [enum CloseButtonDisplayPolicy] enum. diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 75fceac500..ad2cadb96b 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -459,6 +459,12 @@ <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> + <member name="scroll_vertical" type="float" setter="set_v_scroll" getter="get_v_scroll" default="0.0"> + The current vertical scroll value. + </member> + <member name="scroll_horizontal" type="int" setter="set_h_scroll" getter="get_h_scroll" default="0"> + The current horizontal scroll value. + </member> </members> <signals> <signal name="breakpoint_toggled"> diff --git a/doc/classes/TextureButton.xml b/doc/classes/TextureButton.xml index 899ab8b875..201f8ddb8e 100644 --- a/doc/classes/TextureButton.xml +++ b/doc/classes/TextureButton.xml @@ -16,7 +16,7 @@ If [code]true[/code], the texture stretches to the edges of the node's bounding rectangle using the [member stretch_mode]. If [code]false[/code], the texture will not scale with the node. </member> <member name="stretch_mode" type="int" setter="set_stretch_mode" getter="get_stretch_mode" enum="TextureButton.StretchMode" default="0"> - Controls the texture's behavior when you resize the node's bounding rectangle, [b]only if[/b] [member expand] is [code]true[/code]. Set it to one of the [code]STRETCH_*[/code] constants. See the constants to learn more. + Controls the texture's behavior when you resize the node's bounding rectangle, [b]only if[/b] [member expand] is [code]true[/code]. Set it to one of the [enum StretchMode] constants. See the constants to learn more. </member> <member name="texture_click_mask" type="BitMap" setter="set_click_mask" getter="get_click_mask"> Pure black and white [BitMap] image to use for click detection. On the mask, white pixels represent the button's clickable area. Use it to create buttons with curved shapes. diff --git a/doc/classes/TextureProgress.xml b/doc/classes/TextureProgress.xml index 479ab865ba..c16d6f58bc 100644 --- a/doc/classes/TextureProgress.xml +++ b/doc/classes/TextureProgress.xml @@ -86,7 +86,7 @@ The [member texture_progress] fills from right to left. </constant> <constant name="FILL_TOP_TO_BOTTOM" value="2" enum="FillMode"> - The [member texture_progress] fills from top to bototm. + The [member texture_progress] fills from top to bottom. </constant> <constant name="FILL_BOTTOM_TO_TOP" value="3" enum="FillMode"> The [member texture_progress] fills from bottom to top. diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml index dd12c5af23..b9aa74ebb7 100644 --- a/doc/classes/Theme.xml +++ b/doc/classes/Theme.xml @@ -26,7 +26,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Clears the [Color] at [code]name[/code] if the Theme has [code]type[/code]. + Clears the [Color] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="clear_constant"> @@ -37,7 +37,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Clears the constant at [code]name[/code] if the Theme has [code]type[/code]. + Clears the constant at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="clear_font"> @@ -48,7 +48,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Clears the [Font] at [code]name[/code] if the Theme has [code]type[/code]. + Clears the [Font] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="clear_icon"> @@ -59,7 +59,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Clears the icon at [code]name[/code] if the Theme has [code]type[/code]. + Clears the icon at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="clear_stylebox"> @@ -70,14 +70,14 @@ <argument index="1" name="type" type="String"> </argument> <description> - Clears [StyleBox] at [code]name[/code] if the Theme has [code]type[/code]. + Clears [StyleBox] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="copy_default_theme"> <return type="void"> </return> <description> - Sets the Theme's values to a copy of the default theme values. + Sets the theme's values to a copy of the default theme values. </description> </method> <method name="copy_theme"> @@ -86,7 +86,7 @@ <argument index="0" name="other" type="Theme"> </argument> <description> - Sets the Theme's values to a copy of a given theme. + Sets the theme's values to a copy of a given theme. </description> </method> <method name="get_color" qualifiers="const"> @@ -97,7 +97,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Returns the [Color] at [code]name[/code] if the Theme has [code]type[/code]. + Returns the [Color] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_color_list" qualifiers="const"> @@ -106,7 +106,7 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all the [Color]s as a [PoolStringArray] filled with each [Color]'s name, for use in [method get_color], if the Theme has [code]type[/code]. + Returns all the [Color]s as a [PoolStringArray] filled with each [Color]'s name, for use in [method get_color], if the theme has [code]type[/code]. </description> </method> <method name="get_constant" qualifiers="const"> @@ -117,7 +117,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Returns the constant at [code]name[/code] if the Theme has [code]type[/code]. + Returns the constant at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_constant_list" qualifiers="const"> @@ -126,7 +126,7 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all the constants as a [PoolStringArray] filled with each constant's name, for use in [method get_constant], if the Theme has [code]type[/code]. + Returns all the constants as a [PoolStringArray] filled with each constant's name, for use in [method get_constant], if the theme has [code]type[/code]. </description> </method> <method name="get_font" qualifiers="const"> @@ -137,7 +137,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Returns the [Font] at [code]name[/code] if the Theme has [code]type[/code]. + Returns the [Font] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_font_list" qualifiers="const"> @@ -146,7 +146,7 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all the [Font]s as a [PoolStringArray] filled with each [Font]'s name, for use in [method get_font], if the Theme has [code]type[/code]. + Returns all the [Font]s as a [PoolStringArray] filled with each [Font]'s name, for use in [method get_font], if the theme has [code]type[/code]. </description> </method> <method name="get_icon" qualifiers="const"> @@ -157,7 +157,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Returns the icon [Texture] at [code]name[/code] if the Theme has [code]type[/code]. + Returns the icon [Texture] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_icon_list" qualifiers="const"> @@ -166,7 +166,7 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all the icons as a [PoolStringArray] filled with each [Texture]'s name, for use in [method get_icon], if the Theme has [code]type[/code]. + Returns all the icons as a [PoolStringArray] filled with each [Texture]'s name, for use in [method get_icon], if the theme has [code]type[/code]. </description> </method> <method name="get_stylebox" qualifiers="const"> @@ -177,7 +177,7 @@ <argument index="1" name="type" type="String"> </argument> <description> - Returns the icon [StyleBox] at [code]name[/code] if the Theme has [code]type[/code]. + Returns the icon [StyleBox] at [code]name[/code] if the theme has [code]type[/code]. </description> </method> <method name="get_stylebox_list" qualifiers="const"> @@ -186,14 +186,14 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all the [StyleBox]s as a [PoolStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the Theme has [code]type[/code]. + Returns all the [StyleBox]s as a [PoolStringArray] filled with each [StyleBox]'s name, for use in [method get_stylebox], if the theme has [code]type[/code]. </description> </method> <method name="get_stylebox_types" qualifiers="const"> <return type="PoolStringArray"> </return> <description> - Returns all the [StyleBox] types as a [PoolStringArray] filled with each [StyleBox]'s type, for use in [method get_stylebox] and/or [method get_stylebox_list], if the Theme has [code]type[/code]. + Returns all the [StyleBox] types as a [PoolStringArray] filled with each [StyleBox]'s type, for use in [method get_stylebox] and/or [method get_stylebox_list], if the theme has [code]type[/code]. </description> </method> <method name="get_type_list" qualifiers="const"> @@ -202,7 +202,7 @@ <argument index="0" name="type" type="String"> </argument> <description> - Returns all the types in [code]type[/code] as a [PoolStringArray] for use in any of the get_* functions, if the Theme has [code]type[/code]. + Returns all the types in [code]type[/code] as a [PoolStringArray] for use in any of the [code]get_*[/code] functions, if the theme has [code]type[/code]. </description> </method> <method name="has_color" qualifiers="const"> @@ -214,7 +214,7 @@ </argument> <description> Returns [code]true[/code] if [Color] with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the Theme does not have [code]type[/code]. + Returns [code]false[/code] if the theme does not have [code]type[/code]. </description> </method> <method name="has_constant" qualifiers="const"> @@ -226,7 +226,7 @@ </argument> <description> Returns [code]true[/code] if constant with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the Theme does not have [code]type[/code]. + Returns [code]false[/code] if the theme does not have [code]type[/code]. </description> </method> <method name="has_font" qualifiers="const"> @@ -238,7 +238,7 @@ </argument> <description> Returns [code]true[/code] if [Font] with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the Theme does not have [code]type[/code]. + Returns [code]false[/code] if the theme does not have [code]type[/code]. </description> </method> <method name="has_icon" qualifiers="const"> @@ -250,7 +250,7 @@ </argument> <description> Returns [code]true[/code] if icon [Texture] with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the Theme does not have [code]type[/code]. + Returns [code]false[/code] if the theme does not have [code]type[/code]. </description> </method> <method name="has_stylebox" qualifiers="const"> @@ -262,7 +262,7 @@ </argument> <description> Returns [code]true[/code] if [StyleBox] with [code]name[/code] is in [code]type[/code]. - Returns [code]false[/code] if the Theme does not have [code]type[/code]. + Returns [code]false[/code] if the theme does not have [code]type[/code]. </description> </method> <method name="set_color"> @@ -275,8 +275,8 @@ <argument index="2" name="color" type="Color"> </argument> <description> - Sets the Theme's [Color] to [code]color[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if the Theme does not have [code]type[/code]. + Sets the theme's [Color] to [code]color[/code] at [code]name[/code] in [code]type[/code]. + Does nothing if the theme does not have [code]type[/code]. </description> </method> <method name="set_constant"> @@ -289,8 +289,8 @@ <argument index="2" name="constant" type="int"> </argument> <description> - Sets the Theme's constant to [code]constant[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if the Theme does not have [code]type[/code]. + Sets the theme's constant to [code]constant[/code] at [code]name[/code] in [code]type[/code]. + Does nothing if the theme does not have [code]type[/code]. </description> </method> <method name="set_font"> @@ -303,8 +303,8 @@ <argument index="2" name="font" type="Font"> </argument> <description> - Sets the Theme's [Font] to [code]font[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if the Theme does not have [code]type[/code]. + Sets the theme's [Font] to [code]font[/code] at [code]name[/code] in [code]type[/code]. + Does nothing if the theme does not have [code]type[/code]. </description> </method> <method name="set_icon"> @@ -317,8 +317,8 @@ <argument index="2" name="texture" type="Texture"> </argument> <description> - Sets the Theme's icon [Texture] to [code]texture[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if the Theme does not have [code]type[/code]. + Sets the theme's icon [Texture] to [code]texture[/code] at [code]name[/code] in [code]type[/code]. + Does nothing if the theme does not have [code]type[/code]. </description> </method> <method name="set_stylebox"> @@ -331,8 +331,8 @@ <argument index="2" name="texture" type="StyleBox"> </argument> <description> - Sets Theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]type[/code]. - Does nothing if the Theme does not have [code]type[/code]. + Sets theme's [StyleBox] to [code]stylebox[/code] at [code]name[/code] in [code]type[/code]. + Does nothing if the theme does not have [code]type[/code]. </description> </method> </methods> diff --git a/doc/classes/Timer.xml b/doc/classes/Timer.xml index 4f455fb377..3e4b68d91d 100644 --- a/doc/classes/Timer.xml +++ b/doc/classes/Timer.xml @@ -49,7 +49,7 @@ </member> <member name="time_left" type="float" setter="" getter="get_time_left"> The timer's remaining time in seconds. Returns 0 if the timer is inactive. - [b]Note:[/b] You cannot set this value. To change the timer's remaining time, use [member wait_time]. + [b]Note:[/b] You cannot set this value. To change the timer's remaining time, use [method start]. </member> <member name="wait_time" type="float" setter="set_wait_time" getter="get_wait_time" default="1.0"> Wait time in seconds. diff --git a/doc/classes/Transform.xml b/doc/classes/Transform.xml index 034a1b2f5b..2e447ca1ba 100644 --- a/doc/classes/Transform.xml +++ b/doc/classes/Transform.xml @@ -95,6 +95,7 @@ <argument index="0" name="transform" type="Transform"> </argument> <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"> @@ -125,7 +126,7 @@ <argument index="1" name="phi" type="float"> </argument> <description> - Rotates the transform around given axis by phi. The axis must be a normalized vector. + 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"> @@ -134,16 +135,17 @@ <argument index="0" name="scale" type="Vector3"> </argument> <description> - Scales the transform by the specified 3D scaling factors. + Scales the transform by the given scale factor, using matrix multiplication. </description> </method> <method name="translated"> <return type="Transform"> </return> - <argument index="0" name="ofs" type="Vector3"> + <argument index="0" name="offset" type="Vector3"> </argument> <description> - Translates the transform by the specified offset. + 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. </description> </method> <method name="xform"> diff --git a/doc/classes/Transform2D.xml b/doc/classes/Transform2D.xml index 89ccffc2e9..afc8b04dc7 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -112,6 +112,7 @@ <argument index="0" name="transform" type="Transform2D"> </argument> <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="orthonormalized"> @@ -127,7 +128,7 @@ <argument index="0" name="phi" type="float"> </argument> <description> - Rotates the transform by the given angle (in radians). + Rotates the transform by the given angle (in radians), using matrix multiplication. </description> </method> <method name="scaled"> @@ -136,7 +137,7 @@ <argument index="0" name="scale" type="Vector2"> </argument> <description> - Scales the transform by the given factor. + Scales the transform by the given scale factor, using matrix multiplication. </description> </method> <method name="translated"> @@ -145,7 +146,8 @@ <argument index="0" name="offset" type="Vector2"> </argument> <description> - Translates the transform by the given offset. + 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. </description> </method> <method name="xform"> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index e0c8d0b0e8..aa1f8638d2 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -43,14 +43,18 @@ <argument index="1" name="idx" type="int" default="-1"> </argument> <description> - Create an item in the tree and add it as the last child of [code]parent[/code]. If [code]parent[/code] is [code]null[/code], it will be added as the root's last child, or it'll be the the root itself if the tree is empty. + 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. + The new item will be the [code]idx[/code]th child of parent, or it will be the last child if there are not enough siblings. </description> </method> <method name="ensure_cursor_is_visible"> <return type="void"> </return> <description> - Makes the currently selected item visible. This will scroll the tree to make sure the selected item is visible. + 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. + [b]Note:[/b] Despite the name of this method, the focus cursor itself is only visible in [constant SELECT_MULTI] mode. </description> </method> <method name="get_column_at_position" qualifiers="const"> @@ -59,7 +63,7 @@ <argument index="0" name="position" type="Vector2"> </argument> <description> - Returns the column index under the given point. + Returns the column index at [code]position[/code], or -1 if no item is there. </description> </method> <method name="get_column_title" qualifiers="const"> @@ -93,8 +97,9 @@ <argument index="0" name="position" type="Vector2"> </argument> <description> - If [member drop_mode_flags] includes [constant DROP_MODE_INBETWEEN], returns -1 if [code]position[/code] is the upper part of a tree item at that position, 1 for the lower part, and additionally 0 for the middle part if [member drop_mode_flags] includes [constant DROP_MODE_ON_ITEM]. - Otherwise, returns 0. If there are no tree items at [code]position[/code], returns -100. + 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. + To get the item which the returned drop section is relative to, use [method get_item_at_position]. </description> </method> <method name="get_edited" qualifiers="const"> @@ -119,7 +124,7 @@ <argument index="1" name="column" type="int" default="-1"> </argument> <description> - Returns the rectangle area for the specified item. If column is specified, only get the position and size of that column, otherwise get the rectangle containing all columns. + 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"> @@ -137,7 +142,8 @@ <argument index="0" name="from" type="Object"> </argument> <description> - Returns the next selected item after the given one. + 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"> @@ -151,7 +157,7 @@ <return type="TreeItem"> </return> <description> - Returns the tree's root item. + Returns the tree's root item, or [code]null[/code] if the tree is empty. </description> </method> <method name="get_scroll" qualifiers="const"> @@ -165,14 +171,18 @@ <return type="TreeItem"> </return> <description> - Returns the currently selected item. + 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. + To get the currently selected item(s), use [method get_next_selected]. </description> </method> <method name="get_selected_column" qualifiers="const"> <return type="int"> </return> <description> - Returns the current selection's column. + 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. + To tell whether a column of an item is selected, use [method TreeItem.is_selected]. </description> </method> <method name="set_column_expand"> @@ -229,7 +239,8 @@ The number of columns. </member> <member name="drop_mode_flags" type="int" setter="set_drop_mode_flags" getter="get_drop_mode_flags" default="0"> - The drop mode as an OR combination of flags. See [code]DROP_MODE_*[/code] constants. Once dropping is done, reverts to [constant DROP_MODE_DISABLED]. Setting this during [method Control.can_drop_data] is recommended. + The drop mode as an OR combination of flags. See [enum DropModeFlags] constants. Once dropping is done, reverts to [constant DROP_MODE_DISABLED]. Setting this during [method Control.can_drop_data] is recommended. + This controls the drop sections, i.e. the decision and drawing of possible drop locations based on the mouse position. </member> <member name="focus_mode" type="int" setter="set_focus_mode" getter="get_focus_mode" override="true" enum="Control.FocusMode" default="2" /> <member name="hide_folding" type="bool" setter="set_hide_folding" getter="is_folding_hidden" default="false"> @@ -240,7 +251,7 @@ </member> <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" /> <member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="Tree.SelectMode" default="0"> - Allows single or multiple selection. See the [code]SELECT_*[/code] constants. + Allows single or multiple selection. See the [enum SelectMode] constants. </member> </members> <signals> @@ -278,6 +289,7 @@ <argument index="0" name="position" type="Vector2"> </argument> <description> + Emitted when the right mouse button is pressed in the empty space of the tree. </description> </signal> <signal name="empty_tree_rmb_selected"> @@ -343,23 +355,34 @@ </signal> <signal name="nothing_selected"> <description> + Emitted when a left mouse button click does not select any item. </description> </signal> </signals> <constants> <constant name="SELECT_SINGLE" value="0" enum="SelectMode"> - Allows selection of a single item at a time. + Allows selection of a single cell at a time. From the perspective of items, only a single item is allowed to be selected. And there is only one column selected in the selected item. + The focus cursor is always hidden in this mode, but it is positioned at the current selection, making the currently selected item the currently focused item. </constant> <constant name="SELECT_ROW" value="1" enum="SelectMode"> + Allows selection of a single row at a time. From the perspective of items, only a single items is allowed to be selected. And all the columns are selected in the selected item. + The focus cursor is always hidden in this mode, but it is positioned at the first column of the current selection, making the currently selected item the currently focused item. </constant> <constant name="SELECT_MULTI" value="2" enum="SelectMode"> - Allows selection of multiple items at the same time. + Allows selection of multiple cells at the same time. From the perspective of items, multiple items are allowed to be selected. And there can be multiple columns selected in each selected item. + The focus cursor is visible in this mode, the item or column under the cursor is not necessarily selected. </constant> <constant name="DROP_MODE_DISABLED" value="0" enum="DropModeFlags"> + Disables all drop sections, but still allows to detect the "on item" drop section by [method get_drop_section_at_position]. + [b]Note:[/b] This is the default flag, it has no effect when combined with other flags. </constant> <constant name="DROP_MODE_ON_ITEM" value="1" enum="DropModeFlags"> + Enables the "on item" drop section. This drop section covers the entire item. + When combined with [constant DROP_MODE_INBETWEEN], this drop section halves the height and stays centered vertically. </constant> <constant name="DROP_MODE_INBETWEEN" value="2" enum="DropModeFlags"> + Enables "above item" and "below item" drop sections. The "above item" drop section covers the top half of the item, and the "below item" drop section covers the bottom half. + When combined with [constant DROP_MODE_ON_ITEM], these drop sections halves the height and stays on top / bottom accordingly. </constant> </constants> <theme_items> diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index c77388e5f4..f32c5527fd 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -396,7 +396,7 @@ <argument index="1" name="mode" type="int" enum="TreeItem.TreeCellMode"> </argument> <description> - Sets the given column's cell mode to [code]mode[/code]. See [code]CELL_MODE_*[/code] constants. + Sets the given column's cell mode to [code]mode[/code]. See [enum TreeCellMode] constants. </description> </method> <method name="set_checked"> diff --git a/doc/classes/Tween.xml b/doc/classes/Tween.xml index 0f7a93e8d5..cf75e71358 100644 --- a/doc/classes/Tween.xml +++ b/doc/classes/Tween.xml @@ -34,9 +34,9 @@ </argument> <argument index="5" name="duration" type="float"> </argument> - <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType"> + <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> </argument> - <argument index="7" name="ease_type" type="int" enum="Tween.EaseType"> + <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2"> </argument> <argument index="8" name="delay" type="float" default="0"> </argument> @@ -60,9 +60,9 @@ </argument> <argument index="5" name="duration" type="float"> </argument> - <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType"> + <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> </argument> - <argument index="7" name="ease_type" type="int" enum="Tween.EaseType"> + <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2"> </argument> <argument index="8" name="delay" type="float" default="0"> </argument> @@ -137,9 +137,9 @@ </argument> <argument index="4" name="duration" type="float"> </argument> - <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType"> + <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> </argument> - <argument index="6" name="ease_type" type="int" enum="Tween.EaseType"> + <argument index="6" name="ease_type" type="int" enum="Tween.EaseType" default="2"> </argument> <argument index="7" name="delay" type="float" default="0"> </argument> @@ -161,9 +161,9 @@ </argument> <argument index="4" name="duration" type="float"> </argument> - <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType"> + <argument index="5" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> </argument> - <argument index="6" name="ease_type" type="int" enum="Tween.EaseType"> + <argument index="6" name="ease_type" type="int" enum="Tween.EaseType" default="2"> </argument> <argument index="7" name="delay" type="float" default="0"> </argument> @@ -292,9 +292,9 @@ </argument> <argument index="5" name="duration" type="float"> </argument> - <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType"> + <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> </argument> - <argument index="7" name="ease_type" type="int" enum="Tween.EaseType"> + <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2"> </argument> <argument index="8" name="delay" type="float" default="0"> </argument> @@ -318,9 +318,9 @@ </argument> <argument index="5" name="duration" type="float"> </argument> - <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType"> + <argument index="6" name="trans_type" type="int" enum="Tween.TransitionType" default="0"> </argument> - <argument index="7" name="ease_type" type="int" enum="Tween.EaseType"> + <argument index="7" name="ease_type" type="int" enum="Tween.EaseType" default="2"> </argument> <argument index="8" name="delay" type="float" default="0"> </argument> @@ -433,10 +433,10 @@ The interpolation starts quickly and slows down towards the end. </constant> <constant name="EASE_IN_OUT" value="2" enum="EaseType"> - A combination of EASE_IN and EASE_OUT. The interpolation is slowest at both ends. + A combination of [constant EASE_IN] and [constant EASE_OUT]. The interpolation is slowest at both ends. </constant> <constant name="EASE_OUT_IN" value="3" enum="EaseType"> - A combination of EASE_IN and EASE_OUT. The interpolation is fastest at both ends. + A combination of [constant EASE_IN] and [constant EASE_OUT]. The interpolation is fastest at both ends. </constant> </constants> </class> diff --git a/doc/classes/UndoRedo.xml b/doc/classes/UndoRedo.xml index 7834719af6..52ff7ef38b 100644 --- a/doc/classes/UndoRedo.xml +++ b/doc/classes/UndoRedo.xml @@ -32,7 +32,7 @@ </tutorials> <methods> <method name="add_do_method" qualifiers="vararg"> - <return type="Variant"> + <return type="void"> </return> <argument index="0" name="object" type="Object"> </argument> @@ -65,7 +65,7 @@ </description> </method> <method name="add_undo_method" qualifiers="vararg"> - <return type="Variant"> + <return type="void"> </return> <argument index="0" name="object" type="Object"> </argument> diff --git a/doc/classes/VSlider.xml b/doc/classes/VSlider.xml index fc62e5c892..8590c7bc3b 100644 --- a/doc/classes/VSlider.xml +++ b/doc/classes/VSlider.xml @@ -17,20 +17,14 @@ <constants> </constants> <theme_items> - <theme_item name="focus" type="StyleBox"> - </theme_item> <theme_item name="grabber" type="Texture"> </theme_item> <theme_item name="grabber_area" type="StyleBox"> </theme_item> <theme_item name="grabber_disabled" type="Texture"> </theme_item> - <theme_item name="grabber_disabled" type="StyleBox"> - </theme_item> <theme_item name="grabber_highlight" type="Texture"> </theme_item> - <theme_item name="grabber_highlight" type="StyleBox"> - </theme_item> <theme_item name="slider" type="StyleBox"> </theme_item> <theme_item name="tick" type="Texture"> diff --git a/doc/classes/Variant.xml b/doc/classes/Variant.xml index 9d55f5846f..1976e812ba 100644 --- a/doc/classes/Variant.xml +++ b/doc/classes/Variant.xml @@ -17,7 +17,7 @@ - VisualScript tracks properties inside Variants as well, but it also uses static typing. The GUI interface enforces that properties have a particular type that doesn't change over time. - C# is statically typed, but uses the Mono [code]object[/code] type in place of Godot's Variant class when it needs to represent a dynamic value. [code]object[/code] is the Mono runtime's equivalent of the same concept. - The statically-typed language NativeScript C++ does not define a built-in Variant-like class. Godot's GDNative bindings provide their own godot::Variant class for users; Any point at which the C++ code starts interacting with the Godot runtime is a place where you might have to start wrapping data inside Variant objects. - The global [method @GDScript.typeof] function returns the enumerated value of the Variant type stored in the current variable. These correspond to [code]TYPE_*[/code] constants in the [@GlobalScope] docs. + The global [method @GDScript.typeof] function returns the enumerated value of the Variant type stored in the current variable (see [enum Variant.Type]). [codeblock] var foo = 2 match typeof(foo): diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 8ae5caf68c..b23c69de60 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -159,6 +159,7 @@ <argument index="0" name="v" type="Vector2"> </argument> <description> + Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component. </description> </method> <method name="is_normalized"> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index 29c24709e2..d838e6d2f7 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -135,6 +135,7 @@ <argument index="0" name="v" type="Vector3"> </argument> <description> + Returns [code]true[/code] if this vector and [code]v[/code] are approximately equal, by running [method @GDScript.is_equal_approx] on each component. </description> </method> <method name="is_normalized"> diff --git a/doc/classes/VehicleWheel.xml b/doc/classes/VehicleWheel.xml index ff6004bcba..ba33f66e77 100644 --- a/doc/classes/VehicleWheel.xml +++ b/doc/classes/VehicleWheel.xml @@ -75,7 +75,7 @@ This is the distance in meters the wheel is lowered from its origin point. Don't set this to 0.0 and move the wheel into position, instead move the origin point of your wheel (the gizmo in Godot) to the position the wheel will take when bottoming out, then use the rest length to move the wheel down to the position it should be in when the car is in rest. </member> <member name="wheel_roll_influence" type="float" setter="set_roll_influence" getter="get_roll_influence" default="0.1"> - This value affects the roll of your vehicle. If set to 0.0 for all wheels, your vehicle will be prone to rolling over, while a value of 1.0 will resist body roll. + This value affects the roll of your vehicle. If set to 1.0 for all wheels, your vehicle will be prone to rolling over, while a value of 0.0 will resist body roll. </member> </members> <constants> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 9bc46881f9..58dd36daa5 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -126,6 +126,7 @@ <return type="bool"> </return> <description> + Returns [code]true[/code] if the viewport is currently performing a drag operation. </description> </method> <method name="input"> @@ -304,6 +305,13 @@ </member> </members> <signals> + <signal name="gui_focus_changed"> + <argument index="0" name="node" type="Control"> + </argument> + <description> + Emitted when a Control node grabs keyboard focus. + </description> + </signal> <signal name="size_changed"> <description> Emitted when the size of the viewport is changed, whether by [method set_size_override], resize of window, or some other means. diff --git a/doc/classes/ViewportContainer.xml b/doc/classes/ViewportContainer.xml index e4c6091909..2f1bc5d799 100644 --- a/doc/classes/ViewportContainer.xml +++ b/doc/classes/ViewportContainer.xml @@ -15,6 +15,9 @@ If [code]true[/code], the viewport will be scaled to the control's size. </member> <member name="stretch_shrink" type="int" setter="set_stretch_shrink" getter="get_stretch_shrink" default="1"> + Divides the viewport's effective resolution by this value while preserving its scale. This can be used to speed up rendering. + For example, a 1280×720 viewport with [member stretch_shrink] set to [code]2[/code] will be rendered at 640×360 while occupying the same size in the container. + [b]Note:[/b] [member stretch] must be [code]true[/code] for this property to work. </member> </members> <constants> diff --git a/doc/classes/VisualServer.xml b/doc/classes/VisualServer.xml index 895aba2473..6b66721237 100644 --- a/doc/classes/VisualServer.xml +++ b/doc/classes/VisualServer.xml @@ -6,8 +6,16 @@ <description> Server for anything visible. The visual server is the API backend for everything visible. The whole scene system mounts on it to display. The visual server is completely opaque, the internals are entirely implementation specific and cannot be accessed. + The visual server can be used to bypass the scene system entirely. + Resources are created using the [code]*_create[/code] functions. + All objects are drawn to a viewport. You can use the [Viewport] attached to the [SceneTree] or you can create one yourself with [method viewport_create]. When using a custom scenario or canvas, the scenario or canvas needs to be attached to the viewport using [method viewport_set_scenario] or [method viewport_attach_canvas]. + In 3D, all visual objects must be associated with a scenario. The scenario is a visual representation of the world. If accessing the visual server from a running game, the scenario can be accessed from the scene tree from any [Spatial] node with [method Spatial.get_world]. Otherwise, a scenario can be created with [method scenario_create]. + Similarly in 2D, a canvas is needed to draw all canvas items. + In 3D, all visible objects are comprised of a resource and an instance. A resource can be a mesh, a particle system, a light, or any other 3D object. In order to be visible resources must be attached to an instance using [method instance_set_base]. The instance must also be attached to the scenario using [method instance_set_scenario] in order to be visible. + In 2D, all visible objects are some form of canvas item. In order to be visible, a canvas item needs to be the child of a canvas attached to a viewport, or it needs to be the child of another canvas item that is eventually attached to the canvas. </description> <tutorials> + <link>http://docs.godotengine.org/en/latest/tutorials/optimization/using_servers.html</link> </tutorials> <methods> <method name="black_bars_set_images"> @@ -44,6 +52,8 @@ <return type="RID"> </return> <description> + Creates a camera and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]camera_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="camera_set_cull_mask"> @@ -54,6 +64,7 @@ <argument index="1" name="layers" type="int"> </argument> <description> + Sets the cull mask associated with this camera. The cull mask describes which 3d layers are rendered by this camera. Equivalent to [member Camera.cull_mask]. </description> </method> <method name="camera_set_environment"> @@ -64,6 +75,7 @@ <argument index="1" name="env" type="RID"> </argument> <description> + Sets the environment used by this camera. Equivalent to [member Camera.environment]. </description> </method> <method name="camera_set_frustum"> @@ -80,6 +92,7 @@ <argument index="4" name="z_far" type="float"> </argument> <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"> @@ -94,6 +107,7 @@ <argument index="3" name="z_far" type="float"> </argument> <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"> @@ -108,6 +122,7 @@ <argument index="3" name="z_far" type="float"> </argument> <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"> @@ -118,6 +133,7 @@ <argument index="1" name="transform" type="Transform"> </argument> <description> + Sets [Transform] of camera. </description> </method> <method name="camera_set_use_vertical_aspect"> @@ -128,13 +144,15 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], preserves the horizontal aspect ratio which is equivalent to [constant Camera.KEEP_WIDTH]. If [code]false[/code], preserves the vertical aspect ratio which is equivalent to [constant Camera.KEEP_HEIGHT]. </description> </method> <method name="canvas_create"> <return type="RID"> </return> <description> - Creates a canvas and returns the assigned [RID]. + 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] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="canvas_item_add_circle"> @@ -198,6 +216,7 @@ <argument index="5" name="normal_map" type="RID"> </argument> <description> + Adds a mesh command to the [CanvasItem]'s draw commands. </description> </method> <method name="canvas_item_add_multimesh"> @@ -411,7 +430,12 @@ </argument> <argument index="9" name="normal_map" type="RID"> </argument> + <argument index="10" name="antialiased" type="bool" default="false"> + </argument> + <argument index="11" name="antialiasing_use_indices" type="bool" default="false"> + </argument> <description> + Adds a triangle array to the [CanvasItem]'s draw commands. </description> </method> <method name="canvas_item_clear"> @@ -427,7 +451,8 @@ <return type="RID"> </return> <description> - Creates a new [CanvasItem] and returns its [RID]. + Creates a new [CanvasItem] and returns its [RID]. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_item_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="canvas_item_set_clip"> @@ -475,6 +500,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + Enables the use of distance fields for GUI elements that are rendering distance field based fonts. </description> </method> <method name="canvas_item_set_draw_behind_parent"> @@ -540,7 +566,7 @@ <argument index="1" name="parent" type="RID"> </argument> <description> - Sets the parent for the [CanvasItem]. + Sets the parent for the [CanvasItem]. The parent can be another canvas item, or it can be the root canvas that is attached to the viewport. </description> </method> <method name="canvas_item_set_self_modulate"> @@ -635,7 +661,8 @@ <return type="RID"> </return> <description> - Creates a canvas light. + Creates a canvas light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_light_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="canvas_light_occluder_attach_to_canvas"> @@ -653,7 +680,8 @@ <return type="RID"> </return> <description> - Creates a light occluder. + Creates a light occluder and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_light_ocluder_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="canvas_light_occluder_set_enabled"> @@ -787,7 +815,7 @@ <argument index="1" name="mode" type="int" enum="VisualServer.CanvasLightMode"> </argument> <description> - The mode of the light, see [code]CANVAS_LIGHT_MODE_*[/code] constants. + The mode of the light, see [enum CanvasLightMode] constants. </description> </method> <method name="canvas_light_set_scale"> @@ -798,6 +826,7 @@ <argument index="1" name="scale" type="float"> </argument> <description> + Sets the texture's scale factor of the light. Equivalent to [member Light2D.texture_scale]. </description> </method> <method name="canvas_light_set_shadow_buffer_size"> @@ -841,7 +870,7 @@ <argument index="1" name="filter" type="int" enum="VisualServer.CanvasLightShadowFilter"> </argument> <description> - Sets the canvas light's shadow's filter, see [code]CANVAS_LIGHT_SHADOW_FILTER_*[/code] constants. + Sets the canvas light's shadow's filter, see [enum CanvasLightShadowFilter] constants. </description> </method> <method name="canvas_light_set_shadow_gradient_length"> @@ -874,6 +903,7 @@ <argument index="1" name="texture" type="RID"> </argument> <description> + Sets texture to be used by light. Equivalent to [member Light2D.texture]. </description> </method> <method name="canvas_light_set_texture_offset"> @@ -884,6 +914,7 @@ <argument index="1" name="offset" type="Vector2"> </argument> <description> + Sets the offset of the light's texture. Equivalent to [member Light2D.offset]. </description> </method> <method name="canvas_light_set_transform"> @@ -907,13 +938,15 @@ <argument index="2" name="max_z" type="int"> </argument> <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> <description> - Creates a new light occluder polygon. + Creates a new light occluder polygon and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]canvas_occluder_polygon_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="canvas_occluder_polygon_set_cull_mode"> @@ -924,7 +957,7 @@ <argument index="1" name="mode" type="int" enum="VisualServer.CanvasOccluderPolygonCullMode"> </argument> <description> - Sets an occluder polygons cull mode. See [code]CANVAS_OCCLUDER_POLYGON_CULL_MODE_*[/code] constants. + Sets an occluder polygons cull mode. See [enum CanvasOccluderPolygonCullMode] constants. </description> </method> <method name="canvas_occluder_polygon_set_shape"> @@ -979,6 +1012,9 @@ <return type="RID"> </return> <description> + Creates a directional light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this directional light to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="draw"> @@ -989,12 +1025,15 @@ <argument index="1" name="frame_step" type="float" default="0.0"> </argument> <description> + Draws a frame. [i]This method is deprecated[/i], please use [method force_draw] instead. </description> </method> <method name="environment_create"> <return type="RID"> </return> <description> + Creates an environment and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]environment_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="environment_set_adjustment"> @@ -1013,6 +1052,7 @@ <argument index="5" name="ramp" type="RID"> </argument> <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"> @@ -1027,6 +1067,7 @@ <argument index="3" name="sky_contibution" type="float" default="0.0"> </argument> <description> + Sets the ambient light parameters. See [Environment] for more details. </description> </method> <method name="environment_set_background"> @@ -1037,6 +1078,7 @@ <argument index="1" name="bg" type="int" enum="VisualServer.EnvironmentBG"> </argument> <description> + Sets the [i]BGMode[/i] of the environment. Equivalent to [member Environment.background_mode]. </description> </method> <method name="environment_set_bg_color"> @@ -1047,6 +1089,7 @@ <argument index="1" name="color" type="Color"> </argument> <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"> @@ -1057,6 +1100,7 @@ <argument index="1" name="energy" type="float"> </argument> <description> + Sets the intensity of the background color. </description> </method> <method name="environment_set_canvas_max_layer"> @@ -1067,6 +1111,7 @@ <argument index="1" name="max_layer" type="int"> </argument> <description> + Sets the maximum layer to use if using Canvas background mode. </description> </method> <method name="environment_set_dof_blur_far"> @@ -1085,6 +1130,7 @@ <argument index="5" name="quality" type="int" enum="VisualServer.EnvironmentDOFBlurQuality"> </argument> <description> + Sets the values to be used with the "DoF Far Blur" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_dof_blur_near"> @@ -1103,6 +1149,7 @@ <argument index="5" name="quality" type="int" enum="VisualServer.EnvironmentDOFBlurQuality"> </argument> <description> + Sets the values to be used with the "DoF Near Blur" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_fog"> @@ -1119,6 +1166,7 @@ <argument index="4" name="sun_amount" type="float"> </argument> <description> + Sets the variables to be used with the scene fog. See [Environment] for more details. </description> </method> <method name="environment_set_fog_depth"> @@ -1139,6 +1187,7 @@ <argument index="6" name="transmit_curve" type="float"> </argument> <description> + Sets the variables to be used with the fog depth effect. See [Environment] for more details. </description> </method> <method name="environment_set_fog_height"> @@ -1155,6 +1204,7 @@ <argument index="4" name="height_curve" type="float"> </argument> <description> + Sets the variables to be used with the fog height effect. See [Environment] for more details. </description> </method> <method name="environment_set_glow"> @@ -1183,6 +1233,7 @@ <argument index="10" name="bicubic_upscale" type="bool"> </argument> <description> + Sets the variables to be used with the "glow" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_sky"> @@ -1193,6 +1244,7 @@ <argument index="1" name="sky" type="RID"> </argument> <description> + Sets the [Sky] to be used as the environment's background when using [i]BGMode[/i] sky. Equivalent to [member Environment.background_sky]. </description> </method> <method name="environment_set_sky_custom_fov"> @@ -1203,6 +1255,7 @@ <argument index="1" name="scale" type="float"> </argument> <description> + Sets a custom field of view for the background [Sky]. Equivalent to [member Environment.background_sky_custom_fov]. </description> </method> <method name="environment_set_sky_orientation"> @@ -1213,6 +1266,7 @@ <argument index="1" name="orientation" type="Basis"> </argument> <description> + Sets the rotation of the background [Sky] expressed as a [Basis]. Equivalent to [member Environment.background_sky_orientation]. </description> </method> <method name="environment_set_ssao"> @@ -1245,6 +1299,7 @@ <argument index="12" name="bilateral_sharpness" type="float"> </argument> <description> + Sets the variables to be used with the "Screen Space Ambient Occlusion (SSAO)" post-process effect. See [Environment] for more details. </description> </method> <method name="environment_set_ssr"> @@ -1265,6 +1320,7 @@ <argument index="6" name="roughness" type="bool"> </argument> <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_tonemap"> @@ -1289,6 +1345,7 @@ <argument index="8" name="auto_exp_grey" type="float"> </argument> <description> + Sets the variables to be used with the "tonemap" post-process effect. See [Environment] for more details. </description> </method> <method name="finish"> @@ -1306,6 +1363,7 @@ <argument index="1" name="frame_step" type="float" default="0.0"> </argument> <description> + Forces a frame to be drawn when the function is called. Drawing a frame updates all [Viewport]s that are set to update. Use with extreme caution. </description> </method> <method name="force_sync"> @@ -1330,7 +1388,7 @@ <argument index="0" name="info" type="int" enum="VisualServer.RenderInfo"> </argument> <description> - Returns a certain information, see [code]RENDER_INFO_*[/code] for options. + Returns a certain information, see [enum RenderInfo] for options. </description> </method> <method name="get_test_cube"> @@ -1347,6 +1405,22 @@ 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> + <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> + <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> @@ -1358,6 +1432,9 @@ <return type="RID"> </return> <description> + Creates a GI probe and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]gi_probe_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this GI probe to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="gi_probe_get_bias" qualifiers="const"> @@ -1366,6 +1443,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the bias value for the GI probe. Bias is used to avoid self occlusion. Equivalent to [member GIProbeData.bias]. </description> </method> <method name="gi_probe_get_bounds" qualifiers="const"> @@ -1374,6 +1452,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the axis-aligned bounding box that covers the full extent of the GI probe. </description> </method> <method name="gi_probe_get_cell_size" qualifiers="const"> @@ -1382,6 +1461,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the cell size set by [method gi_probe_set_cell_size]. </description> </method> <method name="gi_probe_get_dynamic_data" qualifiers="const"> @@ -1390,6 +1470,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the data used by the GI probe. </description> </method> <method name="gi_probe_get_dynamic_range" qualifiers="const"> @@ -1398,6 +1479,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the dynamic range set for this GI probe. Equivalent to [member GIProbe.dynamic_range]. </description> </method> <method name="gi_probe_get_energy" qualifiers="const"> @@ -1406,6 +1488,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the energy multiplier for this GI probe. Equivalent to [member GIProbe.energy]. </description> </method> <method name="gi_probe_get_normal_bias" qualifiers="const"> @@ -1414,6 +1497,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the normal bias for this GI probe. Equivalent to [member GIProbe.normal_bias]. </description> </method> <method name="gi_probe_get_propagation" qualifiers="const"> @@ -1422,6 +1506,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the propagation value for this GI probe. Equivalent to [member GIProbe.propagation]. </description> </method> <method name="gi_probe_get_to_cell_xform" qualifiers="const"> @@ -1430,6 +1515,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns the Transform set by [method gi_probe_set_to_cell_xform]. </description> </method> <method name="gi_probe_is_compressed" qualifiers="const"> @@ -1438,6 +1524,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns [code]true[/code] if the GI probe data associated with this GI probe is compressed. Equivalent to [member GIProbe.compress]. </description> </method> <method name="gi_probe_is_interior" qualifiers="const"> @@ -1446,6 +1533,7 @@ <argument index="0" name="probe" type="RID"> </argument> <description> + Returns [code]true[/code] if the GI probe is set to interior, meaning it does not account for sky light. Equivalent to [member GIProbe.interior]. </description> </method> <method name="gi_probe_set_bias"> @@ -1456,6 +1544,7 @@ <argument index="1" name="bias" type="float"> </argument> <description> + Sets the bias value to avoid self-occlusion. Equivalent to [member GIProbe.bias]. </description> </method> <method name="gi_probe_set_bounds"> @@ -1466,6 +1555,7 @@ <argument index="1" name="bounds" type="AABB"> </argument> <description> + Sets the axis-aligned bounding box that covers the extent of the GI probe. </description> </method> <method name="gi_probe_set_cell_size"> @@ -1476,6 +1566,7 @@ <argument index="1" name="range" type="float"> </argument> <description> + Sets the size of individual cells within the GI probe. </description> </method> <method name="gi_probe_set_compress"> @@ -1486,6 +1577,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + Sets the compression setting for the GI probe data. Compressed data will take up less space but may look worse. Equivalent to [member GIProbe.compress]. </description> </method> <method name="gi_probe_set_dynamic_data"> @@ -1496,6 +1588,7 @@ <argument index="1" name="data" type="PoolIntArray"> </argument> <description> + Sets the data to be used in the GI probe for lighting calculations. Normally this is created and called internally within the [GIProbe] node. You should not try to set this yourself. </description> </method> <method name="gi_probe_set_dynamic_range"> @@ -1506,6 +1599,7 @@ <argument index="1" name="range" type="int"> </argument> <description> + Sets the dynamic range of the GI probe. Dynamic range sets the limit for how bright lights can be. A smaller range captures greater detail but limits how bright lights can be. Equivalent to [member GIProbe.dynamic_range]. </description> </method> <method name="gi_probe_set_energy"> @@ -1516,6 +1610,7 @@ <argument index="1" name="energy" type="float"> </argument> <description> + Sets the energy multiplier for this GI probe. A higher energy makes the indirect light from the GI probe brighter. Equivalent to [member GIProbe.energy]. </description> </method> <method name="gi_probe_set_interior"> @@ -1526,6 +1621,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + Sets the interior value of this GI probe. A GI probe set to interior does not include the sky when calculating lighting. Equivalent to [member GIProbe.interior]. </description> </method> <method name="gi_probe_set_normal_bias"> @@ -1536,6 +1632,7 @@ <argument index="1" name="bias" type="float"> </argument> <description> + Sets the normal bias for this GI probe. Normal bias behaves similar to the other form of bias and may help reduce self-occlusion. Equivalent to [member GIProbe.normal_bias]. </description> </method> <method name="gi_probe_set_propagation"> @@ -1546,6 +1643,7 @@ <argument index="1" name="propagation" type="float"> </argument> <description> + Sets the propagation of light within this GI probe. Equivalent to [member GIProbe.propagation]. </description> </method> <method name="gi_probe_set_to_cell_xform"> @@ -1556,6 +1654,7 @@ <argument index="1" name="xform" type="Transform"> </argument> <description> + Sets the to cell [Transform] for this GI probe. </description> </method> <method name="has_changed" qualifiers="const"> @@ -1571,6 +1670,7 @@ <argument index="0" name="feature" type="int" enum="VisualServer.Features"> </argument> <description> + Not yet implemented. Always returns [code]false[/code]. </description> </method> <method name="has_os_feature" qualifiers="const"> @@ -1592,6 +1692,7 @@ <argument index="2" name="texture" type="RID"> </argument> <description> + Sets up [ImmediateGeometry] internals to prepare for drawing. Equivalent to [method ImmediateGeometry.begin]. </description> </method> <method name="immediate_clear"> @@ -1600,6 +1701,7 @@ <argument index="0" name="immediate" type="RID"> </argument> <description> + Clears everything that was set up between [method immediate_begin] and [method immediate_end]. Equivalent to [method ImmediateGeometry.clear]. </description> </method> <method name="immediate_color"> @@ -1610,12 +1712,16 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Sets the color to be used with next vertex. Equivalent to [method ImmediateGeometry.set_color]. </description> </method> <method name="immediate_create"> <return type="RID"> </return> <description> + Creates an immediate geometry and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]immediate_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this immediate geometry to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="immediate_end"> @@ -1624,6 +1730,7 @@ <argument index="0" name="immediate" type="RID"> </argument> <description> + Ends drawing the [ImmediateGeometry] and displays it. Equivalent to [method ImmediateGeometry.end]. </description> </method> <method name="immediate_get_material" qualifiers="const"> @@ -1632,6 +1739,7 @@ <argument index="0" name="immediate" type="RID"> </argument> <description> + Returns the material assigned to the [ImmediateGeometry]. </description> </method> <method name="immediate_normal"> @@ -1642,6 +1750,7 @@ <argument index="1" name="normal" type="Vector3"> </argument> <description> + Sets the normal to be used with next vertex. Equivalent to [method ImmediateGeometry.set_normal]. </description> </method> <method name="immediate_set_material"> @@ -1652,6 +1761,7 @@ <argument index="1" name="material" type="RID"> </argument> <description> + Sets the material to be used to draw the [ImmediateGeometry]. </description> </method> <method name="immediate_tangent"> @@ -1662,6 +1772,7 @@ <argument index="1" name="tangent" type="Plane"> </argument> <description> + Sets the tangent to be used with next vertex. Equivalent to [method ImmediateGeometry.set_tangent]. </description> </method> <method name="immediate_uv"> @@ -1672,6 +1783,7 @@ <argument index="1" name="tex_uv" type="Vector2"> </argument> <description> + Sets the UV to be used with next vertex. Equivalent to [method ImmediateGeometry.set_uv]. </description> </method> <method name="immediate_uv2"> @@ -1682,6 +1794,7 @@ <argument index="1" name="tex_uv" type="Vector2"> </argument> <description> + Sets the UV2 to be used with next vertex. Equivalent to [method ImmediateGeometry.set_uv2]. </description> </method> <method name="immediate_vertex"> @@ -1692,6 +1805,7 @@ <argument index="1" name="vertex" type="Vector3"> </argument> <description> + Adds the next vertex using the information provided in advance. Equivalent to [method ImmediateGeometry.add_vertex]. </description> </method> <method name="immediate_vertex_2d"> @@ -1702,13 +1816,14 @@ <argument index="1" name="vertex" type="Vector2"> </argument> <description> + Adds the next vertex using the information provided in advance. This is a helper class that calls [method immediate_vertex] under the hood. Equivalent to [method ImmediateGeometry.add_vertex]. </description> </method> <method name="init"> <return type="void"> </return> <description> - Initializes the visual server. + Initializes the visual server. This function is called internally by platform-dependent code during engine initialization. If called from a running game, it will not do anything. </description> </method> <method name="instance_attach_object_instance_id"> @@ -1719,6 +1834,7 @@ <argument index="1" name="id" type="int"> </argument> <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"> @@ -1729,12 +1845,16 @@ <argument index="1" name="skeleton" type="RID"> </argument> <description> + Attaches a skeleton to an instance. Removes the previous skeleton from the instance. </description> </method> <method name="instance_create"> <return type="RID"> </return> <description> + Creates a visual instance and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]instance_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + An instance is a way of placing a 3D object in the scenario. Objects like particles, meshes, and reflection probes need to be associated with an instance to be visible in the scenario using [method instance_set_base]. </description> </method> <method name="instance_create2"> @@ -1745,6 +1865,8 @@ <argument index="1" name="scenario" type="RID"> </argument> <description> + Creates a visual instance, adds it to the VisualServer, 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] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="instance_geometry_set_as_instance_lod"> @@ -1755,6 +1877,7 @@ <argument index="1" name="as_lod_of_instance" type="RID"> </argument> <description> + Not implemented in Godot 3.x. </description> </method> <method name="instance_geometry_set_cast_shadows_setting"> @@ -1765,6 +1888,7 @@ <argument index="1" name="shadow_casting_setting" type="int" enum="VisualServer.ShadowCastingSetting"> </argument> <description> + Sets the shadow casting setting to one of [enum ShadowCastingSetting]. Equivalent to [member GeometryInstance.cast_shadow]. </description> </method> <method name="instance_geometry_set_draw_range"> @@ -1781,6 +1905,7 @@ <argument index="4" name="max_margin" type="float"> </argument> <description> + Not implemented in Godot 3.x. </description> </method> <method name="instance_geometry_set_flag"> @@ -1793,6 +1918,7 @@ <argument index="2" name="enabled" type="bool"> </argument> <description> + Sets the flag for a given [enum InstanceFlags]. See [enum InstanceFlags] for more details. </description> </method> <method name="instance_geometry_set_material_override"> @@ -1803,6 +1929,7 @@ <argument index="1" name="material" type="RID"> </argument> <description> + Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to [member GeometryInstance.material_override]. </description> </method> <method name="instance_set_base"> @@ -1813,6 +1940,7 @@ <argument index="1" name="base" type="RID"> </argument> <description> + Sets the base of the instance. A base can be any of the 3D objects that are created in the VisualServer that can be displayed. For example, any of the light types, mesh, multimesh, immediate geometry, particle system, reflection probe, lightmap capture, 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"> @@ -1825,6 +1953,7 @@ <argument index="2" name="weight" type="float"> </argument> <description> + Sets the weight for a given blend shape associated with this instance. </description> </method> <method name="instance_set_custom_aabb"> @@ -1835,6 +1964,7 @@ <argument index="1" name="aabb" type="AABB"> </argument> <description> + Sets a custom AABB to use when culling objects from the view frustum. Equivalent to [method GeometryInstance.set_custom_aabb]. </description> </method> <method name="instance_set_exterior"> @@ -1845,6 +1975,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + Function not implemented in Godot 3.x. </description> </method> <method name="instance_set_extra_visibility_margin"> @@ -1855,6 +1986,7 @@ <argument index="1" name="margin" type="float"> </argument> <description> + Sets a margin to increase the size of the AABB when culling objects from the view frustum. This allows you avoid culling objects that fall outside the view frustum. Equivalent to [member GeometryInstance.extra_cull_margin]. </description> </method> <method name="instance_set_layer_mask"> @@ -1865,6 +1997,7 @@ <argument index="1" name="mask" type="int"> </argument> <description> + Sets the render layers that this instance will be drawn to. Equivalent to [member VisualInstance.layers]. </description> </method> <method name="instance_set_scenario"> @@ -1875,6 +2008,7 @@ <argument index="1" name="scenario" type="RID"> </argument> <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_material"> @@ -1887,6 +2021,7 @@ <argument index="2" name="material" type="RID"> </argument> <description> + Sets the material of a specific surface. Equivalent to [method MeshInstance.set_surface_material]. </description> </method> <method name="instance_set_transform"> @@ -1897,6 +2032,7 @@ <argument index="1" name="transform" type="Transform"> </argument> <description> + Sets the world space transform of the instance. Equivalent to [member Spatial.transform]. </description> </method> <method name="instance_set_use_lightmap"> @@ -1909,6 +2045,7 @@ <argument index="2" name="lightmap" type="RID"> </argument> <description> + Sets the lightmap to use with this instance. </description> </method> <method name="instance_set_visible"> @@ -1919,6 +2056,7 @@ <argument index="1" name="visible" type="bool"> </argument> <description> + Sets whether an instance is drawn or not. Equivalent to [member Spatial.visible]. </description> </method> <method name="instances_cull_aabb" qualifiers="const"> @@ -1929,6 +2067,8 @@ <argument index="1" name="scenario" type="RID"> </argument> <description> + Returns an array of object IDs intersecting with the provided AABB. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] 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"> @@ -1939,6 +2079,8 @@ <argument index="1" name="scenario" type="RID"> </argument> <description> + Returns an array of object IDs intersecting with the provided convex shape. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] 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"> @@ -1951,7 +2093,7 @@ <argument index="2" name="scenario" type="RID"> </argument> <description> - Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] you want to query. + Returns an array of object IDs intersecting with the provided 3D ray. Only visual 3D nodes are considered, such as [MeshInstance] or [DirectionalLight]. Use [method @GDScript.instance_from_id] to obtain the actual nodes. A scenario RID must be provided, which is available in the [World] 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> @@ -1963,6 +2105,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], this directional light will blend between shadow map splits resulting in a smoother transition between them. Equivalent to [member DirectionalLight.directional_shadow_blend_splits]. </description> </method> <method name="light_directional_set_shadow_depth_range_mode"> @@ -1973,6 +2116,7 @@ <argument index="1" name="range_mode" type="int" enum="VisualServer.LightDirectionalShadowDepthRangeMode"> </argument> <description> + Sets the shadow depth range mode for this directional light. Equivalent to [member DirectionalLight.directional_shadow_depth_range]. See [enum LightDirectionalShadowDepthRangeMode] for options. </description> </method> <method name="light_directional_set_shadow_mode"> @@ -1983,6 +2127,7 @@ <argument index="1" name="mode" type="int" enum="VisualServer.LightDirectionalShadowMode"> </argument> <description> + Sets the shadow mode for this directional light. Equivalent to [member DirectionalLight.directional_shadow_mode]. See [enum LightDirectionalShadowMode] for options. </description> </method> <method name="light_omni_set_shadow_detail"> @@ -1993,6 +2138,7 @@ <argument index="1" name="detail" type="int" enum="VisualServer.LightOmniShadowDetail"> </argument> <description> + Sets whether to use vertical or horizontal detail for this omni light. This can be used to alleviate artifacts in the shadow map. Equivalent to [member OmniLight.omni_shadow_detail]. </description> </method> <method name="light_omni_set_shadow_mode"> @@ -2003,6 +2149,7 @@ <argument index="1" name="mode" type="int" enum="VisualServer.LightOmniShadowMode"> </argument> <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 OmniLight.omni_shadow_mode]. </description> </method> <method name="light_set_color"> @@ -2013,6 +2160,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Sets the color of the light. Equivalent to [member Light.light_color]. </description> </method> <method name="light_set_cull_mask"> @@ -2023,6 +2171,7 @@ <argument index="1" name="mask" type="int"> </argument> <description> + Sets the cull mask for this Light. Lights only affect objects in the selected layers. Equivalent to [member Light.light_cull_mask]. </description> </method> <method name="light_set_negative"> @@ -2033,6 +2182,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], light will subtract light instead of adding light. Equivalent to [member Light.light_negative]. </description> </method> <method name="light_set_param"> @@ -2045,6 +2195,7 @@ <argument index="2" name="value" type="float"> </argument> <description> + Sets the specified light parameter. See [enum LightParam] for options. Equivalent to [method Light.set_param]. </description> </method> <method name="light_set_projector"> @@ -2055,6 +2206,7 @@ <argument index="1" name="texture" type="RID"> </argument> <description> + Not implemented in Godot 3.x. </description> </method> <method name="light_set_reverse_cull_face_mode"> @@ -2065,6 +2217,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <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 Light.shadow_reverse_cull_face]. </description> </method> <method name="light_set_shadow"> @@ -2075,6 +2228,7 @@ <argument index="1" name="enabled" type="bool"> </argument> <description> + If [code]true[/code], light will cast shadows. Equivalent to [member Light.shadow_enabled]. </description> </method> <method name="light_set_shadow_color"> @@ -2085,6 +2239,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Sets the color of the shadow cast by the light. Equivalent to [member Light.shadow_color]. </description> </method> <method name="light_set_use_gi"> @@ -2102,6 +2257,9 @@ <return type="RID"> </return> <description> + Creates a lightmap capture and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]lightmap_capture_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this lightmap capture to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="lightmap_capture_get_bounds" qualifiers="const"> @@ -2110,6 +2268,7 @@ <argument index="0" name="capture" type="RID"> </argument> <description> + Returns the size of the lightmap capture area. </description> </method> <method name="lightmap_capture_get_energy" qualifiers="const"> @@ -2118,6 +2277,7 @@ <argument index="0" name="capture" type="RID"> </argument> <description> + Returns the energy multiplier used by the lightmap capture. </description> </method> <method name="lightmap_capture_get_octree" qualifiers="const"> @@ -2126,6 +2286,7 @@ <argument index="0" name="capture" type="RID"> </argument> <description> + Returns the octree used by the lightmap capture. </description> </method> <method name="lightmap_capture_get_octree_cell_subdiv" qualifiers="const"> @@ -2134,6 +2295,7 @@ <argument index="0" name="capture" type="RID"> </argument> <description> + Returns the cell subdivision amount used by this lightmap capture's octree. </description> </method> <method name="lightmap_capture_get_octree_cell_transform" qualifiers="const"> @@ -2142,6 +2304,7 @@ <argument index="0" name="capture" type="RID"> </argument> <description> + Returns the cell transform for this lightmap capture's octree. </description> </method> <method name="lightmap_capture_set_bounds"> @@ -2152,6 +2315,7 @@ <argument index="1" name="bounds" type="AABB"> </argument> <description> + Sets the size of the area covered by the lightmap capture. Equivalent to [member BakedLightmapData.bounds]. </description> </method> <method name="lightmap_capture_set_energy"> @@ -2162,6 +2326,7 @@ <argument index="1" name="energy" type="float"> </argument> <description> + Sets the energy multiplier for this lightmap capture. Equivalent to [member BakedLightmapData.energy]. </description> </method> <method name="lightmap_capture_set_octree"> @@ -2172,6 +2337,7 @@ <argument index="1" name="octree" type="PoolByteArray"> </argument> <description> + Sets the octree to be used by this lightmap capture. This function is normally used by the [BakedLightmap] node. Equivalent to [member BakedLightmapData.octree]. </description> </method> <method name="lightmap_capture_set_octree_cell_subdiv"> @@ -2182,6 +2348,7 @@ <argument index="1" name="subdiv" type="int"> </argument> <description> + Sets the subdivision level of this lightmap capture's octree. Equivalent to [member BakedLightmapData.cell_subdiv]. </description> </method> <method name="lightmap_capture_set_octree_cell_transform"> @@ -2192,6 +2359,7 @@ <argument index="1" name="xform" type="Transform"> </argument> <description> + Sets the octree cell transform for this lightmap capture's octree. Equivalent to [member BakedLightmapData.cell_space_transform]. </description> </method> <method name="make_sphere_mesh"> @@ -2211,7 +2379,8 @@ <return type="RID"> </return> <description> - Returns an empty material. + Creates an empty material and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]material_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="material_get_param" qualifiers="const"> @@ -2233,6 +2402,7 @@ <argument index="1" name="parameter" type="String"> </argument> <description> + Returns the default value for the param if available. Otherwise returns an empty [Variant]. </description> </method> <method name="material_get_shader" qualifiers="const"> @@ -2306,7 +2476,7 @@ </return> <argument index="0" name="mesh" type="RID"> </argument> - <argument index="1" name="primtive" type="int" enum="VisualServer.PrimitiveType"> + <argument index="1" name="primitive" type="int" enum="VisualServer.PrimitiveType"> </argument> <argument index="2" name="arrays" type="Array"> </argument> @@ -2315,7 +2485,7 @@ <argument index="4" name="compress_format" type="int" default="97280"> </argument> <description> - Adds a surface generated from the Arrays to a mesh. See [code]PRIMITIVE_TYPE_*[/code] constants for types. + Adds a surface generated from the Arrays to a mesh. See [enum PrimitiveType] constants for types. </description> </method> <method name="mesh_clear"> @@ -2331,7 +2501,9 @@ <return type="RID"> </return> <description> - Creates a new mesh. + Creates a new mesh and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]mesh_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this mesh to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="mesh_get_blend_shape_count" qualifiers="const"> @@ -2503,6 +2675,7 @@ <argument index="3" name="array_index" type="int"> </argument> <description> + Function is unused in Godot 3.x. </description> </method> <method name="mesh_surface_get_format_stride" qualifiers="const"> @@ -2515,6 +2688,7 @@ <argument index="2" name="index_len" type="int"> </argument> <description> + Function is unused in Godot 3.x. </description> </method> <method name="mesh_surface_get_index_array" qualifiers="const"> @@ -2586,6 +2760,7 @@ <argument index="3" name="data" type="PoolByteArray"> </argument> <description> + Updates a specific region of a vertex buffer for the specified surface. Warning: this function alters the vertex buffer directly with no safety mechanisms, you can easily corrupt your mesh. </description> </method> <method name="multimesh_allocate"> @@ -2602,6 +2777,16 @@ <argument index="4" name="custom_data_format" type="int" enum="VisualServer.MultimeshCustomDataFormat" default="0"> </argument> <description> + Allocates space for the multimesh data. Format parameters determine how the data will be stored by OpenGL. See [enum MultimeshTransformFormat], [enum MultimeshColorFormat], and [enum MultimeshCustomDataFormat] for usage. Equivalent to [member MultiMesh.instance_count]. + </description> + </method> + <method name="multimesh_create"> + <return type="RID"> + </return> + <description> + Creates a new multimesh on the VisualServer and returns an [RID] handle. This RID will be used in all [code]multimesh_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this multimesh to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="multimesh_get_aabb" qualifiers="const"> @@ -2610,6 +2795,7 @@ <argument index="0" name="multimesh" type="RID"> </argument> <description> + Calculates and returns the axis-aligned bounding box that encloses all instances within the multimesh. </description> </method> <method name="multimesh_get_instance_count" qualifiers="const"> @@ -2618,6 +2804,7 @@ <argument index="0" name="multimesh" type="RID"> </argument> <description> + Returns the number of instances allocated for this multimesh. </description> </method> <method name="multimesh_get_mesh" qualifiers="const"> @@ -2626,6 +2813,7 @@ <argument index="0" name="multimesh" type="RID"> </argument> <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"> @@ -2634,6 +2822,7 @@ <argument index="0" name="multimesh" type="RID"> </argument> <description> + Returns the number of visible instances for this multimesh. </description> </method> <method name="multimesh_instance_get_color" qualifiers="const"> @@ -2644,6 +2833,7 @@ <argument index="1" name="index" type="int"> </argument> <description> + Returns the color by which the specified instance will be modulated. </description> </method> <method name="multimesh_instance_get_custom_data" qualifiers="const"> @@ -2654,6 +2844,7 @@ <argument index="1" name="index" type="int"> </argument> <description> + Returns the custom data associated with the specified instance. </description> </method> <method name="multimesh_instance_get_transform" qualifiers="const"> @@ -2664,6 +2855,7 @@ <argument index="1" name="index" type="int"> </argument> <description> + Returns the [Transform] of the specified instance. </description> </method> <method name="multimesh_instance_get_transform_2d" qualifiers="const"> @@ -2674,6 +2866,7 @@ <argument index="1" name="index" type="int"> </argument> <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"> @@ -2686,6 +2879,7 @@ <argument index="2" name="color" type="Color"> </argument> <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"> @@ -2698,6 +2892,7 @@ <argument index="2" name="custom_data" type="Color"> </argument> <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"> @@ -2710,6 +2905,7 @@ <argument index="2" name="transform" type="Transform"> </argument> <description> + Sets the [Transform] for this instance. Equivalent to [method MultiMesh.set_instance_transform]. </description> </method> <method name="multimesh_instance_set_transform_2d"> @@ -2722,6 +2918,7 @@ <argument index="2" name="transform" type="Transform2D"> </argument> <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_as_bulk_array"> @@ -2732,6 +2929,11 @@ <argument index="1" name="array" type="PoolRealArray"> </argument> <description> + Sets all data related to the instances in one go. This is especially useful when loading the data from disk or preparing the data from GDNative. + + All data is packed in one large float array. An array may look like this: Transform for instance 1, color data for instance 1, custom data for instance 1, transform for instance 2, color data for instance 2, etc. + + [Transform] is stored as 12 floats, [Transform2D] is stored as 8 floats, [code]COLOR_8BIT[/code] / [code]CUSTOM_DATA_8BIT[/code] is stored as 1 float (4 bytes as is) and [code]COLOR_FLOAT[/code] / [code]CUSTOM_DATA_FLOAT[/code] is stored as 4 floats. </description> </method> <method name="multimesh_set_mesh"> @@ -2742,6 +2944,7 @@ <argument index="1" name="mesh" type="RID"> </argument> <description> + Sets the mesh to be drawn by the multimesh. Equivalent to [member MultiMesh.mesh]. </description> </method> <method name="multimesh_set_visible_instances"> @@ -2752,18 +2955,25 @@ <argument index="1" name="visible" type="int"> </argument> <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="omni_light_create"> <return type="RID"> </return> <description> + Creates a new omni light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this omni light to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="particles_create"> <return type="RID"> </return> <description> + Creates a particle system and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]particles_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach these particles to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="particles_get_current_aabb"> @@ -2772,6 +2982,7 @@ <argument index="0" name="particles" type="RID"> </argument> <description> + Calculates and returns the axis-aligned bounding box that contains all the particles. Equivalent to [method Particles.capture_aabb]. </description> </method> <method name="particles_get_emitting"> @@ -2780,6 +2991,7 @@ <argument index="0" name="particles" type="RID"> </argument> <description> + Returns [code]true[/code] if particles are currently set to emitting. </description> </method> <method name="particles_is_inactive"> @@ -2788,6 +3000,7 @@ <argument index="0" name="particles" type="RID"> </argument> <description> + Returns [code]true[/code] if particles are not emitting and particles are set to inactive. </description> </method> <method name="particles_request_process"> @@ -2796,6 +3009,7 @@ <argument index="0" name="particles" type="RID"> </argument> <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"> @@ -2804,6 +3018,7 @@ <argument index="0" name="particles" type="RID"> </argument> <description> + Reset the particles on the next update. Equivalent to [method Particles.restart] </description> </method> <method name="particles_set_amount"> @@ -2814,6 +3029,7 @@ <argument index="1" name="amount" type="int"> </argument> <description> + Sets the number of particles to be drawn and allocates the memory for them. Equivalent to [member Particles.amount]. </description> </method> <method name="particles_set_custom_aabb"> @@ -2824,6 +3040,7 @@ <argument index="1" name="aabb" type="AABB"> </argument> <description> + Sets a custom axis-aligned bounding box for the particle system. Equivalent to [member Particles.visibility_aabb]. </description> </method> <method name="particles_set_draw_order"> @@ -2834,6 +3051,7 @@ <argument index="1" name="order" type="int" enum="VisualServer.ParticlesDrawOrder"> </argument> <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 Particles.draw_order]. </description> </method> <method name="particles_set_draw_pass_mesh"> @@ -2846,6 +3064,7 @@ <argument index="2" name="mesh" type="RID"> </argument> <description> + Sets the mesh to be used for the specified draw pass. Equivalent to [member Particles.draw_pass_1], [member Particles.draw_pass_2], [member Particles.draw_pass_3], and [member Particles.draw_pass_4]. </description> </method> <method name="particles_set_draw_passes"> @@ -2856,6 +3075,7 @@ <argument index="1" name="count" type="int"> </argument> <description> + Sets the number of draw passes to use. Equivalent to [member Particles.draw_passes]. </description> </method> <method name="particles_set_emission_transform"> @@ -2866,6 +3086,7 @@ <argument index="1" name="transform" type="Transform"> </argument> <description> + Sets the [Transform] that will be used by the particles when they first emit. </description> </method> <method name="particles_set_emitting"> @@ -2876,6 +3097,7 @@ <argument index="1" name="emitting" type="bool"> </argument> <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 Particles.emitting]. </description> </method> <method name="particles_set_explosiveness_ratio"> @@ -2886,6 +3108,7 @@ <argument index="1" name="ratio" type="float"> </argument> <description> + Sets the explosiveness ratio. Equivalent to [member Particles.explosiveness]. </description> </method> <method name="particles_set_fixed_fps"> @@ -2896,6 +3119,7 @@ <argument index="1" name="fps" type="int"> </argument> <description> + Sets the frame rate that the particle system rendering will be fixed to. Equivalent to [member Particles.fixed_fps]. </description> </method> <method name="particles_set_fractional_delta"> @@ -2906,6 +3130,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], uses fractional delta which smooths the movement of the particles. Equivalent to [member Particles.fract_delta]. </description> </method> <method name="particles_set_lifetime"> @@ -2916,6 +3141,7 @@ <argument index="1" name="lifetime" type="float"> </argument> <description> + Sets the lifetime of each particle in the system. Equivalent to [member Particles.lifetime]. </description> </method> <method name="particles_set_one_shot"> @@ -2926,6 +3152,7 @@ <argument index="1" name="one_shot" type="bool"> </argument> <description> + If [code]true[/code], particles will emit once and then stop. Equivalent to [member Particles.one_shot]. </description> </method> <method name="particles_set_pre_process_time"> @@ -2936,6 +3163,7 @@ <argument index="1" name="time" type="float"> </argument> <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 Particles.preprocess]. </description> </method> <method name="particles_set_process_material"> @@ -2946,6 +3174,7 @@ <argument index="1" name="material" type="RID"> </argument> <description> + Sets the material for processing the particles. Note: this is not the material used to draw the materials. Equivalent to [member Particles.process_material]. </description> </method> <method name="particles_set_randomness_ratio"> @@ -2956,6 +3185,7 @@ <argument index="1" name="ratio" type="float"> </argument> <description> + Sets the emission randomness ratio. This randomizes the emission of particles within their phase. Equivalent to [member Particles.randomness]. </description> </method> <method name="particles_set_speed_scale"> @@ -2966,6 +3196,7 @@ <argument index="1" name="scale" type="float"> </argument> <description> + Sets the speed scale of the particle system. Equivalent to [member Particles.speed_scale]. </description> </method> <method name="particles_set_use_local_coordinates"> @@ -2976,12 +3207,16 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], particles use local coordinates. If [code]false[/code] they use global coordinates. Equivalent to [member Particles.local_coords]. </description> </method> <method name="reflection_probe_create"> <return type="RID"> </return> <description> + Creates a reflection probe and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]reflection_probe_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this reflection probe to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="reflection_probe_set_as_interior"> @@ -2992,6 +3227,7 @@ <argument index="1" name="enable" type="bool"> </argument> <description> + If [code]true[/code], reflections will ignore sky contribution. Equivalent to [member ReflectionProbe.interior_enable]. </description> </method> <method name="reflection_probe_set_cull_mask"> @@ -3002,6 +3238,7 @@ <argument index="1" name="layers" type="int"> </argument> <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"> @@ -3012,6 +3249,7 @@ <argument index="1" name="enable" type="bool"> </argument> <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"> @@ -3022,6 +3260,7 @@ <argument index="1" name="enable" type="bool"> </argument> <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"> @@ -3032,6 +3271,7 @@ <argument index="1" name="extents" type="Vector3"> </argument> <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"> @@ -3042,6 +3282,7 @@ <argument index="1" name="intensity" type="float"> </argument> <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_interior_ambient"> @@ -3052,6 +3293,7 @@ <argument index="1" name="color" type="Color"> </argument> <description> + Sets the ambient light color for this reflection probe when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_color]. </description> </method> <method name="reflection_probe_set_interior_ambient_energy"> @@ -3062,6 +3304,7 @@ <argument index="1" name="energy" type="float"> </argument> <description> + Sets the energy multiplier for this reflection probes ambient light contribution when set to interior mode. Equivalent to [member ReflectionProbe.interior_ambient_energy]. </description> </method> <method name="reflection_probe_set_interior_ambient_probe_contribution"> @@ -3072,6 +3315,7 @@ <argument index="1" name="contrib" type="float"> </argument> <description> + Sets the contribution value for how much the reflection affects the ambient light for this reflection probe when set to interior mode. Useful so that ambient light matches the color of the room. Equivalent to [member ReflectionProbe.interior_ambient_contrib]. </description> </method> <method name="reflection_probe_set_max_distance"> @@ -3082,6 +3326,7 @@ <argument index="1" name="distance" type="float"> </argument> <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"> @@ -3092,6 +3337,7 @@ <argument index="1" name="offset" type="Vector3"> </argument> <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_update_mode"> @@ -3102,6 +3348,7 @@ <argument index="1" name="mode" type="int" enum="VisualServer.ReflectionProbeUpdateMode"> </argument> <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"> @@ -3122,6 +3369,9 @@ <return type="RID"> </return> <description> + Creates a scenario and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]scenario_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + The scenario is the 3D world that all the visual instances exist in. </description> </method> <method name="scenario_set_debug"> @@ -3132,6 +3382,7 @@ <argument index="1" name="debug_mode" type="int" enum="VisualServer.ScenarioDebugMode"> </argument> <description> + Sets the [enum ScenarioDebugMode] for this scenario. See [enum ScenarioDebugMode] for options. </description> </method> <method name="scenario_set_environment"> @@ -3142,6 +3393,7 @@ <argument index="1" name="environment" type="RID"> </argument> <description> + Sets the environment that will be used with this scenario. </description> </method> <method name="scenario_set_fallback_environment"> @@ -3152,6 +3404,7 @@ <argument index="1" name="environment" type="RID"> </argument> <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="scenario_set_reflection_atlas_size"> @@ -3164,6 +3417,7 @@ <argument index="2" name="subdiv" type="int"> </argument> <description> + Sets the size of the reflection atlas shared by all reflection probes in this scenario. </description> </method> <method name="set_boot_image"> @@ -3187,6 +3441,7 @@ <argument index="0" name="generate" type="bool"> </argument> <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"> @@ -3195,13 +3450,15 @@ <argument index="0" name="color" type="Color"> </argument> <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> <description> - Creates an empty shader. + Creates an empty shader and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]shader_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="shader_get_code" qualifiers="const"> @@ -3267,6 +3524,7 @@ <argument index="2" name="is_2d_skeleton" type="bool" default="false"> </argument> <description> + Allocates the GPU buffers for this skeleton. </description> </method> <method name="skeleton_bone_get_transform" qualifiers="const"> @@ -3277,6 +3535,7 @@ <argument index="1" name="bone" type="int"> </argument> <description> + Returns the [Transform] set for a specific bone of this skeleton. </description> </method> <method name="skeleton_bone_get_transform_2d" qualifiers="const"> @@ -3287,6 +3546,7 @@ <argument index="1" name="bone" type="int"> </argument> <description> + Returns the [Transform2D] set for a specific bone of this skeleton. </description> </method> <method name="skeleton_bone_set_transform"> @@ -3299,6 +3559,7 @@ <argument index="2" name="transform" type="Transform"> </argument> <description> + Sets the [Transform] for a specific bone of this skeleton. </description> </method> <method name="skeleton_bone_set_transform_2d"> @@ -3311,12 +3572,15 @@ <argument index="2" name="transform" type="Transform2D"> </argument> <description> + Sets the [Transform2D] for a specific bone of this skeleton. </description> </method> <method name="skeleton_create"> <return type="RID"> </return> <description> + Creates a skeleton and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]skeleton_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="skeleton_get_bone_count" qualifiers="const"> @@ -3325,13 +3589,15 @@ <argument index="0" name="skeleton" type="RID"> </argument> <description> + Returns the number of bones allocated for this skeleton. </description> </method> <method name="sky_create"> <return type="RID"> </return> <description> - Creates an empty sky. + Creates an empty sky and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]sky_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="sky_set_texture"> @@ -3351,12 +3617,16 @@ <return type="RID"> </return> <description> + Creates a spot light and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID can be used in most [code]light_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. + To place in a scene, attach this spot light to an instance using [method instance_set_base] using the returned RID. </description> </method> <method name="sync"> <return type="void"> </return> <description> + Not implemented in Godot 3.x. </description> </method> <method name="texture_allocate"> @@ -3377,6 +3647,7 @@ <argument index="6" name="flags" type="int" default="7"> </argument> <description> + Allocates the GPU memory for the texture. </description> </method> <method name="texture_bind"> @@ -3394,7 +3665,8 @@ <return type="RID"> </return> <description> - Creates an empty texture. + Creates an empty texture and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]texture_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="texture_create_from_image"> @@ -3432,6 +3704,7 @@ <argument index="0" name="texture" type="RID"> </argument> <description> + Returns the depth of the texture. </description> </method> <method name="texture_get_flags" qualifiers="const"> @@ -3485,6 +3758,7 @@ <argument index="0" name="texture" type="RID"> </argument> <description> + Returns the type of the texture, can be any of the [enum TextureType]. </description> </method> <method name="texture_get_width" qualifiers="const"> @@ -3533,6 +3807,7 @@ <argument index="9" name="layer" type="int" default="0"> </argument> <description> + Sets a part of the data for a texture. Warning: this function calls the underlying graphics API directly and may corrupt your texture if used improperly. </description> </method> <method name="texture_set_flags"> @@ -3578,6 +3853,7 @@ <argument index="3" name="depth" type="int"> </argument> <description> + Resizes the texture to the specified dimensions. </description> </method> <method name="textures_keep_original"> @@ -3635,7 +3911,8 @@ <return type="RID"> </return> <description> - Creates an empty viewport. + Creates an empty viewport and adds it to the VisualServer. It can be accessed with the RID that is returned. This RID will be used in all [code]viewport_*[/code] VisualServer functions. + Once finished with your RID, you will want to free the RID using the VisualServer's [method free_rid] static method. </description> </method> <method name="viewport_detach"> @@ -3655,7 +3932,7 @@ <argument index="1" name="info" type="int" enum="VisualServer.ViewportRenderInfo"> </argument> <description> - Returns a viewport's render information. For options, see the [code]VIEWPORT_RENDER_INFO*[/code] constants. + Returns a viewport's render information. For options, see the [enum ViewportRenderInfo] constants. </description> </method> <method name="viewport_get_texture" qualifiers="const"> @@ -3803,6 +4080,7 @@ <argument index="1" name="hidden" type="bool"> </argument> <description> + Currently unimplemented in Godot 3.x. </description> </method> <method name="viewport_set_msaa"> @@ -3946,10 +4224,12 @@ <signals> <signal name="frame_post_draw"> <description> + Emitted at the end of the frame, after the VisualServer has finished updating all the Viewports. </description> </signal> <signal name="frame_pre_draw"> <description> + Emitted at the beginning of the frame, before the VisualServer updates all the Viewports. </description> </signal> </signals> @@ -3958,6 +4238,7 @@ Marks an error that shows that the index array is empty. </constant> <constant name="ARRAY_WEIGHTS_SIZE" value="4"> + Number of weights/bones per vertex. </constant> <constant name="CANVAS_ITEM_Z_MIN" value="-4096"> The minimum Z-layer for canvas items. @@ -3966,8 +4247,10 @@ The maximum Z-layer for canvas items. </constant> <constant name="MAX_GLOW_LEVELS" value="7"> + Max number of glow levels that can be used with glow post-process effect. </constant> <constant name="MAX_CURSORS" value="8"> + Unused enum in Godot 3.x. </constant> <constant name="MATERIAL_RENDER_PRIORITY_MIN" value="-128"> The minimum renderpriority of all materials. @@ -3994,12 +4277,16 @@ Marks the back side of a cubemap. </constant> <constant name="TEXTURE_TYPE_2D" value="0" enum="TextureType"> + Normal texture with 2 dimensions, width and height. </constant> <constant name="TEXTURE_TYPE_CUBEMAP" value="1" enum="TextureType"> + Texture made up of six faces, can be looked up with a [code]vec3[/code] in shader. </constant> <constant name="TEXTURE_TYPE_2D_ARRAY" value="2" enum="TextureType"> + An array of 2-dimensional textures. </constant> <constant name="TEXTURE_TYPE_3D" value="3" enum="TextureType"> + A 3-dimensional texture with width, height, and depth. </constant> <constant name="TEXTURE_FLAG_MIPMAPS" value="1" enum="TextureFlags"> Generates mipmaps, which are smaller versions of the same texture to use when zoomed out, keeping the aspect ratio. @@ -4114,11 +4401,13 @@ Flag used to mark a compressed (half float) UV coordinates array for the second UV coordinates. </constant> <constant name="ARRAY_COMPRESS_BONES" value="32768" enum="ArrayFormat"> + Flag used to mark a compressed bone array. </constant> <constant name="ARRAY_COMPRESS_WEIGHTS" value="65536" enum="ArrayFormat"> Flag used to mark a compressed (half float) weight array. </constant> <constant name="ARRAY_COMPRESS_INDEX" value="131072" enum="ArrayFormat"> + Flag used to mark a compressed index array. </constant> <constant name="ARRAY_FLAG_USE_2D_VERTICES" value="262144" enum="ArrayFormat"> Flag used to mark that the array contains 2D vertices. @@ -4154,8 +4443,10 @@ Represents the size of the [enum PrimitiveType] enum. </constant> <constant name="BLEND_SHAPE_MODE_NORMALIZED" value="0" enum="BlendShapeMode"> + Blend shapes are normalized. </constant> <constant name="BLEND_SHAPE_MODE_RELATIVE" value="1" enum="BlendShapeMode"> + Blend shapes are relative to base weight. </constant> <constant name="LIGHT_DIRECTIONAL" value="0" enum="LightType"> Is a directional (sun) light. @@ -4188,47 +4479,67 @@ Scales the shadow color. </constant> <constant name="LIGHT_PARAM_SHADOW_MAX_DISTANCE" value="8" enum="LightParam"> + Max distance that shadows will be rendered. </constant> <constant name="LIGHT_PARAM_SHADOW_SPLIT_1_OFFSET" value="9" enum="LightParam"> + Proportion of shadow atlas occupied by the first split. </constant> <constant name="LIGHT_PARAM_SHADOW_SPLIT_2_OFFSET" value="10" enum="LightParam"> + Proportion of shadow atlas occupied by the second split. </constant> <constant name="LIGHT_PARAM_SHADOW_SPLIT_3_OFFSET" value="11" enum="LightParam"> + Proportion of shadow atlas occupied by the third split. The fourth split occupies the rest. </constant> <constant name="LIGHT_PARAM_SHADOW_NORMAL_BIAS" value="12" enum="LightParam"> + Normal bias used to offset shadow lookup by object normal. Can be used to fix self-shadowing artifacts. </constant> <constant name="LIGHT_PARAM_SHADOW_BIAS" value="13" enum="LightParam"> + Bias the shadow lookup to fix self-shadowing artifacts. </constant> <constant name="LIGHT_PARAM_SHADOW_BIAS_SPLIT_SCALE" value="14" enum="LightParam"> + Increases bias on further splits to fix self-shadowing that only occurs far away from the camera. </constant> <constant name="LIGHT_PARAM_MAX" value="15" enum="LightParam"> Represents the size of the [enum LightParam] enum. </constant> <constant name="LIGHT_OMNI_SHADOW_DUAL_PARABOLOID" value="0" enum="LightOmniShadowMode"> + Use a dual paraboloid shadow map for omni lights. </constant> <constant name="LIGHT_OMNI_SHADOW_CUBE" value="1" enum="LightOmniShadowMode"> + Use a cubemap shadow map for omni lights. Slower but better quality than dual paraboloid. </constant> <constant name="LIGHT_OMNI_SHADOW_DETAIL_VERTICAL" value="0" enum="LightOmniShadowDetail"> + Use more detail vertically when computing shadow map. </constant> <constant name="LIGHT_OMNI_SHADOW_DETAIL_HORIZONTAL" value="1" enum="LightOmniShadowDetail"> + Use more detail horizontally when computing shadow map. </constant> <constant name="LIGHT_DIRECTIONAL_SHADOW_ORTHOGONAL" value="0" enum="LightDirectionalShadowMode"> + Use orthogonal shadow projection for directional light. </constant> <constant name="LIGHT_DIRECTIONAL_SHADOW_PARALLEL_2_SPLITS" value="1" enum="LightDirectionalShadowMode"> + Use 2 splits for shadow projection when using directional light. </constant> <constant name="LIGHT_DIRECTIONAL_SHADOW_PARALLEL_4_SPLITS" value="2" enum="LightDirectionalShadowMode"> + Use 4 splits for shadow projection when using directional light. </constant> <constant name="LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_STABLE" value="0" enum="LightDirectionalShadowDepthRangeMode"> + Keeps shadows stable as camera moves but has lower effective resolution. </constant> <constant name="LIGHT_DIRECTIONAL_SHADOW_DEPTH_RANGE_OPTIMIZED" value="1" enum="LightDirectionalShadowDepthRangeMode"> + Optimize use of shadow maps, increasing the effective resolution. But may result in shadows moving or flickering slightly. </constant> <constant name="VIEWPORT_UPDATE_DISABLED" value="0" enum="ViewportUpdateMode"> + Do not update the viewport. </constant> <constant name="VIEWPORT_UPDATE_ONCE" value="1" enum="ViewportUpdateMode"> + Update the viewport once then set to disabled. </constant> <constant name="VIEWPORT_UPDATE_WHEN_VISIBLE" value="2" enum="ViewportUpdateMode"> + Update the viewport whenever it is visible. </constant> <constant name="VIEWPORT_UPDATE_ALWAYS" value="3" enum="ViewportUpdateMode"> + Always update the viewport. </constant> <constant name="VIEWPORT_CLEAR_ALWAYS" value="0" enum="ViewportClearMode"> The viewport is always cleared before drawing. @@ -4273,16 +4584,22 @@ The Viewport renders 3D but without effects. </constant> <constant name="VIEWPORT_RENDER_INFO_OBJECTS_IN_FRAME" value="0" enum="ViewportRenderInfo"> + Number of objects drawn in a single frame. </constant> <constant name="VIEWPORT_RENDER_INFO_VERTICES_IN_FRAME" value="1" enum="ViewportRenderInfo"> + Number of vertices drawn in a single frame. </constant> <constant name="VIEWPORT_RENDER_INFO_MATERIAL_CHANGES_IN_FRAME" value="2" enum="ViewportRenderInfo"> + Number of material changes during this frame. </constant> <constant name="VIEWPORT_RENDER_INFO_SHADER_CHANGES_IN_FRAME" value="3" enum="ViewportRenderInfo"> + Number of shader changes during this frame. </constant> <constant name="VIEWPORT_RENDER_INFO_SURFACE_CHANGES_IN_FRAME" value="4" enum="ViewportRenderInfo"> + Number of surface changes during this frame. </constant> <constant name="VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME" value="5" enum="ViewportRenderInfo"> + Number of draw calls during this frame. </constant> <constant name="VIEWPORT_RENDER_INFO_MAX" value="6" enum="ViewportRenderInfo"> Represents the size of the [enum ViewportRenderInfo] enum. @@ -4300,12 +4617,16 @@ Debug draw draws objects in wireframe. </constant> <constant name="SCENARIO_DEBUG_DISABLED" value="0" enum="ScenarioDebugMode"> + Do not use a debug mode. </constant> <constant name="SCENARIO_DEBUG_WIREFRAME" value="1" enum="ScenarioDebugMode"> + Draw all objects as wireframe models. </constant> <constant name="SCENARIO_DEBUG_OVERDRAW" value="2" enum="ScenarioDebugMode"> + Draw all objects in a way that displays how much overdraw is occurring. Overdraw occurs when a section of pixels is drawn and shaded and then another object covers it up. To optimize a scene, you should reduce overdraw. </constant> <constant name="SCENARIO_DEBUG_SHADELESS" value="3" enum="ScenarioDebugMode"> + Draw all objects without shading. Equivalent to setting all objects shaders to [code]unshaded[/code]. </constant> <constant name="INSTANCE_NONE" value="0" enum="InstanceType"> The instance does not have a type. @@ -4326,10 +4647,13 @@ The instance is a light. </constant> <constant name="INSTANCE_REFLECTION_PROBE" value="6" enum="InstanceType"> + The instance is a reflection probe. </constant> <constant name="INSTANCE_GI_PROBE" value="7" enum="InstanceType"> + The instance is a GI probe. </constant> <constant name="INSTANCE_LIGHTMAP_CAPTURE" value="8" enum="InstanceType"> + The instance is a lightmap capture. </constant> <constant name="INSTANCE_MAX" value="9" enum="InstanceType"> Represents the size of the [enum InstanceType] enum. @@ -4338,19 +4662,25 @@ A combination of the flags of geometry instances (mesh, multimesh, immediate and particles). </constant> <constant name="INSTANCE_FLAG_USE_BAKED_LIGHT" value="0" enum="InstanceFlags"> + Allows the instance to be used in baked lighting. </constant> <constant name="INSTANCE_FLAG_DRAW_NEXT_FRAME_IF_VISIBLE" value="1" enum="InstanceFlags"> + When set, manually requests to draw geometry on next frame. </constant> <constant name="INSTANCE_FLAG_MAX" value="2" enum="InstanceFlags"> Represents the size of the [enum InstanceFlags] enum. </constant> <constant name="SHADOW_CASTING_SETTING_OFF" value="0" enum="ShadowCastingSetting"> + Disable shadows from this instance. </constant> <constant name="SHADOW_CASTING_SETTING_ON" value="1" enum="ShadowCastingSetting"> + Cast shadows from this instance. </constant> <constant name="SHADOW_CASTING_SETTING_DOUBLE_SIDED" value="2" enum="ShadowCastingSetting"> + Disable backface culling when rendering the shadow of the object. This is slightly slower but may result in more correct shadows. </constant> <constant name="SHADOW_CASTING_SETTING_SHADOWS_ONLY" value="3" enum="ShadowCastingSetting"> + Only render the shadows from the object. The object itself will not be drawn. </constant> <constant name="NINE_PATCH_STRETCH" value="0" enum="NinePatchAxisMode"> The nine patch gets stretched where needed. @@ -4374,16 +4704,22 @@ The light adds color depending on mask. </constant> <constant name="CANVAS_LIGHT_FILTER_NONE" value="0" enum="CanvasLightShadowFilter"> + Do not apply a filter to canvas light shadows. </constant> <constant name="CANVAS_LIGHT_FILTER_PCF3" value="1" enum="CanvasLightShadowFilter"> + Use PCF3 filtering to filter canvas light shadows. </constant> <constant name="CANVAS_LIGHT_FILTER_PCF5" value="2" enum="CanvasLightShadowFilter"> + Use PCF5 filtering to filter canvas light shadows. </constant> <constant name="CANVAS_LIGHT_FILTER_PCF7" value="3" enum="CanvasLightShadowFilter"> + Use PCF7 filtering to filter canvas light shadows. </constant> <constant name="CANVAS_LIGHT_FILTER_PCF9" value="4" enum="CanvasLightShadowFilter"> + Use PCF9 filtering to filter canvas light shadows. </constant> <constant name="CANVAS_LIGHT_FILTER_PCF13" value="5" enum="CanvasLightShadowFilter"> + Use PCF13 filtering to filter canvas light shadows. </constant> <constant name="CANVAS_OCCLUDER_POLYGON_CULL_DISABLED" value="0" enum="CanvasOccluderPolygonCullMode"> Culling of the canvas occluder is disabled. @@ -4425,85 +4761,124 @@ The amount of vertex memory used. </constant> <constant name="FEATURE_SHADERS" value="0" enum="Features"> + Hardware supports shaders. This enum is currently unused in Godot 3.x. </constant> <constant name="FEATURE_MULTITHREADED" value="1" enum="Features"> + Hardware supports multithreading. This enum is currently unused in Godot 3.x. </constant> <constant name="MULTIMESH_TRANSFORM_2D" value="0" enum="MultimeshTransformFormat"> + Use [Transform2D] to store MultiMesh transform. </constant> <constant name="MULTIMESH_TRANSFORM_3D" value="1" enum="MultimeshTransformFormat"> + Use [Transform] to store MultiMesh transform. </constant> <constant name="MULTIMESH_COLOR_NONE" value="0" enum="MultimeshColorFormat"> + MultiMesh does not use per-instance color. </constant> <constant name="MULTIMESH_COLOR_8BIT" value="1" enum="MultimeshColorFormat"> + MultiMesh color uses 8 bits per component. This packs the color into a single float. </constant> <constant name="MULTIMESH_COLOR_FLOAT" value="2" enum="MultimeshColorFormat"> + MultiMesh color uses a float per channel. </constant> <constant name="MULTIMESH_CUSTOM_DATA_NONE" value="0" enum="MultimeshCustomDataFormat"> + MultiMesh does not use custom data. </constant> <constant name="MULTIMESH_CUSTOM_DATA_8BIT" value="1" enum="MultimeshCustomDataFormat"> + MultiMesh custom data uses 8 bits per component. This packs the 4-component custom data into a single float. </constant> <constant name="MULTIMESH_CUSTOM_DATA_FLOAT" value="2" enum="MultimeshCustomDataFormat"> + MultiMesh custom data uses a float per component. </constant> <constant name="REFLECTION_PROBE_UPDATE_ONCE" value="0" enum="ReflectionProbeUpdateMode"> + Reflection probe will update reflections once and then stop. </constant> <constant name="REFLECTION_PROBE_UPDATE_ALWAYS" value="1" enum="ReflectionProbeUpdateMode"> + Reflection probe will update each frame. This mode is necessary to capture moving objects. </constant> <constant name="PARTICLES_DRAW_ORDER_INDEX" value="0" enum="ParticlesDrawOrder"> + Draw particles in the order that they appear in the particles array. </constant> <constant name="PARTICLES_DRAW_ORDER_LIFETIME" value="1" enum="ParticlesDrawOrder"> + Sort particles based on their lifetime. </constant> <constant name="PARTICLES_DRAW_ORDER_VIEW_DEPTH" value="2" enum="ParticlesDrawOrder"> + Sort particles based on their distance to the camera. </constant> <constant name="ENV_BG_CLEAR_COLOR" value="0" enum="EnvironmentBG"> + Use the clear color as background. </constant> <constant name="ENV_BG_COLOR" value="1" enum="EnvironmentBG"> + Use a specified color as the background. </constant> <constant name="ENV_BG_SKY" value="2" enum="EnvironmentBG"> + Use a sky resource for the background. </constant> <constant name="ENV_BG_COLOR_SKY" value="3" enum="EnvironmentBG"> + Use a custom color for background, but use a sky for shading and reflections. </constant> <constant name="ENV_BG_CANVAS" value="4" enum="EnvironmentBG"> + Use a specified canvas layer as the background. This can be useful for instantiating a 2D scene in a 3D world. </constant> <constant name="ENV_BG_KEEP" value="5" enum="EnvironmentBG"> + Do not clear the background, use whatever was rendered last frame as the background. </constant> <constant name="ENV_BG_MAX" value="7" enum="EnvironmentBG"> Represents the size of the [enum EnvironmentBG] enum. </constant> <constant name="ENV_DOF_BLUR_QUALITY_LOW" value="0" enum="EnvironmentDOFBlurQuality"> + Use lowest blur quality. Fastest, but may look bad. </constant> <constant name="ENV_DOF_BLUR_QUALITY_MEDIUM" value="1" enum="EnvironmentDOFBlurQuality"> + Use medium blur quality. </constant> <constant name="ENV_DOF_BLUR_QUALITY_HIGH" value="2" enum="EnvironmentDOFBlurQuality"> + Used highest blur quality. Looks the best, but is the slowest. </constant> <constant name="GLOW_BLEND_MODE_ADDITIVE" value="0" enum="EnvironmentGlowBlendMode"> + Add the effect of the glow on top of the scene. </constant> <constant name="GLOW_BLEND_MODE_SCREEN" value="1" enum="EnvironmentGlowBlendMode"> + Blends the glow effect with the screen. Does not get as bright as additive. </constant> <constant name="GLOW_BLEND_MODE_SOFTLIGHT" value="2" enum="EnvironmentGlowBlendMode"> + Produces a subtle color disturbance around objects. </constant> <constant name="GLOW_BLEND_MODE_REPLACE" value="3" enum="EnvironmentGlowBlendMode"> + Shows the glow effect by itself without the underlying scene. </constant> <constant name="ENV_TONE_MAPPER_LINEAR" value="0" enum="EnvironmentToneMapper"> + Output color as they came in. </constant> <constant name="ENV_TONE_MAPPER_REINHARD" value="1" enum="EnvironmentToneMapper"> + Use the Reinhard tonemapper. </constant> <constant name="ENV_TONE_MAPPER_FILMIC" value="2" enum="EnvironmentToneMapper"> + Use the filmic tonemapper. </constant> <constant name="ENV_TONE_MAPPER_ACES" value="3" enum="EnvironmentToneMapper"> + Use the ACES tonemapper. </constant> <constant name="ENV_SSAO_QUALITY_LOW" value="0" enum="EnvironmentSSAOQuality"> + Lowest quality of screen space ambient occlusion. </constant> <constant name="ENV_SSAO_QUALITY_MEDIUM" value="1" enum="EnvironmentSSAOQuality"> + Medium quality screen space ambient occlusion. </constant> <constant name="ENV_SSAO_QUALITY_HIGH" value="2" enum="EnvironmentSSAOQuality"> + Highest quality screen space ambient occlusion. </constant> <constant name="ENV_SSAO_BLUR_DISABLED" value="0" enum="EnvironmentSSAOBlur"> + Disables the blur set for SSAO. Will make SSAO look noisier. </constant> <constant name="ENV_SSAO_BLUR_1x1" value="1" enum="EnvironmentSSAOBlur"> + Perform a 1x1 blur on the SSAO output. </constant> <constant name="ENV_SSAO_BLUR_2x2" value="2" enum="EnvironmentSSAOBlur"> + Performs a 2x2 blur on the SSAO output. </constant> <constant name="ENV_SSAO_BLUR_3x3" value="3" enum="EnvironmentSSAOBlur"> + Performs a 3x3 blur on the SSAO output. Use this for smoothest SSAO. </constant> </constants> </class> diff --git a/doc/classes/VisualShaderNodeTexture.xml b/doc/classes/VisualShaderNodeTexture.xml index a94b798745..4150b36c9c 100644 --- a/doc/classes/VisualShaderNodeTexture.xml +++ b/doc/classes/VisualShaderNodeTexture.xml @@ -28,6 +28,8 @@ </constant> <constant name="SOURCE_DEPTH" value="4" enum="Source"> </constant> + <constant name="SOURCE_PORT" value="5" enum="Source"> + </constant> <constant name="TYPE_DATA" value="0" enum="TextureType"> </constant> <constant name="TYPE_COLOR" value="1" enum="TextureType"> diff --git a/doc/classes/XMLParser.xml b/doc/classes/XMLParser.xml index 6989246e24..4375b2eb62 100644 --- a/doc/classes/XMLParser.xml +++ b/doc/classes/XMLParser.xml @@ -84,7 +84,7 @@ <return type="int" enum="XMLParser.NodeType"> </return> <description> - Gets the type of the current node. Compare with [code]NODE_*[/code] constants. + Gets the type of the current node. Compare with [enum NodeType] constants. </description> </method> <method name="has_attribute" qualifiers="const"> diff --git a/doc/classes/float.xml b/doc/classes/float.xml index 4c4ea83157..1571bae847 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -1,7 +1,7 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="float" category="Built-In Types" version="3.2"> <brief_description> - Float built-in type + Float built-in type. </brief_description> <description> Float built-in type. @@ -33,7 +33,7 @@ <argument index="0" name="from" type="String"> </argument> <description> - Cast a [String] value to a floating-point value. This method accepts float value strings like [code]"1.23"[/code] and exponential notation strings for its parameter so calling [code]float("1e3")[/code] will return 1000.0 and calling [code]float("1e-3")[/code] will return 0.001. + Cast a [String] value to a floating-point value. This method accepts float value strings like [code]"1.23"[/code] and exponential notation strings for its parameter so calling [code]float("1e3")[/code] will return 1000.0 and calling [code]float("1e-3")[/code] will return 0.001. Calling this method with an invalid float string will return 0. This method stops parsing at the first invalid character and will return the parsed result so far, so calling [code]float("1a3")[/code] will return 1 while calling [code]float("1e3a2")[/code] will return 1000.0. </description> </method> </methods> diff --git a/doc/tools/doc_merge.py b/doc/tools/doc_merge.py index 496d5dcb74..496d5dcb74 100644..100755 --- a/doc/tools/doc_merge.py +++ b/doc/tools/doc_merge.py diff --git a/doc/tools/doc_status.py b/doc/tools/doc_status.py index 6e34cffc05..6e34cffc05 100644..100755 --- a/doc/tools/doc_status.py +++ b/doc/tools/doc_status.py diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index ef38299680..91240e9550 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -14,7 +14,7 @@ GODOT_DOCS_PATTERN = re.compile(r'^http(?:s)?://docs\.godotengine\.org/(?:[a-zA- def print_error(error, state): # type: (str, State) -> None - print(error) + print("ERROR: {}".format(error)) state.errored = True @@ -148,6 +148,8 @@ class State: setter = property.get("setter") or None # Use or None so '' gets turned into None. getter = property.get("getter") or None default_value = property.get("default") or None + if default_value is not None: + default_value = escape_rst(default_value) overridden = property.get("override") or False property_def = PropertyDef(property_name, type_name, setter, getter, property.text, default_value, overridden) @@ -622,6 +624,40 @@ def make_class_list(class_list, columns): # type: (List[str], int) -> None f.close() +def escape_rst(text, until_pos=-1): # type: (str) -> str + # Escape \ character, otherwise it ends up as an escape character in rst + pos = 0 + while True: + pos = text.find('\\', pos, until_pos) + if pos == -1: + break + text = text[:pos] + "\\\\" + text[pos + 1:] + pos += 2 + + # Escape * character to avoid interpreting it as emphasis + pos = 0 + while True: + pos = text.find('*', pos, until_pos) + if pos == -1: + break + text = text[:pos] + "\*" + text[pos + 1:] + pos += 2 + + # Escape _ character at the end of a word to avoid interpreting it as an inline hyperlink + pos = 0 + while True: + pos = text.find('_', pos, until_pos) + if pos == -1: + break + if not text[pos + 1].isalnum(): # don't escape within a snake_case word + text = text[:pos] + "\_" + text[pos + 1:] + pos += 2 + else: + pos += 1 + + return text + + def rstize_text(text, state): # type: (str, State) -> str # Linebreak + tabs in the XML should become two line breaks unless in a "codeblock" pos = 0 @@ -677,36 +713,7 @@ def rstize_text(text, state): # type: (str, State) -> str pos += 2 next_brac_pos = text.find('[') - - # Escape \ character, otherwise it ends up as an escape character in rst - pos = 0 - while True: - pos = text.find('\\', pos, next_brac_pos) - if pos == -1: - break - text = text[:pos] + "\\\\" + text[pos + 1:] - pos += 2 - - # Escape * character to avoid interpreting it as emphasis - pos = 0 - while True: - pos = text.find('*', pos, next_brac_pos) - if pos == -1: - break - text = text[:pos] + "\*" + text[pos + 1:] - pos += 2 - - # Escape _ character at the end of a word to avoid interpreting it as an inline hyperlink - pos = 0 - while True: - pos = text.find('_', pos, next_brac_pos) - if pos == -1: - break - if not text[pos + 1].isalnum(): # don't escape within a snake_case word - text = text[:pos] + "\_" + text[pos + 1:] - pos += 2 - else: - pos += 1 + text = escape_rst(text, next_brac_pos) # Handle [tags] inside_code = False @@ -975,7 +982,11 @@ def make_enum(t, state): # type: (str, State) -> str if c in state.classes and e in state.classes[c].enums: return ":ref:`{0}<enum_{1}_{0}>`".format(e, c) - print_error("Unresolved enum '{}', file: {}".format(t, state.current_class), state) + + # Don't fail for `Vector3.Axis`, as this enum is a special case which is expected not to be resolved. + if "{}.{}".format(c, e) != "Vector3.Axis": + print_error("Unresolved enum '{}', file: {}".format(t, state.current_class), state) + return t |