diff options
Diffstat (limited to 'doc')
95 files changed, 3228 insertions, 1067 deletions
diff --git a/doc/classes/@GlobalScope.xml b/doc/classes/@GlobalScope.xml index fa118bec54..d0bd517050 100644 --- a/doc/classes/@GlobalScope.xml +++ b/doc/classes/@GlobalScope.xml @@ -778,7 +778,7 @@ <return type="float"> </return> <description> - Returns a random floating point value on the interval [code][0, 1][/code]. + Returns a random floating point value between [code]0.0[/code] and [code]1.0[/code] (inclusive). [codeblock] randf() # Returns e.g. 0.375671 [/codeblock] @@ -792,7 +792,7 @@ <argument index="1" name="to" type="float"> </argument> <description> - Random range, any floating point value between [code]from[/code] and [code]to[/code]. + Returns a random floating point value on the interval between [code]from[/code] and [code]to[/code] (inclusive). [codeblock] prints(randf_range(-10, 10), randf_range(-10, 10)) # Prints e.g. -3.844535 7.45315 [/codeblock] @@ -819,7 +819,7 @@ <argument index="1" name="to" type="int"> </argument> <description> - Random range, any 32-bit integer value between [code]from[/code] and [code]to[/code] (inclusive). If [code]to[/code] is lesser than [code]from[/code] they are swapped. + Returns a random signed 32-bit integer between [code]from[/code] and [code]to[/code] (inclusive). If [code]to[/code] is lesser than [code]from[/code], they are swapped. [codeblock] print(randi_range(0, 1)) # Prints 0 or 1 print(randi_range(-10, 1000)) # Prints any number from -10 to 1000 @@ -1224,6 +1224,8 @@ <member name="Marshalls" type="Marshalls" setter="" getter=""> The [Marshalls] singleton. </member> + <member name="NativeExtensionManager" type="NativeExtensionManager" setter="" getter=""> + </member> <member name="NavigationMeshGenerator" type="NavigationMeshGenerator" setter="" getter=""> The [NavigationMeshGenerator] singleton. </member> @@ -2408,13 +2410,15 @@ </constant> <constant name="PROPERTY_HINT_RANGE" value="1" enum="PropertyHint"> Hints that an integer or float property should be within a range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"or_greater"[/code] and/or [code]"or_lesser"[/code] to allow manual input going respectively above the max or below the min values. Example: [code]"-360,360,1,or_greater,or_lesser"[/code]. + Additionally, other keywords can be included: "exp" for exponential range editing, "radians" for editing radian angles in degrees, "degrees" to hint at an angle and "noslider" to hide the slider. </constant> - <constant name="PROPERTY_HINT_EXP_RANGE" value="2" enum="PropertyHint"> - Hints that an integer or float property should be within an exponential range specified via the hint string [code]"min,max"[/code] or [code]"min,max,step"[/code]. The hint string can optionally include [code]"or_greater"[/code] and/or [code]"or_lesser"[/code] to allow manual input going respectively above the max or below the min values. Example: [code]"0.01,100,0.01,or_greater"[/code]. - </constant> - <constant name="PROPERTY_HINT_ENUM" value="3" enum="PropertyHint"> + <constant name="PROPERTY_HINT_ENUM" value="2" enum="PropertyHint"> Hints that an integer, float or string property is an enumerated value to pick in a list specified via a hint string such as [code]"Hello,Something,Else"[/code]. </constant> + <constant name="PROPERTY_HINT_ENUM_SUGGESTION" value="3" enum="PropertyHint"> + Hints that a string property is can be an enumerated value to pick in a list specified via a hint string such as [code]"Hello,Something,Else"[/code]. + Unlike [constant PROPERTY_HINT_ENUM] a property with this hint still accepts arbitrary values and can be empty. The list of values serves to suggest possible values. + </constant> <constant name="PROPERTY_HINT_EXP_EASING" value="4" enum="PropertyHint"> Hints that a float property should be edited via an exponential easing function. The hint string can include [code]"attenuation"[/code] to flip the curve horizontally and/or [code]"inout"[/code] to also include in/out easing. </constant> diff --git a/doc/classes/AcceptDialog.xml b/doc/classes/AcceptDialog.xml index f644606040..fd1e2ba104 100644 --- a/doc/classes/AcceptDialog.xml +++ b/doc/classes/AcceptDialog.xml @@ -21,6 +21,7 @@ <description> Adds a button with label [code]text[/code] and a custom [code]action[/code] to the dialog and returns the created button. [code]action[/code] will be passed to the [signal custom_action] signal when pressed. If [code]true[/code], [code]right[/code] will place the button to the right of any sibling buttons. + You can use [method remove_button] method to remove a button created with this method from the dialog. </description> </method> <method name="add_cancel_button"> @@ -30,6 +31,7 @@ </argument> <description> Adds a button with label [code]name[/code] and a cancel action to the dialog and returns the created button. + You can use [method remove_button] method to remove a button created with this method from the dialog. </description> </method> <method name="get_label"> @@ -55,6 +57,15 @@ Registers a [LineEdit] in the dialog. When the enter key is pressed, the dialog will be accepted. </description> </method> + <method name="remove_button"> + <return type="void"> + </return> + <argument index="0" name="button" type="Control"> + </argument> + <description> + Removes the [code]button[/code] from the dialog. Does NOT free the [code]button[/code]. The [code]button[/code] must be a [Button] added with [method add_button] or [method add_cancel_button] method. After removal, pressing the [code]button[/code] will no longer emit this dialog's [signal custom_action] or [signal cancelled] signals. + </description> + </method> </methods> <members> <member name="dialog_autowrap" type="bool" setter="set_autowrap" getter="has_autowrap" default="false"> diff --git a/doc/classes/ArrayMesh.xml b/doc/classes/ArrayMesh.xml index 1bbf9bcd93..7fbf53c7d1 100644 --- a/doc/classes/ArrayMesh.xml +++ b/doc/classes/ArrayMesh.xml @@ -43,7 +43,7 @@ [/csharp] [/codeblocks] The [MeshInstance3D] is ready to be added to the [SceneTree] to be shown. - See also [ImmediateGeometry3D], [MeshDataTool] and [SurfaceTool] for procedural geometry generation. + See also [ImmediateMesh], [MeshDataTool] and [SurfaceTool] for procedural geometry generation. [b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes. </description> <tutorials> @@ -202,7 +202,31 @@ Sets a name for a given surface. </description> </method> - <method name="surface_update_region"> + <method name="surface_update_attribute_region"> + <return type="void"> + </return> + <argument index="0" name="surf_idx" type="int"> + </argument> + <argument index="1" name="offset" type="int"> + </argument> + <argument index="2" name="data" type="PackedByteArray"> + </argument> + <description> + </description> + </method> + <method name="surface_update_skin_region"> + <return type="void"> + </return> + <argument index="0" name="surf_idx" type="int"> + </argument> + <argument index="1" name="offset" type="int"> + </argument> + <argument index="2" name="data" type="PackedByteArray"> + </argument> + <description> + </description> + </method> + <method name="surface_update_vertex_region"> <return type="void"> </return> <argument index="0" name="surf_idx" type="int"> @@ -212,8 +236,6 @@ <argument index="2" name="data" type="PackedByteArray"> </argument> <description> - Updates a specified region of mesh arrays on the GPU. - [b]Warning:[/b] Only use if you know what you are doing. You can easily cause crashes by calling this function with improper arguments. </description> </method> </methods> diff --git a/doc/classes/BaseButton.xml b/doc/classes/BaseButton.xml index f7e31f5f9c..d842bac54a 100644 --- a/doc/classes/BaseButton.xml +++ b/doc/classes/BaseButton.xml @@ -39,6 +39,16 @@ Returns [code]true[/code] if the mouse has entered the button and has not left it yet. </description> </method> + <method name="set_pressed_no_signal"> + <return type="void"> + </return> + <argument index="0" name="pressed" type="bool"> + </argument> + <description> + Changes the [member pressed] state of the button, without emitting [signal toggled]. Use when you just want to change the state of the button without sending the pressed event (e.g. when initializing scene). Only works if [member toggle_mode] is [code]true[/code]. + [b]Note:[/b] This method doesn't unpress other buttons in [member button_group]. + </description> + </method> </methods> <members> <member name="action_mode" type="int" setter="set_action_mode" getter="get_action_mode" enum="BaseButton.ActionMode" default="1"> @@ -60,7 +70,8 @@ [b]Note:[/b] This property only affects the button's visual appearance. Signals will be emitted at the same moment regardless of this property's value. </member> <member name="pressed" type="bool" setter="set_pressed" getter="is_pressed" default="false"> - If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if [member toggle_mode] is active). + If [code]true[/code], the button's state is pressed. Means the button is pressed down or toggled (if [member toggle_mode] is active). Only works if [member toggle_mode] is [code]true[/code]. + [b]Note:[/b] Setting [member pressed] will result in [signal toggled] to be emitted. If you want to change the pressed state without emitting that signal, use [method set_pressed_no_signal]. </member> <member name="shortcut" type="Shortcut" setter="set_shortcut" getter="get_shortcut"> [Shortcut] associated to the button. diff --git a/doc/classes/BaseMaterial3D.xml b/doc/classes/BaseMaterial3D.xml index abe06bc7e1..2a378ed03e 100644 --- a/doc/classes/BaseMaterial3D.xml +++ b/doc/classes/BaseMaterial3D.xml @@ -347,8 +347,6 @@ </member> <member name="subsurf_scatter_transmittance_color" type="Color" setter="set_transmittance_color" getter="get_transmittance_color" default="Color(1, 1, 1, 1)"> </member> - <member name="subsurf_scatter_transmittance_curve" type="float" setter="set_transmittance_curve" getter="get_transmittance_curve" default="1.0"> - </member> <member name="subsurf_scatter_transmittance_depth" type="float" setter="set_transmittance_depth" getter="get_transmittance_depth" default="0.1"> </member> <member name="subsurf_scatter_transmittance_enabled" type="bool" setter="set_feature" getter="get_feature" default="false"> diff --git a/doc/classes/Button.xml b/doc/classes/Button.xml index c9078a4de5..239e0bb2d9 100644 --- a/doc/classes/Button.xml +++ b/doc/classes/Button.xml @@ -85,6 +85,9 @@ <member name="icon" type="Texture2D" setter="set_button_icon" getter="get_button_icon"> Button's icon, if text is present the icon will be placed before the text. </member> + <member name="icon_align" type="int" setter="set_icon_align" getter="get_icon_align" enum="Button.TextAlign" default="0"> + Specifies if the icon should be aligned to the left, right, or center of a button. Uses the same [enum TextAlign] constants as the text alignment. If centered, text will draw on top of the icon. + </member> <member name="language" type="String" setter="set_language" getter="get_language" default=""""> Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. </member> diff --git a/doc/classes/CPUParticles2D.xml b/doc/classes/CPUParticles2D.xml index 9620e9abd1..22f070b73b 100644 --- a/doc/classes/CPUParticles2D.xml +++ b/doc/classes/CPUParticles2D.xml @@ -152,7 +152,7 @@ Each particle's initial color. If [member texture] is defined, it will be multiplied by this color. </member> <member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp"> - Each particle's color will vary along this [Gradient]. + Each particle's color will vary along this [Gradient] (multiplied with [member color]). </member> <member name="damping" type="float" setter="set_param" getter="get_param" default="0.0"> The rate at which particles lose velocity. diff --git a/doc/classes/CPUParticles3D.xml b/doc/classes/CPUParticles3D.xml index 7509775d20..d7a89eef11 100644 --- a/doc/classes/CPUParticles3D.xml +++ b/doc/classes/CPUParticles3D.xml @@ -148,10 +148,10 @@ Animation speed randomness ratio. </member> <member name="color" type="Color" setter="set_color" getter="get_color" default="Color(1, 1, 1, 1)"> - Unused for 3D particles. + Each particle's initial color. To have particle display color in a [BaseMaterial3D] make sure to set [member BaseMaterial3D.vertex_color_use_as_albedo] to [code]true[/code]. </member> <member name="color_ramp" type="Gradient" setter="set_color_ramp" getter="get_color_ramp"> - Unused for 3D particles. + Each particle's color will vary along this [GradientTexture] over its lifetime (multiplied with [member color]). </member> <member name="damping" type="float" setter="set_param" getter="get_param" default="0.0"> The rate at which particles lose velocity. diff --git a/doc/classes/Callable.xml b/doc/classes/Callable.xml index cbab1a8f50..3c61e8278f 100644 --- a/doc/classes/Callable.xml +++ b/doc/classes/Callable.xml @@ -133,6 +133,13 @@ Returns [code]true[/code] if this [Callable] is a standard callable, referencing an object and a method using a [StringName]. </description> </method> + <method name="is_valid" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns [code]true[/code] if the object exists and has a valid function assigned, or is a custom callable. + </description> + </method> <method name="operator !=" qualifiers="operator"> <return type="bool"> </return> diff --git a/doc/classes/Camera2D.xml b/doc/classes/Camera2D.xml index bf1a9cc929..e8f4cb49b6 100644 --- a/doc/classes/Camera2D.xml +++ b/doc/classes/Camera2D.xml @@ -21,13 +21,6 @@ Aligns the camera to the tracked node. </description> </method> - <method name="clear_current"> - <return type="void"> - </return> - <description> - Removes any [Camera2D] from the ancestor [Viewport]'s internal currently-assigned camera. - </description> - </method> <method name="force_update_scroll"> <return type="void"> </return> @@ -67,13 +60,6 @@ Returns the camera limit for the specified [enum Side]. See also [member limit_bottom], [member limit_top], [member limit_left], and [member limit_right]. </description> </method> - <method name="make_current"> - <return type="void"> - </return> - <description> - Make this the current 2D camera for the scene (viewport and layer), in case there are many cameras in the scene. - </description> - </method> <method name="reset_smoothing"> <return type="void"> </return> @@ -109,7 +95,7 @@ <member name="anchor_mode" type="int" setter="set_anchor_mode" getter="get_anchor_mode" enum="Camera2D.AnchorMode" default="1"> The Camera2D's anchor point. See [enum AnchorMode] constants. </member> - <member name="current" type="bool" setter="_set_current" getter="is_current" default="false"> + <member name="current" type="bool" setter="set_current" getter="is_current" default="false"> If [code]true[/code], the camera is the active camera for the current scene. Only one camera can be current, so setting a different camera [code]current[/code] will disable this one. </member> <member name="custom_viewport" type="Node" setter="set_custom_viewport" getter="get_custom_viewport"> @@ -161,6 +147,8 @@ </member> <member name="limit_smoothed" type="bool" setter="set_limit_smoothing_enabled" getter="is_limit_smoothing_enabled" default="false"> If [code]true[/code], the camera smoothly stops when reaches its limits. + This has no effect if smoothing is disabled. + [b]Note:[/b] To immediately update the camera's position to be within limits without smoothing, even with this setting enabled, invoke [method reset_smoothing]. </member> <member name="limit_top" type="int" setter="set_limit" getter="get_limit" default="-10000000"> Top scroll limit in pixels. The camera stops moving when reaching this value. diff --git a/doc/classes/Camera3D.xml b/doc/classes/Camera3D.xml index afba478a20..0f0bfdc654 100644 --- a/doc/classes/Camera3D.xml +++ b/doc/classes/Camera3D.xml @@ -176,8 +176,8 @@ [codeblock] # This code block is part of a script that inherits from Node3D. # `control` is a reference to a node inheriting from Control. - control.visible = not get_viewport().get_camera().is_position_behind(global_transform.origin) - control.rect_position = get_viewport().get_camera().unproject_position(global_transform.origin) + control.visible = not get_viewport().get_camera_3d().is_position_behind(global_transform.origin) + control.rect_position = get_viewport().get_camera_3d().unproject_position(global_transform.origin) [/codeblock] </description> </method> diff --git a/doc/classes/CanvasLayer.xml b/doc/classes/CanvasLayer.xml index f4c04d7bca..eb99368079 100644 --- a/doc/classes/CanvasLayer.xml +++ b/doc/classes/CanvasLayer.xml @@ -39,9 +39,6 @@ <member name="rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0"> The layer's rotation in radians. </member> - <member name="rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees" default="0.0"> - The layer's rotation in degrees. - </member> <member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)"> The layer's scale. </member> diff --git a/doc/classes/CharacterBody2D.xml b/doc/classes/CharacterBody2D.xml index fbe5c34d7d..e184e7dc82 100644 --- a/doc/classes/CharacterBody2D.xml +++ b/doc/classes/CharacterBody2D.xml @@ -101,9 +101,6 @@ <member name="floor_max_angle" type="float" setter="set_floor_max_angle" getter="get_floor_max_angle" default="0.785398"> Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. The default value equals 45 degrees. </member> - <member name="floor_max_angle_degrees" type="float" setter="set_floor_max_angle_degrees" getter="get_floor_max_angle_degrees" default="45.0"> - Maximum angle (in degrees) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. - </member> <member name="infinite_inertia" type="bool" setter="set_infinite_inertia_enabled" getter="is_infinite_inertia_enabled" default="true"> If [code]true[/code], the body will be able to push [RigidBody2D] nodes when calling [method move_and_slide], but it also won't detect any collisions with them. If [code]false[/code], it will interact with [RigidBody2D] nodes like with [StaticBody2D]. </member> @@ -113,9 +110,6 @@ <member name="max_slides" type="int" setter="set_max_slides" getter="get_max_slides" default="4"> Maximum number of times the body can change direction before it stops when calling [method move_and_slide]. </member> - <member name="motion/sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false"> - If [code]true[/code], the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method move_and_slide] or [method PhysicsBody2D.move_and_collide] functions. - </member> <member name="snap" type="Vector2" setter="set_snap" getter="get_snap" default="Vector2(0, 0)"> When set to a value different from [code]Vector2(0, 0)[/code], the body is kept attached to slopes when calling [method move_and_slide]. As long as the [code]snap[/code] vector is in contact with the ground, the body will remain attached to the surface. This means you must disable snap in order to jump, for example. You can do this by setting [code]snap[/code] to [code]Vector2(0, 0)[/code]. diff --git a/doc/classes/CharacterBody3D.xml b/doc/classes/CharacterBody3D.xml index f6c3d68b3c..c76e02fac0 100644 --- a/doc/classes/CharacterBody3D.xml +++ b/doc/classes/CharacterBody3D.xml @@ -87,9 +87,6 @@ <member name="floor_max_angle" type="float" setter="set_floor_max_angle" getter="get_floor_max_angle" default="0.785398"> Maximum angle (in radians) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. The default value equals 45 degrees. </member> - <member name="floor_max_angle_degrees" type="float" setter="set_floor_max_angle_degrees" getter="get_floor_max_angle_degrees" default="45.0"> - Maximum angle (in degrees) where a slope is still considered a floor (or a ceiling), rather than a wall, when calling [method move_and_slide]. - </member> <member name="infinite_inertia" type="bool" setter="set_infinite_inertia_enabled" getter="is_infinite_inertia_enabled" default="true"> If [code]true[/code], the body will be able to push [RigidBody3D] nodes when calling [method move_and_slide], but it also won't detect any collisions with them. If [code]false[/code], it will interact with [RigidBody3D] nodes like with [StaticBody3D]. </member> diff --git a/doc/classes/CollisionObject2D.xml b/doc/classes/CollisionObject2D.xml index 7c4c75bf0f..b0afbb201c 100644 --- a/doc/classes/CollisionObject2D.xml +++ b/doc/classes/CollisionObject2D.xml @@ -266,6 +266,9 @@ The physics layers this CollisionObject2D scans. Collision objects can scan one or more of 32 different layers. See also [member collision_layer]. [b]Note:[/b] A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> + <member name="disable_mode" type="int" setter="set_disable_mode" getter="get_disable_mode" enum="CollisionObject2D.DisableMode" default="0"> + Defines the behavior in physics when [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED]. See [enum DisableMode] for more details about the different modes. + </member> <member name="input_pickable" type="bool" setter="set_pickable" getter="is_pickable" default="true"> If [code]true[/code], this object is pickable. A pickable object can detect the mouse pointer entering/leaving, and if the mouse is inside it, report input events. Requires at least one [code]collision_layer[/code] bit to be set. </member> @@ -284,15 +287,40 @@ </signal> <signal name="mouse_entered"> <description> - Emitted when the mouse pointer enters any of this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [code]collision_layer[/code] bit to be set. + Emitted when the mouse pointer enters any of this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject2D] won't cause this signal to be emitted. </description> </signal> <signal name="mouse_exited"> <description> - Emitted when the mouse pointer exits all this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [code]collision_layer[/code] bit to be set. + Emitted when the mouse pointer exits all this object's shapes. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. Note that moving between different shapes within a single [CollisionObject2D] won't cause this signal to be emitted. + </description> + </signal> + <signal name="mouse_shape_entered"> + <argument index="0" name="shape_idx" type="int"> + </argument> + <description> + Emitted when the mouse pointer enters any of this object's shapes or moves from one shape to another. [code]shape_idx[/code] is the child index of the newly entered [Shape2D]. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. + </description> + </signal> + <signal name="mouse_shape_exited"> + <argument index="0" name="shape_idx" type="int"> + </argument> + <description> + Emitted when the mouse pointer exits any of this object's shapes. [code]shape_idx[/code] is the child index of the exited [Shape2D]. Requires [member input_pickable] to be [code]true[/code] and at least one [member collision_layer] bit to be set. </description> </signal> </signals> <constants> + <constant name="DISABLE_MODE_REMOVE" value="0" enum="DisableMode"> + When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], remove from the physics simulation to stop all physics interactions with this [CollisionObject2D]. + Automatically re-added to the physics simulation when the [Node] is processed again. + </constant> + <constant name="DISABLE_MODE_MAKE_STATIC" value="1" enum="DisableMode"> + When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], make the body static. Doesn't affect [Area2D]. [PhysicsBody2D] can't be affected by forces or other bodies while static. + Automatically set [PhysicsBody2D] back to its original mode when the [Node] is processed again. + </constant> + <constant name="DISABLE_MODE_KEEP_ACTIVE" value="2" enum="DisableMode"> + When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], do not affect the physics simulation. + </constant> </constants> </class> diff --git a/doc/classes/CollisionObject3D.xml b/doc/classes/CollisionObject3D.xml index 4ab37f5c7b..dfd1e85e56 100644 --- a/doc/classes/CollisionObject3D.xml +++ b/doc/classes/CollisionObject3D.xml @@ -230,6 +230,9 @@ The physics layers this CollisionObject3D scans. Collision objects can scan one or more of 32 different layers. See also [member collision_layer]. [b]Note:[/b] A contact is detected if object A is in any of the layers that object B scans, or object B is in any layers that object A scans. See [url=https://docs.godotengine.org/en/latest/tutorials/physics/physics_introduction.html#collision-layers-and-masks]Collision layers and masks[/url] in the documentation for more information. </member> + <member name="disable_mode" type="int" setter="set_disable_mode" getter="get_disable_mode" enum="CollisionObject3D.DisableMode" default="0"> + Defines the behavior in physics when [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED]. See [enum DisableMode] for more details about the different modes. + </member> <member name="input_capture_on_drag" type="bool" setter="set_capture_input_on_drag" getter="get_capture_input_on_drag" default="false"> If [code]true[/code], the [CollisionObject3D] will continue to receive input events as the mouse is dragged across its shapes. </member> @@ -265,5 +268,16 @@ </signal> </signals> <constants> + <constant name="DISABLE_MODE_REMOVE" value="0" enum="DisableMode"> + When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], remove from the physics simulation to stop all physics interactions with this [CollisionObject3D]. + Automatically re-added to the physics simulation when the [Node] is processed again. + </constant> + <constant name="DISABLE_MODE_MAKE_STATIC" value="1" enum="DisableMode"> + When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], make the body static. Doesn't affect [Area2D]. [PhysicsBody3D] can't be affected by forces or other bodies while static. + Automatically set [PhysicsBody3D] back to its original mode when the [Node] is processed again. + </constant> + <constant name="DISABLE_MODE_KEEP_ACTIVE" value="2" enum="DisableMode"> + When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], do not affect the physics simulation. + </constant> </constants> </class> diff --git a/doc/classes/Color.xml b/doc/classes/Color.xml index 29c21b3213..7b1415e40d 100644 --- a/doc/classes/Color.xml +++ b/doc/classes/Color.xml @@ -80,14 +80,16 @@ </argument> <argument index="2" name="b" type="float"> </argument> + <argument index="3" name="a" type="float"> + </argument> <description> - Constructs a [Color] from RGB values, typically between 0 and 1. Alpha will be 1. + Constructs a [Color] from RGBA values, typically between 0 and 1. [codeblocks] [gdscript] - var color = Color(0.2, 1.0, 0.7) # Similar to `Color8(51, 255, 178, 255)` + var color = Color(0.2, 1.0, 0.7, 0.8) # Similar to `Color8(51, 255, 178, 204)` [/gdscript] [csharp] - var color = new Color(0.2f, 1.0f, 0.7f); // Similar to `Color.Color8(51, 255, 178, 255)` + var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Similar to `Color.Color8(51, 255, 178, 255, 204)` [/csharp] [/codeblocks] </description> @@ -101,16 +103,14 @@ </argument> <argument index="2" name="b" type="float"> </argument> - <argument index="3" name="a" type="float"> - </argument> <description> - Constructs a [Color] from RGBA values, typically between 0 and 1. + Constructs a [Color] from RGB values, typically between 0 and 1. Alpha will be 1. [codeblocks] [gdscript] - var color = Color(0.2, 1.0, 0.7, 0.8) # Similar to `Color8(51, 255, 178, 204)` + var color = Color(0.2, 1.0, 0.7) # Similar to `Color8(51, 255, 178, 255)` [/gdscript] [csharp] - var color = new Color(0.2f, 1.0f, 0.7f, 0.8f); // Similar to `Color.Color8(51, 255, 178, 255, 204)` + var color = new Color(0.2f, 1.0f, 0.7f); // Similar to `Color.Color8(51, 255, 178, 255)` [/csharp] [/codeblocks] </description> @@ -349,12 +349,6 @@ <method name="operator +" qualifiers="operator"> <return type="Color"> </return> - <description> - </description> - </method> - <method name="operator +" qualifiers="operator"> - <return type="Color"> - </return> <argument index="0" name="right" type="Color"> </argument> <description> @@ -363,12 +357,6 @@ <method name="operator -" qualifiers="operator"> <return type="Color"> </return> - <description> - </description> - </method> - <method name="operator -" qualifiers="operator"> - <return type="Color"> - </return> <argument index="0" name="right" type="Color"> </argument> <description> @@ -414,6 +402,18 @@ <description> </description> </method> + <method name="operator unary+" qualifiers="operator"> + <return type="Color"> + </return> + <description> + </description> + </method> + <method name="operator unary-" qualifiers="operator"> + <return type="Color"> + </return> + <description> + </description> + </method> <method name="to_abgr32" qualifiers="const"> <return type="int"> </return> diff --git a/doc/classes/Control.xml b/doc/classes/Control.xml index d7e70fad32..23cbdd8cab 100644 --- a/doc/classes/Control.xml +++ b/doc/classes/Control.xml @@ -150,10 +150,10 @@ * it happens outside parent's rectangle and the parent has either [member rect_clip_content] enabled. </description> </method> - <method name="_has_point" qualifiers="virtual"> + <method name="_has_point" qualifiers="virtual const"> <return type="bool"> </return> - <argument index="0" name="point" type="Vector2"> + <argument index="0" name="" type="Vector2"> </argument> <description> Virtual method to be implemented by the user. Returns whether the given [code]point[/code] is inside this control. @@ -235,22 +235,25 @@ <argument index="1" name="color" type="Color"> </argument> <description> - Overrides the [Color] with given [code]name[/code] in the [member theme] resource the control uses. + Creates a local override for a theme [Color] with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_color_override]. + See also [method get_theme_color]. [b]Example of overriding a label's color and resetting it later:[/b] [codeblocks] [gdscript] - # Override the child node "MyLabel"'s font color to orange. + # Given the child Label node "MyLabel", override its font color with a custom value. $MyLabel.add_theme_color_override("font_color", Color(1, 0.5, 0)) - # Reset the color by creating a new node to get the default value: - var default_label_color = Label.new().get_theme_color("font_color") - $MyLabel.add_theme_color_override("font_color", default_label_color) + # Reset the font color of the child label. + $MyLabel.remove_theme_color_override("font_color") + # Alternatively it can be overridden with the default value from the Label type. + $MyLabel.add_theme_color_override("font_color", get_theme_color("font_color", "Label")) [/gdscript] [csharp] - // Override the child node "MyLabel"'s font color to orange. - GetNode<Label>("MyLabel").AddThemeColorOverride("font_color", new Color(1, 0.5f, 0)); - // Reset the color by creating a new node to get the default value: - var defaultLabelColor = new Label().GetThemeColor("font_color"); - GetNode<Label>("MyLabel").AddThemeColorOverride("font_color", defaultLabelColor); + // Given the child Label node "MyLabel", override its font color with a custom value. + GetNode<Label>("MyLabel").AddThemeColorOverride("font_color", new Color(1, 0.5f, 0)) + // Reset the font color of the child label. + GetNode<Label>("MyLabel").RemoveThemeColorOverride("font_color") + // Alternatively it can be overridden with the default value from the Label type. + GetNode<Label>("MyLabel").AddThemeColorOverride("font_color", GetThemeColor("font_color", "Label")) [/csharp] [/codeblocks] </description> @@ -263,7 +266,8 @@ <argument index="1" name="constant" type="int"> </argument> <description> - Overrides an integer constant with given [code]name[/code] in the [member theme] resource the control uses. + Creates a local override for a theme constant with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_constant_override]. + See also [method get_theme_constant]. </description> </method> <method name="add_theme_font_override"> @@ -274,7 +278,8 @@ <argument index="1" name="font" type="Font"> </argument> <description> - Overrides the font with given [code]name[/code] in the [member theme] resource the control uses. + Creates a local override for a theme [Font] with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_override]. + See also [method get_theme_font]. </description> </method> <method name="add_theme_font_size_override"> @@ -285,7 +290,8 @@ <argument index="1" name="font_size" type="int"> </argument> <description> - Overrides the font size with given [code]name[/code] in the [member theme] resource the control uses. + Creates a local override for a theme font size with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_font_size_override]. + See also [method get_theme_font_size]. </description> </method> <method name="add_theme_icon_override"> @@ -296,7 +302,8 @@ <argument index="1" name="texture" type="Texture2D"> </argument> <description> - Overrides the icon with given [code]name[/code] in the [member theme] resource the control uses. + Creates a local override for a theme icon with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_icon_override]. + See also [method get_theme_icon]. </description> </method> <method name="add_theme_stylebox_override"> @@ -307,7 +314,8 @@ <argument index="1" name="stylebox" type="StyleBox"> </argument> <description> - Overrides the [StyleBox] with given [code]name[/code] in the [member theme] resource the control uses. + Creates a local override for a theme [StyleBox] with the specified [code]name[/code]. Local overrides always take precedence when fetching theme items for the control. An override can be removed with [method remove_theme_stylebox_override]. + See also [method get_theme_stylebox]. [b]Example of modifying a property in a StyleBox by duplicating it:[/b] [codeblocks] [gdscript] @@ -318,8 +326,8 @@ new_stylebox_normal.border_width_top = 3 new_stylebox_normal.border_color = Color(0, 1, 0.5) $MyButton.add_theme_stylebox_override("normal", new_stylebox_normal) - # Remove the stylebox override: - $MyButton.add_theme_stylebox_override("normal", null) + # Remove the stylebox override. + $MyButton.remove_theme_stylebox_override("normal") [/gdscript] [csharp] // The snippet below assumes the child node MyButton has a StyleBoxFlat assigned. @@ -329,8 +337,8 @@ newStyleboxNormal.BorderWidthTop = 3; newStyleboxNormal.BorderColor = new Color(0, 1, 0.5f); GetNode<Button>("MyButton").AddThemeStyleboxOverride("normal", newStyleboxNormal); - // Remove the stylebox override: - GetNode<Button>("MyButton").AddThemeStyleboxOverride("normal", null); + // Remove the stylebox override. + GetNode<Button>("MyButton").RemoveThemeStyleboxOverride("normal"); [/csharp] [/codeblocks] </description> @@ -468,16 +476,23 @@ <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns a color from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. + Returns a [Color] from the first matching [Theme] in the tree if that [Theme] has a color item with the specified [code]name[/code] and [code]theme_type[/code]. If [code]theme_type[/code] is omitted the class name of the current control is used as the type, or [member theme_type_variation] if it is defined. If the type is a class name its parent classes are also checked, in order of inheritance. If the type is a variation its base types are checked, in order of dependency, then the control's class name and its parent classes are checked. + For the current control its local overrides are considered first (see [method add_theme_color_override]), then its assigned [member theme]. After the current control, each parent control and its assigned [member theme] are considered; controls without a [member theme] assigned are skipped. If no matching [Theme] is found in the tree, a custom project [Theme] (see [member ProjectSettings.gui/theme/custom]) and the default [Theme] are used. [codeblocks] [gdscript] func _ready(): - modulate = get_theme_color("font_color", "Button") #get the color defined for button fonts + # Get the font color defined for the current Control's class, if it exists. + modulate = get_theme_color("font_color") + # Get the font color defined for the Button class. + modulate = get_theme_color("font_color", "Button") [/gdscript] [csharp] public override void _Ready() { - Modulate = GetThemeColor("font_color", "Button"); //get the color defined for button fonts + // Get the font color defined for the current Control's class, if it exists. + Modulate = GetThemeColor("font_color"); + // Get the font color defined for the Button class. + Modulate = GetThemeColor("font_color", "Button"); } [/csharp] [/codeblocks] @@ -491,7 +506,8 @@ <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns a constant from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. + Returns a constant from the first matching [Theme] in the tree if that [Theme] has a constant item with the specified [code]name[/code] and [code]theme_type[/code]. + See [method get_theme_color] for details. </description> </method> <method name="get_theme_font" qualifiers="const"> @@ -502,7 +518,8 @@ <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns a font from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. + Returns a [Font] from the first matching [Theme] in the tree if that [Theme] has a font item with the specified [code]name[/code] and [code]theme_type[/code]. + See [method get_theme_color] for details. </description> </method> <method name="get_theme_font_size" qualifiers="const"> @@ -513,7 +530,8 @@ <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns a font size from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. + Returns a font size from the first matching [Theme] in the tree if that [Theme] has a font size item with the specified [code]name[/code] and [code]theme_type[/code]. + See [method get_theme_color] for details. </description> </method> <method name="get_theme_icon" qualifiers="const"> @@ -524,7 +542,8 @@ <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns an icon from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. + Returns an icon from the first matching [Theme] in the tree if that [Theme] has an icon item with the specified [code]name[/code] and [code]theme_type[/code]. + See [method get_theme_color] for details. </description> </method> <method name="get_theme_stylebox" qualifiers="const"> @@ -535,7 +554,8 @@ <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns a [StyleBox] from assigned [Theme] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code]. + Returns a [StyleBox] from the first matching [Theme] in the tree if that [Theme] has a stylebox item with the specified [code]name[/code] and [code]theme_type[/code]. + See [method get_theme_color] for details. </description> </method> <method name="get_tooltip" qualifiers="const"> @@ -588,7 +608,8 @@ <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if [Color] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has a color item with the specified [code]name[/code] and [code]theme_type[/code]. + See [method get_theme_color] for details. </description> </method> <method name="has_theme_color_override" qualifiers="const"> @@ -597,7 +618,8 @@ <argument index="0" name="name" type="StringName"> </argument> <description> - Returns [code]true[/code] if [Color] with given [code]name[/code] has a valid override in this [Control] node. + Returns [code]true[/code] if there is a local override for a theme [Color] with the specified [code]name[/code] in this [Control] node. + See [method add_theme_color_override]. </description> </method> <method name="has_theme_constant" qualifiers="const"> @@ -608,7 +630,8 @@ <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if constant with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has a constant item with the specified [code]name[/code] and [code]theme_type[/code]. + See [method get_theme_color] for details. </description> </method> <method name="has_theme_constant_override" qualifiers="const"> @@ -617,7 +640,8 @@ <argument index="0" name="name" type="StringName"> </argument> <description> - Returns [code]true[/code] if constant with given [code]name[/code] has a valid override in this [Control] node. + Returns [code]true[/code] if there is a local override for a theme constant with the specified [code]name[/code] in this [Control] node. + See [method add_theme_constant_override]. </description> </method> <method name="has_theme_font" qualifiers="const"> @@ -628,7 +652,8 @@ <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if font with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has a font item with the specified [code]name[/code] and [code]theme_type[/code]. + See [method get_theme_color] for details. </description> </method> <method name="has_theme_font_override" qualifiers="const"> @@ -637,7 +662,8 @@ <argument index="0" name="name" type="StringName"> </argument> <description> - Returns [code]true[/code] if font with given [code]name[/code] has a valid override in this [Control] node. + Returns [code]true[/code] if there is a local override for a theme [Font] with the specified [code]name[/code] in this [Control] node. + See [method add_theme_font_override]. </description> </method> <method name="has_theme_font_size" qualifiers="const"> @@ -648,7 +674,8 @@ <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if font size with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has a font size item with the specified [code]name[/code] and [code]theme_type[/code]. + See [method get_theme_color] for details. </description> </method> <method name="has_theme_font_size_override" qualifiers="const"> @@ -657,7 +684,8 @@ <argument index="0" name="name" type="StringName"> </argument> <description> - Returns [code]true[/code] if font size with given [code]name[/code] has a valid override in this [Control] node. + Returns [code]true[/code] if there is a local override for a theme font size with the specified [code]name[/code] in this [Control] node. + See [method add_theme_font_size_override]. </description> </method> <method name="has_theme_icon" qualifiers="const"> @@ -668,7 +696,8 @@ <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if icon with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has an icon item with the specified [code]name[/code] and [code]theme_type[/code]. + See [method get_theme_color] for details. </description> </method> <method name="has_theme_icon_override" qualifiers="const"> @@ -677,7 +706,8 @@ <argument index="0" name="name" type="StringName"> </argument> <description> - Returns [code]true[/code] if icon with given [code]name[/code] has a valid override in this [Control] node. + Returns [code]true[/code] if there is a local override for a theme icon with the specified [code]name[/code] in this [Control] node. + See [method add_theme_icon_override]. </description> </method> <method name="has_theme_stylebox" qualifiers="const"> @@ -688,7 +718,8 @@ <argument index="1" name="theme_type" type="StringName" default=""""> </argument> <description> - Returns [code]true[/code] if [StyleBox] with given [code]name[/code] and associated with [Control] of given [code]theme_type[/code] exists in assigned [Theme]. + Returns [code]true[/code] if there is a matching [Theme] in the tree that has a stylebox item with the specified [code]name[/code] and [code]theme_type[/code]. + See [method get_theme_color] for details. </description> </method> <method name="has_theme_stylebox_override" qualifiers="const"> @@ -697,7 +728,8 @@ <argument index="0" name="name" type="StringName"> </argument> <description> - Returns [code]true[/code] if [StyleBox] with given [code]name[/code] has a valid override in this [Control] node. + Returns [code]true[/code] if there is a local override for a theme [StyleBox] with the specified [code]name[/code] in this [Control] node. + See [method add_theme_stylebox_override]. </description> </method> <method name="is_layout_rtl" qualifiers="const"> @@ -727,7 +759,7 @@ <argument index="0" name="name" type="StringName"> </argument> <description> - Removes a theme override for a [Color] with the given [code]name[/code]. + Removes a local override for a theme [Color] with the specified [code]name[/code] previously added by [method add_theme_color_override] or via the Inspector dock. </description> </method> <method name="remove_theme_constant_override"> @@ -736,7 +768,7 @@ <argument index="0" name="name" type="StringName"> </argument> <description> - Removes a theme override for a constant with the given [code]name[/code]. + Removes a local override for a theme constant with the specified [code]name[/code] previously added by [method add_theme_constant_override] or via the Inspector dock. </description> </method> <method name="remove_theme_font_override"> @@ -745,7 +777,7 @@ <argument index="0" name="name" type="StringName"> </argument> <description> - Removes a theme override for a [Font] with the given [code]name[/code]. + Removes a local override for a theme [Font] with the specified [code]name[/code] previously added by [method add_theme_font_override] or via the Inspector dock. </description> </method> <method name="remove_theme_font_size_override"> @@ -754,7 +786,7 @@ <argument index="0" name="name" type="StringName"> </argument> <description> - Removes a theme override for a font size with the given [code]name[/code]. + Removes a local override for a theme font size with the specified [code]name[/code] previously added by [method add_theme_font_size_override] or via the Inspector dock. </description> </method> <method name="remove_theme_icon_override"> @@ -763,7 +795,7 @@ <argument index="0" name="name" type="StringName"> </argument> <description> - Removes a theme override for an icon with the given [code]name[/code]. + Removes a local override for a theme icon with the specified [code]name[/code] previously added by [method add_theme_icon_override] or via the Inspector dock. </description> </method> <method name="remove_theme_stylebox_override"> @@ -772,7 +804,7 @@ <argument index="0" name="name" type="StringName"> </argument> <description> - Removes a theme override for a [StyleBox] with the given [code]name[/code]. + Removes a local override for a theme [StyleBox] with the specified [code]name[/code] previously added by [method add_theme_stylebox_override] or via the Inspector dock. </description> </method> <method name="set_anchor"> @@ -1144,9 +1176,6 @@ <member name="rect_rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0"> The node's rotation around its pivot, in radians. See [member rect_pivot_offset] to change the pivot's position. </member> - <member name="rect_rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees" default="0.0"> - The node's rotation around its pivot, in degrees. See [member rect_pivot_offset] to change the pivot's position. - </member> <member name="rect_scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)"> The node's scale, relative to its [member rect_size]. Change this property to scale the node around its [member rect_pivot_offset]. The Control's [member hint_tooltip] will also scale according to this value. [b]Note:[/b] This property is mainly intended to be used for animation purposes. Text inside the Control will look pixelated or blurry when the Control is scaled. To support multiple resolutions in your project, use an appropriate viewport stretch mode as described in the [url=https://docs.godotengine.org/en/latest/tutorials/viewports/multiple_resolutions.html]documentation[/url] instead of scaling Controls individually. @@ -1167,8 +1196,9 @@ <member name="theme" type="Theme" setter="set_theme" getter="get_theme"> The [Theme] resource this node and all its [Control] children use. If a child node has its own [Theme] resource set, theme items are merged with child's definitions having higher priority. </member> - <member name="theme_custom_type" type="StringName" setter="set_theme_custom_type" getter="get_theme_custom_type" default="&"""> - The type name used by this [Control] to look up its own theme items. By default, the class name of the node is used (e.g. [code]Button[/code] for the [Button] control), as well as the class names of all parent classes (in order of inheritance). Setting this property gives the highest priority to the type of the specified name, then falls back on the class names. + <member name="theme_type_variation" type="StringName" setter="set_theme_type_variation" getter="get_theme_type_variation" default="&"""> + The name of a theme type variation used by this [Control] to look up its own theme items. When empty, the class name of the node is used (e.g. [code]Button[/code] for the [Button] control), as well as the class names of all parent classes (in order of inheritance). + When set, this property gives the highest priority to the type of the specified name. This type can in turn extend another type, forming a dependency chain. See [method Theme.set_type_variation]. If the theme item cannot be found using this type or its base types, lookup falls back on the class names. [b]Note:[/b] To look up [Control]'s own items use various [code]get_theme_*[/code] methods without specifying [code]theme_type[/code]. [b]Note:[/b] Theme items are looked for in the tree order, from branch to root, where each [Control] node is checked for its [member theme] property. The earliest match against any type/class name is returned. The project-level Theme and the default Theme are checked last. </member> diff --git a/doc/classes/CurveTexture.xml b/doc/classes/CurveTexture.xml index bc6b69d2d1..54065fe0f9 100644 --- a/doc/classes/CurveTexture.xml +++ b/doc/classes/CurveTexture.xml @@ -14,10 +14,16 @@ <member name="curve" type="Curve" setter="set_curve" getter="get_curve"> The [code]curve[/code] rendered onto the texture. </member> + <member name="texture_mode" type="int" setter="set_texture_mode" getter="get_texture_mode" enum="CurveTexture.TextureMode" default="0"> + </member> <member name="width" type="int" setter="set_width" getter="get_width" default="2048"> The width of the texture. </member> </members> <constants> + <constant name="TEXTURE_MODE_RGB" value="0" enum="TextureMode"> + </constant> + <constant name="TEXTURE_MODE_RED" value="1" enum="TextureMode"> + </constant> </constants> </class> diff --git a/doc/classes/CurveXYZTexture.xml b/doc/classes/CurveXYZTexture.xml new file mode 100644 index 0000000000..9afeb58060 --- /dev/null +++ b/doc/classes/CurveXYZTexture.xml @@ -0,0 +1,23 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="CurveXYZTexture" inherits="Texture2D" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="curve_x" type="Curve" setter="set_curve_x" getter="get_curve_x"> + </member> + <member name="curve_y" type="Curve" setter="set_curve_y" getter="get_curve_y"> + </member> + <member name="curve_z" type="Curve" setter="set_curve_z" getter="get_curve_z"> + </member> + <member name="width" type="int" setter="set_width" getter="get_width" default="2048"> + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/DirectionalLight3D.xml b/doc/classes/DirectionalLight3D.xml index 233b1f0c16..4f51adb8fc 100644 --- a/doc/classes/DirectionalLight3D.xml +++ b/doc/classes/DirectionalLight3D.xml @@ -15,9 +15,6 @@ <member name="directional_shadow_blend_splits" type="bool" setter="set_blend_splits" getter="is_blend_splits_enabled" default="false"> If [code]true[/code], shadow detail is sacrificed in exchange for smoother transitions between splits. </member> - <member name="directional_shadow_depth_range" type="int" setter="set_shadow_depth_range" getter="get_shadow_depth_range" enum="DirectionalLight3D.ShadowDepthRange" default="0"> - Optimizes shadow rendering for detail versus movement. See [enum ShadowDepthRange]. - </member> <member name="directional_shadow_fade_start" type="float" setter="set_param" getter="get_param" default="0.8"> Proportion of [member directional_shadow_max_distance] at which point the shadow starts to fade. At [member directional_shadow_max_distance] the shadow will disappear. </member> @@ -55,11 +52,5 @@ <constant name="SHADOW_PARALLEL_4_SPLITS" value="2" enum="ShadowMode"> Splits the view frustum in 4 areas, each with its own shadow map. This is the slowest directional shadow mode. </constant> - <constant name="SHADOW_DEPTH_RANGE_STABLE" value="0" enum="ShadowDepthRange"> - Keeps the shadow stable when the camera moves, at the cost of lower effective shadow resolution. - </constant> - <constant name="SHADOW_DEPTH_RANGE_OPTIMIZED" value="1" enum="ShadowDepthRange"> - Tries to achieve maximum shadow resolution. May result in saw effect on shadow edges. This mode typically works best in games where the camera will often move at high speeds, such as most racing games. - </constant> </constants> </class> diff --git a/doc/classes/DisplayServer.xml b/doc/classes/DisplayServer.xml index ef20174ee6..17b51d5cbe 100644 --- a/doc/classes/DisplayServer.xml +++ b/doc/classes/DisplayServer.xml @@ -44,9 +44,11 @@ </return> <argument index="0" name="mode" type="int" enum="DisplayServer.WindowMode"> </argument> - <argument index="1" name="flags" type="int"> + <argument index="1" name="vsync_mode" type="int" enum="DisplayServer.VSyncMode"> </argument> - <argument index="2" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)"> + <argument index="2" name="flags" type="int"> + </argument> + <argument index="3" name="rect" type="Rect2i" default="Rect2i(0, 0, 0, 0)"> </argument> <description> </description> @@ -671,34 +673,6 @@ [b]Note:[/b] This method is implemented on Android, iOS and UWP. </description> </method> - <method name="vsync_is_enabled" qualifiers="const"> - <return type="bool"> - </return> - <description> - </description> - </method> - <method name="vsync_is_using_via_compositor" qualifiers="const"> - <return type="bool"> - </return> - <description> - </description> - </method> - <method name="vsync_set_enabled"> - <return type="void"> - </return> - <argument index="0" name="enabled" type="bool"> - </argument> - <description> - </description> - </method> - <method name="vsync_set_use_via_compositor"> - <return type="void"> - </return> - <argument index="0" name="enabled" type="bool"> - </argument> - <description> - </description> - </method> <method name="window_attach_instance_id"> <return type="void"> </return> @@ -791,6 +765,15 @@ <description> </description> </method> + <method name="window_get_vsync_mode" qualifiers="const"> + <return type="int" enum="DisplayServer.VSyncMode"> + </return> + <argument index="0" name="window_id" type="int" default="0"> + </argument> + <description> + Returns the VSync mode of the given window. + </description> + </method> <method name="window_move_to_foreground"> <return type="void"> </return> @@ -995,6 +978,19 @@ <description> </description> </method> + <method name="window_set_vsync_mode"> + <return type="void"> + </return> + <argument index="0" name="vsync_mode" type="int" enum="DisplayServer.VSyncMode"> + </argument> + <argument index="1" name="window_id" type="int" default="0"> + </argument> + <description> + Sets the VSync mode of the given window. + See [enum DisplayServer.VSyncMode] for possible values and how they affect the behavior of your application. + Depending on the platform and used renderer, the engine will fall back to [constant VSYNC_ENABLED], if the desired mode is not supported. + </description> + </method> <method name="window_set_window_event_callback"> <return type="void"> </return> @@ -1151,5 +1147,18 @@ </constant> <constant name="WINDOW_EVENT_DPI_CHANGE" value="6" enum="WindowEvent"> </constant> + <constant name="VSYNC_DISABLED" value="0" enum="VSyncMode"> + No vertical synchronization, which means the engine will display frames as fast as possible (tearing may be visible). + </constant> + <constant name="VSYNC_ENABLED" value="1" enum="VSyncMode"> + Default vertical synchronization mode, the image is displayed only on vertical blanking intervals (no tearing is visible). + </constant> + <constant name="VSYNC_ADAPTIVE" value="2" enum="VSyncMode"> + Behaves like [constant VSYNC_DISABLED] when the framerate drops below the screen's refresh rate to reduce stuttering (tearing may be visible), otherwise vertical synchronization is enabled to avoid tearing. + </constant> + <constant name="VSYNC_MAILBOX" value="3" enum="VSyncMode"> + Displays the most recent image in the queue on vertical blanking intervals, while rendering to the other images (no tearing is visible). + Although not guaranteed, the images can be rendered as fast as possible, which may reduce input lag. + </constant> </constants> </class> diff --git a/doc/classes/EditorPlugin.xml b/doc/classes/EditorPlugin.xml index a02d318f70..753227513b 100644 --- a/doc/classes/EditorPlugin.xml +++ b/doc/classes/EditorPlugin.xml @@ -547,6 +547,7 @@ <return type="void"> </return> <description> + Minimizes the bottom panel. </description> </method> <method name="make_bottom_panel_item_visible"> @@ -555,6 +556,7 @@ <argument index="0" name="item" type="Control"> </argument> <description> + Makes a specific item in the bottom panel visible. </description> </method> <method name="queue_save_layout"> diff --git a/doc/classes/EditorSpinSlider.xml b/doc/classes/EditorSpinSlider.xml index 935335943f..b86e5e5c6e 100644 --- a/doc/classes/EditorSpinSlider.xml +++ b/doc/classes/EditorSpinSlider.xml @@ -18,6 +18,9 @@ </member> <member name="read_only" type="bool" setter="set_read_only" getter="is_read_only" default="false"> </member> + <member name="suffix" type="String" setter="set_suffix" getter="get_suffix" default=""""> + The suffix to display after the value (in a faded color). This should generally be a plural word. You may have to use an abbreviation if the suffix is too long to be displayed. + </member> </members> <constants> </constants> diff --git a/doc/classes/File.xml b/doc/classes/File.xml index 7feaaa2040..f98c31dc7f 100644 --- a/doc/classes/File.xml +++ b/doc/classes/File.xml @@ -486,6 +486,7 @@ </argument> <description> Stores any Variant value in the file. If [code]full_objects[/code] is [code]true[/code], encoding objects is allowed (and can potentially include code). + [b]Note:[/b] Not all properties are included. Only properties that are configured with the [constant PROPERTY_USAGE_STORAGE] flag set will be serialized. You can add a new usage flag to a property by overriding the [method Object._get_property_list] method in your class. You can also check how property usage is configured by calling [method Object._get_property_list]. See [enum PropertyUsageFlags] for the possible usage flags. </description> </method> </methods> diff --git a/doc/classes/HTTPClient.xml b/doc/classes/HTTPClient.xml index a549994a69..a08bed751f 100644 --- a/doc/classes/HTTPClient.xml +++ b/doc/classes/HTTPClient.xml @@ -158,7 +158,8 @@ <argument index="3" name="body" type="String" default=""""> </argument> <description> - Sends a request to the connected host. The URL parameter is just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]index.php[/code]. + Sends a request to the connected host. + The URL parameter is usually just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]/index.php[/code]. When sending requests to an HTTP proxy server, it should be an absolute URL. For [constant HTTPClient.METHOD_OPTIONS] requests, [code]*[/code] is also allowed. For [constant HTTPClient.METHOD_CONNECT] requests, it should be the authority component ([code]host:port[/code]). Headers are HTTP request headers. For available HTTP methods, see [enum Method]. To create a POST request with query strings to push to the server, do: [codeblocks] @@ -166,7 +167,7 @@ var fields = {"username" : "user", "password" : "pass"} var query_string = http_client.query_string_from_dict(fields) var headers = ["Content-Type: application/x-www-form-urlencoded", "Content-Length: " + str(query_string.length())] - var result = http_client.request(http_client.METHOD_POST, "index.php", headers, query_string) + var result = http_client.request(http_client.METHOD_POST, "/index.php", headers, query_string) [/gdscript] [csharp] var fields = new Godot.Collections.Dictionary { { "username", "user" }, { "password", "pass" } }; @@ -190,7 +191,8 @@ <argument index="3" name="body" type="PackedByteArray"> </argument> <description> - Sends a raw request to the connected host. The URL parameter is just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]index.php[/code]. + Sends a raw request to the connected host. + The URL parameter is usually just the part after the host, so for [code]http://somehost.com/index.php[/code], it is [code]/index.php[/code]. When sending requests to an HTTP proxy server, it should be an absolute URL. For [constant HTTPClient.METHOD_OPTIONS] requests, [code]*[/code] is also allowed. For [constant HTTPClient.METHOD_CONNECT] requests, it should be the authority component ([code]host:port[/code]). Headers are HTTP request headers. For available HTTP methods, see [enum Method]. Sends the body data raw, as a byte array and does not encode it in any way. </description> diff --git a/doc/classes/ImageTexture.xml b/doc/classes/ImageTexture.xml index 5fef56e354..f89b6ad57b 100644 --- a/doc/classes/ImageTexture.xml +++ b/doc/classes/ImageTexture.xml @@ -61,10 +61,8 @@ </return> <argument index="0" name="image" type="Image"> </argument> - <argument index="1" name="immediate" type="bool" default="false"> - </argument> <description> - Replaces the texture's data with a new [Image]. If [code]immediate[/code] is [code]true[/code], it will take effect immediately after the call. + Replaces the texture's data with a new [Image]. [b]Note:[/b] The texture has to be initialized first with the [method create_from_image] method before it can be updated. The new image dimensions, format, and mipmaps configuration should match the existing texture's image configuration, otherwise it has to be re-created with the [method create_from_image] method. Use this method over [method create_from_image] if you need to update the texture frequently, which is faster than allocating additional memory for a new texture each time. </description> diff --git a/doc/classes/ImmediateGeometry3D.xml b/doc/classes/ImmediateGeometry3D.xml deleted file mode 100644 index d2d663847f..0000000000 --- a/doc/classes/ImmediateGeometry3D.xml +++ /dev/null @@ -1,113 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="ImmediateGeometry3D" inherits="GeometryInstance3D" version="4.0"> - <brief_description> - Draws simple geometry from code. - </brief_description> - <description> - Draws simple geometry from code. Uses a drawing mode similar to OpenGL 1.x. - See also [ArrayMesh], [MeshDataTool] and [SurfaceTool] for procedural geometry generation. - [b]Note:[/b] ImmediateGeometry3D is best suited to small amounts of mesh data that change every frame. It will be slow when handling large amounts of mesh data. If mesh data doesn't change often, use [ArrayMesh], [MeshDataTool] or [SurfaceTool] instead. - [b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes. - </description> - <tutorials> - </tutorials> - <methods> - <method name="add_sphere"> - <return type="void"> - </return> - <argument index="0" name="lats" type="int"> - </argument> - <argument index="1" name="lons" type="int"> - </argument> - <argument index="2" name="radius" type="float"> - </argument> - <argument index="3" name="add_uv" type="bool" default="true"> - </argument> - <description> - Simple helper to draw an UV sphere with given latitude, longitude and radius. - </description> - </method> - <method name="add_vertex"> - <return type="void"> - </return> - <argument index="0" name="position" type="Vector3"> - </argument> - <description> - Adds a vertex in local coordinate space with the currently set color/uv/etc. - </description> - </method> - <method name="begin"> - <return type="void"> - </return> - <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType"> - </argument> - <argument index="1" name="texture" type="Texture2D" default="null"> - </argument> - <description> - Begin drawing (and optionally pass a texture override). When done call [method end]. For more information on how this works, search for [code]glBegin()[/code] and [code]glEnd()[/code] references. - For the type of primitive, see the [enum Mesh.PrimitiveType] enum. - </description> - </method> - <method name="clear"> - <return type="void"> - </return> - <description> - Clears everything that was drawn using begin/end. - </description> - </method> - <method name="end"> - <return type="void"> - </return> - <description> - Ends a drawing context and displays the results. - </description> - </method> - <method name="set_color"> - <return type="void"> - </return> - <argument index="0" name="color" type="Color"> - </argument> - <description> - The current drawing color. - </description> - </method> - <method name="set_normal"> - <return type="void"> - </return> - <argument index="0" name="normal" type="Vector3"> - </argument> - <description> - The next vertex's normal. - </description> - </method> - <method name="set_tangent"> - <return type="void"> - </return> - <argument index="0" name="tangent" type="Plane"> - </argument> - <description> - The next vertex's tangent (and binormal facing). - </description> - </method> - <method name="set_uv"> - <return type="void"> - </return> - <argument index="0" name="uv" type="Vector2"> - </argument> - <description> - The next vertex's UV. - </description> - </method> - <method name="set_uv2"> - <return type="void"> - </return> - <argument index="0" name="uv" type="Vector2"> - </argument> - <description> - The next vertex's second layer UV. - </description> - </method> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/ImmediateMesh.xml b/doc/classes/ImmediateMesh.xml new file mode 100644 index 0000000000..d2ae091cad --- /dev/null +++ b/doc/classes/ImmediateMesh.xml @@ -0,0 +1,103 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="ImmediateMesh" inherits="Mesh" version="4.0"> + <brief_description> + Mesh optimized for creating geometry manually. + </brief_description> + <description> + Mesh optimized for creating geometry manually, similar to OpenGL1.x immediate mode. + </description> + <tutorials> + </tutorials> + <methods> + <method name="clear_surfaces"> + <return type="void"> + </return> + <description> + Clear all surfaces. + </description> + </method> + <method name="surface_add_vertex"> + <return type="void"> + </return> + <argument index="0" name="vertex" type="Vector3"> + </argument> + <description> + Add a 3D vertex using the current attributes previously set. + </description> + </method> + <method name="surface_add_vertex_2d"> + <return type="void"> + </return> + <argument index="0" name="vertex" type="Vector2"> + </argument> + <description> + Add a 2D vertex using the current attributes previously set. + </description> + </method> + <method name="surface_begin"> + <return type="void"> + </return> + <argument index="0" name="primitive" type="int" enum="Mesh.PrimitiveType"> + </argument> + <argument index="1" name="material" type="Material" default="null"> + </argument> + <description> + Begin a new surface. + </description> + </method> + <method name="surface_end"> + <return type="void"> + </return> + <description> + End and commit current surface. Note that surface being created will not be visible until this function is called. + </description> + </method> + <method name="surface_set_color"> + <return type="void"> + </return> + <argument index="0" name="color" type="Color"> + </argument> + <description> + Set the color attribute that will be pushed with the next vertex. + </description> + </method> + <method name="surface_set_normal"> + <return type="void"> + </return> + <argument index="0" name="normal" type="Vector3"> + </argument> + <description> + Set the normal attribute that will be pushed with the next vertex. + </description> + </method> + <method name="surface_set_tangent"> + <return type="void"> + </return> + <argument index="0" name="tangent" type="Plane"> + </argument> + <description> + Set the tangent attribute that will be pushed with the next vertex. + </description> + </method> + <method name="surface_set_uv"> + <return type="void"> + </return> + <argument index="0" name="uv" type="Vector2"> + </argument> + <description> + Set the UV attribute that will be pushed with the next vertex. + </description> + </method> + <method name="surface_set_uv2"> + <return type="void"> + </return> + <argument index="0" name="uv2" type="Vector2"> + </argument> + <description> + Set the UV2 attribute that will be pushed with the next vertex. + </description> + </method> + </methods> + <constants> + </constants> +</class> diff --git a/doc/classes/InputMap.xml b/doc/classes/InputMap.xml index 0fb18d8e81..3948ab0208 100644 --- a/doc/classes/InputMap.xml +++ b/doc/classes/InputMap.xml @@ -41,6 +41,15 @@ Removes all events from an action. </description> </method> + <method name="action_get_deadzone"> + <return type="float"> + </return> + <argument index="0" name="action" type="StringName"> + </argument> + <description> + Returns a deadzone value for the action. + </description> + </method> <method name="action_get_events"> <return type="Array"> </return> diff --git a/doc/classes/Label.xml b/doc/classes/Label.xml index ee59f0c85a..ca22567ad5 100644 --- a/doc/classes/Label.xml +++ b/doc/classes/Label.xml @@ -75,11 +75,11 @@ <member name="align" type="int" setter="set_align" getter="get_align" enum="Label.Align" default="0"> Controls the text's horizontal align. Supports left, center, right, and fill, or justify. Set it to one of the [enum Align] constants. </member> - <member name="autowrap" type="bool" setter="set_autowrap" getter="has_autowrap" default="false"> - If [code]true[/code], wraps the text inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. + <member name="autowrap_mode" type="int" setter="set_autowrap_mode" getter="get_autowrap_mode" enum="Label.AutowrapMode" default="0"> + If set to something other than [constant AUTOWRAP_OFF], the text gets wrapped inside the node's bounding rectangle. If you resize the node, it will change its height automatically to show all the text. To see how each mode behaves, see [enum AutowrapMode]. </member> <member name="clip_text" type="bool" setter="set_clip_text" getter="is_clipping_text" default="false"> - If [code]true[/code], the Label only shows the text that fits inside its bounding rectangle. It also lets you scale the node down freely. + If [code]true[/code], the Label only shows the text that fits inside its bounding rectangle and will clip text horizontally. </member> <member name="language" type="String" setter="set_language" getter="get_language" default=""""> Language code used for line-breaking and text shaping algorithms, if left empty current locale is used instead. @@ -107,6 +107,9 @@ <member name="text_direction" type="int" setter="set_text_direction" getter="get_text_direction" enum="Control.TextDirection" default="0"> Base text writing direction. </member> + <member name="text_overrun_behavior" type="int" setter="set_text_overrun_behavior" getter="get_text_overrun_behavior" enum="Label.OverrunBehavior" default="0"> + Sets the clipping behavior when the text exceeds the node's bounding rectangle. See [enum OverrunBehavior] for a description of all modes. + </member> <member name="uppercase" type="bool" setter="set_uppercase" getter="is_uppercase" default="false"> If [code]true[/code], all the text displays as UPPERCASE. </member> @@ -142,6 +145,33 @@ <constant name="VALIGN_FILL" value="3" enum="VAlign"> Align the whole text by spreading the rows. </constant> + <constant name="AUTOWRAP_OFF" value="0" enum="AutowrapMode"> + Autowrap is disabled. + </constant> + <constant name="AUTOWRAP_ARBITRARY" value="1" enum="AutowrapMode"> + Wraps the text inside the node's bounding rectangle by allowing to break lines at arbitrary positions, which is useful when very limited space is available. + </constant> + <constant name="AUTOWRAP_WORD" value="2" enum="AutowrapMode"> + Wraps the text inside the node's bounding rectangle by soft-breaking between words. + </constant> + <constant name="AUTOWRAP_WORD_SMART" value="3" enum="AutowrapMode"> + Behaves similarly to [constant AUTOWRAP_WORD], but force-breaks a word if that single word does not fit in one line. + </constant> + <constant name="OVERRUN_NO_TRIMMING" value="0" enum="OverrunBehavior"> + No text trimming is performed. + </constant> + <constant name="OVERRUN_TRIM_CHAR" value="1" enum="OverrunBehavior"> + Trims the text per character. + </constant> + <constant name="OVERRUN_TRIM_WORD" value="2" enum="OverrunBehavior"> + Trims the text per word. + </constant> + <constant name="OVERRUN_TRIM_ELLIPSIS" value="3" enum="OverrunBehavior"> + Trims the text per character and adds an ellipsis to indicate that parts are hidden. + </constant> + <constant name="OVERRUN_TRIM_WORD_ELLIPSIS" value="4" enum="OverrunBehavior"> + Trims the text per word and adds an ellipsis to indicate that parts are hidden. + </constant> </constants> <theme_items> <theme_item name="font" type="Font"> diff --git a/doc/classes/LineEdit.xml b/doc/classes/LineEdit.xml index f1e7c5f6e1..af6fc738c7 100644 --- a/doc/classes/LineEdit.xml +++ b/doc/classes/LineEdit.xml @@ -102,6 +102,13 @@ Inserts [code]text[/code] at the caret. If the resulting value is longer than [member max_length], nothing happens. </description> </method> + <method name="is_menu_visible" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns whether the menu is visible. Use this instead of [code]get_menu().visible[/code] to improve performance (so the creation of the menu is avoided). + </description> + </method> <method name="menu_option"> <return type="void"> </return> @@ -169,6 +176,7 @@ The caret's column position inside the [LineEdit]. When set, the text may scroll to accommodate it. </member> <member name="caret_force_displayed" type="bool" setter="set_caret_force_displayed" getter="is_caret_force_displayed" default="false"> + If [code]true[/code], the [LineEdit] will always show the caret, even if focus is lost. </member> <member name="caret_mid_grapheme" type="bool" setter="set_caret_mid_grapheme_enabled" getter="is_caret_mid_grapheme_enabled" default="false"> Allow moving caret, selecting and removing the individual composite character components. @@ -195,6 +203,28 @@ </member> <member name="max_length" type="int" setter="set_max_length" getter="get_max_length" default="0"> Maximum amount of characters that can be entered inside the [LineEdit]. If [code]0[/code], there is no limit. + When a limit is defined, characters that would exceed [member max_length] are truncated. This happens both for existing [member text] contents when setting the max length, or for new text inserted in the [LineEdit], including pasting. If any input text is truncated, the [signal text_change_rejected] signal is emitted with the truncated substring as parameter. + [b]Example:[/b] + [codeblocks] + [gdscript] + text = "Hello world" + max_length = 5 + # `text` becomes "Hello". + max_length = 10 + text += " goodbye" + # `text` becomes "Hello good". + # `text_change_rejected` is emitted with "bye" as parameter. + [/gdscript] + [csharp] + Text = "Hello world"; + MaxLength = 5; + // `Text` becomes "Hello". + MaxLength = 10; + Text += " goodbye"; + // `Text` becomes "Hello good". + // `text_change_rejected` is emitted with "bye" as parameter. + [/csharp] + [/codeblocks] </member> <member name="mouse_default_cursor_shape" type="int" setter="set_default_cursor_shape" getter="get_default_cursor_shape" override="true" enum="Control.CursorShape" default="1" /> <member name="placeholder_alpha" type="float" setter="set_placeholder_alpha" getter="get_placeholder_alpha" default="0.6"> @@ -237,8 +267,10 @@ </members> <signals> <signal name="text_change_rejected"> + <argument index="0" name="rejected_substring" type="String"> + </argument> <description> - Emitted when trying to append text that would overflow the [member max_length]. + Emitted when appending text that overflows the [member max_length]. The appended text is truncated to fit [member max_length], and the part that couldn't fit is passed as the [code]rejected_substring[/code] argument. </description> </signal> <signal name="text_changed"> diff --git a/doc/classes/Mesh.xml b/doc/classes/Mesh.xml index 3bbdfbe62e..2cc0bd2ef9 100644 --- a/doc/classes/Mesh.xml +++ b/doc/classes/Mesh.xml @@ -16,8 +16,14 @@ <method name="create_convex_shape" qualifiers="const"> <return type="Shape3D"> </return> + <argument index="0" name="clean" type="bool" default="true"> + </argument> + <argument index="1" name="simplify" type="bool" default="false"> + </argument> <description> Calculate a [ConvexPolygonShape3D] from the mesh. + If [code]clean[/code] is [code]true[/code] (default), duplicate and interior vertices are removed automatically. You can set it to [code]false[/code] to make the process faster if not needed. + If [code]simplify[/code] is [code]true[/code], the geometry can be further simplified to reduce the amount of vertices. Disabled by default. </description> </method> <method name="create_outline" qualifiers="const"> diff --git a/doc/classes/MeshDataTool.xml b/doc/classes/MeshDataTool.xml index da02511dc0..c0ee1e1956 100644 --- a/doc/classes/MeshDataTool.xml +++ b/doc/classes/MeshDataTool.xml @@ -45,7 +45,7 @@ AddChild(mi); [/csharp] [/codeblocks] - See also [ArrayMesh], [ImmediateGeometry3D] and [SurfaceTool] for procedural geometry generation. + See also [ArrayMesh], [ImmediateMesh] and [SurfaceTool] for procedural geometry generation. [b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes. </description> <tutorials> diff --git a/doc/classes/MeshInstance3D.xml b/doc/classes/MeshInstance3D.xml index 7c4e75793e..930301a742 100644 --- a/doc/classes/MeshInstance3D.xml +++ b/doc/classes/MeshInstance3D.xml @@ -16,8 +16,14 @@ <method name="create_convex_collision"> <return type="void"> </return> + <argument index="0" name="clean" type="bool" default="true"> + </argument> + <argument index="1" name="simplify" type="bool" default="false"> + </argument> <description> This helper creates a [StaticBody3D] child node with a [ConvexPolygonShape3D] collision shape calculated from the mesh geometry. It's mainly used for testing. + If [code]clean[/code] is [code]true[/code] (default), duplicate and interior vertices are removed automatically. You can set it to [code]false[/code] to make the process faster if not needed. + If [code]simplify[/code] is [code]true[/code], the geometry can be further simplified to reduce the amount of vertices. Disabled by default. </description> </method> <method name="create_debug_tangents"> diff --git a/doc/classes/MultiplayerAPI.xml b/doc/classes/MultiplayerAPI.xml index 5de5703d95..82b929c1f7 100644 --- a/doc/classes/MultiplayerAPI.xml +++ b/doc/classes/MultiplayerAPI.xml @@ -4,7 +4,7 @@ High-level multiplayer API. </brief_description> <description> - This class implements most of the logic behind the high-level multiplayer API. See also [NetworkedMultiplayerPeer]. + This class implements most of the logic behind the high-level multiplayer API. See also [MultiplayerPeer]. By default, [SceneTree] has a reference to this class that is used to provide multiplayer capabilities (i.e. RPC/RSET) across the whole scene. It is possible to override the MultiplayerAPI instance used by specific Nodes by setting the [member Node.custom_multiplayer] property, effectively allowing to run both client and server in the same scene. [b]Note:[/b] The high-level multiplayer API protocol is an implementation detail and isn't meant to be used by non-Godot servers. It may change without notice. @@ -70,10 +70,10 @@ </argument> <argument index="1" name="id" type="int" default="0"> </argument> - <argument index="2" name="mode" type="int" enum="NetworkedMultiplayerPeer.TransferMode" default="2"> + <argument index="2" name="mode" type="int" enum="MultiplayerPeer.TransferMode" default="2"> </argument> <description> - Sends the given raw [code]bytes[/code] to a specific peer identified by [code]id[/code] (see [method NetworkedMultiplayerPeer.set_target_peer]). Default ID is [code]0[/code], i.e. broadcast to all peers. + Sends the given raw [code]bytes[/code] to a specific peer identified by [code]id[/code] (see [method MultiplayerPeer.set_target_peer]). Default ID is [code]0[/code], i.e. broadcast to all peers. </description> </method> </methods> @@ -82,7 +82,7 @@ If [code]true[/code], the MultiplayerAPI will allow encoding and decoding of object during RPCs/RSETs. [b]Warning:[/b] Deserialized objects can contain code which gets executed. Do not use this option if the serialized object comes from untrusted sources to avoid potential security threats such as remote code execution. </member> - <member name="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_peer"> + <member name="network_peer" type="MultiplayerPeer" setter="set_network_peer" getter="get_network_peer"> The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the MultiplayerAPI will become a network server (check with [method is_network_server]) and will set root node's network mode to master, or it will become a regular peer with root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to MultiplayerAPI's signals. </member> <member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections" default="false"> @@ -146,14 +146,5 @@ <constant name="RPC_MODE_PUPPET" value="3" enum="RPCMode"> Used with [method Node.rpc_config] to set a method to be called or a property to be changed only on puppets for this node. Analogous to the [code]puppet[/code] keyword. Only accepts calls or property changes from the node's network master, see [method Node.set_network_master]. </constant> - <constant name="RPC_MODE_REMOTESYNC" value="4" enum="RPCMode"> - Behave like [constant RPC_MODE_REMOTE] but also make the call or property change locally. Analogous to the [code]remotesync[/code] keyword. - </constant> - <constant name="RPC_MODE_MASTERSYNC" value="5" enum="RPCMode"> - Behave like [constant RPC_MODE_MASTER] but also make the call or property change locally. Analogous to the [code]mastersync[/code] keyword. - </constant> - <constant name="RPC_MODE_PUPPETSYNC" value="6" enum="RPCMode"> - Behave like [constant RPC_MODE_PUPPET] but also make the call or property change locally. Analogous to the [code]puppetsync[/code] keyword. - </constant> </constants> </class> diff --git a/doc/classes/NetworkedMultiplayerPeer.xml b/doc/classes/MultiplayerPeer.xml index 06ea46f023..713cd64b82 100644 --- a/doc/classes/NetworkedMultiplayerPeer.xml +++ b/doc/classes/MultiplayerPeer.xml @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="UTF-8" ?> -<class name="NetworkedMultiplayerPeer" inherits="PacketPeer" version="4.0"> +<class name="MultiplayerPeer" inherits="PacketPeer" version="4.0"> <brief_description> A high-level network interface to simplify multiplayer interactions. </brief_description> @@ -13,7 +13,7 @@ </tutorials> <methods> <method name="get_connection_status" qualifiers="const"> - <return type="int" enum="NetworkedMultiplayerPeer.ConnectionStatus"> + <return type="int" enum="MultiplayerPeer.ConnectionStatus"> </return> <description> Returns the current state of the connection. See [enum ConnectionStatus]. @@ -23,14 +23,14 @@ <return type="int"> </return> <description> - Returns the ID of the [NetworkedMultiplayerPeer] who sent the most recent packet. + Returns the ID of the [MultiplayerPeer] who sent the most recent packet. </description> </method> <method name="get_unique_id" qualifiers="const"> <return type="int"> </return> <description> - Returns the ID of this [NetworkedMultiplayerPeer]. + Returns the ID of this [MultiplayerPeer]. </description> </method> <method name="poll"> @@ -53,9 +53,9 @@ </methods> <members> <member name="refuse_new_connections" type="bool" setter="set_refuse_new_connections" getter="is_refusing_new_connections" default="true"> - If [code]true[/code], this [NetworkedMultiplayerPeer] refuses new connections. + If [code]true[/code], this [MultiplayerPeer] refuses new connections. </member> - <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="NetworkedMultiplayerPeer.TransferMode" default="0"> + <member name="transfer_mode" type="int" setter="set_transfer_mode" getter="get_transfer_mode" enum="MultiplayerPeer.TransferMode" default="0"> The manner in which to send packets to the [code]target_peer[/code]. See [enum TransferMode]. </member> </members> diff --git a/doc/classes/NativeExtension.xml b/doc/classes/NativeExtension.xml new file mode 100644 index 0000000000..c48af7df7b --- /dev/null +++ b/doc/classes/NativeExtension.xml @@ -0,0 +1,57 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="NativeExtension" inherits="RefCounted" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="close_library"> + <return type="void"> + </return> + <description> + </description> + </method> + <method name="get_minimum_library_initialization_level" qualifiers="const"> + <return type="int" enum="NativeExtension.InitializationLevel"> + </return> + <description> + </description> + </method> + <method name="initialize_library"> + <return type="void"> + </return> + <argument index="0" name="level" type="int" enum="NativeExtension.InitializationLevel"> + </argument> + <description> + </description> + </method> + <method name="is_library_open" qualifiers="const"> + <return type="bool"> + </return> + <description> + </description> + </method> + <method name="open_library"> + <return type="int" enum="Error"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <argument index="1" name="entry_symbol" type="String"> + </argument> + <description> + </description> + </method> + </methods> + <constants> + <constant name="INITIALIZATION_LEVEL_CORE" value="0" enum="InitializationLevel"> + </constant> + <constant name="INITIALIZATION_LEVEL_SERVERS" value="1" enum="InitializationLevel"> + </constant> + <constant name="INITIALIZATION_LEVEL_SCENE" value="2" enum="InitializationLevel"> + </constant> + <constant name="INITIALIZATION_LEVEL_EDITOR" value="3" enum="InitializationLevel"> + </constant> + </constants> +</class> diff --git a/doc/classes/NativeExtensionManager.xml b/doc/classes/NativeExtensionManager.xml new file mode 100644 index 0000000000..ba9018ff4c --- /dev/null +++ b/doc/classes/NativeExtensionManager.xml @@ -0,0 +1,61 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="NativeExtensionManager" inherits="Object" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + <method name="get_extension"> + <return type="NativeExtension"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <description> + </description> + </method> + <method name="get_loaded_extensions" qualifiers="const"> + <return type="PackedStringArray"> + </return> + <description> + </description> + </method> + <method name="load_extension"> + <return type="int" enum="NativeExtensionManager.LoadStatus"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <description> + </description> + </method> + <method name="reload_extension"> + <return type="int" enum="NativeExtensionManager.LoadStatus"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <description> + </description> + </method> + <method name="unload_extension"> + <return type="int" enum="NativeExtensionManager.LoadStatus"> + </return> + <argument index="0" name="path" type="String"> + </argument> + <description> + </description> + </method> + </methods> + <constants> + <constant name="LOAD_STATUS_OK" value="0" enum="LoadStatus"> + </constant> + <constant name="LOAD_STATUS_FAILED" value="1" enum="LoadStatus"> + </constant> + <constant name="LOAD_STATUS_ALREADY_LOADED" value="2" enum="LoadStatus"> + </constant> + <constant name="LOAD_STATUS_NOT_LOADED" value="3" enum="LoadStatus"> + </constant> + <constant name="LOAD_STATUS_NEEDS_RESTART" value="4" enum="LoadStatus"> + </constant> + </constants> +</class> diff --git a/doc/classes/Node.xml b/doc/classes/Node.xml index 21f3f1fcc0..fc971effd7 100644 --- a/doc/classes/Node.xml +++ b/doc/classes/Node.xml @@ -14,7 +14,7 @@ To keep track of the scene hierarchy (especially when instancing scenes into other scenes), an "owner" can be set for the node with the [member owner] property. This keeps track of who instantiated what. This is mostly useful when writing editors and tools, though. Finally, when a node is freed with [method Object.free] or [method queue_free], it will also free all its children. [b]Groups:[/b] Nodes can be added to as many groups as you want to be easy to manage, you could create groups like "enemies" or "collectables" for example, depending on your game. See [method add_to_group], [method is_in_group] and [method remove_from_group]. You can then retrieve all nodes in these groups, iterate them and even call methods on groups via the methods on [SceneTree]. - [b]Networking with nodes:[/b] After connecting to a server (or making one, see [NetworkedMultiplayerENet]), it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling [method rpc] with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections). To identify which node receives the RPC call, Godot will use its [NodePath] (make sure node names are the same on all peers). Also, take a look at the high-level networking tutorial and corresponding demos. + [b]Networking with nodes:[/b] After connecting to a server (or making one, see [ENetMultiplayerPeer]), it is possible to use the built-in RPC (remote procedure call) system to communicate over the network. By calling [method rpc] with a method name, it will be called locally and in all connected peers (peers = clients and the server that accepts connections). To identify which node receives the RPC call, Godot will use its [NodePath] (make sure node names are the same on all peers). Also, take a look at the high-level networking tutorial and corresponding demos. </description> <tutorials> <link title="Scenes and nodes">https://docs.godotengine.org/en/latest/getting_started/step_by_step/scenes_and_nodes.html</link> @@ -426,7 +426,7 @@ Returns [code]true[/code] if the [NodePath] points to a valid node and its subname points to a valid resource, e.g. [code]Area2D/CollisionShape2D:shape[/code]. Properties with a non-[Resource] type (e.g. nodes or primitive math types) are not considered resources. </description> </method> - <method name="is_a_parent_of" qualifiers="const"> + <method name="is_ancestor_of" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="node" type="Node"> @@ -660,7 +660,7 @@ </argument> <description> Sends a remote procedure call request for the given [code]method[/code] to peers on the network (and locally), optionally sending all additional arguments as arguments to the method called by the RPC. The call request will only be received by nodes with the same [NodePath], including the exact same node name. Behaviour depends on the RPC configuration for the given method, see [method rpc_config]. Methods are not exposed to RPCs by default. Returns an empty [Variant]. - [b]Note:[/b] You can only safely use RPCs on clients after you received the [code]connected_to_server[/code] signal from the [SceneTree]. You also need to keep track of the connection state, either by the [SceneTree] signals like [code]server_disconnected[/code] or by checking [code]SceneTree.network_peer.get_connection_status() == CONNECTION_CONNECTED[/code]. + [b]Note:[/b] You can only safely use RPCs on clients after you received the [code]connected_to_server[/code] signal from the [MultiplayerAPI]. You also need to keep track of the connection state, either by the [MultiplayerAPI] signals like [code]server_disconnected[/code] or by checking [code]get_multiplayer().network_peer.get_connection_status() == CONNECTION_CONNECTED[/code]. </description> </method> <method name="rpc_config"> @@ -670,12 +670,12 @@ </argument> <argument index="1" name="rpc_mode" type="int" enum="MultiplayerAPI.RPCMode"> </argument> - <argument index="2" name="transfer_mode" type="int" enum="NetworkedMultiplayerPeer.TransferMode" default="2"> + <argument index="2" name="transfer_mode" type="int" enum="MultiplayerPeer.TransferMode" default="2"> </argument> <argument index="3" name="channel" type="int" default="0"> </argument> <description> - Changes the RPC mode for the given [code]method[/code] to the given [code]rpc_mode[/code], optionally specifying the [code]transfer_mode[/code] and [code]channel[/code] (on supported peers). See [enum MultiplayerAPI.RPCMode] and [enum NetworkedMultiplayerPeer.TransferMode]. An alternative is annotating methods and properties with the corresponding keywords ([code]remote[/code], [code]master[/code], [code]puppet[/code], [code]remotesync[/code], [code]mastersync[/code], [code]puppetsync[/code]). By default, methods are not exposed to networking (and RPCs). + Changes the RPC mode for the given [code]method[/code] to the given [code]rpc_mode[/code], optionally specifying the [code]transfer_mode[/code] and [code]channel[/code] (on supported peers). See [enum MultiplayerAPI.RPCMode] and [enum MultiplayerPeer.TransferMode]. An alternative is annotating methods and properties with the corresponding keywords ([code]remote[/code], [code]master[/code], [code]puppet[/code], [code]remotesync[/code], [code]mastersync[/code], [code]puppetsync[/code]). By default, methods are not exposed to networking (and RPCs). </description> </method> <method name="rpc_id" qualifiers="vararg"> @@ -686,7 +686,7 @@ <argument index="1" name="method" type="StringName"> </argument> <description> - Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] (see [method NetworkedMultiplayerPeer.set_target_peer]). Returns an empty [Variant]. + Sends a [method rpc] to a specific peer identified by [code]peer_id[/code] (see [method MultiplayerPeer.set_target_peer]). Returns an empty [Variant]. </description> </method> <method name="set_display_folded"> @@ -904,6 +904,12 @@ <constant name="NOTIFICATION_POST_ENTER_TREE" value="27"> Notification received when the node is ready, just before [constant NOTIFICATION_READY] is received. Unlike the latter, it's sent every time the node enters tree, instead of only once. </constant> + <constant name="NOTIFICATION_DISABLED" value="28"> + Notification received when the node is disabled. See [constant PROCESS_MODE_DISABLED]. + </constant> + <constant name="NOTIFICATION_ENABLED" value="29"> + Notification received when the node is enabled again after being disabled. See [constant PROCESS_MODE_DISABLED]. + </constant> <constant name="NOTIFICATION_EDITOR_PRE_SAVE" value="9001"> Notification received right before the scene with the node is saved in the editor. This notification is only sent in the Godot editor and will not occur in exported projects. </constant> diff --git a/doc/classes/Node2D.xml b/doc/classes/Node2D.xml index cc99abf9cb..9ffa333f17 100644 --- a/doc/classes/Node2D.xml +++ b/doc/classes/Node2D.xml @@ -122,9 +122,6 @@ <member name="global_rotation" type="float" setter="set_global_rotation" getter="get_global_rotation"> Global rotation in radians. </member> - <member name="global_rotation_degrees" type="float" setter="set_global_rotation_degrees" getter="get_global_rotation_degrees"> - Global rotation in degrees. - </member> <member name="global_scale" type="Vector2" setter="set_global_scale" getter="get_global_scale"> Global scale. </member> @@ -137,16 +134,11 @@ <member name="rotation" type="float" setter="set_rotation" getter="get_rotation" default="0.0"> Rotation in radians, relative to the node's parent. </member> - <member name="rotation_degrees" type="float" setter="set_rotation_degrees" getter="get_rotation_degrees" default="0.0"> - Rotation in degrees, relative to the node's parent. - </member> <member name="scale" type="Vector2" setter="set_scale" getter="get_scale" default="Vector2(1, 1)"> The node's scale. Unscaled value: [code](1, 1)[/code]. </member> <member name="skew" type="float" setter="set_skew" getter="get_skew" default="0.0"> </member> - <member name="skew_degrees" type="float" setter="set_skew_degrees" getter="get_skew_degrees" default="0.0"> - </member> <member name="transform" type="Transform2D" setter="set_transform" getter="get_transform"> Local [Transform2D]. </member> diff --git a/doc/classes/Node3D.xml b/doc/classes/Node3D.xml index 2dc8659d5d..14e03a2186 100644 --- a/doc/classes/Node3D.xml +++ b/doc/classes/Node3D.xml @@ -294,13 +294,10 @@ <member name="position" type="Vector3" setter="set_position" getter="get_position" default="Vector3(0, 0, 0)"> Local position or translation of this node relative to the parent. This is equivalent to [code]transform.origin[/code]. </member> - <member name="rotation" type="Vector3" setter="set_rotation" getter="get_rotation"> + <member name="rotation" type="Vector3" setter="set_rotation" getter="get_rotation" default="Vector3(0, 0, 0)"> Rotation part of the local transformation in radians, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle). [b]Note:[/b] In the mathematical sense, rotation is a matrix and not a vector. The three Euler angles, which are the three independent parameters of the Euler-angle parametrization of the rotation matrix, are stored in a [Vector3] data structure not because the rotation is a vector, but only because [Vector3] exists as a convenient data-structure to store 3 floating-point numbers. Therefore, applying affine operations on the rotation "vector" is not meaningful. </member> - <member name="rotation_degrees" type="Vector3" setter="set_rotation_degrees" getter="get_rotation_degrees" default="Vector3(0, 0, 0)"> - Rotation part of the local transformation in degrees, specified in terms of YXZ-Euler angles in the format (X angle, Y angle, Z angle). - </member> <member name="scale" type="Vector3" setter="set_scale" getter="get_scale" default="Vector3(1, 1, 1)"> Scale part of the local transformation. </member> diff --git a/doc/classes/NodePath.xml b/doc/classes/NodePath.xml index 817ccd5160..0ba2e73ad4 100644 --- a/doc/classes/NodePath.xml +++ b/doc/classes/NodePath.xml @@ -20,6 +20,7 @@ @"/root/Main" # If your main scene's root node were named "Main". @"/root/MyAutoload" # If you have an autoloaded node or scene. [/codeblock] + [b]Note:[/b] In the editor, [NodePath] properties are automatically updated when moving, renaming or deleting a node in the scene tree, but they are never updated at runtime. </description> <tutorials> <link title="2D Role Playing Game Demo">https://godotengine.org/asset-library/asset/520</link> diff --git a/doc/classes/PacketPeerUDP.xml b/doc/classes/PacketPeerUDP.xml index 5d059ad3df..2707df612c 100644 --- a/doc/classes/PacketPeerUDP.xml +++ b/doc/classes/PacketPeerUDP.xml @@ -148,7 +148,7 @@ var socket = new PacketPeerUDP(); // Server socket.SetDestAddress("127.0.0.1", 789); - socket.PutPacket("Time To Stop".ToAscii()); + socket.PutPacket("Time to stop".ToAscii()); // Client while (socket.Wait() == OK) diff --git a/doc/classes/ParticlesMaterial.xml b/doc/classes/ParticlesMaterial.xml index e8fde21032..52430b3f45 100644 --- a/doc/classes/ParticlesMaterial.xml +++ b/doc/classes/ParticlesMaterial.xml @@ -145,7 +145,7 @@ Each particle's initial color. If the [GPUParticles2D]'s [code]texture[/code] is defined, it will be multiplied by this color. To have particle display color in a [BaseMaterial3D] make sure to set [member BaseMaterial3D.vertex_color_use_as_albedo] to [code]true[/code]. </member> <member name="color_ramp" type="Texture2D" setter="set_color_ramp" getter="get_color_ramp"> - Each particle's color will vary along this [GradientTexture]. + Each particle's color will vary along this [GradientTexture] over its lifetime (multiplied with [member color]). </member> <member name="damping" type="float" setter="set_param" getter="get_param" default="0.0"> The rate at which particles lose velocity. diff --git a/doc/classes/Performance.xml b/doc/classes/Performance.xml index b6013fa83e..a141961df5 100644 --- a/doc/classes/Performance.xml +++ b/doc/classes/Performance.xml @@ -168,58 +168,42 @@ <constant name="OBJECT_ORPHAN_NODE_COUNT" value="9" enum="Monitor"> Number of orphan nodes, i.e. nodes which are not parented to a node of the scene tree. </constant> - <constant name="RENDER_OBJECTS_IN_FRAME" value="10" enum="Monitor"> - 3D objects drawn per frame. + <constant name="RENDER_TOTAL_OBJECTS_IN_FRAME" value="10" enum="Monitor"> </constant> - <constant name="RENDER_VERTICES_IN_FRAME" value="11" enum="Monitor"> - Vertices drawn per frame. 3D only. + <constant name="RENDER_TOTAL_PRIMITIVES_IN_FRAME" value="11" enum="Monitor"> </constant> - <constant name="RENDER_MATERIAL_CHANGES_IN_FRAME" value="12" enum="Monitor"> - Material changes per frame. 3D only. + <constant name="RENDER_TOTAL_DRAW_CALLS_IN_FRAME" value="12" enum="Monitor"> </constant> - <constant name="RENDER_SHADER_CHANGES_IN_FRAME" value="13" enum="Monitor"> - Shader changes per frame. 3D only. - </constant> - <constant name="RENDER_SURFACE_CHANGES_IN_FRAME" value="14" enum="Monitor"> - Render surface changes per frame. 3D only. - </constant> - <constant name="RENDER_DRAW_CALLS_IN_FRAME" value="15" enum="Monitor"> - Draw calls per frame. 3D only. - </constant> - <constant name="RENDER_VIDEO_MEM_USED" value="16" enum="Monitor"> + <constant name="RENDER_VIDEO_MEM_USED" value="13" enum="Monitor"> The amount of video memory used, i.e. texture and vertex memory combined. </constant> - <constant name="RENDER_TEXTURE_MEM_USED" value="17" enum="Monitor"> + <constant name="RENDER_TEXTURE_MEM_USED" value="14" enum="Monitor"> The amount of texture memory used. </constant> - <constant name="RENDER_VERTEX_MEM_USED" value="18" enum="Monitor"> - The amount of vertex memory used. - </constant> - <constant name="RENDER_USAGE_VIDEO_MEM_TOTAL" value="19" enum="Monitor"> - Unimplemented in the GLES2 rendering backend, always returns 0. + <constant name="RENDER_BUFFER_MEM_USED" value="15" enum="Monitor"> </constant> - <constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="20" enum="Monitor"> + <constant name="PHYSICS_2D_ACTIVE_OBJECTS" value="16" enum="Monitor"> Number of active [RigidBody2D] nodes in the game. </constant> - <constant name="PHYSICS_2D_COLLISION_PAIRS" value="21" enum="Monitor"> + <constant name="PHYSICS_2D_COLLISION_PAIRS" value="17" enum="Monitor"> Number of collision pairs in the 2D physics engine. </constant> - <constant name="PHYSICS_2D_ISLAND_COUNT" value="22" enum="Monitor"> + <constant name="PHYSICS_2D_ISLAND_COUNT" value="18" enum="Monitor"> Number of islands in the 2D physics engine. </constant> - <constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="23" enum="Monitor"> + <constant name="PHYSICS_3D_ACTIVE_OBJECTS" value="19" enum="Monitor"> Number of active [RigidBody3D] and [VehicleBody3D] nodes in the game. </constant> - <constant name="PHYSICS_3D_COLLISION_PAIRS" value="24" enum="Monitor"> + <constant name="PHYSICS_3D_COLLISION_PAIRS" value="20" enum="Monitor"> Number of collision pairs in the 3D physics engine. </constant> - <constant name="PHYSICS_3D_ISLAND_COUNT" value="25" enum="Monitor"> + <constant name="PHYSICS_3D_ISLAND_COUNT" value="21" enum="Monitor"> Number of islands in the 3D physics engine. </constant> - <constant name="AUDIO_OUTPUT_LATENCY" value="26" enum="Monitor"> + <constant name="AUDIO_OUTPUT_LATENCY" value="22" enum="Monitor"> Output latency of the [AudioServer]. </constant> - <constant name="MONITOR_MAX" value="27" enum="Monitor"> + <constant name="MONITOR_MAX" value="23" enum="Monitor"> Represents the size of the [enum Monitor] enum. </constant> </constants> diff --git a/doc/classes/PhysicalBone3D.xml b/doc/classes/PhysicalBone3D.xml index 736b44ee1c..2ed862e9ce 100644 --- a/doc/classes/PhysicalBone3D.xml +++ b/doc/classes/PhysicalBone3D.xml @@ -66,12 +66,9 @@ <member name="joint_offset" type="Transform3D" setter="set_joint_offset" getter="get_joint_offset" default="Transform3D(1, 0, 0, 0, 1, 0, 0, 0, 1, 0, 0, 0)"> Sets the joint's transform. </member> - <member name="joint_rotation" type="Vector3" setter="set_joint_rotation" getter="get_joint_rotation"> + <member name="joint_rotation" type="Vector3" setter="set_joint_rotation" getter="get_joint_rotation" default="Vector3(0, 0, 0)"> Sets the joint's rotation in radians. </member> - <member name="joint_rotation_degrees" type="Vector3" setter="set_joint_rotation_degrees" getter="get_joint_rotation_degrees" default="Vector3(0, 0, 0)"> - Sets the joint's rotation in degrees. - </member> <member name="joint_type" type="int" setter="set_joint_type" getter="get_joint_type" enum="PhysicalBone3D.JointType" default="0"> Sets the joint type. See [enum JointType] for possible values. </member> diff --git a/doc/classes/PhysicsServer2D.xml b/doc/classes/PhysicsServer2D.xml index 33cd61eb9c..b492ddaa25 100644 --- a/doc/classes/PhysicsServer2D.xml +++ b/doc/classes/PhysicsServer2D.xml @@ -820,6 +820,10 @@ </argument> <argument index="5" name="result" type="PhysicsTestMotionResult2D" default="null"> </argument> + <argument index="6" name="exclude_raycast_shapes" type="bool" default="true"> + </argument> + <argument index="7" name="exclude" type="Array" default="[]"> + </argument> <description> Returns [code]true[/code] if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. [PhysicsTestMotionResult2D] can be passed to return additional information in. </description> @@ -1024,7 +1028,7 @@ <argument index="0" name="iterations" type="int"> </argument> <description> - Sets the amount of iterations for calculating velocities of colliding bodies. The greater the amount, the more accurate the collisions, but with a performance loss. + Sets the amount of iterations for calculating velocities of colliding bodies. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. The default value is [code]8[/code]. </description> </method> <method name="shape_get_data" qualifiers="const"> diff --git a/doc/classes/PhysicsServer3D.xml b/doc/classes/PhysicsServer3D.xml index aa1f7597ea..9db7ff5c12 100644 --- a/doc/classes/PhysicsServer3D.xml +++ b/doc/classes/PhysicsServer3D.xml @@ -772,6 +772,25 @@ Sets a body state (see [enum BodyState] constants). </description> </method> + <method name="body_test_motion"> + <return type="bool"> + </return> + <argument index="0" name="body" type="RID"> + </argument> + <argument index="1" name="from" type="Transform3D"> + </argument> + <argument index="2" name="motion" type="Vector3"> + </argument> + <argument index="3" name="infinite_inertia" type="bool"> + </argument> + <argument index="4" name="margin" type="float" default="0.001"> + </argument> + <argument index="5" name="result" type="PhysicsTestMotionResult3D" default="null"> + </argument> + <description> + Returns [code]true[/code] if a collision would result from moving in the given direction from a given point in space. Margin increases the size of the shapes involved in the collision detection. [PhysicsTestMotionResult3D] can be passed to return additional information in. + </description> + </method> <method name="box_shape_create"> <return type="RID"> </return> @@ -1168,6 +1187,16 @@ Activates or deactivates the 3D physics engine. </description> </method> + <method name="set_collision_iterations"> + <return type="void"> + </return> + <argument index="0" name="iterations" type="int"> + </argument> + <description> + Sets the amount of iterations for calculating velocities of colliding bodies. The greater the amount of iterations, the more accurate the collisions will be. However, a greater amount of iterations requires more CPU power, which can decrease performance. The default value is [code]8[/code]. + [b]Note:[/b] Only has an effect when using the default GodotPhysics engine, not the Bullet physics engine. + </description> + </method> <method name="shape_get_data" qualifiers="const"> <return type="Variant"> </return> diff --git a/doc/classes/PhysicsShapeQueryParameters2D.xml b/doc/classes/PhysicsShapeQueryParameters2D.xml index 321a713e26..229a40638a 100644 --- a/doc/classes/PhysicsShapeQueryParameters2D.xml +++ b/doc/classes/PhysicsShapeQueryParameters2D.xml @@ -4,7 +4,7 @@ Parameters to be sent to a 2D shape physics query. </brief_description> <description> - This class contains the shape and other parameters for 2D intersection/collision queries. See also [PhysicsShapeQueryResult2D]. + This class contains the shape and other parameters for 2D intersection/collision queries. </description> <tutorials> </tutorials> diff --git a/doc/classes/PhysicsShapeQueryParameters3D.xml b/doc/classes/PhysicsShapeQueryParameters3D.xml index 52916a8418..9ca892acb3 100644 --- a/doc/classes/PhysicsShapeQueryParameters3D.xml +++ b/doc/classes/PhysicsShapeQueryParameters3D.xml @@ -4,7 +4,7 @@ Parameters to be sent to a 3D shape physics query. </brief_description> <description> - This class contains the shape and other parameters for 3D intersection/collision queries. See also [PhysicsShapeQueryResult3D]. + This class contains the shape and other parameters for 3D intersection/collision queries. </description> <tutorials> </tutorials> diff --git a/doc/classes/PhysicsShapeQueryResult2D.xml b/doc/classes/PhysicsShapeQueryResult2D.xml deleted file mode 100644 index 07b7bc90e2..0000000000 --- a/doc/classes/PhysicsShapeQueryResult2D.xml +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="PhysicsShapeQueryResult2D" inherits="RefCounted" version="4.0"> - <brief_description> - Result of a 2D shape query in [PhysicsServer2D]. - </brief_description> - <description> - The result of a 2D shape query in [PhysicsServer2D]. See also [PhysicsShapeQueryParameters2D]. - </description> - <tutorials> - </tutorials> - <methods> - <method name="get_result_count" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the number of objects that intersected with the shape. - </description> - </method> - <method name="get_result_object" qualifiers="const"> - <return type="Object"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <description> - Returns the [Object] that intersected with the shape at index [code]idx[/code]. - </description> - </method> - <method name="get_result_object_id" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <description> - Returns the instance ID of the [Object] that intersected with the shape at index [code]idx[/code]. - </description> - </method> - <method name="get_result_object_shape" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <description> - Returns the child index of the object's [Shape2D] that intersected with the shape at index [code]idx[/code]. - </description> - </method> - <method name="get_result_rid" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <description> - Returns the [RID] of the object that intersected with the shape at index [code]idx[/code]. - </description> - </method> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/PhysicsShapeQueryResult3D.xml b/doc/classes/PhysicsShapeQueryResult3D.xml deleted file mode 100644 index d0ca227a68..0000000000 --- a/doc/classes/PhysicsShapeQueryResult3D.xml +++ /dev/null @@ -1,58 +0,0 @@ -<?xml version="1.0" encoding="UTF-8" ?> -<class name="PhysicsShapeQueryResult3D" inherits="RefCounted" version="4.0"> - <brief_description> - Result of a 3D shape query in [PhysicsServer3D]. - </brief_description> - <description> - The result of a 3D shape query in [PhysicsServer3D]. See also [PhysicsShapeQueryParameters3D]. - </description> - <tutorials> - </tutorials> - <methods> - <method name="get_result_count" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the number of objects that intersected with the shape. - </description> - </method> - <method name="get_result_object" qualifiers="const"> - <return type="Object"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <description> - Returns the [Object] that intersected with the shape at index [code]idx[/code]. - </description> - </method> - <method name="get_result_object_id" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <description> - Returns the instance ID of the [Object] that intersected with the shape at index [code]idx[/code]. - </description> - </method> - <method name="get_result_object_shape" qualifiers="const"> - <return type="int"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <description> - Returns the child index of the object's [Shape3D] that intersected with the shape at index [code]idx[/code]. - </description> - </method> - <method name="get_result_rid" qualifiers="const"> - <return type="RID"> - </return> - <argument index="0" name="idx" type="int"> - </argument> - <description> - Returns the [RID] of the object that intersected with the shape at index [code]idx[/code]. - </description> - </method> - </methods> - <constants> - </constants> -</class> diff --git a/doc/classes/PhysicsTestMotionResult2D.xml b/doc/classes/PhysicsTestMotionResult2D.xml index da04ffa86a..bf3497386e 100644 --- a/doc/classes/PhysicsTestMotionResult2D.xml +++ b/doc/classes/PhysicsTestMotionResult2D.xml @@ -19,10 +19,16 @@ </member> <member name="collider_velocity" type="Vector2" setter="" getter="get_collider_velocity" default="Vector2(0, 0)"> </member> + <member name="collision_depth" type="float" setter="" getter="get_collision_depth" default="0.0"> + </member> <member name="collision_normal" type="Vector2" setter="" getter="get_collision_normal" default="Vector2(0, 0)"> </member> <member name="collision_point" type="Vector2" setter="" getter="get_collision_point" default="Vector2(0, 0)"> </member> + <member name="collision_safe_fraction" type="float" setter="" getter="get_collision_safe_fraction" default="0.0"> + </member> + <member name="collision_unsafe_fraction" type="float" setter="" getter="get_collision_unsafe_fraction" default="0.0"> + </member> <member name="motion" type="Vector2" setter="" getter="get_motion" default="Vector2(0, 0)"> </member> <member name="motion_remainder" type="Vector2" setter="" getter="get_motion_remainder" default="Vector2(0, 0)"> diff --git a/doc/classes/PhysicsTestMotionResult3D.xml b/doc/classes/PhysicsTestMotionResult3D.xml new file mode 100644 index 0000000000..08c72ba965 --- /dev/null +++ b/doc/classes/PhysicsTestMotionResult3D.xml @@ -0,0 +1,39 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="PhysicsTestMotionResult3D" inherits="RefCounted" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="collider" type="Object" setter="" getter="get_collider"> + </member> + <member name="collider_id" type="int" setter="" getter="get_collider_id" default="0"> + </member> + <member name="collider_rid" type="RID" setter="" getter="get_collider_rid"> + </member> + <member name="collider_shape" type="int" setter="" getter="get_collider_shape" default="0"> + </member> + <member name="collider_velocity" type="Vector3" setter="" getter="get_collider_velocity" default="Vector3(0, 0, 0)"> + </member> + <member name="collision_depth" type="float" setter="" getter="get_collision_depth" default="0.0"> + </member> + <member name="collision_normal" type="Vector3" setter="" getter="get_collision_normal" default="Vector3(0, 0, 0)"> + </member> + <member name="collision_point" type="Vector3" setter="" getter="get_collision_point" default="Vector3(0, 0, 0)"> + </member> + <member name="collision_safe_fraction" type="float" setter="" getter="get_collision_safe_fraction" default="0.0"> + </member> + <member name="collision_unsafe_fraction" type="float" setter="" getter="get_collision_unsafe_fraction" default="0.0"> + </member> + <member name="motion" type="Vector3" setter="" getter="get_motion" default="Vector3(0, 0, 0)"> + </member> + <member name="motion_remainder" type="Vector3" setter="" getter="get_motion_remainder" default="Vector3(0, 0, 0)"> + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/Plane.xml b/doc/classes/Plane.xml index cca5793fc7..12869061c4 100644 --- a/doc/classes/Plane.xml +++ b/doc/classes/Plane.xml @@ -169,23 +169,23 @@ <description> </description> </method> - <method name="operator +" qualifiers="operator"> - <return type="Plane"> + <method name="operator ==" qualifiers="operator"> + <return type="bool"> </return> + <argument index="0" name="right" type="Plane"> + </argument> <description> </description> </method> - <method name="operator -" qualifiers="operator"> + <method name="operator unary+" qualifiers="operator"> <return type="Plane"> </return> <description> </description> </method> - <method name="operator ==" qualifiers="operator"> - <return type="bool"> + <method name="operator unary-" qualifiers="operator"> + <return type="Plane"> </return> - <argument index="0" name="right" type="Plane"> - </argument> <description> </description> </method> diff --git a/doc/classes/PlaneMesh.xml b/doc/classes/PlaneMesh.xml index c95ba29ea2..56bf98772b 100644 --- a/doc/classes/PlaneMesh.xml +++ b/doc/classes/PlaneMesh.xml @@ -12,6 +12,9 @@ <methods> </methods> <members> + <member name="center_offset" type="Vector3" setter="set_center_offset" getter="get_center_offset" default="Vector3(0, 0, 0)"> + Offset of the generated plane. Useful for particles. + </member> <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(2, 2)"> Size of the generated plane. </member> diff --git a/doc/classes/Polygon2D.xml b/doc/classes/Polygon2D.xml index c33a1424a7..5a53063148 100644 --- a/doc/classes/Polygon2D.xml +++ b/doc/classes/Polygon2D.xml @@ -118,12 +118,9 @@ <member name="texture_offset" type="Vector2" setter="set_texture_offset" getter="get_texture_offset" default="Vector2(0, 0)"> Amount to offset the polygon's [code]texture[/code]. If [code](0, 0)[/code] the texture's origin (its top-left corner) will be placed at the polygon's [code]position[/code]. </member> - <member name="texture_rotation" type="float" setter="set_texture_rotation" getter="get_texture_rotation"> + <member name="texture_rotation" type="float" setter="set_texture_rotation" getter="get_texture_rotation" default="0.0"> The texture's rotation in radians. </member> - <member name="texture_rotation_degrees" type="float" setter="set_texture_rotation_degrees" getter="get_texture_rotation_degrees" default="0.0"> - The texture's rotation in degrees. - </member> <member name="texture_scale" type="Vector2" setter="set_texture_scale" getter="get_texture_scale" default="Vector2(1, 1)"> Amount to multiply the [code]uv[/code] coordinates when using a [code]texture[/code]. Larger values make the texture smaller, and vice versa. </member> diff --git a/doc/classes/Popup.xml b/doc/classes/Popup.xml index b8d8a55412..89695989c8 100644 --- a/doc/classes/Popup.xml +++ b/doc/classes/Popup.xml @@ -13,6 +13,7 @@ <members> <member name="borderless" type="bool" setter="set_flag" getter="get_flag" override="true" default="true" /> <member name="close_on_parent_focus" type="bool" setter="set_close_on_parent_focus" getter="get_close_on_parent_focus" default="true"> + If [code]true[/code], the [Popup] will close when its parent is focused. </member> <member name="transient" type="bool" setter="set_transient" getter="is_transient" override="true" default="true" /> <member name="unresizable" type="bool" setter="set_flag" getter="get_flag" override="true" default="true" /> diff --git a/doc/classes/PopupMenu.xml b/doc/classes/PopupMenu.xml index e448d18d73..3489c5435a 100644 --- a/doc/classes/PopupMenu.xml +++ b/doc/classes/PopupMenu.xml @@ -260,6 +260,7 @@ <return type="int"> </return> <description> + Returns the index of the currently focused item. Returns [code]-1[/code] if no item is focused. </description> </method> <method name="get_item_accelerator" qualifiers="const"> diff --git a/doc/classes/ProjectSettings.xml b/doc/classes/ProjectSettings.xml index 1847a316e1..c3ef9f2425 100644 --- a/doc/classes/ProjectSettings.xml +++ b/doc/classes/ProjectSettings.xml @@ -445,7 +445,7 @@ </member> <member name="debug/settings/fps/force_fps" type="int" setter="" getter="" default="0"> Maximum number of frames per second allowed. The actual number of frames per second may still be below this value if the game is lagging. - If [member display/window/vsync/use_vsync] is enabled, it takes precedence and the forced FPS number cannot exceed the monitor's refresh rate. + If [member display/window/vsync/vsync_mode] is set to [code]Enabled[/code] or [code]Adaptive[/code], it takes precedence and the forced FPS number cannot exceed the monitor's refresh rate. This setting is therefore mostly relevant for lowering the maximum FPS below VSync, e.g. to perform non-real-time rendering of static frames, or test the project under lag conditions. </member> <member name="debug/settings/gdscript/max_call_stack" type="int" setter="" getter="" default="1024"> @@ -532,12 +532,10 @@ <member name="display/window/size/width" type="int" setter="" getter="" default="1024"> Sets the game's main viewport width. On desktop platforms, this is the default window size. Stretch mode settings also use this as a reference when enabled. </member> - <member name="display/window/vsync/use_vsync" type="bool" setter="" getter="" default="true"> - If [code]true[/code], enables vertical synchronization. This eliminates tearing that may appear in moving scenes, at the cost of higher input latency and stuttering at lower framerates. If [code]false[/code], vertical synchronization will be disabled, however, many platforms will enforce it regardless (such as mobile platforms and HTML5). - </member> - <member name="display/window/vsync/vsync_via_compositor" type="bool" setter="" getter="" default="false"> - If [code]Use Vsync[/code] is enabled and this setting is [code]true[/code], enables vertical synchronization via the operating system's window compositor when in windowed mode and the compositor is enabled. This will prevent stutter in certain situations. (Windows only.) - [b]Note:[/b] This option is experimental and meant to alleviate stutter experienced by some users. However, some users have experienced a Vsync framerate halving (e.g. from 60 FPS to 30 FPS) when using it. + <member name="display/window/vsync/vsync_mode" type="int" setter="" getter="" default="1"> + Sets the VSync mode for the main game window. + See [enum DisplayServer.VSyncMode] for possible values and how they affect the behavior of your application. + Depending on the platform and used renderer, the engine will fall back to [code]Enabled[/code], if the desired mode is not supported. </member> <member name="editor/node_naming/name_casing" type="int" setter="" getter="" default="0"> When creating node names automatically, set the type of casing in this project. This is mostly an editor setting. @@ -1430,8 +1428,6 @@ </member> <member name="rendering/global_illumination/sdfgi/probe_ray_count" type="int" setter="" getter="" default="1"> </member> - <member name="rendering/global_illumination/voxel_gi/anisotropic" type="bool" setter="" getter="" default="false"> - </member> <member name="rendering/global_illumination/voxel_gi/quality" type="int" setter="" getter="" default="1"> </member> <member name="rendering/lightmapping/bake_performance/max_rays_per_pass" type="int" setter="" getter="" default="32"> @@ -1573,12 +1569,16 @@ <member name="rendering/shadows/shadows/soft_shadow_quality.mobile" type="int" setter="" getter="" default="0"> Lower-end override for [member rendering/shadows/shadows/soft_shadow_quality] on mobile devices, due to performance concerns or driver support. </member> + <member name="rendering/textures/decals/filter" type="int" setter="" getter="" default="3"> + </member> <member name="rendering/textures/default_filters/anisotropic_filtering_level" type="int" setter="" getter="" default="2"> Sets the maximum number of samples to take when using anisotropic filtering on textures (as a power of two). A higher sample count will result in sharper textures at oblique angles, but is more expensive to compute. A value of [code]0[/code] forcibly disables anisotropic filtering, even on materials where it is enabled. </member> <member name="rendering/textures/default_filters/use_nearest_mipmap_filter" type="bool" setter="" getter="" default="false"> If [code]true[/code], uses nearest-neighbor mipmap filtering when using mipmaps (also called "bilinear filtering"), which will result in visible seams appearing between mipmap stages. This may increase performance in mobile as less memory bandwidth is used. If [code]false[/code], linear mipmap filtering (also called "trilinear filtering") is used. </member> + <member name="rendering/textures/light_projectors/filter" type="int" setter="" getter="" default="3"> + </member> <member name="rendering/textures/lossless_compression/force_png" type="bool" setter="" getter="" default="false"> If [code]true[/code], the texture importer will import lossless textures using the PNG format. Otherwise, it will default to using WebP. </member> diff --git a/doc/classes/QuadMesh.xml b/doc/classes/QuadMesh.xml index 94d638888c..4209e3db14 100644 --- a/doc/classes/QuadMesh.xml +++ b/doc/classes/QuadMesh.xml @@ -13,6 +13,9 @@ <methods> </methods> <members> + <member name="center_offset" type="Vector3" setter="set_center_offset" getter="get_center_offset" default="Vector3(0, 0, 0)"> + Offset of the generated Quad. Useful for particles. + </member> <member name="size" type="Vector2" setter="set_size" getter="get_size" default="Vector2(1, 1)"> Size on the X and Y axes. </member> diff --git a/doc/classes/Quaternion.xml b/doc/classes/Quaternion.xml index 660204ee7d..06434ab268 100644 --- a/doc/classes/Quaternion.xml +++ b/doc/classes/Quaternion.xml @@ -177,17 +177,17 @@ </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Quaternion"> + <return type="Vector3"> </return> - <argument index="0" name="right" type="Quaternion"> + <argument index="0" name="right" type="Vector3"> </argument> <description> </description> </method> <method name="operator *" qualifiers="operator"> - <return type="Vector3"> + <return type="Quaternion"> </return> - <argument index="0" name="right" type="Vector3"> + <argument index="0" name="right" type="Quaternion"> </argument> <description> </description> @@ -211,12 +211,6 @@ <method name="operator +" qualifiers="operator"> <return type="Quaternion"> </return> - <description> - </description> - </method> - <method name="operator +" qualifiers="operator"> - <return type="Quaternion"> - </return> <argument index="0" name="right" type="Quaternion"> </argument> <description> @@ -225,12 +219,6 @@ <method name="operator -" qualifiers="operator"> <return type="Quaternion"> </return> - <description> - </description> - </method> - <method name="operator -" qualifiers="operator"> - <return type="Quaternion"> - </return> <argument index="0" name="right" type="Quaternion"> </argument> <description> @@ -268,6 +256,18 @@ <description> </description> </method> + <method name="operator unary+" qualifiers="operator"> + <return type="Quaternion"> + </return> + <description> + </description> + </method> + <method name="operator unary-" qualifiers="operator"> + <return type="Quaternion"> + </return> + <description> + </description> + </method> <method name="slerp" qualifiers="const"> <return type="Quaternion"> </return> diff --git a/doc/classes/RDPipelineSpecializationConstant.xml b/doc/classes/RDPipelineSpecializationConstant.xml new file mode 100644 index 0000000000..4d9481b846 --- /dev/null +++ b/doc/classes/RDPipelineSpecializationConstant.xml @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="RDPipelineSpecializationConstant" inherits="RefCounted" version="4.0"> + <brief_description> + </brief_description> + <description> + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="constant_id" type="int" setter="set_constant_id" getter="get_constant_id" default="0"> + </member> + <member name="value" type="Variant" setter="set_value" getter="get_value"> + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/RandomNumberGenerator.xml b/doc/classes/RandomNumberGenerator.xml index 6fcb79b5fe..9c84cdd03e 100644 --- a/doc/classes/RandomNumberGenerator.xml +++ b/doc/classes/RandomNumberGenerator.xml @@ -23,7 +23,7 @@ <return type="float"> </return> <description> - Generates a pseudo-random float between [code]0.0[/code] and [code]1.0[/code] (inclusive). + Returns a pseudo-random float between [code]0.0[/code] and [code]1.0[/code] (inclusive). </description> </method> <method name="randf_range"> @@ -34,7 +34,7 @@ <argument index="1" name="to" type="float"> </argument> <description> - Generates a pseudo-random float between [code]from[/code] and [code]to[/code] (inclusive). + Returns a pseudo-random float between [code]from[/code] and [code]to[/code] (inclusive). </description> </method> <method name="randfn"> @@ -45,14 +45,14 @@ <argument index="1" name="deviation" type="float" default="1.0"> </argument> <description> - Generates a [url=https://en.wikipedia.org/wiki/Normal_distribution]normally-distributed[/url] pseudo-random number, using Box-Muller transform with the specified [code]mean[/code] and a standard [code]deviation[/code]. This is also called Gaussian distribution. + Returns a [url=https://en.wikipedia.org/wiki/Normal_distribution]normally-distributed[/url] pseudo-random number, using Box-Muller transform with the specified [code]mean[/code] and a standard [code]deviation[/code]. This is also called Gaussian distribution. </description> </method> <method name="randi"> <return type="int"> </return> <description> - Generates a pseudo-random 32-bit unsigned integer between [code]0[/code] and [code]4294967295[/code] (inclusive). + Returns a pseudo-random 32-bit unsigned integer between [code]0[/code] and [code]4294967295[/code] (inclusive). </description> </method> <method name="randi_range"> @@ -63,14 +63,14 @@ <argument index="1" name="to" type="int"> </argument> <description> - Generates a pseudo-random 32-bit signed integer between [code]from[/code] and [code]to[/code] (inclusive). + Returns a pseudo-random 32-bit signed integer between [code]from[/code] and [code]to[/code] (inclusive). </description> </method> <method name="randomize"> <return type="void"> </return> <description> - Setups a time-based seed to generator. + Setups a time-based seed to for this [RandomNumberGenerator] instance. Unlike the [@GlobalScope] random number generation functions, different [RandomNumberGenerator] instances can use different seeds. </description> </method> </methods> diff --git a/doc/classes/ReflectionProbe.xml b/doc/classes/ReflectionProbe.xml index 1d32a8b509..db01faced8 100644 --- a/doc/classes/ReflectionProbe.xml +++ b/doc/classes/ReflectionProbe.xml @@ -28,8 +28,8 @@ <member name="enable_shadows" type="bool" setter="set_enable_shadows" getter="are_shadows_enabled" default="false"> If [code]true[/code], computes shadows in the reflection probe. This makes the reflection probe slower to render; you may want to disable this if using the [constant UPDATE_ALWAYS] [member update_mode]. </member> - <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(1, 1, 1)"> - The size of the reflection probe. The larger the extents the more space covered by the probe which will lower the perceived resolution. It is best to keep the extents only as large as you need them. + <member name="extents" type="Vector3" setter="set_extents" getter="get_extents" default="Vector3(10, 10, 10)"> + The size of the reflection probe. The larger the extents, the more space covered by the probe, which will lower the perceived resolution. It is best to keep the extents only as large as you need them. </member> <member name="intensity" type="float" setter="set_intensity" getter="get_intensity" default="1.0"> Defines the reflection intensity. Intensity modulates the strength of the reflection. diff --git a/doc/classes/RenderingDevice.xml b/doc/classes/RenderingDevice.xml index b66b945025..901a985961 100644 --- a/doc/classes/RenderingDevice.xml +++ b/doc/classes/RenderingDevice.xml @@ -140,6 +140,8 @@ </return> <argument index="0" name="shader" type="RID"> </argument> + <argument index="1" name="specialization_constants" type="RDPipelineSpecializationConstant[]" default="[]"> + </argument> <description> </description> </method> @@ -515,6 +517,14 @@ <description> </description> </method> + <method name="get_memory_usage" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="arg0" type="int" enum="RenderingDevice.MemoryType"> + </argument> + <description> + </description> + </method> <method name="index_array_create"> <return type="RID"> </return> @@ -572,6 +582,8 @@ </argument> <argument index="9" name="for_render_pass" type="int" default="0"> </argument> + <argument index="10" name="specialization_constants" type="RDPipelineSpecializationConstant[]" default="[]"> + </argument> <description> </description> </method> @@ -1701,6 +1713,12 @@ </constant> <constant name="SHADER_LANGUAGE_HLSL" value="1" enum="ShaderLanguage"> </constant> + <constant name="PIPELINE_SPECIALIZATION_CONSTANT_TYPE_BOOL" value="0" enum="PipelineSpecializationConstantType"> + </constant> + <constant name="PIPELINE_SPECIALIZATION_CONSTANT_TYPE_INT" value="1" enum="PipelineSpecializationConstantType"> + </constant> + <constant name="PIPELINE_SPECIALIZATION_CONSTANT_TYPE_FLOAT" value="2" enum="PipelineSpecializationConstantType"> + </constant> <constant name="LIMIT_MAX_BOUND_UNIFORM_SETS" value="0" enum="Limit"> </constant> <constant name="LIMIT_MAX_FRAMEBUFFER_COLOR_ATTACHMENTS" value="1" enum="Limit"> @@ -1771,6 +1789,12 @@ </constant> <constant name="LIMIT_MAX_COMPUTE_WORKGROUP_SIZE_Z" value="34" enum="Limit"> </constant> + <constant name="MEMORY_TEXTURES" value="0" enum="MemoryType"> + </constant> + <constant name="MEMORY_BUFFERS" value="1" enum="MemoryType"> + </constant> + <constant name="MEMORY_TOTAL" value="2" enum="MemoryType"> + </constant> <constant name="INVALID_ID" value="-1"> </constant> <constant name="INVALID_FORMAT_ID" value="-1"> diff --git a/doc/classes/RenderingServer.xml b/doc/classes/RenderingServer.xml index 44e0202307..31ced67ac4 100644 --- a/doc/classes/RenderingServer.xml +++ b/doc/classes/RenderingServer.xml @@ -18,42 +18,92 @@ <link title="Optimization using Servers">https://docs.godotengine.org/en/latest/tutorials/optimization/using_servers.html</link> </tutorials> <methods> - <method name="black_bars_set_images"> - <return type="void"> + <method name="bake_render_uv2"> + <return type="Image[]"> </return> - <argument index="0" name="left" type="RID"> + <argument index="0" name="base" type="RID"> + </argument> + <argument index="1" name="material_overrides" type="Array"> + </argument> + <argument index="2" name="image_size" type="Vector2i"> </argument> - <argument index="1" name="top" type="RID"> + <description> + </description> + </method> + <method name="camera_create"> + <return type="RID"> + </return> + <description> + Creates a camera and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]camera_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. + </description> + </method> + <method name="camera_effects_create"> + <return type="RID"> + </return> + <description> + </description> + </method> + <method name="camera_effects_set_custom_exposure"> + <return type="void"> + </return> + <argument index="0" name="camera_effects" type="RID"> </argument> - <argument index="2" name="right" type="RID"> + <argument index="1" name="enable" type="bool"> </argument> - <argument index="3" name="bottom" type="RID"> + <argument index="2" name="exposure" type="float"> </argument> <description> - Sets images to be rendered in the window margin. </description> </method> - <method name="black_bars_set_margins"> + <method name="camera_effects_set_dof_blur"> <return type="void"> </return> - <argument index="0" name="left" type="int"> + <argument index="0" name="camera_effects" type="RID"> + </argument> + <argument index="1" name="far_enable" type="bool"> + </argument> + <argument index="2" name="far_distance" type="float"> </argument> - <argument index="1" name="top" type="int"> + <argument index="3" name="far_transition" type="float"> </argument> - <argument index="2" name="right" type="int"> + <argument index="4" name="near_enable" type="bool"> </argument> - <argument index="3" name="bottom" type="int"> + <argument index="5" name="near_distance" type="float"> + </argument> + <argument index="6" name="near_transition" type="float"> + </argument> + <argument index="7" name="amount" type="float"> </argument> <description> - Sets margin size, where black bars (or images, if [method black_bars_set_images] was used) are rendered. </description> </method> - <method name="camera_create"> - <return type="RID"> + <method name="camera_effects_set_dof_blur_bokeh_shape"> + <return type="void"> </return> + <argument index="0" name="shape" type="int" enum="RenderingServer.DOFBokehShape"> + </argument> + <description> + </description> + </method> + <method name="camera_effects_set_dof_blur_quality"> + <return type="void"> + </return> + <argument index="0" name="quality" type="int" enum="RenderingServer.DOFBlurQuality"> + </argument> + <argument index="1" name="use_jitter" type="bool"> + </argument> + <description> + </description> + </method> + <method name="camera_set_camera_effects"> + <return type="void"> + </return> + <argument index="0" name="camera" type="RID"> + </argument> + <argument index="1" name="effects" type="RID"> + </argument> <description> - Creates a camera and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]camera_*[/code] RenderingServer functions. - Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. </description> </method> <method name="camera_set_cull_mask"> @@ -155,6 +205,246 @@ Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. </description> </method> + <method name="canvas_item_add_circle"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="pos" type="Vector2"> + </argument> + <argument index="2" name="radius" type="float"> + </argument> + <argument index="3" name="color" type="Color"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_add_clip_ignore"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="ignore" type="bool"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_add_line"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="from" type="Vector2"> + </argument> + <argument index="2" name="to" type="Vector2"> + </argument> + <argument index="3" name="color" type="Color"> + </argument> + <argument index="4" name="width" type="float" default="1.0"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_add_mesh"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="mesh" type="RID"> + </argument> + <argument index="2" name="transform" type="Transform2D" default="Transform2D(1, 0, 0, 1, 0, 0)"> + </argument> + <argument index="3" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> + </argument> + <argument index="4" name="texture" type="RID"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_add_multimesh"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="mesh" type="RID"> + </argument> + <argument index="2" name="texture" type="RID"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_add_nine_patch"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="rect" type="Rect2"> + </argument> + <argument index="2" name="source" type="Rect2"> + </argument> + <argument index="3" name="texture" type="RID"> + </argument> + <argument index="4" name="topleft" type="Vector2"> + </argument> + <argument index="5" name="bottomright" type="Vector2"> + </argument> + <argument index="6" name="x_axis_mode" type="int" enum="RenderingServer.NinePatchAxisMode" default="0"> + </argument> + <argument index="7" name="y_axis_mode" type="int" enum="RenderingServer.NinePatchAxisMode" default="0"> + </argument> + <argument index="8" name="draw_center" type="bool" default="true"> + </argument> + <argument index="9" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_add_particles"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="particles" type="RID"> + </argument> + <argument index="2" name="texture" type="RID"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_add_polygon"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="points" type="PackedVector2Array"> + </argument> + <argument index="2" name="colors" type="PackedColorArray"> + </argument> + <argument index="3" name="uvs" type="PackedVector2Array" default="PackedVector2Array()"> + </argument> + <argument index="4" name="texture" type="RID"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_add_polyline"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="points" type="PackedVector2Array"> + </argument> + <argument index="2" name="colors" type="PackedColorArray"> + </argument> + <argument index="3" name="width" type="float" default="1.0"> + </argument> + <argument index="4" name="antialiased" type="bool" default="false"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_add_primitive"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="points" type="PackedVector2Array"> + </argument> + <argument index="2" name="colors" type="PackedColorArray"> + </argument> + <argument index="3" name="uvs" type="PackedVector2Array"> + </argument> + <argument index="4" name="texture" type="RID"> + </argument> + <argument index="5" name="width" type="float" default="1.0"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_add_rect"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="rect" type="Rect2"> + </argument> + <argument index="2" name="color" type="Color"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_add_set_transform"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="transform" type="Transform2D"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_add_texture_rect"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="rect" type="Rect2"> + </argument> + <argument index="2" name="texture" type="RID"> + </argument> + <argument index="3" name="tile" type="bool" default="false"> + </argument> + <argument index="4" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> + </argument> + <argument index="5" name="transpose" type="bool" default="false"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_add_texture_rect_region"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="rect" type="Rect2"> + </argument> + <argument index="2" name="texture" type="RID"> + </argument> + <argument index="3" name="src_rect" type="Rect2"> + </argument> + <argument index="4" name="modulate" type="Color" default="Color(1, 1, 1, 1)"> + </argument> + <argument index="5" name="transpose" type="bool" default="false"> + </argument> + <argument index="6" name="clip_uv" type="bool" default="true"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_add_triangle_array"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="indices" type="PackedInt32Array"> + </argument> + <argument index="2" name="points" type="PackedVector2Array"> + </argument> + <argument index="3" name="colors" type="PackedColorArray"> + </argument> + <argument index="4" name="uvs" type="PackedVector2Array" default="PackedVector2Array()"> + </argument> + <argument index="5" name="bones" type="PackedInt32Array" default="PackedInt32Array()"> + </argument> + <argument index="6" name="weights" type="PackedFloat32Array" default="PackedFloat32Array()"> + </argument> + <argument index="7" name="texture" type="RID"> + </argument> + <argument index="8" name="count" type="int" default="-1"> + </argument> + <description> + </description> + </method> <method name="canvas_item_clear"> <return type="void"> </return> @@ -164,6 +454,40 @@ Clears the [CanvasItem] and removes all commands in it. </description> </method> + <method name="canvas_item_create"> + <return type="RID"> + </return> + <description> + </description> + </method> + <method name="canvas_item_set_canvas_group_mode"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="mode" type="int" enum="RenderingServer.CanvasGroupMode"> + </argument> + <argument index="2" name="clear_margin" type="float" default="5.0"> + </argument> + <argument index="3" name="fit_empty" type="bool" default="false"> + </argument> + <argument index="4" name="fit_margin" type="float" default="0.0"> + </argument> + <argument index="5" name="blur_mipmaps" type="bool" default="false"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_set_clip"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="clip" type="bool"> + </argument> + <description> + </description> + </method> <method name="canvas_item_set_copy_to_backbuffer"> <return type="void"> </return> @@ -177,6 +501,58 @@ Sets the [CanvasItem] to copy a rect to the backbuffer. </description> </method> + <method name="canvas_item_set_custom_rect"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="use_custom_rect" type="bool"> + </argument> + <argument index="2" name="rect" type="Rect2" default="Rect2(0, 0, 0, 0)"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_set_default_texture_filter"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="filter" type="int" enum="RenderingServer.CanvasItemTextureFilter"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_set_default_texture_repeat"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="repeat" type="int" enum="RenderingServer.CanvasItemTextureRepeat"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_set_distance_field_mode"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_set_draw_behind_parent"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> <method name="canvas_item_set_draw_index"> <return type="void"> </return> @@ -188,6 +564,16 @@ Sets the index for the [CanvasItem]. </description> </method> + <method name="canvas_item_set_light_mask"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="mask" type="int"> + </argument> + <description> + </description> + </method> <method name="canvas_item_set_material"> <return type="void"> </return> @@ -199,6 +585,56 @@ Sets a new material to the [CanvasItem]. </description> </method> + <method name="canvas_item_set_modulate"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="color" type="Color"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_set_parent"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="parent" type="RID"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_set_self_modulate"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="color" type="Color"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_set_sort_children_by_y"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_set_transform"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="transform" type="Transform2D"> + </argument> + <description> + </description> + </method> <method name="canvas_item_set_use_parent_material"> <return type="void"> </return> @@ -210,6 +646,32 @@ Sets if the [CanvasItem] uses its parent's material. </description> </method> + <method name="canvas_item_set_visibility_notifier"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="enable" type="bool"> + </argument> + <argument index="2" name="area" type="Rect2"> + </argument> + <argument index="3" name="enter_callable" type="Callable"> + </argument> + <argument index="4" name="exit_callable" type="Callable"> + </argument> + <description> + </description> + </method> + <method name="canvas_item_set_visible"> + <return type="void"> + </return> + <argument index="0" name="item" type="RID"> + </argument> + <argument index="1" name="visible" type="bool"> + </argument> + <description> + </description> + </method> <method name="canvas_item_set_z_as_relative_to_parent"> <return type="void"> </return> @@ -270,6 +732,16 @@ Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. </description> </method> + <method name="canvas_light_occluder_set_as_sdf_collision"> + <return type="void"> + </return> + <argument index="0" name="occluder" type="RID"> + </argument> + <argument index="1" name="enable" type="bool"> + </argument> + <description> + </description> + </method> <method name="canvas_light_occluder_set_enabled"> <return type="void"> </return> @@ -537,6 +1009,14 @@ Sets the shape of the occluder polygon. </description> </method> + <method name="canvas_set_disable_scale"> + <return type="void"> + </return> + <argument index="0" name="disable" type="bool"> + </argument> + <description> + </description> + </method> <method name="canvas_set_item_mirroring"> <return type="void"> </return> @@ -561,12 +1041,182 @@ Modulates all colors in the given canvas. </description> </method> + <method name="canvas_set_shadow_texture_size"> + <return type="void"> + </return> + <argument index="0" name="size" type="int"> + </argument> + <description> + </description> + </method> + <method name="canvas_texture_create"> + <return type="RID"> + </return> + <description> + </description> + </method> + <method name="canvas_texture_set_channel"> + <return type="void"> + </return> + <argument index="0" name="canvas_texture" type="RID"> + </argument> + <argument index="1" name="channel" type="int" enum="RenderingServer.CanvasTextureChannel"> + </argument> + <argument index="2" name="texture" type="RID"> + </argument> + <description> + </description> + </method> + <method name="canvas_texture_set_shading_parameters"> + <return type="void"> + </return> + <argument index="0" name="canvas_texture" type="RID"> + </argument> + <argument index="1" name="base_color" type="Color"> + </argument> + <argument index="2" name="shininess" type="float"> + </argument> + <description> + </description> + </method> + <method name="canvas_texture_set_texture_filter"> + <return type="void"> + </return> + <argument index="0" name="canvas_texture" type="RID"> + </argument> + <argument index="1" name="filter" type="int" enum="RenderingServer.CanvasItemTextureFilter"> + </argument> + <description> + </description> + </method> + <method name="canvas_texture_set_texture_repeat"> + <return type="void"> + </return> + <argument index="0" name="canvas_texture" type="RID"> + </argument> + <argument index="1" name="repeat" type="int" enum="RenderingServer.CanvasItemTextureRepeat"> + </argument> + <description> + </description> + </method> <method name="create_local_rendering_device" qualifiers="const"> <return type="RenderingDevice"> </return> <description> </description> </method> + <method name="decal_create"> + <return type="RID"> + </return> + <description> + </description> + </method> + <method name="decal_set_albedo_mix"> + <return type="void"> + </return> + <argument index="0" name="decal" type="RID"> + </argument> + <argument index="1" name="albedo_mix" type="float"> + </argument> + <description> + </description> + </method> + <method name="decal_set_cull_mask"> + <return type="void"> + </return> + <argument index="0" name="decal" type="RID"> + </argument> + <argument index="1" name="mask" type="int"> + </argument> + <description> + </description> + </method> + <method name="decal_set_distance_fade"> + <return type="void"> + </return> + <argument index="0" name="decal" type="RID"> + </argument> + <argument index="1" name="enabled" type="bool"> + </argument> + <argument index="2" name="begin" type="float"> + </argument> + <argument index="3" name="length" type="float"> + </argument> + <description> + </description> + </method> + <method name="decal_set_emission_energy"> + <return type="void"> + </return> + <argument index="0" name="decal" type="RID"> + </argument> + <argument index="1" name="energy" type="float"> + </argument> + <description> + </description> + </method> + <method name="decal_set_extents"> + <return type="void"> + </return> + <argument index="0" name="decal" type="RID"> + </argument> + <argument index="1" name="extents" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="decal_set_fade"> + <return type="void"> + </return> + <argument index="0" name="decal" type="RID"> + </argument> + <argument index="1" name="above" type="float"> + </argument> + <argument index="2" name="below" type="float"> + </argument> + <description> + </description> + </method> + <method name="decal_set_modulate"> + <return type="void"> + </return> + <argument index="0" name="decal" type="RID"> + </argument> + <argument index="1" name="color" type="Color"> + </argument> + <description> + </description> + </method> + <method name="decal_set_normal_fade"> + <return type="void"> + </return> + <argument index="0" name="decal" type="RID"> + </argument> + <argument index="1" name="fade" type="float"> + </argument> + <description> + </description> + </method> + <method name="decal_set_texture"> + <return type="void"> + </return> + <argument index="0" name="decal" type="RID"> + </argument> + <argument index="1" name="type" type="int" enum="RenderingServer.DecalTexture"> + </argument> + <argument index="2" name="texture" type="RID"> + </argument> + <description> + </description> + </method> + <method name="decals_set_filter"> + <return type="void"> + </return> + <argument index="0" name="filter" type="int" enum="RenderingServer.DecalFilter"> + </argument> + <description> + </description> + </method> <method name="directional_light_create"> <return type="RID"> </return> @@ -576,6 +1226,36 @@ 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="directional_shadow_atlas_set_size"> + <return type="void"> + </return> + <argument index="0" name="size" type="int"> + </argument> + <argument index="1" name="is_16bits" type="bool"> + </argument> + <description> + </description> + </method> + <method name="directional_shadow_quality_set"> + <return type="void"> + </return> + <argument index="0" name="quality" type="int" enum="RenderingServer.ShadowQuality"> + </argument> + <description> + </description> + </method> + <method name="environment_bake_panorama"> + <return type="Image"> + </return> + <argument index="0" name="environment" type="RID"> + </argument> + <argument index="1" name="bake_irradiance" type="bool"> + </argument> + <argument index="2" name="size" type="Vector2i"> + </argument> + <description> + </description> + </method> <method name="environment_create"> <return type="RID"> </return> @@ -584,6 +1264,22 @@ Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. </description> </method> + <method name="environment_glow_set_use_bicubic_upscale"> + <return type="void"> + </return> + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="environment_glow_set_use_high_quality"> + <return type="void"> + </return> + <argument index="0" name="enable" type="bool"> + </argument> + <description> + </description> + </method> <method name="environment_set_adjustment"> <return type="void"> </return> @@ -721,6 +1417,58 @@ <description> </description> </method> + <method name="environment_set_sdfgi"> + <return type="void"> + </return> + <argument index="0" name="env" type="RID"> + </argument> + <argument index="1" name="enable" type="bool"> + </argument> + <argument index="2" name="cascades" type="int" enum="RenderingServer.EnvironmentSDFGICascades"> + </argument> + <argument index="3" name="min_cell_size" type="float"> + </argument> + <argument index="4" name="y_scale" type="int" enum="RenderingServer.EnvironmentSDFGIYScale"> + </argument> + <argument index="5" name="use_occlusion" type="bool"> + </argument> + <argument index="6" name="bounce_feedback" type="float"> + </argument> + <argument index="7" name="read_sky" type="bool"> + </argument> + <argument index="8" name="energy" type="float"> + </argument> + <argument index="9" name="normal_bias" type="float"> + </argument> + <argument index="10" name="probe_bias" type="float"> + </argument> + <description> + </description> + </method> + <method name="environment_set_sdfgi_frames_to_converge"> + <return type="void"> + </return> + <argument index="0" name="frames" type="int" enum="RenderingServer.EnvironmentSDFGIFramesToConverge"> + </argument> + <description> + </description> + </method> + <method name="environment_set_sdfgi_frames_to_update_light"> + <return type="void"> + </return> + <argument index="0" name="frames" type="int" enum="RenderingServer.EnvironmentSDFGIFramesToUpdateLight"> + </argument> + <description> + </description> + </method> + <method name="environment_set_sdfgi_ray_count"> + <return type="void"> + </return> + <argument index="0" name="ray_count" type="int" enum="RenderingServer.EnvironmentSDFGIRayCount"> + </argument> + <description> + </description> + </method> <method name="environment_set_sky"> <return type="void"> </return> @@ -781,6 +1529,24 @@ Sets the variables to be used with the "screen space ambient occlusion" post-process effect. See [Environment] for more details. </description> </method> + <method name="environment_set_ssao_quality"> + <return type="void"> + </return> + <argument index="0" name="quality" type="int" enum="RenderingServer.EnvironmentSSAOQuality"> + </argument> + <argument index="1" name="half_size" type="bool"> + </argument> + <argument index="2" name="adaptive_target" type="float"> + </argument> + <argument index="3" name="blur_passes" type="int"> + </argument> + <argument index="4" name="fadeout_from" type="float"> + </argument> + <argument index="5" name="fadeout_to" type="float"> + </argument> + <description> + </description> + </method> <method name="environment_set_ssr"> <return type="void"> </return> @@ -800,6 +1566,14 @@ Sets the variables to be used with the "screen space reflections" post-process effect. See [Environment] for more details. </description> </method> + <method name="environment_set_ssr_roughness_quality"> + <return type="void"> + </return> + <argument index="0" name="quality" type="int" enum="RenderingServer.EnvironmentSSRRoughnessQuality"> + </argument> + <description> + </description> + </method> <method name="environment_set_tonemap"> <return type="void"> </return> @@ -825,11 +1599,48 @@ Sets the variables to be used with the "tonemap" post-process effect. See [Environment] for more details. </description> </method> - <method name="finish"> + <method name="environment_set_volumetric_fog"> + <return type="void"> + </return> + <argument index="0" name="env" type="RID"> + </argument> + <argument index="1" name="enable" type="bool"> + </argument> + <argument index="2" name="density" type="float"> + </argument> + <argument index="3" name="light" type="Color"> + </argument> + <argument index="4" name="light_energy" type="float"> + </argument> + <argument index="5" name="length" type="float"> + </argument> + <argument index="6" name="p_detail_spread" type="float"> + </argument> + <argument index="7" name="gi_inject" type="float"> + </argument> + <argument index="8" name="temporal_reprojection" type="bool"> + </argument> + <argument index="9" name="temporal_reprojection_amount" type="float"> + </argument> + <description> + </description> + </method> + <method name="environment_set_volumetric_fog_filter_active"> + <return type="void"> + </return> + <argument index="0" name="active" type="bool"> + </argument> + <description> + </description> + </method> + <method name="environment_set_volumetric_fog_volume_size"> <return type="void"> </return> + <argument index="0" name="size" type="int"> + </argument> + <argument index="1" name="depth" type="int"> + </argument> <description> - Removes buffers and clears testcubes. </description> </method> <method name="force_draw"> @@ -840,14 +1651,12 @@ <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"> <return type="void"> </return> <description> - Synchronizes threads. </description> </method> <method name="free_rid"> @@ -865,13 +1674,12 @@ <description> </description> </method> - <method name="get_render_info"> + <method name="get_rendering_info"> <return type="int"> </return> - <argument index="0" name="info" type="int" enum="RenderingServer.RenderInfo"> + <argument index="0" name="info" type="int" enum="RenderingServer.RenderingInfo"> </argument> <description> - Returns a certain information, see [enum RenderInfo] for options. </description> </method> <method name="get_test_cube"> @@ -963,6 +1771,16 @@ <description> </description> </method> + <method name="global_variable_set_override"> + <return type="void"> + </return> + <argument index="0" name="name" type="StringName"> + </argument> + <argument index="1" name="value" type="Variant"> + </argument> + <description> + </description> + </method> <method name="has_changed" qualifiers="const"> <return type="bool"> </return> @@ -988,226 +1806,146 @@ Returns [code]true[/code] if the OS supports a certain feature. Features might be [code]s3tc[/code], [code]etc[/code], [code]etc2[/code] and [code]pvrtc[/code]. </description> </method> - <method name="immediate_begin"> + <method name="instance_attach_object_instance_id"> <return type="void"> </return> - <argument index="0" name="immediate" type="RID"> - </argument> - <argument index="1" name="primitive" type="int" enum="RenderingServer.PrimitiveType"> - </argument> - <argument index="2" name="texture" type="RID"> + <argument index="0" name="instance" type="RID"> </argument> - <description> - Sets up [ImmediateGeometry3D] internals to prepare for drawing. Equivalent to [method ImmediateGeometry3D.begin]. - </description> - </method> - <method name="immediate_clear"> - <return type="void"> - </return> - <argument index="0" name="immediate" type="RID"> + <argument index="1" name="id" type="int"> </argument> <description> - Clears everything that was set up between [method immediate_begin] and [method immediate_end]. Equivalent to [method ImmediateGeometry3D.clear]. + 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="immediate_color"> + <method name="instance_attach_skeleton"> <return type="void"> </return> - <argument index="0" name="immediate" type="RID"> + <argument index="0" name="instance" type="RID"> </argument> - <argument index="1" name="color" type="Color"> + <argument index="1" name="skeleton" type="RID"> </argument> <description> - Sets the color to be used with next vertex. Equivalent to [method ImmediateGeometry3D.set_color]. + Attaches a skeleton to an instance. Removes the previous skeleton from the instance. </description> </method> - <method name="immediate_create"> + <method name="instance_create"> <return type="RID"> </return> <description> - Creates an immediate geometry and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]immediate_*[/code] RenderingServer functions. + Creates a visual instance and adds it to the RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]instance_*[/code] RenderingServer functions. Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. - 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"> - <return type="void"> - </return> - <argument index="0" name="immediate" type="RID"> - </argument> - <description> - Ends drawing the [ImmediateGeometry3D] and displays it. Equivalent to [method ImmediateGeometry3D.end]. + 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="immediate_get_material" qualifiers="const"> + <method name="instance_create2"> <return type="RID"> </return> - <argument index="0" name="immediate" type="RID"> - </argument> - <description> - Returns the material assigned to the [ImmediateGeometry3D]. - </description> - </method> - <method name="immediate_normal"> - <return type="void"> - </return> - <argument index="0" name="immediate" type="RID"> - </argument> - <argument index="1" name="normal" type="Vector3"> - </argument> - <description> - Sets the normal to be used with next vertex. Equivalent to [method ImmediateGeometry3D.set_normal]. - </description> - </method> - <method name="immediate_set_material"> - <return type="void"> - </return> - <argument index="0" name="immediate" type="RID"> - </argument> - <argument index="1" name="material" type="RID"> - </argument> - <description> - Sets the material to be used to draw the [ImmediateGeometry3D]. - </description> - </method> - <method name="immediate_tangent"> - <return type="void"> - </return> - <argument index="0" name="immediate" type="RID"> + <argument index="0" name="base" type="RID"> </argument> - <argument index="1" name="tangent" type="Plane"> + <argument index="1" name="scenario" type="RID"> </argument> <description> - Sets the tangent to be used with next vertex. Equivalent to [method ImmediateGeometry3D.set_tangent]. + Creates a visual instance, adds it to the RenderingServer, and sets both base and scenario. It can be accessed with the RID that is returned. This RID will be used in all [code]instance_*[/code] RenderingServer functions. + Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. </description> </method> - <method name="immediate_uv"> - <return type="void"> + <method name="instance_geometry_get_shader_parameter" qualifiers="const"> + <return type="Variant"> </return> - <argument index="0" name="immediate" type="RID"> + <argument index="0" name="instance" type="RID"> </argument> - <argument index="1" name="tex_uv" type="Vector2"> + <argument index="1" name="parameter" type="StringName"> </argument> <description> - Sets the UV to be used with next vertex. Equivalent to [method ImmediateGeometry3D.set_uv]. </description> </method> - <method name="immediate_uv2"> - <return type="void"> + <method name="instance_geometry_get_shader_parameter_default_value" qualifiers="const"> + <return type="Variant"> </return> - <argument index="0" name="immediate" type="RID"> + <argument index="0" name="instance" type="RID"> </argument> - <argument index="1" name="tex_uv" type="Vector2"> + <argument index="1" name="parameter" type="StringName"> </argument> <description> - Sets the UV2 to be used with next vertex. Equivalent to [method ImmediateGeometry3D.set_uv2]. </description> </method> - <method name="immediate_vertex"> - <return type="void"> + <method name="instance_geometry_get_shader_parameter_list" qualifiers="const"> + <return type="Array"> </return> - <argument index="0" name="immediate" type="RID"> - </argument> - <argument index="1" name="vertex" type="Vector3"> + <argument index="0" name="instance" type="RID"> </argument> <description> - Adds the next vertex using the information provided in advance. Equivalent to [method ImmediateGeometry3D.add_vertex]. </description> </method> - <method name="immediate_vertex_2d"> + <method name="instance_geometry_set_cast_shadows_setting"> <return type="void"> </return> - <argument index="0" name="immediate" type="RID"> + <argument index="0" name="instance" type="RID"> </argument> - <argument index="1" name="vertex" type="Vector2"> + <argument index="1" name="shadow_casting_setting" type="int" enum="RenderingServer.ShadowCastingSetting"> </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 ImmediateGeometry3D.add_vertex]. - </description> - </method> - <method name="init"> - <return type="void"> - </return> - <description> - Initializes the rendering server. This function is called internally by platform-dependent code during engine initialization. If called from a running game, it will not do anything. + Sets the shadow casting setting to one of [enum ShadowCastingSetting]. Equivalent to [member GeometryInstance3D.cast_shadow]. </description> </method> - <method name="instance_attach_object_instance_id"> + <method name="instance_geometry_set_flag"> <return type="void"> </return> <argument index="0" name="instance" type="RID"> </argument> - <argument index="1" name="id" type="int"> + <argument index="1" name="flag" type="int" enum="RenderingServer.InstanceFlags"> + </argument> + <argument index="2" name="enabled" type="bool"> </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]. + Sets the flag for a given [enum InstanceFlags]. See [enum InstanceFlags] for more details. </description> </method> - <method name="instance_attach_skeleton"> + <method name="instance_geometry_set_lightmap"> <return type="void"> </return> <argument index="0" name="instance" type="RID"> </argument> - <argument index="1" name="skeleton" type="RID"> + <argument index="1" name="lightmap" 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 RenderingServer. It can be accessed with the RID that is returned. This RID will be used in all [code]instance_*[/code] RenderingServer functions. - Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. - 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"> - <return type="RID"> - </return> - <argument index="0" name="base" type="RID"> + <argument index="2" name="lightmap_uv_scale" type="Rect2"> </argument> - <argument index="1" name="scenario" type="RID"> + <argument index="3" name="lightmap_slice" type="int"> </argument> <description> - Creates a visual instance, adds it to the RenderingServer, and sets both base and scenario. It can be accessed with the RID that is returned. This RID will be used in all [code]instance_*[/code] RenderingServer functions. - Once finished with your RID, you will want to free the RID using the RenderingServer's [method free_rid] static method. </description> </method> - <method name="instance_geometry_set_cast_shadows_setting"> + <method name="instance_geometry_set_lod_bias"> <return type="void"> </return> <argument index="0" name="instance" type="RID"> </argument> - <argument index="1" name="shadow_casting_setting" type="int" enum="RenderingServer.ShadowCastingSetting"> + <argument index="1" name="lod_bias" type="float"> </argument> <description> - Sets the shadow casting setting to one of [enum ShadowCastingSetting]. Equivalent to [member GeometryInstance3D.cast_shadow]. </description> </method> - <method name="instance_geometry_set_flag"> + <method name="instance_geometry_set_material_override"> <return type="void"> </return> <argument index="0" name="instance" type="RID"> </argument> - <argument index="1" name="flag" type="int" enum="RenderingServer.InstanceFlags"> - </argument> - <argument index="2" name="enabled" type="bool"> + <argument index="1" name="material" type="RID"> </argument> <description> - Sets the flag for a given [enum InstanceFlags]. See [enum InstanceFlags] for more details. + Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to [member GeometryInstance3D.material_override]. </description> </method> - <method name="instance_geometry_set_material_override"> + <method name="instance_geometry_set_shader_parameter"> <return type="void"> </return> <argument index="0" name="instance" type="RID"> </argument> - <argument index="1" name="material" type="RID"> + <argument index="1" name="parameter" type="StringName"> + </argument> + <argument index="2" name="value" type="Variant"> </argument> <description> - Sets a material that will override the material for all surfaces on the mesh associated with this instance. Equivalent to [member GeometryInstance3D.material_override]. </description> </method> <method name="instance_geometry_set_visibility_range"> @@ -1262,17 +2000,6 @@ Sets a custom AABB to use when culling objects from the view frustum. Equivalent to [method GeometryInstance3D.set_custom_aabb]. </description> </method> - <method name="instance_set_exterior"> - <return type="void"> - </return> - <argument index="0" name="instance" type="RID"> - </argument> - <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"> <return type="void"> </return> @@ -1401,17 +2128,6 @@ If [code]true[/code], this directional light will blend between shadow map splits resulting in a smoother transition between them. Equivalent to [member DirectionalLight3D.directional_shadow_blend_splits]. </description> </method> - <method name="light_directional_set_shadow_depth_range_mode"> - <return type="void"> - </return> - <argument index="0" name="light" type="RID"> - </argument> - <argument index="1" name="range_mode" type="int" enum="RenderingServer.LightDirectionalShadowDepthRangeMode"> - </argument> - <description> - Sets the shadow depth range mode for this directional light. Equivalent to [member DirectionalLight3D.directional_shadow_depth_range]. See [enum LightDirectionalShadowDepthRangeMode] for options. - </description> - </method> <method name="light_directional_set_shadow_mode"> <return type="void"> </return> @@ -1445,6 +2161,14 @@ Sets whether to use a dual paraboloid or a cubemap for the shadow map. Dual paraboloid is faster but may suffer from artifacts. Equivalent to [member OmniLight3D.omni_shadow_mode]. </description> </method> + <method name="light_projectors_set_filter"> + <return type="void"> + </return> + <argument index="0" name="filter" type="int" enum="RenderingServer.LightProjectorFilter"> + </argument> + <description> + </description> + </method> <method name="light_set_bake_mode"> <return type="void"> </return> @@ -1477,6 +2201,16 @@ Sets the cull mask for this Light3D. Lights only affect objects in the selected layers. Equivalent to [member Light3D.light_cull_mask]. </description> </method> + <method name="light_set_max_sdfgi_cascade"> + <return type="void"> + </return> + <argument index="0" name="light" type="RID"> + </argument> + <argument index="1" name="cascade" type="int"> + </argument> + <description> + </description> + </method> <method name="light_set_negative"> <return type="void"> </return> @@ -1545,6 +2279,100 @@ Sets the color of the shadow cast by the light. Equivalent to [member Light3D.shadow_color]. </description> </method> + <method name="lightmap_create"> + <return type="RID"> + </return> + <description> + </description> + </method> + <method name="lightmap_get_probe_capture_bsp_tree" qualifiers="const"> + <return type="PackedInt32Array"> + </return> + <argument index="0" name="lightmap" type="RID"> + </argument> + <description> + </description> + </method> + <method name="lightmap_get_probe_capture_points" qualifiers="const"> + <return type="PackedVector3Array"> + </return> + <argument index="0" name="lightmap" type="RID"> + </argument> + <description> + </description> + </method> + <method name="lightmap_get_probe_capture_sh" qualifiers="const"> + <return type="PackedColorArray"> + </return> + <argument index="0" name="lightmap" type="RID"> + </argument> + <description> + </description> + </method> + <method name="lightmap_get_probe_capture_tetrahedra" qualifiers="const"> + <return type="PackedInt32Array"> + </return> + <argument index="0" name="lightmap" type="RID"> + </argument> + <description> + </description> + </method> + <method name="lightmap_set_probe_bounds"> + <return type="void"> + </return> + <argument index="0" name="lightmap" type="RID"> + </argument> + <argument index="1" name="bounds" type="AABB"> + </argument> + <description> + </description> + </method> + <method name="lightmap_set_probe_capture_data"> + <return type="void"> + </return> + <argument index="0" name="lightmap" type="RID"> + </argument> + <argument index="1" name="points" type="PackedVector3Array"> + </argument> + <argument index="2" name="point_sh" type="PackedColorArray"> + </argument> + <argument index="3" name="tetrahedra" type="PackedInt32Array"> + </argument> + <argument index="4" name="bsp_tree" type="PackedInt32Array"> + </argument> + <description> + </description> + </method> + <method name="lightmap_set_probe_capture_update_speed"> + <return type="void"> + </return> + <argument index="0" name="speed" type="float"> + </argument> + <description> + </description> + </method> + <method name="lightmap_set_probe_interior"> + <return type="void"> + </return> + <argument index="0" name="lightmap" type="RID"> + </argument> + <argument index="1" name="interior" type="bool"> + </argument> + <description> + </description> + </method> + <method name="lightmap_set_textures"> + <return type="void"> + </return> + <argument index="0" name="lightmap" type="RID"> + </argument> + <argument index="1" name="light" type="RID"> + </argument> + <argument index="2" name="uses_sh" type="bool"> + </argument> + <description> + </description> + </method> <method name="make_sphere_mesh"> <return type="RID"> </return> @@ -1623,6 +2451,35 @@ Sets a shader material's shader. </description> </method> + <method name="mesh_add_surface"> + <return type="void"> + </return> + <argument index="0" name="mesh" type="RID"> + </argument> + <argument index="1" name="surface" type="Dictionary"> + </argument> + <description> + </description> + </method> + <method name="mesh_add_surface_from_arrays"> + <return type="void"> + </return> + <argument index="0" name="mesh" type="RID"> + </argument> + <argument index="1" name="primitive" type="int" enum="RenderingServer.PrimitiveType"> + </argument> + <argument index="2" name="arrays" type="Array"> + </argument> + <argument index="3" name="blend_shapes" type="Array" default="[]"> + </argument> + <argument index="4" name="lods" type="Dictionary" default="{ +}"> + </argument> + <argument index="5" name="compress_format" type="int" default="0"> + </argument> + <description> + </description> + </method> <method name="mesh_clear"> <return type="void"> </return> @@ -1641,6 +2498,16 @@ 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_create_from_surfaces"> + <return type="RID"> + </return> + <argument index="0" name="surfaces" type="Dictionary[]"> + </argument> + <argument index="1" name="blend_shape_count" type="int" default="0"> + </argument> + <description> + </description> + </method> <method name="mesh_get_blend_shape_count" qualifiers="const"> <return type="int"> </return> @@ -1668,6 +2535,16 @@ Returns a mesh's custom aabb. </description> </method> + <method name="mesh_get_surface"> + <return type="Dictionary"> + </return> + <argument index="0" name="mesh" type="RID"> + </argument> + <argument index="1" name="surface" type="int"> + </argument> + <description> + </description> + </method> <method name="mesh_get_surface_count" qualifiers="const"> <return type="int"> </return> @@ -1699,6 +2576,16 @@ Sets a mesh's custom aabb. </description> </method> + <method name="mesh_set_shadow_mesh"> + <return type="void"> + </return> + <argument index="0" name="mesh" type="RID"> + </argument> + <argument index="1" name="shadow_mesh" type="RID"> + </argument> + <description> + </description> + </method> <method name="mesh_surface_get_arrays" qualifiers="const"> <return type="Array"> </return> @@ -1787,7 +2674,35 @@ Sets a mesh's surface's material. </description> </method> - <method name="mesh_surface_update_region"> + <method name="mesh_surface_update_attribute_region"> + <return type="void"> + </return> + <argument index="0" name="mesh" type="RID"> + </argument> + <argument index="1" name="surface" type="int"> + </argument> + <argument index="2" name="offset" type="int"> + </argument> + <argument index="3" name="data" type="PackedByteArray"> + </argument> + <description> + </description> + </method> + <method name="mesh_surface_update_skin_region"> + <return type="void"> + </return> + <argument index="0" name="mesh" type="RID"> + </argument> + <argument index="1" name="surface" type="int"> + </argument> + <argument index="2" name="offset" type="int"> + </argument> + <argument index="3" name="data" type="PackedByteArray"> + </argument> + <description> + </description> + </method> + <method name="mesh_surface_update_vertex_region"> <return type="void"> </return> <argument index="0" name="mesh" type="RID"> @@ -1799,7 +2714,6 @@ <argument index="3" name="data" type="PackedByteArray"> </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_data"> @@ -2008,11 +2922,11 @@ <method name="occluder_set_mesh"> <return type="void"> </return> - <argument index="0" name="arg0" type="RID"> + <argument index="0" name="occluder" type="RID"> </argument> - <argument index="1" name="arg1" type="PackedVector3Array"> + <argument index="1" name="vertices" type="PackedVector3Array"> </argument> - <argument index="2" name="arg2" type="PackedInt32Array"> + <argument index="2" name="indices" type="PackedInt32Array"> </argument> <description> </description> @@ -2026,6 +2940,110 @@ 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_collision_create"> + <return type="RID"> + </return> + <description> + </description> + </method> + <method name="particles_collision_height_field_update"> + <return type="void"> + </return> + <argument index="0" name="particles_collision" type="RID"> + </argument> + <description> + </description> + </method> + <method name="particles_collision_set_attractor_attenuation"> + <return type="void"> + </return> + <argument index="0" name="particles_collision" type="RID"> + </argument> + <argument index="1" name="curve" type="float"> + </argument> + <description> + </description> + </method> + <method name="particles_collision_set_attractor_directionality"> + <return type="void"> + </return> + <argument index="0" name="particles_collision" type="RID"> + </argument> + <argument index="1" name="amount" type="float"> + </argument> + <description> + </description> + </method> + <method name="particles_collision_set_attractor_strength"> + <return type="void"> + </return> + <argument index="0" name="particles_collision" type="RID"> + </argument> + <argument index="1" name="setrngth" type="float"> + </argument> + <description> + </description> + </method> + <method name="particles_collision_set_box_extents"> + <return type="void"> + </return> + <argument index="0" name="particles_collision" type="RID"> + </argument> + <argument index="1" name="extents" type="Vector3"> + </argument> + <description> + </description> + </method> + <method name="particles_collision_set_collision_type"> + <return type="void"> + </return> + <argument index="0" name="particles_collision" type="RID"> + </argument> + <argument index="1" name="type" type="int" enum="RenderingServer.ParticlesCollisionType"> + </argument> + <description> + </description> + </method> + <method name="particles_collision_set_cull_mask"> + <return type="void"> + </return> + <argument index="0" name="particles_collision" type="RID"> + </argument> + <argument index="1" name="mask" type="int"> + </argument> + <description> + </description> + </method> + <method name="particles_collision_set_field_texture"> + <return type="void"> + </return> + <argument index="0" name="particles_collision" type="RID"> + </argument> + <argument index="1" name="texture" type="RID"> + </argument> + <description> + </description> + </method> + <method name="particles_collision_set_height_field_resolution"> + <return type="void"> + </return> + <argument index="0" name="particles_collision" type="RID"> + </argument> + <argument index="1" name="resolution" type="int" enum="RenderingServer.ParticlesCollisionHeightfieldResolution"> + </argument> + <description> + </description> + </method> + <method name="particles_collision_set_sphere_radius"> + <return type="void"> + </return> + <argument index="0" name="particles_collision" type="RID"> + </argument> + <argument index="1" name="radius" type="float"> + </argument> + <description> + </description> + </method> <method name="particles_create"> <return type="RID"> </return> @@ -2035,6 +3053,24 @@ 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_emit"> + <return type="void"> + </return> + <argument index="0" name="particles" type="RID"> + </argument> + <argument index="1" name="transform" type="Transform3D"> + </argument> + <argument index="2" name="velocity" type="Vector3"> + </argument> + <argument index="3" name="color" type="Color"> + </argument> + <argument index="4" name="custom" type="Color"> + </argument> + <argument index="5" name="emit_flags" type="int"> + </argument> + <description> + </description> + </method> <method name="particles_get_current_aabb"> <return type="AABB"> </return> @@ -2091,6 +3127,16 @@ Sets the number of particles to be drawn and allocates the memory for them. Equivalent to [member GPUParticles3D.amount]. </description> </method> + <method name="particles_set_collision_base_size"> + <return type="void"> + </return> + <argument index="0" name="particles" type="RID"> + </argument> + <argument index="1" name="size" type="float"> + </argument> + <description> + </description> + </method> <method name="particles_set_custom_aabb"> <return type="void"> </return> @@ -2192,6 +3238,16 @@ If [code]true[/code], uses fractional delta which smooths the movement of the particles. Equivalent to [member GPUParticles3D.fract_delta]. </description> </method> + <method name="particles_set_interpolate"> + <return type="void"> + </return> + <argument index="0" name="particles" type="RID"> + </argument> + <argument index="1" name="enable" type="bool"> + </argument> + <description> + </description> + </method> <method name="particles_set_lifetime"> <return type="void"> </return> @@ -2203,6 +3259,16 @@ Sets the lifetime of each particle in the system. Equivalent to [member GPUParticles3D.lifetime]. </description> </method> + <method name="particles_set_mode"> + <return type="void"> + </return> + <argument index="0" name="particles" type="RID"> + </argument> + <argument index="1" name="mode" type="int" enum="RenderingServer.ParticlesMode"> + </argument> + <description> + </description> + </method> <method name="particles_set_one_shot"> <return type="void"> </return> @@ -2258,6 +3324,48 @@ Sets the speed scale of the particle system. Equivalent to [member GPUParticles3D.speed_scale]. </description> </method> + <method name="particles_set_subemitter"> + <return type="void"> + </return> + <argument index="0" name="particles" type="RID"> + </argument> + <argument index="1" name="subemitter_particles" type="RID"> + </argument> + <description> + </description> + </method> + <method name="particles_set_trail_bind_poses"> + <return type="void"> + </return> + <argument index="0" name="particles" type="RID"> + </argument> + <argument index="1" name="bind_poses" type="Transform3D[]"> + </argument> + <description> + </description> + </method> + <method name="particles_set_trails"> + <return type="void"> + </return> + <argument index="0" name="particles" type="RID"> + </argument> + <argument index="1" name="enable" type="bool"> + </argument> + <argument index="2" name="length_sec" type="float"> + </argument> + <description> + </description> + </method> + <method name="particles_set_transform_align"> + <return type="void"> + </return> + <argument index="0" name="particles" type="RID"> + </argument> + <argument index="1" name="align" type="int" enum="RenderingServer.ParticlesTransformAlign"> + </argument> + <description> + </description> + </method> <method name="particles_set_use_local_coordinates"> <return type="void"> </return> @@ -2374,6 +3482,16 @@ Sets the intensity of the reflection probe. Intensity modulates the strength of the reflection. Equivalent to [member ReflectionProbe.intensity]. </description> </method> + <method name="reflection_probe_set_lod_threshold"> + <return type="void"> + </return> + <argument index="0" name="probe" type="RID"> + </argument> + <argument index="1" name="pixels" type="float"> + </argument> + <description> + </description> + </method> <method name="reflection_probe_set_max_distance"> <return type="void"> </return> @@ -2396,6 +3514,16 @@ Sets the origin offset to be used when this reflection probe is in box project mode. Equivalent to [member ReflectionProbe.origin_offset]. </description> </method> + <method name="reflection_probe_set_resolution"> + <return type="void"> + </return> + <argument index="0" name="probe" type="RID"> + </argument> + <argument index="1" name="resolution" type="int"> + </argument> + <description> + </description> + </method> <method name="reflection_probe_set_update_mode"> <return type="void"> </return> @@ -2440,18 +3568,18 @@ <description> </description> </method> - <method name="scenario_set_debug"> + <method name="scenario_set_environment"> <return type="void"> </return> <argument index="0" name="scenario" type="RID"> </argument> - <argument index="1" name="debug_mode" type="int" enum="RenderingServer.ScenarioDebugMode"> + <argument index="1" name="environment" type="RID"> </argument> <description> - Sets the [enum ScenarioDebugMode] for this scenario. See [enum ScenarioDebugMode] for options. + Sets the environment that will be used with this scenario. </description> </method> - <method name="scenario_set_environment"> + <method name="scenario_set_fallback_environment"> <return type="void"> </return> <argument index="0" name="scenario" type="RID"> @@ -2459,18 +3587,19 @@ <argument index="1" name="environment" type="RID"> </argument> <description> - Sets the environment that will be used with this scenario. + 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_fallback_environment"> + <method name="screen_space_roughness_limiter_set_active"> <return type="void"> </return> - <argument index="0" name="scenario" type="RID"> + <argument index="0" name="enable" type="bool"> </argument> - <argument index="1" name="environment" type="RID"> + <argument index="1" name="amount" type="float"> + </argument> + <argument index="2" name="limit" type="float"> </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="set_boot_image"> @@ -2528,7 +3657,7 @@ </return> <argument index="0" name="shader" type="RID"> </argument> - <argument index="1" name="name" type="StringName"> + <argument index="1" name="param" type="StringName"> </argument> <description> Returns a default texture from a shader searched by name. @@ -2537,15 +3666,15 @@ <method name="shader_get_param_default" qualifiers="const"> <return type="Variant"> </return> - <argument index="0" name="material" type="RID"> + <argument index="0" name="shader" type="RID"> </argument> - <argument index="1" name="parameter" type="StringName"> + <argument index="1" name="param" type="StringName"> </argument> <description> </description> </method> <method name="shader_get_param_list" qualifiers="const"> - <return type="Array"> + <return type="Dictionary[]"> </return> <argument index="0" name="shader" type="RID"> </argument> @@ -2553,28 +3682,25 @@ Returns the parameters of a shader. </description> </method> - <method name="shader_set_code"> + <method name="shader_set_default_texture_param"> <return type="void"> </return> <argument index="0" name="shader" type="RID"> </argument> - <argument index="1" name="code" type="String"> + <argument index="1" name="param" type="StringName"> + </argument> + <argument index="2" name="texture" type="RID"> </argument> <description> - Sets a shader's code. + Sets a shader's default texture. Overwrites the texture given by name. </description> </method> - <method name="shader_set_default_texture_param"> + <method name="shadows_quality_set"> <return type="void"> </return> - <argument index="0" name="shader" type="RID"> - </argument> - <argument index="1" name="name" type="StringName"> - </argument> - <argument index="2" name="texture" type="RID"> + <argument index="0" name="quality" type="int" enum="RenderingServer.ShadowQuality"> </argument> <description> - Sets a shader's default texture. Overwrites the texture given by name. </description> </method> <method name="skeleton_allocate_data"> @@ -2654,6 +3780,30 @@ Returns the number of bones allocated for this skeleton. </description> </method> + <method name="skeleton_set_base_transform_2d"> + <return type="void"> + </return> + <argument index="0" name="skeleton" type="RID"> + </argument> + <argument index="1" name="base_transform" type="Transform2D"> + </argument> + <description> + </description> + </method> + <method name="sky_bake_panorama"> + <return type="Image"> + </return> + <argument index="0" name="sky" type="RID"> + </argument> + <argument index="1" name="energy" type="float"> + </argument> + <argument index="2" name="bake_irradiance" type="bool"> + </argument> + <argument index="3" name="size" type="Vector2i"> + </argument> + <description> + </description> + </method> <method name="sky_create"> <return type="RID"> </return> @@ -2673,6 +3823,26 @@ Sets the material that the sky uses to render the background and reflection maps. </description> </method> + <method name="sky_set_mode"> + <return type="void"> + </return> + <argument index="0" name="sky" type="RID"> + </argument> + <argument index="1" name="mode" type="int" enum="RenderingServer.SkyMode"> + </argument> + <description> + </description> + </method> + <method name="sky_set_radiance_size"> + <return type="void"> + </return> + <argument index="0" name="sky" type="RID"> + </argument> + <argument index="1" name="radiance_size" type="int"> + </argument> + <description> + </description> + </method> <method name="spot_light_create"> <return type="RID"> </return> @@ -2682,6 +3852,24 @@ 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="sub_surface_scattering_set_quality"> + <return type="void"> + </return> + <argument index="0" name="quality" type="int" enum="RenderingServer.SubSurfaceScatteringQuality"> + </argument> + <description> + </description> + </method> + <method name="sub_surface_scattering_set_scale"> + <return type="void"> + </return> + <argument index="0" name="scale" type="float"> + </argument> + <argument index="1" name="depth_scale" type="float"> + </argument> + <description> + </description> + </method> <method name="texture_2d_create"> <return type="RID"> </return> @@ -2698,6 +3886,162 @@ <description> </description> </method> + <method name="texture_2d_layer_get" qualifiers="const"> + <return type="Image"> + </return> + <argument index="0" name="texture" type="RID"> + </argument> + <argument index="1" name="layer" type="int"> + </argument> + <description> + </description> + </method> + <method name="texture_2d_layered_create"> + <return type="RID"> + </return> + <argument index="0" name="layers" type="Image[]"> + </argument> + <argument index="1" name="layered_type" type="int" enum="RenderingServer.TextureLayeredType"> + </argument> + <description> + </description> + </method> + <method name="texture_2d_layered_placeholder_create"> + <return type="RID"> + </return> + <argument index="0" name="layered_type" type="int" enum="RenderingServer.TextureLayeredType"> + </argument> + <description> + </description> + </method> + <method name="texture_2d_placeholder_create"> + <return type="RID"> + </return> + <description> + </description> + </method> + <method name="texture_2d_update"> + <return type="void"> + </return> + <argument index="0" name="texture" type="RID"> + </argument> + <argument index="1" name="image" type="Image"> + </argument> + <argument index="2" name="layer" type="int"> + </argument> + <description> + </description> + </method> + <method name="texture_3d_create"> + <return type="RID"> + </return> + <argument index="0" name="format" type="int" enum="Image.Format"> + </argument> + <argument index="1" name="width" type="int"> + </argument> + <argument index="2" name="height" type="int"> + </argument> + <argument index="3" name="depth" type="int"> + </argument> + <argument index="4" name="mipmaps" type="bool"> + </argument> + <argument index="5" name="data" type="Image[]"> + </argument> + <description> + </description> + </method> + <method name="texture_3d_get" qualifiers="const"> + <return type="Image[]"> + </return> + <argument index="0" name="texture" type="RID"> + </argument> + <description> + </description> + </method> + <method name="texture_3d_placeholder_create"> + <return type="RID"> + </return> + <description> + </description> + </method> + <method name="texture_3d_update"> + <return type="void"> + </return> + <argument index="0" name="texture" type="RID"> + </argument> + <argument index="1" name="data" type="Image[]"> + </argument> + <description> + </description> + </method> + <method name="texture_get_path" qualifiers="const"> + <return type="String"> + </return> + <argument index="0" name="texture" type="RID"> + </argument> + <description> + </description> + </method> + <method name="texture_proxy_create"> + <return type="RID"> + </return> + <argument index="0" name="base" type="RID"> + </argument> + <description> + </description> + </method> + <method name="texture_proxy_update"> + <return type="void"> + </return> + <argument index="0" name="texture" type="RID"> + </argument> + <argument index="1" name="proxy_to" type="RID"> + </argument> + <description> + </description> + </method> + <method name="texture_replace"> + <return type="void"> + </return> + <argument index="0" name="texture" type="RID"> + </argument> + <argument index="1" name="by_texture" type="RID"> + </argument> + <description> + </description> + </method> + <method name="texture_set_force_redraw_if_visible"> + <return type="void"> + </return> + <argument index="0" name="texture" type="RID"> + </argument> + <argument index="1" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="texture_set_path"> + <return type="void"> + </return> + <argument index="0" name="texture" type="RID"> + </argument> + <argument index="1" name="path" type="String"> + </argument> + <description> + </description> + </method> + <method name="texture_set_size_override"> + <return type="void"> + </return> + <argument index="0" name="texture" type="RID"> + </argument> + <argument index="1" name="width" type="int"> + </argument> + <argument index="2" name="height" type="int"> + </argument> + <description> + </description> + </method> <method name="viewport_attach_camera"> <return type="void"> </return> @@ -2772,10 +4116,11 @@ </return> <argument index="0" name="viewport" type="RID"> </argument> - <argument index="1" name="info" type="int" enum="RenderingServer.ViewportRenderInfo"> + <argument index="1" name="type" type="int" enum="RenderingServer.ViewportRenderInfoType"> + </argument> + <argument index="2" name="info" type="int" enum="RenderingServer.ViewportRenderInfo"> </argument> <description> - Returns a viewport's render information. For options, see the [enum ViewportRenderInfo] constants. </description> </method> <method name="viewport_get_texture" qualifiers="const"> @@ -2860,48 +4205,67 @@ Sets the debug draw mode of a viewport. See [enum ViewportDebugDraw] for options. </description> </method> - <method name="viewport_set_disable_environment"> + <method name="viewport_set_default_canvas_item_texture_filter"> <return type="void"> </return> <argument index="0" name="viewport" type="RID"> </argument> - <argument index="1" name="disabled" type="bool"> + <argument index="1" name="filter" type="int" enum="RenderingServer.CanvasItemTextureFilter"> </argument> <description> - If [code]true[/code], rendering of a viewport's environment is disabled. </description> </method> - <method name="viewport_set_global_canvas_transform"> + <method name="viewport_set_default_canvas_item_texture_repeat"> <return type="void"> </return> <argument index="0" name="viewport" type="RID"> </argument> - <argument index="1" name="transform" type="Transform2D"> + <argument index="1" name="repeat" type="int" enum="RenderingServer.CanvasItemTextureRepeat"> </argument> <description> - Sets the viewport's global transformation matrix. </description> </method> - <method name="viewport_set_hide_canvas"> + <method name="viewport_set_disable_2d"> <return type="void"> </return> <argument index="0" name="viewport" type="RID"> </argument> - <argument index="1" name="hidden" type="bool"> + <argument index="1" name="disable" type="bool"> </argument> <description> If [code]true[/code], the viewport's canvas is not rendered. </description> </method> - <method name="viewport_set_hide_scenario"> + <method name="viewport_set_disable_3d"> + <return type="void"> + </return> + <argument index="0" name="viewport" type="RID"> + </argument> + <argument index="1" name="disable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="viewport_set_disable_environment"> <return type="void"> </return> <argument index="0" name="viewport" type="RID"> </argument> - <argument index="1" name="hidden" type="bool"> + <argument index="1" name="disabled" type="bool"> </argument> <description> - Currently unimplemented in Godot 3.x. + If [code]true[/code], rendering of a viewport's environment is disabled. + </description> + </method> + <method name="viewport_set_global_canvas_transform"> + <return type="void"> + </return> + <argument index="0" name="viewport" type="RID"> + </argument> + <argument index="1" name="transform" type="Transform2D"> + </argument> + <description> + Sets the viewport's global transformation matrix. </description> </method> <method name="viewport_set_measure_render_time"> @@ -2972,7 +4336,29 @@ </argument> <description> Sets a viewport's scenario. - The scenario contains information about the [enum ScenarioDebugMode], environment information, reflection atlas etc. + The scenario contains information about environment information, reflection atlas etc. + </description> + </method> + <method name="viewport_set_screen_space_aa"> + <return type="void"> + </return> + <argument index="0" name="viewport" type="RID"> + </argument> + <argument index="1" name="mode" type="int" enum="RenderingServer.ViewportScreenSpaceAA"> + </argument> + <description> + </description> + </method> + <method name="viewport_set_sdf_oversize_and_scale"> + <return type="void"> + </return> + <argument index="0" name="viewport" type="RID"> + </argument> + <argument index="1" name="oversize" type="int" enum="RenderingServer.ViewportSDFOversize"> + </argument> + <argument index="2" name="scale" type="int" enum="RenderingServer.ViewportSDFScale"> + </argument> + <description> </description> </method> <method name="viewport_set_shadow_atlas_quadrant_subdivision"> @@ -3014,6 +4400,26 @@ Sets the viewport's width and height. </description> </method> + <method name="viewport_set_snap_2d_transforms_to_pixel"> + <return type="void"> + </return> + <argument index="0" name="viewport" type="RID"> + </argument> + <argument index="1" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> + <method name="viewport_set_snap_2d_vertices_to_pixel"> + <return type="void"> + </return> + <argument index="0" name="viewport" type="RID"> + </argument> + <argument index="1" name="enabled" type="bool"> + </argument> + <description> + </description> + </method> <method name="viewport_set_transparent_background"> <return type="void"> </return> @@ -3067,6 +4473,188 @@ If [code]true[/code], the viewport uses augmented or virtual reality technologies. See [XRInterface]. </description> </method> + <method name="visibility_notifier_create"> + <return type="RID"> + </return> + <description> + </description> + </method> + <method name="visibility_notifier_set_aabb"> + <return type="void"> + </return> + <argument index="0" name="notifier" type="RID"> + </argument> + <argument index="1" name="aabb" type="AABB"> + </argument> + <description> + </description> + </method> + <method name="visibility_notifier_set_callbacks"> + <return type="void"> + </return> + <argument index="0" name="notifier" type="RID"> + </argument> + <argument index="1" name="enter_callable" type="Callable"> + </argument> + <argument index="2" name="exit_callable" type="Callable"> + </argument> + <description> + </description> + </method> + <method name="voxel_gi_allocate_data"> + <return type="void"> + </return> + <argument index="0" name="voxel_gi" type="RID"> + </argument> + <argument index="1" name="to_cell_xform" type="Transform3D"> + </argument> + <argument index="2" name="aabb" type="AABB"> + </argument> + <argument index="3" name="octree_size" type="Vector3i"> + </argument> + <argument index="4" name="octree_cells" type="PackedByteArray"> + </argument> + <argument index="5" name="data_cells" type="PackedByteArray"> + </argument> + <argument index="6" name="distance_field" type="PackedByteArray"> + </argument> + <argument index="7" name="level_counts" type="PackedInt32Array"> + </argument> + <description> + </description> + </method> + <method name="voxel_gi_create"> + <return type="RID"> + </return> + <description> + </description> + </method> + <method name="voxel_gi_get_data_cells" qualifiers="const"> + <return type="PackedByteArray"> + </return> + <argument index="0" name="voxel_gi" type="RID"> + </argument> + <description> + </description> + </method> + <method name="voxel_gi_get_distance_field" qualifiers="const"> + <return type="PackedByteArray"> + </return> + <argument index="0" name="voxel_gi" type="RID"> + </argument> + <description> + </description> + </method> + <method name="voxel_gi_get_level_counts" qualifiers="const"> + <return type="PackedInt32Array"> + </return> + <argument index="0" name="voxel_gi" type="RID"> + </argument> + <description> + </description> + </method> + <method name="voxel_gi_get_octree_cells" qualifiers="const"> + <return type="PackedByteArray"> + </return> + <argument index="0" name="voxel_gi" type="RID"> + </argument> + <description> + </description> + </method> + <method name="voxel_gi_get_octree_size" qualifiers="const"> + <return type="Vector3i"> + </return> + <argument index="0" name="voxel_gi" type="RID"> + </argument> + <description> + </description> + </method> + <method name="voxel_gi_get_to_cell_xform" qualifiers="const"> + <return type="Transform3D"> + </return> + <argument index="0" name="voxel_gi" type="RID"> + </argument> + <description> + </description> + </method> + <method name="voxel_gi_set_bias"> + <return type="void"> + </return> + <argument index="0" name="voxel_gi" type="RID"> + </argument> + <argument index="1" name="bias" type="float"> + </argument> + <description> + </description> + </method> + <method name="voxel_gi_set_dynamic_range"> + <return type="void"> + </return> + <argument index="0" name="voxel_gi" type="RID"> + </argument> + <argument index="1" name="range" type="float"> + </argument> + <description> + </description> + </method> + <method name="voxel_gi_set_energy"> + <return type="void"> + </return> + <argument index="0" name="voxel_gi" type="RID"> + </argument> + <argument index="1" name="energy" type="float"> + </argument> + <description> + </description> + </method> + <method name="voxel_gi_set_interior"> + <return type="void"> + </return> + <argument index="0" name="voxel_gi" type="RID"> + </argument> + <argument index="1" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="voxel_gi_set_normal_bias"> + <return type="void"> + </return> + <argument index="0" name="voxel_gi" type="RID"> + </argument> + <argument index="1" name="bias" type="float"> + </argument> + <description> + </description> + </method> + <method name="voxel_gi_set_propagation"> + <return type="void"> + </return> + <argument index="0" name="voxel_gi" type="RID"> + </argument> + <argument index="1" name="amount" type="float"> + </argument> + <description> + </description> + </method> + <method name="voxel_gi_set_quality"> + <return type="void"> + </return> + <argument index="0" name="quality" type="int" enum="RenderingServer.VoxelGIQuality"> + </argument> + <description> + </description> + </method> + <method name="voxel_gi_set_use_two_bounces"> + <return type="void"> + </return> + <argument index="0" name="voxel_gi" type="RID"> + </argument> + <argument index="1" name="enable" type="bool"> + </argument> + <description> + </description> + </method> </methods> <members> <member name="render_loop_enabled" type="bool" setter="set_render_loop_enabled" getter="is_render_loop_enabled"> @@ -3104,6 +4692,8 @@ <constant name="MAX_CURSORS" value="8"> Unused enum in Godot 3.x. </constant> + <constant name="MAX_2D_DIRECTIONAL_LIGHTS" value="8"> + </constant> <constant name="TEXTURE_LAYERED_2D_ARRAY" value="0" enum="TextureLayeredType"> </constant> <constant name="TEXTURE_LAYERED_CUBEMAP" value="1" enum="TextureLayeredType"> @@ -3181,6 +4771,26 @@ <constant name="ARRAY_MAX" value="13" enum="ArrayType"> Represents the size of the [enum ArrayType] enum. </constant> + <constant name="ARRAY_CUSTOM_COUNT" value="4"> + </constant> + <constant name="ARRAY_CUSTOM_RGBA8_UNORM" value="0" enum="ArrayCustomFormat"> + </constant> + <constant name="ARRAY_CUSTOM_RGBA8_SNORM" value="1" enum="ArrayCustomFormat"> + </constant> + <constant name="ARRAY_CUSTOM_RG_HALF" value="2" enum="ArrayCustomFormat"> + </constant> + <constant name="ARRAY_CUSTOM_RGBA_HALF" value="3" enum="ArrayCustomFormat"> + </constant> + <constant name="ARRAY_CUSTOM_R_FLOAT" value="4" enum="ArrayCustomFormat"> + </constant> + <constant name="ARRAY_CUSTOM_RG_FLOAT" value="5" enum="ArrayCustomFormat"> + </constant> + <constant name="ARRAY_CUSTOM_RGB_FLOAT" value="6" enum="ArrayCustomFormat"> + </constant> + <constant name="ARRAY_CUSTOM_RGBA_FLOAT" value="7" enum="ArrayCustomFormat"> + </constant> + <constant name="ARRAY_CUSTOM_MAX" value="8" enum="ArrayCustomFormat"> + </constant> <constant name="ARRAY_FORMAT_VERTEX" value="1" enum="ArrayFormat"> Flag used to mark a vertex array. </constant> @@ -3220,6 +4830,8 @@ </constant> <constant name="ARRAY_FORMAT_CUSTOM_BASE" value="13" enum="ArrayFormat"> </constant> + <constant name="ARRAY_FORMAT_CUSTOM_BITS" value="3" enum="ArrayFormat"> + </constant> <constant name="ARRAY_FORMAT_CUSTOM0_SHIFT" value="13" enum="ArrayFormat"> </constant> <constant name="ARRAY_FORMAT_CUSTOM1_SHIFT" value="16" enum="ArrayFormat"> @@ -3269,6 +4881,16 @@ <constant name="MULTIMESH_TRANSFORM_3D" value="1" enum="MultimeshTransformFormat"> Use [Transform3D] to store MultiMesh transform. </constant> + <constant name="LIGHT_PROJECTOR_FILTER_NEAREST" value="0" enum="LightProjectorFilter"> + </constant> + <constant name="LIGHT_PROJECTOR_FILTER_NEAREST_MIPMAPS" value="1" enum="LightProjectorFilter"> + </constant> + <constant name="LIGHT_PROJECTOR_FILTER_LINEAR" value="2" enum="LightProjectorFilter"> + </constant> + <constant name="LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS" value="3" enum="LightProjectorFilter"> + </constant> + <constant name="LIGHT_PROJECTOR_FILTER_LINEAR_MIPMAPS_ANISOTROPIC" value="4" enum="LightProjectorFilter"> + </constant> <constant name="LIGHT_DIRECTIONAL" value="0" enum="LightType"> Is a directional (sun) light. </constant> @@ -3328,6 +4950,8 @@ <constant name="LIGHT_PARAM_SHADOW_BLUR" value="16" enum="LightParam"> Blurs the edges of the shadow. Can be used to hide pixel artifacts in low resolution shadow maps. A high value can make shadows appear grainy and can cause other unwanted artifacts. Try to keep as near default as possible. </constant> + <constant name="LIGHT_PARAM_SHADOW_VOLUMETRIC_FOG_FADE" value="17" enum="LightParam"> + </constant> <constant name="LIGHT_PARAM_TRANSMITTANCE_BIAS" value="18" enum="LightParam"> </constant> <constant name="LIGHT_PARAM_MAX" value="19" enum="LightParam"> @@ -3354,11 +4978,17 @@ <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 name="SHADOW_QUALITY_HARD" value="0" enum="ShadowQuality"> + </constant> + <constant name="SHADOW_QUALITY_SOFT_LOW" value="1" enum="ShadowQuality"> + </constant> + <constant name="SHADOW_QUALITY_SOFT_MEDIUM" value="2" enum="ShadowQuality"> </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 name="SHADOW_QUALITY_SOFT_HIGH" value="3" enum="ShadowQuality"> + </constant> + <constant name="SHADOW_QUALITY_SOFT_ULTRA" value="4" enum="ShadowQuality"> + </constant> + <constant name="SHADOW_QUALITY_MAX" value="5" enum="ShadowQuality"> </constant> <constant name="REFLECTION_PROBE_UPDATE_ONCE" value="0" enum="ReflectionProbeUpdateMode"> Reflection probe will update reflections once and then stop. @@ -3382,15 +5012,81 @@ </constant> <constant name="DECAL_TEXTURE_MAX" value="4" enum="DecalTexture"> </constant> + <constant name="DECAL_FILTER_NEAREST" value="0" enum="DecalFilter"> + </constant> + <constant name="DECAL_FILTER_NEAREST_MIPMAPS" value="1" enum="DecalFilter"> + </constant> + <constant name="DECAL_FILTER_LINEAR" value="2" enum="DecalFilter"> + </constant> + <constant name="DECAL_FILTER_LINEAR_MIPMAPS" value="3" enum="DecalFilter"> + </constant> + <constant name="DECAL_FILTER_LINEAR_MIPMAPS_ANISOTROPIC" value="4" enum="DecalFilter"> + </constant> + <constant name="VOXEL_GI_QUALITY_LOW" value="0" enum="VoxelGIQuality"> + </constant> + <constant name="VOXEL_GI_QUALITY_HIGH" value="1" enum="VoxelGIQuality"> + </constant> + <constant name="PARTICLES_MODE_2D" value="0" enum="ParticlesMode"> + </constant> + <constant name="PARTICLES_MODE_3D" value="1" enum="ParticlesMode"> + </constant> + <constant name="PARTICLES_TRANSFORM_ALIGN_DISABLED" value="0" enum="ParticlesTransformAlign"> + </constant> + <constant name="PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD" value="1" enum="ParticlesTransformAlign"> + </constant> + <constant name="PARTICLES_TRANSFORM_ALIGN_Y_TO_VELOCITY" value="2" enum="ParticlesTransformAlign"> + </constant> + <constant name="PARTICLES_TRANSFORM_ALIGN_Z_BILLBOARD_Y_TO_VELOCITY" value="3" enum="ParticlesTransformAlign"> + </constant> + <constant name="PARTICLES_EMIT_FLAG_POSITION" value="1"> + </constant> + <constant name="PARTICLES_EMIT_FLAG_ROTATION_SCALE" value="2"> + </constant> + <constant name="PARTICLES_EMIT_FLAG_VELOCITY" value="4"> + </constant> + <constant name="PARTICLES_EMIT_FLAG_COLOR" value="8"> + </constant> + <constant name="PARTICLES_EMIT_FLAG_CUSTOM" value="16"> + </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_REVERSE_LIFETIME" value="2" enum="ParticlesDrawOrder"> + </constant> <constant name="PARTICLES_DRAW_ORDER_VIEW_DEPTH" value="3" enum="ParticlesDrawOrder"> Sort particles based on their distance to the camera. </constant> + <constant name="PARTICLES_COLLISION_TYPE_SPHERE_ATTRACT" value="0" enum="ParticlesCollisionType"> + </constant> + <constant name="PARTICLES_COLLISION_TYPE_BOX_ATTRACT" value="1" enum="ParticlesCollisionType"> + </constant> + <constant name="PARTICLES_COLLISION_TYPE_VECTOR_FIELD_ATTRACT" value="2" enum="ParticlesCollisionType"> + </constant> + <constant name="PARTICLES_COLLISION_TYPE_SPHERE_COLLIDE" value="3" enum="ParticlesCollisionType"> + </constant> + <constant name="PARTICLES_COLLISION_TYPE_BOX_COLLIDE" value="4" enum="ParticlesCollisionType"> + </constant> + <constant name="PARTICLES_COLLISION_TYPE_SDF_COLLIDE" value="5" enum="ParticlesCollisionType"> + </constant> + <constant name="PARTICLES_COLLISION_TYPE_HEIGHTFIELD_COLLIDE" value="6" enum="ParticlesCollisionType"> + </constant> + <constant name="PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_256" value="0" enum="ParticlesCollisionHeightfieldResolution"> + </constant> + <constant name="PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_512" value="1" enum="ParticlesCollisionHeightfieldResolution"> + </constant> + <constant name="PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_1024" value="2" enum="ParticlesCollisionHeightfieldResolution"> + </constant> + <constant name="PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_2048" value="3" enum="ParticlesCollisionHeightfieldResolution"> + </constant> + <constant name="PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_4096" value="4" enum="ParticlesCollisionHeightfieldResolution"> + </constant> + <constant name="PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_8192" value="5" enum="ParticlesCollisionHeightfieldResolution"> + </constant> + <constant name="PARTICLES_COLLISION_HEIGHTFIELD_RESOLUTION_MAX" value="6" enum="ParticlesCollisionHeightfieldResolution"> + </constant> <constant name="VIEWPORT_UPDATE_DISABLED" value="0" enum="ViewportUpdateMode"> Do not update the viewport. </constant> @@ -3414,6 +5110,24 @@ <constant name="VIEWPORT_CLEAR_ONLY_NEXT_FRAME" value="2" enum="ViewportClearMode"> The viewport is cleared once, then the clear mode is set to [constant VIEWPORT_CLEAR_NEVER]. </constant> + <constant name="VIEWPORT_SDF_OVERSIZE_100_PERCENT" value="0" enum="ViewportSDFOversize"> + </constant> + <constant name="VIEWPORT_SDF_OVERSIZE_120_PERCENT" value="1" enum="ViewportSDFOversize"> + </constant> + <constant name="VIEWPORT_SDF_OVERSIZE_150_PERCENT" value="2" enum="ViewportSDFOversize"> + </constant> + <constant name="VIEWPORT_SDF_OVERSIZE_200_PERCENT" value="3" enum="ViewportSDFOversize"> + </constant> + <constant name="VIEWPORT_SDF_OVERSIZE_MAX" value="4" enum="ViewportSDFOversize"> + </constant> + <constant name="VIEWPORT_SDF_SCALE_100_PERCENT" value="0" enum="ViewportSDFScale"> + </constant> + <constant name="VIEWPORT_SDF_SCALE_50_PERCENT" value="1" enum="ViewportSDFScale"> + </constant> + <constant name="VIEWPORT_SDF_SCALE_25_PERCENT" value="2" enum="ViewportSDFScale"> + </constant> + <constant name="VIEWPORT_SDF_SCALE_MAX" value="3" enum="ViewportSDFScale"> + </constant> <constant name="VIEWPORT_MSAA_DISABLED" value="0" enum="ViewportMSAA"> Multisample antialiasing is disabled. </constant> @@ -3437,26 +5151,29 @@ </constant> <constant name="VIEWPORT_SCREEN_SPACE_AA_MAX" value="2" enum="ViewportScreenSpaceAA"> </constant> + <constant name="VIEWPORT_OCCLUSION_BUILD_QUALITY_LOW" value="0" enum="ViewportOcclusionCullingBuildQuality"> + </constant> + <constant name="VIEWPORT_OCCLUSION_BUILD_QUALITY_MEDIUM" value="1" enum="ViewportOcclusionCullingBuildQuality"> + </constant> + <constant name="VIEWPORT_OCCLUSION_BUILD_QUALITY_HIGH" value="2" enum="ViewportOcclusionCullingBuildQuality"> + </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"> + <constant name="VIEWPORT_RENDER_INFO_PRIMITIVES_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 name="VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME" value="2" enum="ViewportRenderInfo"> + Number of draw calls 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 name="VIEWPORT_RENDER_INFO_MAX" value="3" enum="ViewportRenderInfo"> + Represents the size of the [enum ViewportRenderInfo] enum. </constant> - <constant name="VIEWPORT_RENDER_INFO_SURFACE_CHANGES_IN_FRAME" value="4" enum="ViewportRenderInfo"> - Number of surface changes during this frame. + <constant name="VIEWPORT_RENDER_INFO_TYPE_VISIBLE" value="0" enum="ViewportRenderInfoType"> </constant> - <constant name="VIEWPORT_RENDER_INFO_DRAW_CALLS_IN_FRAME" value="5" enum="ViewportRenderInfo"> - Number of draw calls during this frame. + <constant name="VIEWPORT_RENDER_INFO_TYPE_SHADOW" value="1" enum="ViewportRenderInfoType"> </constant> - <constant name="VIEWPORT_RENDER_INFO_MAX" value="6" enum="ViewportRenderInfo"> - Represents the size of the [enum ViewportRenderInfo] enum. + <constant name="VIEWPORT_RENDER_INFO_TYPE_MAX" value="2" enum="ViewportRenderInfoType"> </constant> <constant name="VIEWPORT_DEBUG_DRAW_DISABLED" value="0" enum="ViewportDebugDraw"> Debug draw is disabled. Default setting. @@ -3508,11 +5225,25 @@ </constant> <constant name="VIEWPORT_DEBUG_DRAW_GI_BUFFER" value="17" enum="ViewportDebugDraw"> </constant> + <constant name="VIEWPORT_DEBUG_DRAW_DISABLE_LOD" value="18" enum="ViewportDebugDraw"> + </constant> + <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_OMNI_LIGHTS" value="19" enum="ViewportDebugDraw"> + </constant> + <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_SPOT_LIGHTS" value="20" enum="ViewportDebugDraw"> + </constant> + <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_DECALS" value="21" enum="ViewportDebugDraw"> + </constant> + <constant name="VIEWPORT_DEBUG_DRAW_CLUSTER_REFLECTION_PROBES" value="22" enum="ViewportDebugDraw"> + </constant> <constant name="VIEWPORT_DEBUG_DRAW_OCCLUDERS" value="23" enum="ViewportDebugDraw"> </constant> + <constant name="SKY_MODE_AUTOMATIC" value="0" enum="SkyMode"> + </constant> <constant name="SKY_MODE_QUALITY" value="1" enum="SkyMode"> Uses high quality importance sampling to process the radiance map. In general, this results in much higher quality than [constant Sky.PROCESS_MODE_REALTIME] but takes much longer to generate. This should not be used if you plan on changing the sky at runtime. If you are finding that the reflection is not blurry enough and is showing sparkles or fireflies, try increasing [member ProjectSettings.rendering/reflections/sky_reflections/ggx_samples]. </constant> + <constant name="SKY_MODE_INCREMENTAL" value="2" enum="SkyMode"> + </constant> <constant name="SKY_MODE_REALTIME" value="3" enum="SkyMode"> Uses the fast filtering algorithm to process the radiance map. In general this results in lower quality, but substantially faster run times. [b]Note:[/b] The fast filtering algorithm is limited to 256x256 cubemaps, so [member Sky.radiance_size] must be set to [constant Sky.RADIANCE_SIZE_256]. @@ -3609,64 +5340,88 @@ <constant name="ENV_SSAO_QUALITY_ULTRA" value="4" enum="EnvironmentSSAOQuality"> Highest quality screen space ambient occlusion. Uses the adaptive setting which can be dynamically adjusted to smoothly balance performance and visual quality. </constant> - <constant name="SUB_SURFACE_SCATTERING_QUALITY_DISABLED" value="0" enum="SubSurfaceScatteringQuality"> + <constant name="ENV_SDFGI_CASCADES_4" value="0" enum="EnvironmentSDFGICascades"> </constant> - <constant name="SUB_SURFACE_SCATTERING_QUALITY_LOW" value="1" enum="SubSurfaceScatteringQuality"> + <constant name="ENV_SDFGI_CASCADES_6" value="1" enum="EnvironmentSDFGICascades"> </constant> - <constant name="SUB_SURFACE_SCATTERING_QUALITY_MEDIUM" value="2" enum="SubSurfaceScatteringQuality"> + <constant name="ENV_SDFGI_CASCADES_8" value="2" enum="EnvironmentSDFGICascades"> </constant> - <constant name="SUB_SURFACE_SCATTERING_QUALITY_HIGH" value="3" enum="SubSurfaceScatteringQuality"> + <constant name="ENV_SDFGI_Y_SCALE_DISABLED" value="0" enum="EnvironmentSDFGIYScale"> </constant> - <constant name="DOF_BLUR_QUALITY_VERY_LOW" value="0" enum="DOFBlurQuality"> - Lowest quality DOF blur. This is the fastest setting, but you may be able to see filtering artifacts. + <constant name="ENV_SDFGI_Y_SCALE_75_PERCENT" value="1" enum="EnvironmentSDFGIYScale"> </constant> - <constant name="DOF_BLUR_QUALITY_LOW" value="1" enum="DOFBlurQuality"> - Low quality DOF blur. + <constant name="ENV_SDFGI_Y_SCALE_50_PERCENT" value="2" enum="EnvironmentSDFGIYScale"> </constant> - <constant name="DOF_BLUR_QUALITY_MEDIUM" value="2" enum="DOFBlurQuality"> - Medium quality DOF blur. + <constant name="ENV_SDFGI_RAY_COUNT_4" value="0" enum="EnvironmentSDFGIRayCount"> </constant> - <constant name="DOF_BLUR_QUALITY_HIGH" value="3" enum="DOFBlurQuality"> - Highest quality DOF blur. Results in the smoothest looking blur by taking the most samples, but is also significantly slower. + <constant name="ENV_SDFGI_RAY_COUNT_8" value="1" enum="EnvironmentSDFGIRayCount"> </constant> - <constant name="DOF_BOKEH_BOX" value="0" enum="DOFBokehShape"> - Calculate the DOF blur using a box filter. The fastest option, but results in obvious lines in blur pattern. + <constant name="ENV_SDFGI_RAY_COUNT_16" value="2" enum="EnvironmentSDFGIRayCount"> </constant> - <constant name="DOF_BOKEH_HEXAGON" value="1" enum="DOFBokehShape"> - Calculates DOF blur using a hexagon shaped filter. + <constant name="ENV_SDFGI_RAY_COUNT_32" value="3" enum="EnvironmentSDFGIRayCount"> </constant> - <constant name="DOF_BOKEH_CIRCLE" value="2" enum="DOFBokehShape"> - Calculates DOF blur using a circle shaped filter. Best quality and most realistic, but slowest. Use only for areas where a lot of performance can be dedicated to post-processing (e.g. cutscenes). + <constant name="ENV_SDFGI_RAY_COUNT_64" value="4" enum="EnvironmentSDFGIRayCount"> </constant> - <constant name="SHADOW_QUALITY_HARD" value="0" enum="ShadowQuality"> + <constant name="ENV_SDFGI_RAY_COUNT_96" value="5" enum="EnvironmentSDFGIRayCount"> </constant> - <constant name="SHADOW_QUALITY_SOFT_LOW" value="1" enum="ShadowQuality"> + <constant name="ENV_SDFGI_RAY_COUNT_128" value="6" enum="EnvironmentSDFGIRayCount"> </constant> - <constant name="SHADOW_QUALITY_SOFT_MEDIUM" value="2" enum="ShadowQuality"> + <constant name="ENV_SDFGI_RAY_COUNT_MAX" value="7" enum="EnvironmentSDFGIRayCount"> </constant> - <constant name="SHADOW_QUALITY_SOFT_HIGH" value="3" enum="ShadowQuality"> + <constant name="ENV_SDFGI_CONVERGE_IN_5_FRAMES" value="0" enum="EnvironmentSDFGIFramesToConverge"> </constant> - <constant name="SHADOW_QUALITY_SOFT_ULTRA" value="4" enum="ShadowQuality"> + <constant name="ENV_SDFGI_CONVERGE_IN_10_FRAMES" value="1" enum="EnvironmentSDFGIFramesToConverge"> </constant> - <constant name="SHADOW_QUALITY_MAX" value="5" enum="ShadowQuality"> + <constant name="ENV_SDFGI_CONVERGE_IN_15_FRAMES" value="2" enum="EnvironmentSDFGIFramesToConverge"> </constant> - <constant name="SCENARIO_DEBUG_DISABLED" value="0" enum="ScenarioDebugMode"> - Do not use a debug mode. + <constant name="ENV_SDFGI_CONVERGE_IN_20_FRAMES" value="3" enum="EnvironmentSDFGIFramesToConverge"> </constant> - <constant name="SCENARIO_DEBUG_WIREFRAME" value="1" enum="ScenarioDebugMode"> - Draw all objects as wireframe models. + <constant name="ENV_SDFGI_CONVERGE_IN_25_FRAMES" value="4" enum="EnvironmentSDFGIFramesToConverge"> </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 name="ENV_SDFGI_CONVERGE_IN_30_FRAMES" value="5" enum="EnvironmentSDFGIFramesToConverge"> </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 name="ENV_SDFGI_CONVERGE_MAX" value="6" enum="EnvironmentSDFGIFramesToConverge"> </constant> - <constant name="VIEWPORT_OCCLUSION_BUILD_QUALITY_LOW" value="0" enum="ViewportOcclusionCullingBuildQuality"> + <constant name="ENV_SDFGI_UPDATE_LIGHT_IN_1_FRAME" value="0" enum="EnvironmentSDFGIFramesToUpdateLight"> </constant> - <constant name="VIEWPORT_OCCLUSION_BUILD_QUALITY_MEDIUM" value="1" enum="ViewportOcclusionCullingBuildQuality"> + <constant name="ENV_SDFGI_UPDATE_LIGHT_IN_2_FRAMES" value="1" enum="EnvironmentSDFGIFramesToUpdateLight"> </constant> - <constant name="VIEWPORT_OCCLUSION_BUILD_QUALITY_HIGH" value="2" enum="ViewportOcclusionCullingBuildQuality"> + <constant name="ENV_SDFGI_UPDATE_LIGHT_IN_4_FRAMES" value="2" enum="EnvironmentSDFGIFramesToUpdateLight"> + </constant> + <constant name="ENV_SDFGI_UPDATE_LIGHT_IN_8_FRAMES" value="3" enum="EnvironmentSDFGIFramesToUpdateLight"> + </constant> + <constant name="ENV_SDFGI_UPDATE_LIGHT_IN_16_FRAMES" value="4" enum="EnvironmentSDFGIFramesToUpdateLight"> + </constant> + <constant name="ENV_SDFGI_UPDATE_LIGHT_MAX" value="5" enum="EnvironmentSDFGIFramesToUpdateLight"> + </constant> + <constant name="SUB_SURFACE_SCATTERING_QUALITY_DISABLED" value="0" enum="SubSurfaceScatteringQuality"> + </constant> + <constant name="SUB_SURFACE_SCATTERING_QUALITY_LOW" value="1" enum="SubSurfaceScatteringQuality"> + </constant> + <constant name="SUB_SURFACE_SCATTERING_QUALITY_MEDIUM" value="2" enum="SubSurfaceScatteringQuality"> + </constant> + <constant name="SUB_SURFACE_SCATTERING_QUALITY_HIGH" value="3" enum="SubSurfaceScatteringQuality"> + </constant> + <constant name="DOF_BOKEH_BOX" value="0" enum="DOFBokehShape"> + Calculate the DOF blur using a box filter. The fastest option, but results in obvious lines in blur pattern. + </constant> + <constant name="DOF_BOKEH_HEXAGON" value="1" enum="DOFBokehShape"> + Calculates DOF blur using a hexagon shaped filter. + </constant> + <constant name="DOF_BOKEH_CIRCLE" value="2" enum="DOFBokehShape"> + Calculates DOF blur using a circle shaped filter. Best quality and most realistic, but slowest. Use only for areas where a lot of performance can be dedicated to post-processing (e.g. cutscenes). + </constant> + <constant name="DOF_BLUR_QUALITY_VERY_LOW" value="0" enum="DOFBlurQuality"> + Lowest quality DOF blur. This is the fastest setting, but you may be able to see filtering artifacts. + </constant> + <constant name="DOF_BLUR_QUALITY_LOW" value="1" enum="DOFBlurQuality"> + Low quality DOF blur. + </constant> + <constant name="DOF_BLUR_QUALITY_MEDIUM" value="2" enum="DOFBlurQuality"> + Medium quality DOF blur. + </constant> + <constant name="DOF_BLUR_QUALITY_HIGH" value="3" enum="DOFBlurQuality"> + Highest quality DOF blur. Results in the smoothest looking blur by taking the most samples, but is also significantly slower. </constant> <constant name="INSTANCE_NONE" value="0" enum="InstanceType"> The instance does not have a type. @@ -3677,35 +5432,34 @@ <constant name="INSTANCE_MULTIMESH" value="2" enum="InstanceType"> The instance is a multimesh. </constant> - <constant name="INSTANCE_IMMEDIATE" value="3" enum="InstanceType"> - The instance is an immediate geometry. - </constant> - <constant name="INSTANCE_PARTICLES" value="4" enum="InstanceType"> + <constant name="INSTANCE_PARTICLES" value="3" enum="InstanceType"> The instance is a particle emitter. </constant> - <constant name="INSTANCE_PARTICLES_COLLISION" value="5" enum="InstanceType"> + <constant name="INSTANCE_PARTICLES_COLLISION" value="4" enum="InstanceType"> </constant> - <constant name="INSTANCE_LIGHT" value="6" enum="InstanceType"> + <constant name="INSTANCE_LIGHT" value="5" enum="InstanceType"> The instance is a light. </constant> - <constant name="INSTANCE_REFLECTION_PROBE" value="7" enum="InstanceType"> + <constant name="INSTANCE_REFLECTION_PROBE" value="6" enum="InstanceType"> The instance is a reflection probe. </constant> - <constant name="INSTANCE_DECAL" value="8" enum="InstanceType"> + <constant name="INSTANCE_DECAL" value="7" enum="InstanceType"> The instance is a decal. </constant> - <constant name="INSTANCE_VOXEL_GI" value="9" enum="InstanceType"> + <constant name="INSTANCE_VOXEL_GI" value="8" enum="InstanceType"> The instance is a VoxelGI. </constant> - <constant name="INSTANCE_LIGHTMAP" value="10" enum="InstanceType"> + <constant name="INSTANCE_LIGHTMAP" value="9" enum="InstanceType"> The instance is a lightmap. </constant> - <constant name="INSTANCE_OCCLUDER" value="11" enum="InstanceType"> + <constant name="INSTANCE_OCCLUDER" value="10" enum="InstanceType"> </constant> - <constant name="INSTANCE_MAX" value="13" enum="InstanceType"> + <constant name="INSTANCE_VISIBLITY_NOTIFIER" value="11" enum="InstanceType"> + </constant> + <constant name="INSTANCE_MAX" value="12" enum="InstanceType"> Represents the size of the [enum InstanceType] enum. </constant> - <constant name="INSTANCE_GEOMETRY_MASK" value="30" enum="InstanceType"> + <constant name="INSTANCE_GEOMETRY_MASK" value="14" enum="InstanceType"> 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"> @@ -3734,6 +5488,20 @@ <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="BAKE_CHANNEL_ALBEDO_ALPHA" value="0" enum="BakeChannels"> + </constant> + <constant name="BAKE_CHANNEL_NORMAL" value="1" enum="BakeChannels"> + </constant> + <constant name="BAKE_CHANNEL_ORM" value="2" enum="BakeChannels"> + </constant> + <constant name="BAKE_CHANNEL_EMISSION" value="3" enum="BakeChannels"> + </constant> + <constant name="CANVAS_TEXTURE_CHANNEL_DIFFUSE" value="0" enum="CanvasTextureChannel"> + </constant> + <constant name="CANVAS_TEXTURE_CHANNEL_NORMAL" value="1" enum="CanvasTextureChannel"> + </constant> + <constant name="CANVAS_TEXTURE_CHANNEL_SPECULAR" value="2" enum="CanvasTextureChannel"> + </constant> <constant name="NINE_PATCH_STRETCH" value="0" enum="NinePatchAxisMode"> The nine patch gets stretched where needed. </constant> @@ -3880,35 +5648,17 @@ </constant> <constant name="GLOBAL_VAR_TYPE_MAX" value="28" enum="GlobalVariableType"> </constant> - <constant name="INFO_OBJECTS_IN_FRAME" value="0" enum="RenderInfo"> - The amount of objects in the frame. - </constant> - <constant name="INFO_VERTICES_IN_FRAME" value="1" enum="RenderInfo"> - The amount of vertices in the frame. - </constant> - <constant name="INFO_MATERIAL_CHANGES_IN_FRAME" value="2" enum="RenderInfo"> - The amount of modified materials in the frame. - </constant> - <constant name="INFO_SHADER_CHANGES_IN_FRAME" value="3" enum="RenderInfo"> - The amount of shader rebinds in the frame. - </constant> - <constant name="INFO_SURFACE_CHANGES_IN_FRAME" value="4" enum="RenderInfo"> - The amount of surface changes in the frame. + <constant name="RENDERING_INFO_TOTAL_OBJECTS_IN_FRAME" value="0" enum="RenderingInfo"> </constant> - <constant name="INFO_DRAW_CALLS_IN_FRAME" value="5" enum="RenderInfo"> - The amount of draw calls in frame. + <constant name="RENDERING_INFO_TOTAL_PRIMITIVES_IN_FRAME" value="1" enum="RenderingInfo"> </constant> - <constant name="INFO_USAGE_VIDEO_MEM_TOTAL" value="6" enum="RenderInfo"> - Unimplemented in the GLES2 rendering backend, always returns 0. + <constant name="RENDERING_INFO_TOTAL_DRAW_CALLS_IN_FRAME" value="2" enum="RenderingInfo"> </constant> - <constant name="INFO_VIDEO_MEM_USED" value="7" enum="RenderInfo"> - The amount of video memory used, i.e. texture and vertex memory combined. + <constant name="RENDERING_INFO_TEXTURE_MEM_USED" value="3" enum="RenderingInfo"> </constant> - <constant name="INFO_TEXTURE_MEM_USED" value="8" enum="RenderInfo"> - The amount of texture memory used. + <constant name="RENDERING_INFO_BUFFER_MEM_USED" value="4" enum="RenderingInfo"> </constant> - <constant name="INFO_VERTEX_MEM_USED" value="9" enum="RenderInfo"> - The amount of vertex memory used. + <constant name="RENDERING_INFO_VIDEO_MEM_USED" value="5" enum="RenderingInfo"> </constant> <constant name="FEATURE_SHADERS" value="0" enum="Features"> Hardware supports shaders. This enum is currently unused in Godot 3.x. diff --git a/doc/classes/SceneTree.xml b/doc/classes/SceneTree.xml index d327e8cbca..bf51b4dfa7 100644 --- a/doc/classes/SceneTree.xml +++ b/doc/classes/SceneTree.xml @@ -112,20 +112,6 @@ Returns the current frame number, i.e. the total frame count since the application started. </description> </method> - <method name="get_network_connected_peers" qualifiers="const"> - <return type="PackedInt32Array"> - </return> - <description> - Returns the peer IDs of all connected peers of this [SceneTree]'s [member network_peer]. - </description> - </method> - <method name="get_network_unique_id" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the unique peer ID of this [SceneTree]'s [member network_peer]. - </description> - </method> <method name="get_node_count" qualifiers="const"> <return type="int"> </return> @@ -149,13 +135,6 @@ Returns an array of currently exising [Tween]s in the [SceneTree] (both running and paused). </description> </method> - <method name="get_rpc_sender_id" qualifiers="const"> - <return type="int"> - </return> - <description> - Returns the sender's peer ID for the most recently received RPC call. - </description> - </method> <method name="has_group" qualifiers="const"> <return type="bool"> </return> @@ -165,20 +144,6 @@ Returns [code]true[/code] if the given group exists. </description> </method> - <method name="has_network_peer" qualifiers="const"> - <return type="bool"> - </return> - <description> - Returns [code]true[/code] if there is a [member network_peer] set. - </description> - </method> - <method name="is_network_server" qualifiers="const"> - <return type="bool"> - </return> - <description> - Returns [code]true[/code] if this [SceneTree]'s [member network_peer] is in server mode (listening for connections). - </description> - </method> <method name="notify_group"> <return type="void"> </return> @@ -301,32 +266,16 @@ If [code]true[/code] (default value), enables automatic polling of the [MultiplayerAPI] for this SceneTree during [signal process_frame]. If [code]false[/code], you need to manually call [method MultiplayerAPI.poll] to process network packets and deliver RPCs/RSETs. This allows running RPCs/RSETs in a different loop (e.g. physics, thread, specific time step) and for manual [Mutex] protection when accessing the [MultiplayerAPI] from threads. </member> - <member name="network_peer" type="NetworkedMultiplayerPeer" setter="set_network_peer" getter="get_network_peer"> - The peer object to handle the RPC system (effectively enabling networking when set). Depending on the peer itself, the [SceneTree] will become a network server (check with [method is_network_server]) and will set the root node's network mode to master, or it will become a regular peer with the root node set to puppet. All child nodes are set to inherit the network mode by default. Handling of networking-related events (connection, disconnection, new clients) is done by connecting to [SceneTree]'s signals. - </member> <member name="paused" type="bool" setter="set_pause" getter="is_paused" default="false"> If [code]true[/code], the [SceneTree] is paused. Doing so will have the following behavior: - 2D and 3D physics will be stopped. - [method Node._process], [method Node._physics_process] and [method Node._input] will not be called anymore in nodes. </member> - <member name="refuse_new_network_connections" type="bool" setter="set_refuse_new_network_connections" getter="is_refusing_new_network_connections" default="false"> - If [code]true[/code], the [SceneTree]'s [member network_peer] refuses new incoming connections. - </member> <member name="root" type="Window" setter="" getter="get_root"> The [SceneTree]'s root [Window]. </member> </members> <signals> - <signal name="connected_to_server"> - <description> - Emitted whenever this [SceneTree]'s [member network_peer] successfully connected to a server. Only emitted on clients. - </description> - </signal> - <signal name="connection_failed"> - <description> - Emitted whenever this [SceneTree]'s [member network_peer] fails to establish a connection to a server. Only emitted on clients. - </description> - </signal> <signal name="files_dropped"> <argument index="0" name="files" type="PackedStringArray"> </argument> @@ -336,20 +285,6 @@ Emitted when files are dragged from the OS file manager and dropped in the game window. The arguments are a list of file paths and the identifier of the screen where the drag originated. </description> </signal> - <signal name="network_peer_connected"> - <argument index="0" name="id" type="int"> - </argument> - <description> - Emitted whenever this [SceneTree]'s [member network_peer] connects with a new peer. ID is the peer ID of the new peer. Clients get notified when other clients connect to the same server. Upon connecting to a server, a client also receives this signal for the server (with ID being 1). - </description> - </signal> - <signal name="network_peer_disconnected"> - <argument index="0" name="id" type="int"> - </argument> - <description> - Emitted whenever this [SceneTree]'s [member network_peer] disconnects from a peer. Clients get notified when other clients disconnect from the same server. - </description> - </signal> <signal name="node_added"> <argument index="0" name="node" type="Node"> </argument> @@ -388,11 +323,6 @@ Emitted immediately before [method Node._process] is called on every node in the [SceneTree]. </description> </signal> - <signal name="server_disconnected"> - <description> - Emitted whenever this [SceneTree]'s [member network_peer] disconnected from server. Only emitted on clients. - </description> - </signal> <signal name="tree_changed"> <description> Emitted whenever the [SceneTree] hierarchy changed (children being moved or renamed, etc.). diff --git a/doc/classes/SoftBody3D.xml b/doc/classes/SoftBody3D.xml index 7999ad774d..b143c60d9d 100644 --- a/doc/classes/SoftBody3D.xml +++ b/doc/classes/SoftBody3D.xml @@ -93,6 +93,9 @@ </member> <member name="damping_coefficient" type="float" setter="set_damping_coefficient" getter="get_damping_coefficient" default="0.01"> </member> + <member name="disable_mode" type="int" setter="set_disable_mode" getter="get_disable_mode" enum="SoftBody3D.DisableMode" default="0"> + Defines the behavior in physics when [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED]. See [enum DisableMode] for more details about the different modes. + </member> <member name="drag_coefficient" type="float" setter="set_drag_coefficient" getter="get_drag_coefficient" default="0.0"> </member> <member name="linear_stiffness" type="float" setter="set_linear_stiffness" getter="get_linear_stiffness" default="0.5"> @@ -113,5 +116,12 @@ </member> </members> <constants> + <constant name="DISABLE_MODE_REMOVE" value="0" enum="DisableMode"> + When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], remove from the physics simulation to stop all physics interactions with this [SoftBody3D]. + Automatically re-added to the physics simulation when the [Node] is processed again. + </constant> + <constant name="DISABLE_MODE_KEEP_ACTIVE" value="1" enum="DisableMode"> + When [member Node.process_mode] is set to [constant Node.PROCESS_MODE_DISABLED], do not affect the physics simulation. + </constant> </constants> </class> diff --git a/doc/classes/Sprite3D.xml b/doc/classes/Sprite3D.xml index f7f2ff0de1..ddb9d543e8 100644 --- a/doc/classes/Sprite3D.xml +++ b/doc/classes/Sprite3D.xml @@ -21,7 +21,6 @@ The number of columns in the sprite sheet. </member> <member name="region_enabled" type="bool" setter="set_region_enabled" getter="is_region_enabled" default="false"> - If [code]true[/code], texture will be cut from a larger atlas texture. See [member region_rect]. </member> <member name="region_rect" type="Rect2" setter="set_region_rect" getter="get_region_rect" default="Rect2(0, 0, 0, 0)"> The region of the atlas texture to display. [member region_enabled] must be [code]true[/code]. @@ -39,11 +38,6 @@ Emitted when the [member frame] changes. </description> </signal> - <signal name="texture_changed"> - <description> - Emitted when the [member texture] changes. - </description> - </signal> </signals> <constants> </constants> diff --git a/doc/classes/StaticBody2D.xml b/doc/classes/StaticBody2D.xml index 85915a53fe..326bf58e22 100644 --- a/doc/classes/StaticBody2D.xml +++ b/doc/classes/StaticBody2D.xml @@ -29,6 +29,9 @@ The physics material override for the body. If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. </member> + <member name="sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false"> + If [code]true[/code] and [member kinematic_motion] is enabled, the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method PhysicsBody2D.move_and_collide]. + </member> </members> <constants> </constants> diff --git a/doc/classes/StaticBody3D.xml b/doc/classes/StaticBody3D.xml index f83d440f10..69c123002f 100644 --- a/doc/classes/StaticBody3D.xml +++ b/doc/classes/StaticBody3D.xml @@ -32,6 +32,9 @@ The physics material override for the body. If a material is assigned to this property, it will be used instead of any other physics material, such as an inherited one. </member> + <member name="sync_to_physics" type="bool" setter="set_sync_to_physics" getter="is_sync_to_physics_enabled" default="false"> + If [code]true[/code] and [member kinematic_motion] is enabled, the body's movement will be synchronized to the physics frame. This is useful when animating movement via [AnimationPlayer], for example on moving platforms. Do [b]not[/b] use together with [method PhysicsBody3D.move_and_collide]. + </member> </members> <constants> </constants> diff --git a/doc/classes/SurfaceTool.xml b/doc/classes/SurfaceTool.xml index 22d1b52479..a8b836ff0c 100644 --- a/doc/classes/SurfaceTool.xml +++ b/doc/classes/SurfaceTool.xml @@ -24,7 +24,7 @@ The above [SurfaceTool] now contains one vertex of a triangle which has a UV coordinate and a specified [Color]. If another vertex were added without calling [method set_uv] or [method set_color], then the last values would be used. Vertex attributes must be passed [b]before[/b] calling [method add_vertex]. Failure to do so will result in an error when committing the vertex information to a mesh. Additionally, the attributes used before the first vertex is added determine the format of the mesh. For example, if you only add UVs to the first vertex, you cannot add color to any of the subsequent vertices. - See also [ArrayMesh], [ImmediateGeometry3D] and [MeshDataTool] for procedural geometry generation. + See also [ArrayMesh], [ImmediateMesh] and [MeshDataTool] for procedural geometry generation. [b]Note:[/b] Godot uses clockwise [url=https://learnopengl.com/Advanced-OpenGL/Face-culling]winding order[/url] for front faces of triangle primitive modes. </description> <tutorials> diff --git a/doc/classes/TextEdit.xml b/doc/classes/TextEdit.xml index 6a3c124c60..e51bf42bdb 100644 --- a/doc/classes/TextEdit.xml +++ b/doc/classes/TextEdit.xml @@ -14,6 +14,7 @@ <return type="void"> </return> <description> + A virtual method that is called whenever backspace is triggered. </description> </method> <method name="add_gutter"> @@ -28,6 +29,7 @@ <return type="void"> </return> <description> + Causes the [TextEdit] to perform a backspace. </description> </method> <method name="center_viewport_to_cursor"> @@ -172,6 +174,7 @@ <argument index="0" name="line" type="int"> </argument> <description> + Returns the indent level of a specific line. </description> </method> <method name="get_line" qualifiers="const"> @@ -312,6 +315,7 @@ <return type="int"> </return> <description> + Returns the [TextEdit]'s' tab size. </description> </method> <method name="get_visible_line_count" qualifiers="const"> @@ -378,6 +382,13 @@ <description> </description> </method> + <method name="is_menu_visible" qualifiers="const"> + <return type="bool"> + </return> + <description> + Returns whether the menu is visible. Use this instead of [code]get_menu().visible[/code] to improve performance (so the creation of the menu is avoided). + </description> + </method> <method name="is_selection_active" qualifiers="const"> <return type="bool"> </return> @@ -667,6 +678,7 @@ <argument index="0" name="size" type="int"> </argument> <description> + Sets the tab size for the [TextEdit] to use. </description> </method> <method name="undo"> @@ -846,9 +858,9 @@ </constant> <constant name="GUTTER_TYPE_STRING" value="0" enum="GutterType"> </constant> - <constant name="GUTTER_TPYE_ICON" value="1" enum="GutterType"> + <constant name="GUTTER_TYPE_ICON" value="1" enum="GutterType"> </constant> - <constant name="GUTTER_TPYE_CUSTOM" value="2" enum="GutterType"> + <constant name="GUTTER_TYPE_CUSTOM" value="2" enum="GutterType"> </constant> <constant name="MENU_CUT" value="0" enum="MenuItems"> Cuts (copies and clears) the selected text. diff --git a/doc/classes/TextServer.xml b/doc/classes/TextServer.xml index c943946ab3..0f9318fda1 100644 --- a/doc/classes/TextServer.xml +++ b/doc/classes/TextServer.xml @@ -1088,6 +1088,19 @@ Returns composite character end position closest to the [code]pos[/code]. </description> </method> + <method name="shaped_text_overrun_trim_to_width"> + <return type="void"> + </return> + <argument index="0" name="shaped" type="RID"> + </argument> + <argument index="1" name="width" type="float" default="0"> + </argument> + <argument index="2" name="overrun_trim_flags" type="int" default="0"> + </argument> + <description> + Trims text if it exceeds the given width. + </description> + </method> <method name="shaped_text_prev_grapheme_pos"> <return type="int"> </return> @@ -1260,6 +1273,21 @@ <constant name="BREAK_GRAPHEME_BOUND" value="64" enum="LineBreakFlag"> Break the line between any unconnected graphemes. </constant> + <constant name="OVERRUN_NO_TRIMMING" value="0" enum="TextOverrunFlag"> + No trimming is performed. + </constant> + <constant name="OVERRUN_TRIM" value="1" enum="TextOverrunFlag"> + Trims the text when it exceeds the given width. + </constant> + <constant name="OVERRUN_TRIM_WORD_ONLY" value="2" enum="TextOverrunFlag"> + Trims the text per word instead of per grapheme. + </constant> + <constant name="OVERRUN_ADD_ELLIPSIS" value="4" enum="TextOverrunFlag"> + Determines whether an ellipsis should be added at the end of the text. + </constant> + <constant name="OVERRUN_ENFORCE_ELLIPSIS" value="8" enum="TextOverrunFlag"> + Determines whether the ellipsis at the end of the text is enforced and may not be hidden. + </constant> <constant name="GRAPHEME_IS_RTL" value="2" enum="GraphemeFlag"> Grapheme is part of right-to-left or bottom-to-top run. </constant> diff --git a/doc/classes/Theme.xml b/doc/classes/Theme.xml index 7448697df3..969d8ab2a4 100644 --- a/doc/classes/Theme.xml +++ b/doc/classes/Theme.xml @@ -97,6 +97,15 @@ Clears the theme item of [code]data_type[/code] at [code]name[/code] if the theme has [code]theme_type[/code]. </description> </method> + <method name="clear_type_variation"> + <return type="void"> + </return> + <argument index="0" name="theme_type" type="StringName"> + </argument> + <description> + Unmarks [code]theme_type[/code] as being a variation of any other type. + </description> + </method> <method name="copy_default_theme"> <return type="void"> </return> @@ -319,6 +328,24 @@ Returns all the theme types as a [PackedStringArray] filled with unique type names, for use in other [code]get_*[/code] functions of this theme. </description> </method> + <method name="get_type_variation_base" qualifiers="const"> + <return type="StringName"> + </return> + <argument index="0" name="theme_type" type="StringName"> + </argument> + <description> + Returns the base theme type if [code]theme_type[/code] is a valid variation type. Returns an empty string otherwise. + </description> + </method> + <method name="get_type_variation_list" qualifiers="const"> + <return type="PackedStringArray"> + </return> + <argument index="0" name="base_type" type="StringName"> + </argument> + <description> + Returns a list of all variation for the given [code]base_type[/code]. + </description> + </method> <method name="has_color" qualifiers="const"> <return type="bool"> </return> @@ -405,6 +432,17 @@ Returns [code]false[/code] if the theme does not have [code]theme_type[/code]. </description> </method> + <method name="is_type_variation" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="theme_type" type="StringName"> + </argument> + <argument index="1" name="base_type" type="StringName"> + </argument> + <description> + Returns [code]true[/code] if [code]theme_type[/code] is marked as a variation of [code]base_type[/code] in this theme. + </description> + </method> <method name="rename_color"> <return type="void"> </return> @@ -599,6 +637,20 @@ Creates [code]theme_type[/code] if the theme does not have it. </description> </method> + <method name="set_type_variation"> + <return type="void"> + </return> + <argument index="0" name="theme_type" type="StringName"> + </argument> + <argument index="1" name="base_type" type="StringName"> + </argument> + <description> + Marks [code]theme_type[/code] as being a variation of [code]base_type[/code]. + This adds [code]theme_type[/code] as a suggested option for [member Control.theme_type_variation] on a [Control] that is of the [code]base_type[/code] class. + Variations can also be nested, i.e. [code]base_type[/code] can be another variation. If a chain of variations ends with a [code]base_type[/code] matching a class of a [Control], the whole chain is going to be suggested as options. + Note: Suggestions only show up if this [Theme] is set as the project default theme. See [member ProjectSettings.gui/theme/custom]. + </description> + </method> </methods> <members> <member name="default_font" type="Font" setter="set_default_font" getter="get_default_font"> diff --git a/doc/classes/TileData.xml b/doc/classes/TileData.xml index 1f0f807a08..bb793024eb 100644 --- a/doc/classes/TileData.xml +++ b/doc/classes/TileData.xml @@ -7,7 +7,7 @@ <tutorials> </tutorials> <methods> - <method name="add_collision_shape"> + <method name="add_collision_polygon"> <return type="void"> </return> <argument index="0" name="layer_id" type="int"> @@ -15,27 +15,27 @@ <description> </description> </method> - <method name="get_collision_shape_one_way_margin" qualifiers="const"> + <method name="get_collision_polygon_one_way_margin" qualifiers="const"> <return type="float"> </return> <argument index="0" name="layer_id" type="int"> </argument> - <argument index="1" name="shape_index" type="int"> + <argument index="1" name="polygon_index" type="int"> </argument> <description> </description> </method> - <method name="get_collision_shape_shape" qualifiers="const"> - <return type="Shape2D"> + <method name="get_collision_polygon_points" qualifiers="const"> + <return type="PackedVector2Array"> </return> <argument index="0" name="layer_id" type="int"> </argument> - <argument index="1" name="shape_index" type="int"> + <argument index="1" name="polygon_index" type="int"> </argument> <description> </description> </method> - <method name="get_collision_shapes_count" qualifiers="const"> + <method name="get_collision_polygons_count" qualifiers="const"> <return type="int"> </return> <argument index="0" name="layer_id" type="int"> @@ -83,68 +83,68 @@ <description> </description> </method> - <method name="is_collision_shape_one_way" qualifiers="const"> + <method name="is_collision_polygon_one_way" qualifiers="const"> <return type="bool"> </return> <argument index="0" name="layer_id" type="int"> </argument> - <argument index="1" name="shape_index" type="int"> + <argument index="1" name="polygon_index" type="int"> </argument> <description> </description> </method> - <method name="remove_collision_shape"> + <method name="remove_collision_polygon"> <return type="void"> </return> <argument index="0" name="layer_id" type="int"> </argument> - <argument index="1" name="shape_index" type="int"> + <argument index="1" name="polygon_index" type="int"> </argument> <description> </description> </method> - <method name="set_collision_shape_one_way"> + <method name="set_collision_polygon_one_way"> <return type="void"> </return> <argument index="0" name="layer_id" type="int"> </argument> - <argument index="1" name="shape_index" type="int"> + <argument index="1" name="polygon_index" type="int"> </argument> <argument index="2" name="one_way" type="bool"> </argument> <description> </description> </method> - <method name="set_collision_shape_one_way_margin"> + <method name="set_collision_polygon_one_way_margin"> <return type="void"> </return> <argument index="0" name="layer_id" type="int"> </argument> - <argument index="1" name="shape_index" type="int"> + <argument index="1" name="polygon_index" type="int"> </argument> <argument index="2" name="one_way_margin" type="float"> </argument> <description> </description> </method> - <method name="set_collision_shape_shape"> + <method name="set_collision_polygon_points"> <return type="void"> </return> <argument index="0" name="layer_id" type="int"> </argument> - <argument index="1" name="shape_index" type="int"> + <argument index="1" name="polygon_index" type="int"> </argument> - <argument index="2" name="shape" type="Shape2D"> + <argument index="2" name="polygon" type="PackedVector2Array"> </argument> <description> </description> </method> - <method name="set_collision_shapes_count"> + <method name="set_collision_polygons_count"> <return type="void"> </return> <argument index="0" name="layer_id" type="int"> </argument> - <argument index="1" name="shapes_count" type="int"> + <argument index="1" name="polygons_count" type="int"> </argument> <description> </description> diff --git a/doc/classes/TileSet.xml b/doc/classes/TileSet.xml index 7d8b589f78..436e15387d 100644 --- a/doc/classes/TileSet.xml +++ b/doc/classes/TileSet.xml @@ -289,8 +289,6 @@ </member> <member name="tile_size" type="Vector2i" setter="set_tile_size" getter="get_tile_size" default="Vector2i(16, 16)"> </member> - <member name="tile_skew" type="Vector2" setter="set_tile_skew" getter="get_tile_skew" default="Vector2(0, 0)"> - </member> <member name="uv_clipping" type="bool" setter="set_uv_clipping" getter="is_uv_clipping" default="false"> </member> <member name="y_sorting" type="bool" setter="set_y_sorting" getter="is_y_sorting" default="false"> @@ -324,37 +322,37 @@ </constant> <constant name="TILE_OFFSET_AXIS_VERTICAL" value="1" enum="TileOffsetAxis"> </constant> - <constant name="TileSet::CELL_NEIGHBOR_RIGHT_SIDE" value="0" enum="CellNeighbor"> + <constant name="CELL_NEIGHBOR_RIGHT_SIDE" value="0" enum="CellNeighbor"> </constant> - <constant name="TileSet::CELL_NEIGHBOR_RIGHT_CORNER" value="1" enum="CellNeighbor"> + <constant name="CELL_NEIGHBOR_RIGHT_CORNER" value="1" enum="CellNeighbor"> </constant> - <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_RIGHT_SIDE" value="2" enum="CellNeighbor"> + <constant name="CELL_NEIGHBOR_BOTTOM_RIGHT_SIDE" value="2" enum="CellNeighbor"> </constant> - <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_RIGHT_CORNER" value="3" enum="CellNeighbor"> + <constant name="CELL_NEIGHBOR_BOTTOM_RIGHT_CORNER" value="3" enum="CellNeighbor"> </constant> - <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_SIDE" value="4" enum="CellNeighbor"> + <constant name="CELL_NEIGHBOR_BOTTOM_SIDE" value="4" enum="CellNeighbor"> </constant> - <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_CORNER" value="5" enum="CellNeighbor"> + <constant name="CELL_NEIGHBOR_BOTTOM_CORNER" value="5" enum="CellNeighbor"> </constant> - <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_LEFT_SIDE" value="6" enum="CellNeighbor"> + <constant name="CELL_NEIGHBOR_BOTTOM_LEFT_SIDE" value="6" enum="CellNeighbor"> </constant> - <constant name="TileSet::CELL_NEIGHBOR_BOTTOM_LEFT_CORNER" value="7" enum="CellNeighbor"> + <constant name="CELL_NEIGHBOR_BOTTOM_LEFT_CORNER" value="7" enum="CellNeighbor"> </constant> - <constant name="TileSet::CELL_NEIGHBOR_LEFT_SIDE" value="8" enum="CellNeighbor"> + <constant name="CELL_NEIGHBOR_LEFT_SIDE" value="8" enum="CellNeighbor"> </constant> - <constant name="TileSet::CELL_NEIGHBOR_LEFT_CORNER" value="9" enum="CellNeighbor"> + <constant name="CELL_NEIGHBOR_LEFT_CORNER" value="9" enum="CellNeighbor"> </constant> - <constant name="TileSet::CELL_NEIGHBOR_TOP_LEFT_SIDE" value="10" enum="CellNeighbor"> + <constant name="CELL_NEIGHBOR_TOP_LEFT_SIDE" value="10" enum="CellNeighbor"> </constant> - <constant name="TileSet::CELL_NEIGHBOR_TOP_LEFT_CORNER" value="11" enum="CellNeighbor"> + <constant name="CELL_NEIGHBOR_TOP_LEFT_CORNER" value="11" enum="CellNeighbor"> </constant> - <constant name="TileSet::CELL_NEIGHBOR_TOP_SIDE" value="12" enum="CellNeighbor"> + <constant name="CELL_NEIGHBOR_TOP_SIDE" value="12" enum="CellNeighbor"> </constant> - <constant name="TileSet::CELL_NEIGHBOR_TOP_CORNER" value="13" enum="CellNeighbor"> + <constant name="CELL_NEIGHBOR_TOP_CORNER" value="13" enum="CellNeighbor"> </constant> - <constant name="TileSet::CELL_NEIGHBOR_TOP_RIGHT_SIDE" value="14" enum="CellNeighbor"> + <constant name="CELL_NEIGHBOR_TOP_RIGHT_SIDE" value="14" enum="CellNeighbor"> </constant> - <constant name="TileSet::CELL_NEIGHBOR_TOP_RIGHT_CORNER" value="15" enum="CellNeighbor"> + <constant name="CELL_NEIGHBOR_TOP_RIGHT_CORNER" value="15" enum="CellNeighbor"> </constant> <constant name="TERRAIN_MODE_MATCH_CORNERS_AND_SIDES" value="0" enum="TerrainMode"> </constant> diff --git a/doc/classes/Tree.xml b/doc/classes/Tree.xml index 6a65d4ff7d..b498b9bb90 100644 --- a/doc/classes/Tree.xml +++ b/doc/classes/Tree.xml @@ -96,6 +96,14 @@ Returns the column index at [code]position[/code], or -1 if no item is there. </description> </method> + <method name="get_column_expand_ratio" qualifiers="const"> + <return type="int"> + </return> + <argument index="0" name="column" type="int"> + </argument> + <description> + </description> + </method> <method name="get_column_title" qualifiers="const"> <return type="String"> </return> @@ -232,7 +240,7 @@ Returns the last pressed button's index. </description> </method> - <method name="get_root"> + <method name="get_root" qualifiers="const"> <return type="TreeItem"> </return> <description> @@ -264,12 +272,50 @@ To tell whether a column of an item is selected, use [method TreeItem.is_selected]. </description> </method> + <method name="is_column_clipping_content" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="column" type="int"> + </argument> + <description> + </description> + </method> + <method name="is_column_expanding" qualifiers="const"> + <return type="bool"> + </return> + <argument index="0" name="column" type="int"> + </argument> + <description> + </description> + </method> <method name="scroll_to_item"> <return type="void"> </return> <argument index="0" name="item" type="Object"> </argument> <description> + Causes the [Tree] to jump to the specified item. + </description> + </method> + <method name="set_column_clip_content"> + <return type="void"> + </return> + <argument index="0" name="column" type="int"> + </argument> + <argument index="1" name="enable" type="bool"> + </argument> + <description> + </description> + </method> + <method name="set_column_custom_minimum_width"> + <return type="void"> + </return> + <argument index="0" name="column" type="int"> + </argument> + <argument index="1" name="min_width" type="int"> + </argument> + <description> + Overrides the calculated minimum width of a column. It can be set to `0` to restore the default behavior. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to [member Control.size_flags_stretch_ratio]. </description> </method> <method name="set_column_expand"> @@ -283,15 +329,14 @@ If [code]true[/code], the column will have the "Expand" flag of [Control]. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to [member Control.size_flags_stretch_ratio]. </description> </method> - <method name="set_column_min_width"> + <method name="set_column_expand_ratio"> <return type="void"> </return> <argument index="0" name="column" type="int"> </argument> - <argument index="1" name="min_width" type="int"> + <argument index="1" name="ratio" type="int"> </argument> <description> - Sets the minimum width of a column. Columns that have the "Expand" flag will use their "min_width" in a similar fashion to [member Control.size_flags_stretch_ratio]. </description> </method> <method name="set_column_title"> @@ -372,6 +417,12 @@ If [code]true[/code], the tree's root is hidden. </member> <member name="rect_clip_content" type="bool" setter="set_clip_contents" getter="is_clipping_contents" override="true" default="true" /> + <member name="scroll_horizontal_enabled" type="bool" setter="set_h_scroll_enabled" getter="is_h_scroll_enabled" default="true"> + If [code]true[/code], enables horizontal scrolling. + </member> + <member name="scroll_vertical_enabled" type="bool" setter="set_v_scroll_enabled" getter="is_v_scroll_enabled" default="true"> + If [code]true[/code], enables vertical scrolling. + </member> <member name="select_mode" type="int" setter="set_select_mode" getter="get_select_mode" enum="Tree.SelectMode" default="0"> Allows single or multiple selection. See the [enum SelectMode] constants. </member> diff --git a/doc/classes/TreeItem.xml b/doc/classes/TreeItem.xml index 0256d83fea..85c9caa101 100644 --- a/doc/classes/TreeItem.xml +++ b/doc/classes/TreeItem.xml @@ -192,7 +192,7 @@ Returns [code]true[/code] if [code]expand_right[/code] is set. </description> </method> - <method name="get_first_child"> + <method name="get_first_child" qualifiers="const"> <return type="TreeItem"> </return> <description> @@ -260,7 +260,7 @@ Returns the metadata value that was set for the given column using [method set_metadata]. </description> </method> - <method name="get_next"> + <method name="get_next" qualifiers="const"> <return type="TreeItem"> </return> <description> @@ -288,7 +288,7 @@ Returns OpenType feature [code]tag[/code] of the item's text. </description> </method> - <method name="get_parent"> + <method name="get_parent" qualifiers="const"> <return type="TreeItem"> </return> <description> @@ -391,7 +391,7 @@ Returns the given column's tooltip. </description> </method> - <method name="get_tree"> + <method name="get_tree" qualifiers="const"> <return type="Tree"> </return> <description> diff --git a/doc/classes/Vector2.xml b/doc/classes/Vector2.xml index 07d09c31dc..498aefbef0 100644 --- a/doc/classes/Vector2.xml +++ b/doc/classes/Vector2.xml @@ -304,12 +304,6 @@ <method name="operator +" qualifiers="operator"> <return type="Vector2"> </return> - <description> - </description> - </method> - <method name="operator +" qualifiers="operator"> - <return type="Vector2"> - </return> <argument index="0" name="right" type="Vector2"> </argument> <description> @@ -318,12 +312,6 @@ <method name="operator -" qualifiers="operator"> <return type="Vector2"> </return> - <description> - </description> - </method> - <method name="operator -" qualifiers="operator"> - <return type="Vector2"> - </return> <argument index="0" name="right" type="Vector2"> </argument> <description> @@ -401,6 +389,18 @@ <description> </description> </method> + <method name="operator unary+" qualifiers="operator"> + <return type="Vector2"> + </return> + <description> + </description> + </method> + <method name="operator unary-" qualifiers="operator"> + <return type="Vector2"> + </return> + <description> + </description> + </method> <method name="orthogonal" qualifiers="const"> <return type="Vector2"> </return> diff --git a/doc/classes/Vector2i.xml b/doc/classes/Vector2i.xml index 930ec944ba..5f190de8ca 100644 --- a/doc/classes/Vector2i.xml +++ b/doc/classes/Vector2i.xml @@ -126,12 +126,6 @@ <method name="operator +" qualifiers="operator"> <return type="Vector2i"> </return> - <description> - </description> - </method> - <method name="operator +" qualifiers="operator"> - <return type="Vector2i"> - </return> <argument index="0" name="right" type="Vector2i"> </argument> <description> @@ -140,12 +134,6 @@ <method name="operator -" qualifiers="operator"> <return type="Vector2i"> </return> - <description> - </description> - </method> - <method name="operator -" qualifiers="operator"> - <return type="Vector2i"> - </return> <argument index="0" name="right" type="Vector2i"> </argument> <description> @@ -223,6 +211,18 @@ <description> </description> </method> + <method name="operator unary+" qualifiers="operator"> + <return type="Vector2i"> + </return> + <description> + </description> + </method> + <method name="operator unary-" qualifiers="operator"> + <return type="Vector2i"> + </return> + <description> + </description> + </method> <method name="sign" qualifiers="const"> <return type="Vector2i"> </return> diff --git a/doc/classes/Vector3.xml b/doc/classes/Vector3.xml index eb1fd5f098..1361666c18 100644 --- a/doc/classes/Vector3.xml +++ b/doc/classes/Vector3.xml @@ -318,12 +318,6 @@ <method name="operator +" qualifiers="operator"> <return type="Vector3"> </return> - <description> - </description> - </method> - <method name="operator +" qualifiers="operator"> - <return type="Vector3"> - </return> <argument index="0" name="right" type="Vector3"> </argument> <description> @@ -332,12 +326,6 @@ <method name="operator -" qualifiers="operator"> <return type="Vector3"> </return> - <description> - </description> - </method> - <method name="operator -" qualifiers="operator"> - <return type="Vector3"> - </return> <argument index="0" name="right" type="Vector3"> </argument> <description> @@ -415,6 +403,18 @@ <description> </description> </method> + <method name="operator unary+" qualifiers="operator"> + <return type="Vector3"> + </return> + <description> + </description> + </method> + <method name="operator unary-" qualifiers="operator"> + <return type="Vector3"> + </return> + <description> + </description> + </method> <method name="outer" qualifiers="const"> <return type="Basis"> </return> diff --git a/doc/classes/Vector3i.xml b/doc/classes/Vector3i.xml index 8b45a62afa..e08bafa665 100644 --- a/doc/classes/Vector3i.xml +++ b/doc/classes/Vector3i.xml @@ -134,12 +134,6 @@ <method name="operator +" qualifiers="operator"> <return type="Vector3i"> </return> - <description> - </description> - </method> - <method name="operator +" qualifiers="operator"> - <return type="Vector3i"> - </return> <argument index="0" name="right" type="Vector3i"> </argument> <description> @@ -148,12 +142,6 @@ <method name="operator -" qualifiers="operator"> <return type="Vector3i"> </return> - <description> - </description> - </method> - <method name="operator -" qualifiers="operator"> - <return type="Vector3i"> - </return> <argument index="0" name="right" type="Vector3i"> </argument> <description> @@ -231,6 +219,18 @@ <description> </description> </method> + <method name="operator unary+" qualifiers="operator"> + <return type="Vector3i"> + </return> + <description> + </description> + </method> + <method name="operator unary-" qualifiers="operator"> + <return type="Vector3i"> + </return> + <description> + </description> + </method> <method name="sign" qualifiers="const"> <return type="Vector3i"> </return> diff --git a/doc/classes/Viewport.xml b/doc/classes/Viewport.xml index 292be34a0d..bf58dc4d8c 100644 --- a/doc/classes/Viewport.xml +++ b/doc/classes/Viewport.xml @@ -36,11 +36,18 @@ Returns the 3D world of the viewport, or if none the world of the parent viewport. </description> </method> - <method name="get_camera" qualifiers="const"> + <method name="get_camera_2d" qualifiers="const"> + <return type="Camera2D"> + </return> + <description> + Returns the currently active 2D camera. Returns null if there are no active cameras. + </description> + </method> + <method name="get_camera_3d" qualifiers="const"> <return type="Camera3D"> </return> <description> - Returns the active 3D camera. + Returns the currently active 3D camera. </description> </method> <method name="get_final_transform" qualifiers="const"> @@ -60,10 +67,11 @@ <method name="get_render_info"> <return type="int"> </return> - <argument index="0" name="info" type="int" enum="Viewport.RenderInfo"> + <argument index="0" name="type" type="int" enum="Viewport.RenderInfoType"> + </argument> + <argument index="1" name="info" type="int" enum="Viewport.RenderInfo"> </argument> <description> - Returns information about the viewport from the rendering pipeline. </description> </method> <method name="get_shadow_atlas_quadrant_subdiv" qualifiers="const"> @@ -208,6 +216,9 @@ <member name="debug_draw" type="int" setter="set_debug_draw" getter="get_debug_draw" enum="Viewport.DebugDraw" default="0"> The overlay mode for test rendered geometry in debug purposes. </member> + <member name="disable_3d" type="bool" setter="set_disable_3d" getter="is_3d_disabled" default="false"> + Disable 3D rendering (but keep 2D rendering). + </member> <member name="global_canvas_transform" type="Transform2D" setter="set_global_canvas_transform" getter="get_global_canvas_transform"> The global canvas transform of the viewport. The canvas transform is relative to this. </member> @@ -347,23 +358,20 @@ <constant name="RENDER_INFO_OBJECTS_IN_FRAME" value="0" enum="RenderInfo"> Amount of objects in frame. </constant> - <constant name="RENDER_INFO_VERTICES_IN_FRAME" value="1" enum="RenderInfo"> + <constant name="RENDER_INFO_PRIMITIVES_IN_FRAME" value="1" enum="RenderInfo"> Amount of vertices in frame. </constant> - <constant name="RENDER_INFO_MATERIAL_CHANGES_IN_FRAME" value="2" enum="RenderInfo"> - Amount of material changes in frame. + <constant name="RENDER_INFO_DRAW_CALLS_IN_FRAME" value="2" enum="RenderInfo"> + Amount of draw calls in frame. </constant> - <constant name="RENDER_INFO_SHADER_CHANGES_IN_FRAME" value="3" enum="RenderInfo"> - Amount of shader changes in frame. + <constant name="RENDER_INFO_MAX" value="3" enum="RenderInfo"> + Represents the size of the [enum RenderInfo] enum. </constant> - <constant name="RENDER_INFO_SURFACE_CHANGES_IN_FRAME" value="4" enum="RenderInfo"> - Amount of surface changes in frame. + <constant name="RENDER_INFO_TYPE_VISIBLE" value="0" enum="RenderInfoType"> </constant> - <constant name="RENDER_INFO_DRAW_CALLS_IN_FRAME" value="5" enum="RenderInfo"> - Amount of draw calls in frame. + <constant name="RENDER_INFO_TYPE_SHADOW" value="1" enum="RenderInfoType"> </constant> - <constant name="RENDER_INFO_MAX" value="6" enum="RenderInfo"> - Represents the size of the [enum RenderInfo] enum. + <constant name="RENDER_INFO_TYPE_MAX" value="2" enum="RenderInfoType"> </constant> <constant name="DEBUG_DRAW_DISABLED" value="0" enum="DebugDraw"> Objects are displayed normally. diff --git a/doc/classes/VisualShaderNode.xml b/doc/classes/VisualShaderNode.xml index 9a74f2322e..199224b190 100644 --- a/doc/classes/VisualShaderNode.xml +++ b/doc/classes/VisualShaderNode.xml @@ -4,6 +4,7 @@ Base class for nodes in a visual shader graph. </brief_description> <description> + Visual shader graphs consist of various nodes. Each node in the graph is a separate object and they are represented as a rectangular boxes with title and a set of properties. Each node has also connection ports that allow to connect it to another nodes and control the flow of the shader. </description> <tutorials> <link title="VisualShaders">https://docs.godotengine.org/en/latest/tutorials/shading/visual_shaders.html</link> diff --git a/doc/classes/VisualShaderNodeCurveTexture.xml b/doc/classes/VisualShaderNodeCurveTexture.xml index 26b7b07df2..4839ceab92 100644 --- a/doc/classes/VisualShaderNodeCurveTexture.xml +++ b/doc/classes/VisualShaderNodeCurveTexture.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeCurveTexture" inherits="VisualShaderNodeResizableBase" version="4.0"> <brief_description> + Performs a [CurveTexture] lookup within the visual shader graph. </brief_description> <description> + Comes with a built-in editor for texture's curves. </description> <tutorials> </tutorials> @@ -10,6 +12,7 @@ </methods> <members> <member name="texture" type="CurveTexture" setter="set_texture" getter="get_texture"> + The source texture. </member> </members> <constants> diff --git a/doc/classes/VisualShaderNodeCurveXYZTexture.xml b/doc/classes/VisualShaderNodeCurveXYZTexture.xml new file mode 100644 index 0000000000..11cdc541bb --- /dev/null +++ b/doc/classes/VisualShaderNodeCurveXYZTexture.xml @@ -0,0 +1,20 @@ +<?xml version="1.0" encoding="UTF-8" ?> +<class name="VisualShaderNodeCurveXYZTexture" inherits="VisualShaderNodeResizableBase" version="4.0"> + <brief_description> + Performs a [CurveXYZTexture] lookup within the visual shader graph. + </brief_description> + <description> + Comes with a built-in editor for texture's curves. + </description> + <tutorials> + </tutorials> + <methods> + </methods> + <members> + <member name="texture" type="CurveXYZTexture" setter="set_texture" getter="get_texture"> + The source texture. + </member> + </members> + <constants> + </constants> +</class> diff --git a/doc/classes/VisualShaderNodeResizableBase.xml b/doc/classes/VisualShaderNodeResizableBase.xml index 9052f6854b..f42289a10e 100644 --- a/doc/classes/VisualShaderNodeResizableBase.xml +++ b/doc/classes/VisualShaderNodeResizableBase.xml @@ -1,8 +1,10 @@ <?xml version="1.0" encoding="UTF-8" ?> <class name="VisualShaderNodeResizableBase" inherits="VisualShaderNode" version="4.0"> <brief_description> + Base class for resizable nodes in a visual shader graph. </brief_description> <description> + Resizable nodes have a handle that allows the user to adjust their size as needed. </description> <tutorials> </tutorials> diff --git a/doc/classes/VoxelGIData.xml b/doc/classes/VoxelGIData.xml index 88a0411e2b..f613002233 100644 --- a/doc/classes/VoxelGIData.xml +++ b/doc/classes/VoxelGIData.xml @@ -66,12 +66,6 @@ </method> </methods> <members> - <member name="anisotropy_strength" type="float" setter="set_anisotropy_strength" getter="get_anisotropy_strength" default="0.5"> - </member> - <member name="ao" type="float" setter="set_ao" getter="get_ao" default="0.0"> - </member> - <member name="ao_size" type="float" setter="set_ao_size" getter="get_ao_size" default="0.5"> - </member> <member name="bias" type="float" setter="set_bias" getter="get_bias" default="1.5"> </member> <member name="dynamic_range" type="float" setter="set_dynamic_range" getter="get_dynamic_range" default="4.0"> diff --git a/doc/classes/Window.xml b/doc/classes/Window.xml index 6ae5a5f449..c8efaca1fc 100644 --- a/doc/classes/Window.xml +++ b/doc/classes/Window.xml @@ -19,6 +19,13 @@ <description> </description> </method> + <method name="get_contents_minimum_size" qualifiers="const"> + <return type="Vector2"> + </return> + <description> + Returns the combined minimum size from the child [Control] nodes of the window. + </description> + </method> <method name="get_flag" qualifiers="const"> <return type="bool"> </return> @@ -340,7 +347,7 @@ </member> <member name="theme" type="Theme" setter="set_theme" getter="get_theme"> </member> - <member name="theme_custom_type" type="StringName" setter="set_theme_custom_type" getter="get_theme_custom_type" default="&"""> + <member name="theme_type_variation" type="StringName" setter="set_theme_type_variation" getter="get_theme_type_variation" default="&"""> </member> <member name="title" type="String" setter="set_title" getter="get_title" default=""""> </member> diff --git a/doc/classes/float.xml b/doc/classes/float.xml index f75c130039..585c847d22 100644 --- a/doc/classes/float.xml +++ b/doc/classes/float.xml @@ -145,16 +145,6 @@ <method name="operator +" qualifiers="operator"> <return type="float"> </return> - <description> - Unary plus operator. Doesn't have any effect. - [codeblock] - var a = +2.5 # a is 2.5. - [/codeblock] - </description> - </method> - <method name="operator +" qualifiers="operator"> - <return type="float"> - </return> <argument index="0" name="right" type="float"> </argument> <description> @@ -173,17 +163,6 @@ <method name="operator -" qualifiers="operator"> <return type="float"> </return> - <description> - Unary minus operator. Negates the number. - [codeblock] - var a = -2.5 # a is -2.5. - print(-a) # 2.5 - [/codeblock] - </description> - </method> - <method name="operator -" qualifiers="operator"> - <return type="float"> - </return> <argument index="0" name="right" type="float"> </argument> <description> @@ -308,6 +287,18 @@ Returns [code]true[/code] if this [float] is greater than or equal to the given [int]. </description> </method> + <method name="operator unary+" qualifiers="operator"> + <return type="float"> + </return> + <description> + </description> + </method> + <method name="operator unary-" qualifiers="operator"> + <return type="float"> + </return> + <description> + </description> + </method> </methods> <constants> </constants> diff --git a/doc/classes/int.xml b/doc/classes/int.xml index b0ad963998..95918c9007 100644 --- a/doc/classes/int.xml +++ b/doc/classes/int.xml @@ -126,21 +126,21 @@ </description> </method> <method name="operator *" qualifiers="operator"> - <return type="float"> + <return type="int"> </return> - <argument index="0" name="right" type="float"> + <argument index="0" name="right" type="int"> </argument> <description> - Multiplies an [int] and a [float]. The result is a [float]. + Multiplies two [int]s. </description> </method> <method name="operator *" qualifiers="operator"> - <return type="int"> + <return type="float"> </return> - <argument index="0" name="right" type="int"> + <argument index="0" name="right" type="float"> </argument> <description> - Multiplies two [int]s. + Multiplies an [int] and a [float]. The result is a [float]. </description> </method> <method name="operator *" qualifiers="operator"> @@ -204,16 +204,6 @@ </description> </method> <method name="operator +" qualifiers="operator"> - <return type="int"> - </return> - <description> - Unary plus operator. Doesn't have any effect. - [codeblock] - var a = +1 # a is 1. - [/codeblock] - </description> - </method> - <method name="operator +" qualifiers="operator"> <return type="float"> </return> <argument index="0" name="right" type="float"> @@ -232,17 +222,6 @@ </description> </method> <method name="operator -" qualifiers="operator"> - <return type="int"> - </return> - <description> - Unary minus operator. Negates the number. - [codeblock] - var a = -1 # a is -1. - print(-a) # 1 - [/codeblock] - </description> - </method> - <method name="operator -" qualifiers="operator"> <return type="float"> </return> <argument index="0" name="right" type="float"> @@ -414,6 +393,18 @@ [/codeblock] </description> </method> + <method name="operator unary+" qualifiers="operator"> + <return type="int"> + </return> + <description> + </description> + </method> + <method name="operator unary-" qualifiers="operator"> + <return type="int"> + </return> + <description> + </description> + </method> <method name="operator |" qualifiers="operator"> <return type="int"> </return> diff --git a/doc/tools/makerst.py b/doc/tools/makerst.py index 1c6055f8ca..9be7751d3d 100755 --- a/doc/tools/makerst.py +++ b/doc/tools/makerst.py @@ -350,6 +350,9 @@ def main(): # type: () -> None pattern = re.compile(args.filter) + # Create the output folder recursively if it doesn't already exist. + os.makedirs(args.output, exist_ok=True) + for class_name, class_def in state.classes.items(): if args.filter and not pattern.search(class_def.filepath): continue @@ -358,6 +361,8 @@ def main(): # type: () -> None if not state.errored: print("No errors found.") + if not args.dry_run: + print("Wrote reStructuredText files for each class to: %s" % args.output) else: print("Errors were found in the class reference XML. Please check the messages above.") exit(1) @@ -837,7 +842,7 @@ def rstize_text(text, state): # type: (str, State) -> str inside_code = True elif cmd == "gdscript": tag_depth += 1 - tag_text = "\n .. code-tab:: gdscript GDScript\n" + tag_text = "\n .. code-tab:: gdscript\n" inside_code = True elif cmd == "csharp": tag_depth += 1 |