diff options
Diffstat (limited to 'doc/classes')
54 files changed, 692 insertions, 131 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 b64f926921..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"> @@ -182,7 +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 [code]is_equal_approx[/code] on each component. + 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"> @@ -197,7 +197,7 @@ </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/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/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/Basis.xml b/doc/classes/Basis.xml index 5a7fc0a41b..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"> @@ -210,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/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/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/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/GraphEdit.xml b/doc/classes/GraphEdit.xml index 80e9b152ef..3041a7cb7f 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"> diff --git a/doc/classes/GraphNode.xml b/doc/classes/GraphNode.xml index 8470a346ff..77b3eb1ca0 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> 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 57d2c6ff96..3a63b2dc07 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -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> diff --git a/doc/classes/HTTPRequest.xml b/doc/classes/HTTPRequest.xml index 2fed423a32..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(): diff --git a/doc/classes/ImmediateGeometry.xml b/doc/classes/ImmediateGeometry.xml index e0807760f7..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"> 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/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/Light2D.xml b/doc/classes/Light2D.xml index 5bb90daaf4..cdc0270269 100644 --- a/doc/classes/Light2D.xml +++ b/doc/classes/Light2D.xml @@ -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/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/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/Node.xml b/doc/classes/Node.xml index e9fb47cbbd..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"> @@ -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 54b4f3df64..71d0c1a6fe 100644 --- a/doc/classes/OS.xml +++ b/doc/classes/OS.xml @@ -655,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> @@ -905,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. 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/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/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/Plane.xml b/doc/classes/Plane.xml index f179041327..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"> @@ -153,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/PopupMenu.xml b/doc/classes/PopupMenu.xml index bdb6ca84ee..c920b52df6 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"> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 57940a2507..126f11a4ed 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -401,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> diff --git a/doc/classes/RichTextLabel.xml b/doc/classes/RichTextLabel.xml index 2962391b99..0e53490681 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"> @@ -244,7 +251,7 @@ <argument index="0" name="line" type="int"> </argument> <description> - Removes a line of content from the label. Returns [code]true[/code] if the line exists. + Removes the [code]line[/code]th line of content from the label. Returns [code]true[/code] if the line exists. </description> </method> <method name="scroll_to_line"> @@ -278,8 +285,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 +298,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 +327,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 +347,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 0635dd8935..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"> 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/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/TabContainer.xml b/doc/classes/TabContainer.xml index 1f584ad317..e5f126c344 100644 --- a/doc/classes/TabContainer.xml +++ b/doc/classes/TabContainer.xml @@ -150,6 +150,7 @@ 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/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/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 4c4022b3b5..2e447ca1ba 100644 --- a/doc/classes/Transform.xml +++ b/doc/classes/Transform.xml @@ -126,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"> @@ -135,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 6288bb074c..afc8b04dc7 100644 --- a/doc/classes/Transform2D.xml +++ b/doc/classes/Transform2D.xml @@ -128,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"> @@ -137,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"> @@ -146,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 dd4330b00b..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"> @@ -230,6 +240,7 @@ </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 [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"> @@ -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/Tween.xml b/doc/classes/Tween.xml index aa995e6cbe..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> 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/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 4effe9aad2..58dd36daa5 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -305,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/VisualServer.xml b/doc/classes/VisualServer.xml index db3fd930c6..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"> @@ -413,7 +432,10 @@ </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"> @@ -429,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"> @@ -477,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"> @@ -542,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"> @@ -637,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"> @@ -655,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"> @@ -800,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"> @@ -876,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"> @@ -886,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"> @@ -909,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"> @@ -981,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"> @@ -991,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"> @@ -1015,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"> @@ -1029,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"> @@ -1039,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"> @@ -1049,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"> @@ -1059,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"> @@ -1069,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"> @@ -1087,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"> @@ -1105,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"> @@ -1121,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"> @@ -1141,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"> @@ -1157,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"> @@ -1185,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"> @@ -1195,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"> @@ -1205,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"> @@ -1215,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"> @@ -1247,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"> @@ -1267,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"> @@ -1291,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"> @@ -1308,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"> @@ -1349,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> @@ -1360,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"> @@ -1368,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"> @@ -1376,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"> @@ -1384,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"> @@ -1392,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"> @@ -1400,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"> @@ -1408,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"> @@ -1416,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"> @@ -1424,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"> @@ -1432,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"> @@ -1440,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"> @@ -1448,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"> @@ -1458,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"> @@ -1468,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"> @@ -1478,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"> @@ -1488,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"> @@ -1498,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"> @@ -1508,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"> @@ -1518,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"> @@ -1528,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"> @@ -1538,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"> @@ -1548,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"> @@ -1558,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"> @@ -1573,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"> @@ -1594,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"> @@ -1602,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"> @@ -1612,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"> @@ -1626,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"> @@ -1634,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"> @@ -1644,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"> @@ -1654,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"> @@ -1664,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"> @@ -1674,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"> @@ -1684,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"> @@ -1694,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"> @@ -1704,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"> @@ -1721,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"> @@ -1731,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"> @@ -1747,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"> @@ -1757,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"> @@ -1767,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"> @@ -1783,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"> @@ -1795,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"> @@ -1805,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"> @@ -1815,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"> @@ -1827,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"> @@ -1837,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"> @@ -1847,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"> @@ -1857,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"> @@ -1867,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"> @@ -1877,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"> @@ -1889,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"> @@ -1899,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"> @@ -1911,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"> @@ -1921,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"> @@ -1931,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"> @@ -1941,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"> @@ -1953,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> @@ -1965,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"> @@ -1975,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"> @@ -1985,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"> @@ -1995,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"> @@ -2005,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"> @@ -2015,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"> @@ -2025,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"> @@ -2035,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"> @@ -2047,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"> @@ -2057,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"> @@ -2067,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"> @@ -2077,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"> @@ -2087,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"> @@ -2104,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"> @@ -2112,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"> @@ -2120,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"> @@ -2128,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"> @@ -2136,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"> @@ -2144,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"> @@ -2154,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"> @@ -2164,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"> @@ -2174,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"> @@ -2184,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"> @@ -2194,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"> @@ -2213,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"> @@ -2235,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"> @@ -2333,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"> @@ -2505,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"> @@ -2517,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"> @@ -2588,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"> @@ -2604,14 +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. + 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"> @@ -2620,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"> @@ -2628,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"> @@ -2636,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"> @@ -2644,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"> @@ -2654,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"> @@ -2664,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"> @@ -2674,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"> @@ -2684,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"> @@ -2696,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"> @@ -2708,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"> @@ -2720,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"> @@ -2732,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"> @@ -2742,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"> @@ -2752,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"> @@ -2762,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"> @@ -2782,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"> @@ -2790,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"> @@ -2798,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"> @@ -2806,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"> @@ -2814,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"> @@ -2824,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"> @@ -2834,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"> @@ -2844,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"> @@ -2856,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"> @@ -2866,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"> @@ -2876,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"> @@ -2886,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"> @@ -2896,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"> @@ -2906,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"> @@ -2916,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"> @@ -2926,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"> @@ -2936,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"> @@ -2946,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"> @@ -2956,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"> @@ -2966,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"> @@ -2976,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"> @@ -2986,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"> @@ -3002,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"> @@ -3012,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"> @@ -3022,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"> @@ -3032,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"> @@ -3042,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"> @@ -3052,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"> @@ -3062,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"> @@ -3072,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"> @@ -3082,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"> @@ -3092,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"> @@ -3102,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"> @@ -3112,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"> @@ -3132,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"> @@ -3142,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"> @@ -3152,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"> @@ -3162,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"> @@ -3174,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"> @@ -3197,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"> @@ -3205,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"> @@ -3277,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"> @@ -3287,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"> @@ -3297,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"> @@ -3309,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"> @@ -3321,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"> @@ -3335,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"> @@ -3361,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"> @@ -3387,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"> @@ -3404,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"> @@ -3442,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"> @@ -3495,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"> @@ -3543,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"> @@ -3588,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"> @@ -3645,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"> @@ -3813,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"> @@ -3956,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> @@ -3968,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. @@ -3976,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. @@ -4004,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. @@ -4124,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. @@ -4164,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. @@ -4198,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. @@ -4283,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. @@ -4310,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. @@ -4336,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. @@ -4348,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. @@ -4384,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. @@ -4435,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/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> |